!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@2a9980c"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d8675e12-77e9-4c59-a918-2830e380d05f",e._sentryDebugIdIdentifier="sentry-dbid-d8675e12-77e9-4c59-a918-2830e380d05f")}catch(e){}}(),(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["89244"],{59833:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={coverTheme:"coverTheme-PJLqY5"}},53170:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={grabber:"grabber-thsQdT"}},24311:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={input:"input-y4v6N4",textarea:"textarea-GbEjRX",autogrowing:"autogrowing-_ipn9Y",inputText:"inputText-pV_yWb",inputWithButtonWrapper:"inputWithButtonWrapper-qFTACT",primary:"primary-MUgbK6","secondary-outline":"secondary-outline-JXafwf",secondaryOutline:"secondary-outline-JXafwf",inputWithButtonInput:"inputWithButtonInput-KDznfS",start:"start-p226EZ",end:"end-LEvC6s",segmentedInputContainer:"segmentedInputContainer-BnsX3X",inputWithButtonButton:"inputWithButtonButton-SsgPne",focus:"focus-nqjos7",leading:"leading-hoxUwz",trailing:"trailing-cHz8Pv",error:"error-QSGsmD",disabled:"disabled-bZ2Wej",readOnly:"readOnly-yVYuPy",wrapper:"wrapper-JJvHsG",position_leading:"position_leading-_w7oUS",positionLeading:"position_leading-_w7oUS",size_sm:"size_sm-nn6jzC",sizeSm:"size_sm-nn6jzC",size_md:"size_md-UKpzt4",sizeMd:"size_md-UKpzt4",position_trailing:"position_trailing-kaOmCa",positionTrailing:"position_trailing-kaOmCa",unstyled:"unstyled-IJLUJU"}},12215:function(e){var t,n;t=function(){function e(){for(var e=0,t={};e1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a,s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*o.expires),o.expires=s}o.expires=o.expires?o.expires.toUTCString():"";try{a=JSON.stringify(i),/^[\{\[]/.test(a)&&(i=a)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(a={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,p=0;pT,Route:()=>k,Router:()=>E,default:()=>P,exec:()=>a,getCurrentUrl:()=>h,route:()=>g,subscribers:()=>f});var r=n(50172),i={};function o(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){var r,o=/(?:\?([^#]*))?(#.*)?$/,a=e.match(o),s={};if(a&&a[1])for(var l=a[1].split("&"),c=0;ch.indexOf("?")||g)){r=!1;break}if(s[m]=decodeURIComponent(_),g||b){s[m]=e.slice(f).map(decodeURIComponent).join("/");break}}else if(t[f]!==e[f]){r=!1;break}return(!0===n.default||!1!==r)&&s}function s(e,t){return e.rankt.rank?-1:e.index-t.index}function l(e,t){var n;return e.index=t,e.rank=(n=e).props.default?0:u(n.props.path).map(c).join(""),e.props}function u(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function c(e){return":"==e.charAt(0)?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}var d=null,p=[],f=[],m={};function h(){var e;return""+((e=d&&d.location?d.location:d&&d.getCurrentLocation?d.getCurrentLocation():"undefined"!=typeof location?location:m).pathname||"")+(e.search||"")}function g(e,t){var n,r;return void 0===t&&(t=!1),"string"!=typeof e&&e.url&&(t=e.replace,e=e.url),function(e){for(var t=p.length;t--;)if(p[t].canRoute(e))return!0;return!1}(e)&&(n=e,r=t?"replace":"push",d&&d[r]?d[r](n):"undefined"!=typeof history&&history[r+"State"]&&history[r+"State"](null,null,n)),b(e)}function b(e){for(var t=!1,n=0;n0},t.prototype.routeTo=function(e){this.setState({url:e});var t=this.canRoute(e);return this.updating||this.forceUpdate(),t},t.prototype.componentWillMount=function(){p.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var e=this;d&&(this.unlisten=d.listen(function(t){e.routeTo(""+(t.pathname||"")+(t.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),p.splice(p.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(e,t,n){return e.filter(l).sort(s).map(function(e){var i=a(t,e.props.path,e.props);if(i){if(!1!==n){var s={url:t,matches:i};return o(s,i),delete s.ref,delete s.key,(0,r.cloneElement)(e,s)}return e}}).filter(Boolean)},t.prototype.render=function(e,t){var n=e.children,i=e.onChange,o=t.url,a=this.getMatchingChildren((0,r.toChildArray)(n),o,!0),s=a[0]||null,l=this.previousUrl;return o!==l&&(this.previousUrl=o,"function"==typeof i&&i({router:this,url:o,previous:l,active:a,current:s})),s},t}(r.Component),T=function(e){return(0,r.createElement)("a",o({onClick:y},e))},k=function(e){return(0,r.createElement)(e.component,e)};E.subscribers=f,E.getCurrentUrl=h,E.route=g,E.Router=E,E.Route=k,E.Link=T,E.exec=a;let P=E},12550:function(e,t,n){var r=n(25814),i=n(60471);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},41814:function(e,t,n){"use strict";n.d(t,{r:()=>a});var r=n(4006),i=n(10996),o=n(59833);function a(e){let{children:t}=e;return(0,r.Y)(i.NP,{theme:o.A.coverTheme,children:t})}},23623:function(e,t,n){"use strict";n.d(t,{a:()=>o});var r=n(4006),i=n(10996);let o=e=>{let{children:t,disable:n}=e;return n?(0,r.Y)(r.FK,{children:t}):(0,r.Y)(i.NP,{theme:"dark-theme",children:t})}},9266:function(e,t,n){"use strict";n.d(t,{Ay:()=>$,Be:()=>G});var r=n(69277),i=n(70408),o=n(79785),a=n(4006),s=n(32485),l=n.n(s),u=n(12215),c=n(87677),d=n(48697),p=n(17402),f=n(41814),m=n(97432),h=n(33764),g=n(86160),b=n(84605),_=n(53989),y=n(85478),v=n(34835),w=n(39520),S=n(86500),E=n(53928),T=n(68349),k=n(89490),P=n(35369),A=n(76977),I=n(45974),R=n(63136),C=n(54754),N=n(21398),U=n(11510),x=n(61554),M=n(49095),D=n(28194),L=n(56262),F=n(39318),B=n(41086),O=n(82776),Y=n(57324),W=n(82121);function H(){let e=(0,o._)(["By ",""]);return H=function(){return e},e}let q="intro_popup_last_hidden_at";function G(e){let{includePrice:t=!0,includeRankingDetail:r=!0,includeByline:i=!0,includeBadge:o=!1,rankingDetailOverrideText:s=null,language:l="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=l||e.language,{iTemplate:c}=I18N.i(l||e.language),d=(0,O.getByLine)(e),p=null;return r&&(p=s||(e.rankingDetailByLanguage&&"en"!==u&&e.rankingDetailByLanguage[u]?e.rankingDetailByLanguage[u].rankingDetail:e.rankingDetail)),(0,a.FD)(C.r,{separator:" \xb7 ",children:[i&&d?(0,a.FD)(A.pT,{inline:!0,gap:4,children:[c(H(),d),o&&(0,a.Y)(N.Ic,{module:"../user_badge/UserBadge",resolve:e=>e.UserStatusSymbols,onRequest:()=>Promise.resolve().then(n.bind(n,49095)),size:"sm",tier:e.author_bestseller_tier,userId:e.author_id,whileLoading:e.author_bestseller_tier?(0,a.Y)(A.pT,{alignItems:"center",children:(0,a.Y)(M.UserStatusSymbols,{size:"sm",tier:e.author_bestseller_tier})}):(0,a.Y)(a.FK,{})})]}):null,p,t&&function(e,t){let{language:n}=t,r=!e.disable_monthly_subscriptions&&e.plans&&e.plans.filter(e=>"month"===e.interval).sort((e,t)=>e.amount-t.amount)[0],i=!e.disable_annual_subscriptions&&e.plans&&e.plans.filter(e=>"year"===e.interval).sort((e,t)=>e.amount-t.amount)[0],o=r||i;if(o)return(0,D.xB)(o,{language:n})}(e,{language:l})]})}let $=(0,p.memo)(e=>{var t,n;let{publication:o,user:s,post:l,onHide:c,freeSignup:d,hidden:m,alwaysShow:h,showOnMount:g,freeSignupEmail:b,email:_,referralCode:w,blurbs:E,launchWelcomePage:k}=e,{getConfigFor:P}=(0,y.mJ)(),A=P("welcome_page_query_params"),[I,R]=(0,p.useState)(!1),[C,N]=(0,p.useState)(!!(k||h)),U=(e,t)=>{var n;return A&&null!=(n=(0,B.y)(e))?n:t},[x]=(0,p.useState)(U("no_skip",void 0)),[M]=(0,p.useState)(U("no_blurbs",!1)),[D]=(0,p.useState)(()=>{let e=U("hero_text",void 0);return e?decodeURIComponent(e):void 0});(0,p.useEffect)(()=>{let e=e=>{"Escape"===e.key&&G(!0)};if(C)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[C]),(0,p.useEffect)(()=>{if(k&&!$()||H()){if("undefined"!=typeof window&&(0,T.iQ)(document.documentElement,"has-intro-popup"),(0,B.y)("r")){let e=(0,B.y)("r");s&&(0,O.userReferralKey)(s)===e||(0,S.u4)(S.qY.COVER_PAGE_REFERRAL_VISIT,{referral_key:e,referring_user:(0,O.userFromReferralKey)(e)})}W()}else c&&c(),(0,v.E)({hide_intro_popup:!0}),"undefined"!=typeof window&&(0,T.vy)(document.documentElement,"has-intro-popup"),!h&&"undefined"!=typeof window&&(0,T.nB)(document.documentElement,"show-intro-popup")&&(0,T.vy)(document.documentElement,"show-intro-popup");return["no_skip","no_blurbs","hero_text","hide_intro_popup"].forEach(e=>(0,T.qm)(e)),()=>{"undefined"!=typeof window&&(0,T.vy)(document.documentElement,"has-intro-popup"),G(!0)}},[]);let W=()=>{"undefined"!=typeof window&&((0,T.iQ)(document.documentElement,"show-intro-popup"),(0,S.u4)(S.qY.COVER_PAGE_SHOWN,{has_cover_photo:!!o.cover_photo_url,has_free_signup_email:!!b,has_free_signup:!!d,functional_version:!0,launch_welcome_page:k,always_show:h,hidden:m,screen_height:"undefined"!=typeof window?window.innerHeight:null,screen_width:"undefined"!=typeof window?window.innerWidth:null}),h||(0,S.b8)("pageview",{dl:"".concat(document.location.origin,"/welcome").concat(document.location.search)})),N(!0)},H=(0,p.useCallback)(()=>!!h||!m&&(!!g||!!I||!$()&&!!(null==l||l&&!(0,L.isPaidAudience)(l.audience))&&!d&&(!s||!s.is_free_subscribed&&!s.is_subscribed)),[h,d,m,l,g,I,s]),G=e=>{e||(V(),setTimeout(()=>{(0,v.E)({hide_intro_popup:!0})},500)),c&&c(),!h&&"undefined"!=typeof window&&(0,T.nB)(document.documentElement,"show-intro-popup")&&(0,T.vy)(document.documentElement,"show-intro-popup")},$=()=>{let e=u.get(q);if(e&&new Date(e)>new Date(Date.now()-864e5))return!0;return!1},V=()=>{u.set(q,new Date().toJSON(),{expires:3650})},z=async e=>{(0,S.u4)(S.qY.COVER_PAGE_EMAIL_SUBMITTED,{is_paying_sub:!!e.body.prompt_to_login,has_plans:!!o.plans,functional_version:!0,homepage_type:o.homepage_type}),V(),R(!0),(0,v.E)({freeSignup:!0,freeSignupEmail:e.body.email});let t=h?"/":document.location.href;e.body.prompt_to_login?setTimeout(()=>{document.location.href=(0,F.yRP)("/account/login",{redirect:t,email:e.body.email})},30):document.location.href=(0,F.yRP)("/subscribe",(0,r._)((0,i._)((0,r._)({next:t,later:!0,just_signed_up:!0},e.body.subscription_id&&{subscription_id:e.body.subscription_id},e.body.referral_token&&{referral_token:e.body.referral_token}),{requires_confirmation:e.body.requires_confirmation?"true":"",utm_source:Y.VU.coverPage,email:e.body.email,skip_redirect_check:!0}),o.section&&{specific_section_ids:String(o.section.id)}))};return C&&H()?(0,a.Y)(f.r,{children:(0,a.Y)("div",{className:"intro-popup",children:(0,a.Y)("div",{className:"intro-popup-page",children:(0,a.Y)(j,{source:"cover_page",email:_,pub:o,user:null!=s?s:null,freeSignup:d,freeSignupEmail:b,referralCode:w,forceSignup:null!=(n=null!=(t=(0,B.y)("force"))?t:x)?n:void 0,onMaybeLater:x?void 0:()=>{(0,S.u4)(S.qY.COVER_PAGE_MAYBE_LATER_CLICKED,{functional_version:!0}),G()},onFreeSignup:z,onSubscribeInApp:()=>G(),blurbs:E,hideBlurbs:M,overrideSubtitle:D})})})}):null}),j=e=>{let{autoFocus:t=!0,pub:i,user:o,email:s,freeSignup:u,freeSignupEmail:d,referralCode:f,source:h,forceSignup:v,submitButtonText:w,onMaybeLater:T,onFreeSignup:I,onSubscribeInApp:C,blurbs:M,hideBlurbs:D,overrideSubtitle:L}=e,O=(0,p.useContext)(_.l9),H=(0,U.Iu)(),{iString:q}=(0,b.GO)(),{getConfigFor:G}=(0,y.mJ)(),$=(0,B.y)("referralCode"),j=(0,B.y)("refSource"),K=q("Learn More"),X=O.getSettingFor("welcome_page_opt_out_text"),Z=G("welcome_page_no_opt_out")?null:"No thanks"===X?q("No thanks"):null!=X?X:q("No thanks"),Q=(0,F.DNs)(i,{params:(0,r._)({utm_source:Y.VU.subscribeEmail,utm_content:Y.fL.learnMore},$&&{referralCode:$},j&&{refSource:j})});(0,p.useEffect)(()=>{"subscribe_page"===h&&(0,S.u4)(S.qY.SUBSCRIBE_EMAIL_FULL_SCREEN_SHOWN,{functional_version:!0}),(0,S.u4)(S.qY.FULL_EMAIL_FORM_SHOWN,{source:h,functional_version:!0}),(0,E.jN)(E.ti.TRACK_REGISTRATION_SHOWN)},[h]);let ee=M&&!D?M.filter(e=>""!=e.description):[],et=!v&&!i.invite_only&&H&&!(null==o?void 0:o.reader_installed_at)&&G("welcome_page_app_button");return(0,a.FD)("div",{className:"full-email-form",children:[(0,a.FD)("div",{className:"vertically-centered",children:[T&&!i.invite_only&&(0,a.Y)(z,{onClick:T}),(0,a.Y)(V,{pub:i,overrideSubtitle:L}),!i.invite_only||o&&o.is_free_subscribed?(0,a.FD)(a.FK,{children:[(0,a.Y)(A.Ye,{justifyContent:"center",style:{width:"100%"},children:(0,a.FD)(A.I1,{gap:4,style:{width:"100%",maxWidth:"380px"},children:[(0,a.Y)(A.I1,{className:W.A.emailFormContainer,justifyContent:"center",alignItems:"center",children:(0,a.Y)(m.A,{email:s,isWelcomePageColor:!0,freeSignup:u,freeSignupEmail:d,pub:i,referralCode:f,source:h,submitButtonText:w,user:o,onConfirmationRequired:"enabled"===i.payments_state?()=>null:void 0,onSuccess:I||(()=>document.location.href="proxy.php?url=https%3A%2F%2Fsubstackcdn.com%2F"),autoFocus:t})}),(0,a.Y)(k.az,{paddingX:{mobile:16,desktop:0},paddingTop:16,className:W.A.tosText,children:(0,a.Y)(x.U,{includeCheckbox:!1,addSubscribePreamble:!0,color:"secondary",textAlign:"center",pub:i})})]})}),!v&&(T?Z?(0,a.FD)(P.$n,{priority:"quaternary",className:W.A.maybeLater,onClick:T,"data-testid":"maybeLater",children:[Z,(0,a.Y)(c.A,{size:20})]}):null:(0,a.FD)(P.$n,{priority:"quaternary",className:W.A.maybeLater,href:Q,localNavigation:!1,children:[K,(0,a.Y)(c.A,{size:20})]}))]}):(0,a.Y)(N.Ic,{onRequest:()=>Promise.all([n.e("85929"),n.e("60273")]).then(n.bind(n,66312)),resolve:e=>e.InviteActions,module:"./InviteActions",pub:i,user:o,freeSignupEmail:d}),!!(null==ee?void 0:ee.length)&&(0,a.Y)("div",{className:"blurb-buffer"}),!!(null==ee?void 0:ee.length)&&(0,a.Y)(A.Ye,{className:"blurbs",gap:20,children:ee.map(e=>(0,a.FD)(A.I1,{gap:8,className:"blurb",children:[(0,a.Y)(R.EY.B4,{className:l()("blurb-text",W.A.blurbText),children:(0,a.Y)(J,{text:"“".concat(e.description,"”")})}),(0,a.FD)(R.EY.B4,{weight:"semibold",className:l()("blurb-text",W.A.blurbText),children:[e.author_name||e.recommendingPublication.email_from_name||e.recommendingPublication.copyright,", ",(0,a.Y)("a",{href:(0,F.$_T)(e.recommendingPublication),children:e.recommendingPublication.name})]})]}))})]}),et&&(0,a.Y)(g.T,{publication:i,user:o,email:s,onSubscribeSuccess:C})]})},V=e=>{let{pub:t,overrideSubtitle:n}=e,{getSettingFor:i}=(0,_.Pu)(),{language:o}=(0,b.GO)(),{title:s,subtitle:u,logoUrl:c,coverPhotoUrl:d,hideTitle:p,hideSubtitle:f}=((e,t)=>{let n,r,i,o,a,s,{getConfigFor:l}=(0,y.mJ)();if(l("section_specific_welcome_pages")&&e.section){var u;n=e.section.name,r=e.section.description,i=null!=(u=e.section.logo_url)?u:e.logo_url,a=!!((o=e.section.cover_photo_url)&&e.section.hide_intro_title),s=!!(o&&e.section.hide_intro_subtitle)}else n=e.name,r=e.hero_text,i=e.logo_url,a=!!((o=e.cover_photo_url)&&e.hide_intro_title),s=!!(o&&e.hide_intro_subtitle);return t&&(r=t),{title:n,subtitle:r,logoUrl:i,coverPhotoUrl:o,hideTitle:a,hideSubtitle:s}})(t,n),m=i("display_welcome_page_details"),g=d&&(0,F.d4Y)(d);return(0,a.FD)(a.FK,{children:[d?(0,a.Y)(h.o,{className:"publication-cover-photo",src:d,imageProps:{quality:"auto:best"},maxWidth:1360,loading:"eager",style:(0,r._)({},g&&g.width&&{height:"min(35vh, ".concat(680*g.height/g.width,"px)")})}):c&&(0,a.Y)(k.az,{paddingBottom:32,"data-testid":"intro-popup-logo",children:(0,a.Y)(I.Nq,{logoUrl:c,size:88})}),!p&&(0,a.Y)("h1",{className:l()("publication-name",{"no-logo":!c,"with-cover":d},W.A.balancedText),children:s}),!f&&u&&(0,a.Y)("p",{className:l()("publication-tagline with-cover",{verbose:!0,"with-cover":d},W.A.balancedText),children:u}),(0,a.Y)("div",{className:"publication-meta",children:G(t,{includePrice:!1,includeBadge:!0,rankingDetailOverrideText:t.rankingDetailFreeSubscriberCount,includeRankingDetail:!!m,language:o})})]})},z=e=>{let{onClick:t}=e;return(0,a.Y)(P.K0,{onClick:t,"aria-label":"Close","data-testid":"close-welcome-modal",priority:"tertiary",className:W.A.closeWelcomeModal,children:(0,a.Y)(d.A,{size:20})})},J=e=>{let{text:t}=e,{truncatedText:n,measureRef:r}=(0,w.L)({text:t,truncationRules:[{minLines:5,truncateTo:4}],ellipsesText:"...”"}),i=n?"".concat(n,"...”"):t;return(0,a.FD)("div",{style:{position:"relative"},children:[(0,a.Y)("div",{children:i}),(0,a.Y)("div",{ref:r,style:{visibility:"hidden",position:"absolute",width:"100%"}})]})}},34206:function(e,t,n){"use strict";n.d(t,{Ay:()=>S,Me:()=>b,Oo:()=>_,YV:()=>g});var r=n(99851),i=n(69277),o=n(70408),a=n(32641),s=n(4006),l=n(32485),u=n.n(l),c=n(17402),d=n(84565),p=n(86500),f=n(94729),m=n(63136),h=n(82776);function g(e,t){if("undefined"==typeof window||void 0===window.Stripe)return null;let n={};return t&&t.stripe_user_id?h.NO_PLATFORM_CUSTOMER_CLONE_COUNTRIES.includes(t.stripe_country)&&(n.stripeAccount=t.stripe_user_id):console.warn("No publication passed for Stripe connection"),window.Stripe(e,n)}function b(e){return e.elements({locale:window._preloads&&window._preloads.language||"auto"}).create("card",{style:{base:{fontSize:"14px",lineHeight:"40px",fontFamily:'-apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'}},disableLink:!0})}class _ extends c.Component{componentDidMount(){!this.props.disabled&&(this.props.element&&this.props.element.mount(this.elementContainer),this.props.addressElement&&this.props.addressElement.mount(this.addressContainer))}componentDidUpdate(e){this.props.disabled||(this.props.element&&!e.element&&this.props.element.mount(this.elementContainer),this.props.addressElement&&!e.addressElement&&this.props.addressElement.mount(this.addressContainer))}componentWillUnmount(){try{this.props.element&&this.props.element.unmount(this.elementContainer),this.props.addressElement&&this.props.addressElement.unmount(this.addressContainer)}catch(e){}}render(){let{className:e,element:t,isPaymentElement:n,addressElement:r,disabled:i}=this.props;return t||n?(0,s.FD)("div",{className:u()("fancy-stripe",e,{"payment-element":n}),children:[r&&(0,s.Y)("div",{ref:this.assignAddressContainer,style:{paddingBottom:"24px"}}),(0,s.Y)("div",{ref:this.assignElementContainer}),i&&(0,s.Y)(m.EY.B4,{translated:!0,color:"error",children:"This type of purchase is currently unavailable in your region."})]}):null}constructor(...e){super(...e),(0,r._)(this,"elementContainer",void 0),(0,r._)(this,"addressContainer",void 0),(0,r._)(this,"assignElementContainer",e=>{this.elementContainer=e}),(0,r._)(this,"assignAddressContainer",e=>{this.addressContainer=e})}}class y extends c.Component{async componentDidMount(){let e=!1;if(this.state.paymentRequest){try{let t=await this.state.paymentRequest.canMakePayment();t&&t.applePay&&(e=!0)}catch(e){console.error(e)}(0,p.u4)(p.qY.APPLE_PAY_SETUP_FINISHED,{success:e})}if(await this.setState({canMount:e}),e){if(this.button||await new Promise(e=>setTimeout(e,0)),!this.state.stripeButton)return void console.error("stripeButton not ready");if(this.state.stripeButton.mount(this.button),!this.state.paymentRequest)return void console.error("paymentRequest not ready");this.state.paymentRequest.on("token",e=>this.onTokenReceived(e)),this.state.paymentRequest.update({currency:this.props.plan.currency,total:this.getPaymentTotal()})}else this.props.onVisibilityChanged&&this.props.onVisibilityChanged(!1)}componentDidUpdate(e){let t=!1;for(let i of["pub","plan","quantity","coupon","notRecurring","variableAmount"]){var n,r;if(e[i]!==this.props[i]||"coupon"===i&&e[i]&&(null==(n=e[i])?void 0:n.loading)&&(!this.props[i]||!(null==(r=this.props[i])?void 0:r.loading))){t=!0;break}}t&&this.state.paymentRequest&&this.state.paymentRequest.update({currency:this.props.plan.currency,total:this.getPaymentTotal()})}componentWillUnmount(){if(this.state.paymentRequest&&this.state.paymentRequest.off("token"),this.state.stripeButton)try{this.state.stripeButton.unmount(this.button)}catch(e){}}async onTokenReceived(e){(0,p.u4)(p.qY.APPLE_PAY_ATTEMPED);try{if(!this.props.onSuccess)return void console.error("No onSuccess handler for Apple Pay");await this.props.onSuccess({email:e.payerEmail,name:e.payerName,stripe_token:e.token}),e.complete("success"),(0,p.u4)(p.qY.APPLE_PAY_SUCCEEDED)}catch(t){console.error("Apple Pay submission failed:",e,t),e.complete("fail"),(0,p.u4)(p.qY.APPLE_PAY_FAILED,{reason:t.message})}}getPaymentTotal(){var e,t,n,r;let i,{pub:o,plan:a,quantity:s,coupon:l,notRecurring:u,variableAmount:c}=this.props,d=0,p=Math.max(0,("trial_period_days"in a?a.trial_period_days:null)||0,l&&!l.error&&!l.loading&&l.trial_period_days||0,o.trial_end_override&&Math.ceil((o.trial_end_override-Date.now()/1e3)/60/60/24));u&&(p=0);let f=("metadata"in a&&(null==(e=a.metadata)?void 0:e.founding)?null!=(t=c||a.amount)?t:0:null!=(n=a.amount)?n:0)*(s||1),m=f;return l&&!l.error&&!l.loading&&(l.percent_off?m=Math.round(m*(1-(l.percent_off_precise||l.percent_off)/100)):l.amount_off&&(m=Math.max(0,m-l.amount_off)),m<=0&&(m=f,"once"===l.duration?"year"===a.interval?d+=12*a.interval_count:d+=a.interval_count:"repeating"===l.duration&&(d+=null!=(r=l.duration_in_months)?r:0))),u?i="one-time":(i="".concat(this.props.plan.interval,"ly"),this.props.quantity>1&&(i+=" per person"),d?(p>15&&(d+=Math.floor(p/30)),i+=" with ".concat(d,"-month trial")):p&&(i+=" with ".concat(p,"-day trial"))),{label:i,amount:m}}render(){var e;let{children:t,className:n,error:r}=this.props,{canMount:i}=null!=(e=this.state)?e:{};return void 0===i||i||"undefined"==typeof window?(0,s.FD)("div",{className:"apple-pay-parent-container",children:[i?(0,s.Y)("div",{className:"apple-pay-element ".concat(n||""),ref:this.assignButton}):(0,s.Y)("p",{className:"apple-pay-loader ".concat(n||""),children:"Loading…"}),r&&(0,s.Y)("div",{className:"error",children:r}),t]}):null}constructor(e,t){if(super(e,t),(0,r._)(this,"button",void 0),(0,r._)(this,"assignButton",e=>{this.button=e}),e.stripe&&e.pub.stripe_country){(0,p.u4)(p.qY.APPLE_PAY_SETUP_STARTED);try{const t=e.stripe.paymentRequest({country:this.props.pub.stripe_country,currency:this.props.plan.currency,total:this.getPaymentTotal(),requestPayerName:!0,requestPayerEmail:!0}),n=e.stripe.elements().create("paymentRequestButton",{paymentRequest:t});this.state={paymentRequest:t,stripeButton:n}}catch(e){console.error(e),(0,p.u4)(p.qY.APPLE_PAY_SETUP_FINISHED,{success:!1})}}}}class v extends c.Component{render(){let e=this.props,{children:t,ref:n,defaultValue:r}=e,o=(0,a._)(e,["children","ref","defaultValue"]);return this.state,(0,s.FD)("div",{className:"fancy-input",children:[(0,s.Y)("input",(0,i._)({ref:this.assignInput,defaultValue:r},o)),t]})}blur(){this._input&&this._input.blur()}constructor(...e){super(...e),(0,r._)(this,"_input",void 0),(0,r._)(this,"assignInput",e=>{this._input=e})}}class w extends c.Component{getInputs(){let e=[];if(this.base)for(let t of Array.from(this.base.getElementsByTagName("*")))["INPUT","TEXTAREA","SELECT"].includes(t.nodeName)&&t.getAttribute("name")&&"g-recaptcha-response"!==t.id&&e.push(t);return e}resetErrors(){this.setState({_paramErrors:{},_otherErrors:[]})}clear(){for(let e of(this.resetErrors(),this.getInputs()))e.blur&&e.blur(),"checkbox"===e.type?e.checked=!1:"select"===e.type?e.selectedIndex=-1:"radio"===e.type?e.checked=!1:"target"in e&&e.target?e.target.value="":e.value=""}handleStripeChange(e){let{error:t}=e;t?this.setState({_stripeError:t.message}):this.setState({_stripeError:null})}componentDidMount(){this._mountTime=new Date,this._stripeCardOrPaymentElement&&this._stripeCardOrPaymentElement.addEventListener("change",e=>this.handleStripeChange(e))}componentDidUpdate(e){let{country:t,currency:n,email:r,name:o,pub:a,stripeClientSecret:s,stripeElementAppearance:l,themeVariables:u,useStripePaymentElement:c,enableLink:d}=this.props;if(c){var p,f;if(e.useStripePaymentElement||(null==(p=this._stripeCardOrPaymentElement)||p.destroy(),this._stripeCardOrPaymentElement=null),s!==e.stripeClientSecret)if(s){this.setState({loading:!0});let e=this.props.isPlatformCustomer?this._stripe:this._connectedStripe;if(!e)return void console.error("Stripe instance not available in componentDidUpdate");({elements:this._stripeElements,addressElement:this._stripeAddressElement,paymentElement:this._stripeCardOrPaymentElement}=function(e,t){let{withAddressElement:n=!1,currency:r,email:o,name:a,country:s,stripeElementAppearance:l={},themeVariables:{color_theme_accent:u,color_theme_bg_contrast_1:c,print_on_pop:d,print_on_web_bg_color:p,print_secondary_on_web_bg_color:f}={},enableLink:m=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h={clientSecret:t,currency:r,appearance:(0,i._)({theme:"flat",variables:{borderRadius:"8px",colorBackground:c||void 0,colorPrimary:u||"rgb(255, 103, 25)",accessibleColorOnColorPrimary:d||void 0,colorText:p||void 0,colorTextPlaceholder:f||void 0,colorTextSecondary:f||void 0}},l),locale:window._preloads&&window._preloads.language||"auto"},g=e.elements(h);return{elements:g,addressElement:n?g.create("address",{mode:"billing",defaultValues:{name:a,address:{country:s}}}):void 0,paymentElement:g.create("payment",{layout:{type:"tabs",defaultCollapsed:!1},defaultValues:{billingDetails:{email:o,name:a,address:{country:s}}},wallets:{link:m?"auto":"never"},terms:{card:"never",applePay:"never",googlePay:"never"}})}}(e,s,{withAddressElement:(null==a?void 0:a.stripe_country)==="IN",currency:n,email:r,name:null!=o?o:void 0,country:t,stripeElementAppearance:l,themeVariables:u,enableLink:d})),this.setState({loading:!1})}else e.stripeClientSecret&&(null==(f=this._stripeCardOrPaymentElement)||f.destroy(),this._stripeCardOrPaymentElement=null)}}componentWillUnmount(){this._stripeCardOrPaymentElement&&this._stripeCardOrPaymentElement.destroy()}onInputBlur(e){this.props.analyticsName&&this._mountTime&&new Date().getTime()-this._mountTime.getTime()>1e3&&e.target&&e.target.value&&!e.target._blurTracked&&((0,p.u4)("".concat(this.props.analyticsName," Input Filled"),{name:e.target.name}),e.target._blurTracked=!0)}async onPaymentRequestAttempt(e){let t=await this.handleSubmitAsync(null,e);if(t)throw t}handleSubmit(e){e&&e.preventDefault(),this.handleSubmitAsync(e).catch(e=>{console.error(e)})}async handleSubmitAsync(e){let t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.preventDefault(),this.props.analyticsName&&(0,p.u4)("".concat(this.props.analyticsName," Submit Pressed")),this.props.loading||this.state.loading||this.props.disableSubmit)return;this.resetErrors(),this.setState({loading:!0});let a=null;if(this.stripeElement&&!o.stripe_token&&!this.props.useStripePaymentElement){let{token:e=null,error:t}=this._stripe?await this._stripe.createToken(this._stripeCardOrPaymentElement):{error:{message:""}};if(e)a=e;else{this.setState({loading:!1,_stripeError:t&&t.message}),this.props.analyticsName&&(console.log("error",t),(0,p.u4)("".concat(this.props.analyticsName," Missing Payment"),{type:t&&t.type,code:t&&t.code,decline_code:t&&t.decline_code,reason:t&&t.message}));return}}if(this.stripeElement&&this.props.useStripePaymentElement){var s,l,u,c=this;if(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c.props.isPlatformCustomer?c._stripe:c._connectedStripe;return t?c._stripeElements?t.confirmSetup({elements:c._stripeElements,redirect:"if_required",confirmParams:e}):void console.error("Stripe elements not available"):void console.error("Stripe instance not available")},!this.props.performSubmit){let{setupIntent:e}=await t();if(!e)return void this.setState({loading:!1});n=e.payment_method}}let d={};for(let e of this.getInputs())if(e.blur&&e.blur(),"checkbox"==e.type)d[e.name]=!!e.checked;else if("radio"==e.type)e.checked&&(d[e.name]=e.value);else if("select"===e.type){let t=e.options[e.selectedIndex];t?d[e.name]=t.value:console.error("No selected option in select element")}else d[e.name]=e.value;if(Object.keys(o).forEach(e=>{!d[e]&&o[e]&&(d[e]=o[e])}),a?d.stripe_token=a:n&&(d.paymentMethodId=n),this.props.prepareData)try{let t=await this.props.prepareData(d,e);t&&(d=t)}catch(e){throw this.setState({loading:!1}),e}this.props.onChangeLoadingState&&this.props.onChangeLoadingState(!0);try{this.props.performSubmit?r=this.props.useStripePaymentElement?await this.props.performSubmit(d,{confirmSetup:t}):await this.props.performSubmit(d):this.props.action?r=this.props.method&&"get"===this.props.method?{body:await (0,f.x6)(this.props.action,{query:d,method:this.props.method})}:{body:await (0,f.x6)(this.props.action,{json:d,method:this.props.method||"POST"})}:this.props.onSubmit&&this.props.onSubmit(d)}catch(t){let e=t.response&&t.response.body instanceof ReadableStream;t.response&&t.body&&e?t.response={body:t.body,status:null==(l=t.response)?void 0:l.status}:t.response&&t.body&&!t.response.body&&(t.response.body=t.body),i=t}if((null==r||null==(s=r.body)?void 0:s.confirmPaymentUrl)&&r.body.clientSecret&&this._connectedStripe){(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_STARTED);let e=await this._connectedStripe.confirmCardPayment(r.body.clientSecret);if(e.error){(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_FAILED,{error:null==(u=e.error)?void 0:u.message});let t={error:e.error.message||"Failed to confirm payment"};i={response:{body:t,text:JSON.stringify(t)}}}else(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_SUCCEEDED)}if(this.setState({loading:!1}),this.props.onChangeLoadingState&&this.props.onChangeLoadingState(!1),i){if(this.processErrors(i.response),this.props.onError&&this.props.onError(i,d),!i.response)throw i}else this.props.onSuccess&&this.props.onSuccess(r,d);return i}processErrors(e){let t={},n=[];if(e&&e.body&&e.body.errors){let r=this.getInputs();e.body.errors.forEach(e=>{!0!==this.props.noInlineErrors&&e.param&&r.filter(t=>t.getAttribute("name")===e.param).length>0?t[e.param]?(console.log("Discarding repeated error"),console.log(e)):t[e.param]=e:n.push(e)})}else e&&e.body&&"string"==typeof e.body.error?n.push({msg:e.body.error}):n.push({msg:"Something went wrong"});this.setState({_paramErrors:t,_otherErrors:n}),this.props.analyticsName&&(0,p.u4)("".concat(this.props.analyticsName," Error"),{paramErrors:JSON.stringify(t),otherErrors:JSON.stringify(n)})}render(){var e;let t=this.props,n=null!=(e=this.state)?e:{},r=t.autoLock&&n.loading||t.loading,a=!1,l=!1,d=t.getConfigFor("disable_card_element_in_europe")&&!t.useStripePaymentElement&&t.pub&&h.EEA_COUNTRIES.includes(t.pub.stripe_country)&&(!t.currency||"eur"===t.currency),p=e=>{let f=[];return c.Children.toArray(e).forEach(e=>{if(!e)return null;if("object"==typeof e&&(e.type===v||"input"===e.type||"textarea"===e.type||"select"===e.type)&&e.props&&"name"in e.props&&e.props.name){let t=e.props.name;if(f.push((0,c.cloneElement)(e,{disabled:r||"disabled"in e.props&&e.props.disabled,onChange:t=>{let n=e.props&&"onChange"in e.props&&e.props.onChange||e.props&&"onInput"in e.props&&e.props.onInput;n&&"function"==typeof n&&n(t),this.props.onChange&&this.props.onChange(t)},onInput:t=>{e.props&&"onInput"in e.props&&e.props.onInput&&"function"==typeof e.props.onInput&&e.props.onInput(t),this.props.onInput&&this.props.onInput(t)},onBlur:t=>{this.onInputBlur(t),e.props&&"onBlur"in e.props&&e.props.onBlur&&"function"==typeof e.props.onBlur&&e.props.onBlur(t)}})),n._paramErrors[null!=t?t:"undefined"]&&!r){let e=n._paramErrors[null!=t?t:"undefined"];if(!e)return void console.error("No error for",t);e.msgHTML?f.push((0,s.Y)("div",(0,o._)((0,i._)({className:"error"},t&&{name:t}),{dangerouslySetInnerHTML:{__html:e.msgHTML}}))):f.push((0,s.Y)("div",(0,o._)((0,i._)({className:"error"},t&&{name:t}),{children:e.msg||"Invalid"})))}}else if("object"==typeof e&&e.props&&"type"in e.props&&"submit"===e.props.type)f.push((0,c.cloneElement)(e,{disabled:r||"disabled"in e.props&&e.props.disabled,loading:r||"loading"in e.props&&e.props.loading,onClick:t=>{e.props&&"onClick"in e.props&&e.props.onClick&&"function"==typeof e.props.onClick&&!1!==e.props.onClick(t)&&this.handleSubmit(t)}}));else if("object"==typeof e&&e.props&&"id"in e.props&&"error-container"===e.props.id){if(n._otherErrors&&!r){let t=n._otherErrors.map(e=>e.msgHTML?(0,s.Y)("div",{className:"error other-error",dangerouslySetInnerHTML:{__html:e.msgHTML}}):(0,s.Y)("div",{className:"error other-error",children:e.msg})).concat(e.props&&e.props.children?c.Children.toArray(e.props.children):[]);f.push((0,c.cloneElement)(e,{},t))}}else if("object"==typeof e&&"type"in e&&e.type===_){if(a)throw Error("Can only handle one stripe element");a=!0,f.push((0,c.cloneElement)(e,{ref:t=>{e.props&&e.props.ref&&e.props.ref(t),this.stripeElement=t},element:this._stripeCardOrPaymentElement,isPaymentElement:this.props.useStripePaymentElement,addressElement:this._stripeAddressElement,disabled:d})),!n._stripeError&&this._stripeCardOrPaymentElement||r||"undefined"==typeof window||f.push((0,s.Y)("div",{className:u()("error",t.stripeErrorClassName),role:"alert",children:n._stripeError||"Stripe payments not loaded. Are there blocked scripts?"}))}else if("object"==typeof e&&"type"in e&&e.type===y){if(l)throw Error("Can only handle one stripe payment request button");l=!0,f.push((0,c.cloneElement)(e,{ref:t=>{e.props&&e.props.ref&&e.props.ref(t),this.stripePaymentRequestButton=t},stripe:this._stripe,onSuccess:t=>(e.props&&"onSuccess"in e.props&&e.props.onSuccess&&"function"==typeof e.props.onSuccess&&e.props.onSuccess(t),this.onPaymentRequestAttempt(t))}))}else"object"==typeof e&&"props"in e&&e.props&&e.props.children?f.push((0,c.cloneElement)(e,{},p(e.props.children))):f.push(e)}),f};return(0,s.Y)("form",(0,o._)((0,i._)({className:"form ".concat(t.className||""),action:t.noJsAction||t.action,method:t.method&&["get","post"].includes(t.method.toLowerCase())&&t.method.toLowerCase()||"post",autoComplete:t.autoComplete,onSubmit:e=>this.handleSubmit(e),noValidate:!0},t.enctype&&{enctype:t.enctype},t.id&&{id:t.id}),{children:p(t.children)}))}constructor(e,t){super(e,t),(0,r._)(this,"_stripe",void 0),(0,r._)(this,"_connectedStripe",void 0),(0,r._)(this,"_stripeCardOrPaymentElement",void 0),(0,r._)(this,"_mountTime",void 0),(0,r._)(this,"_stripeElements",void 0),(0,r._)(this,"_stripeAddressElement",void 0),(0,r._)(this,"stripeElement",void 0),(0,r._)(this,"stripePaymentRequestButton",void 0),this.state={_paramErrors:{},_otherErrors:[],_stripeError:null,loading:!1},this.props.stripe_publishable_key&&(this._stripe=g(this.props.stripe_publishable_key,this.props.pub),this._stripe&&(this.props.useStripePaymentElement||(this._stripeCardOrPaymentElement=b(this._stripe)),this._connectedStripe=function(e,t){if("undefined"==typeof window||void 0===window.Stripe||!(null==t?void 0:t.stripe_user_id))return null;let n={stripeAccount:t.stripe_user_id};return window.Stripe(e,n)}(this.props.stripe_publishable_key,this.props.pub)))}}let S=(0,d.yq)(w)},74322:function(e,t,n){"use strict";n.d(t,{P:()=>l,v:()=>s});var r=n(4006),i=n(17402),o=n(85902);let a=(0,i.createContext)(!1);function s(e){let{children:t,context:n}=e;return(0,r.Y)(o.vd,{context:n,children:(0,r.Y)(a.Provider,{value:!0,children:t})})}function l(){return(0,i.useContext)(a)}},25006:function(e,t,n){"use strict";n.d(t,{Eo:()=>c,df:()=>u,pP:()=>l});var r,i,o=n(4006),a=n(17402);let s="undefined"!=typeof window&&null!=(i=null==(r=window._preloads)?void 0:r.pub)?i:null,l=(0,a.createContext)(s);function u(){return(0,a.useContext)(l)}function c(e){let{children:t,pub:n}=e;return(0,o.Y)(l.Provider,{value:null!=n?n:null,children:t})}l.displayName="PubContext"},25757:function(e,t,n){"use strict";n.d(t,{$5:()=>l,dX:()=>u});var r=n(53928),i=n(66565),o=n(44803),a=n(82260),s=n(39318);function l(e){let t=(0,i.zj)();t.properties.is_free_subscribed||e||(t.properties.is_free_subscribed=!0,c())}function u(){if("undefined"==typeof window)return;let e=new URL(location.toString());e.searchParams.get("just_signed_up")&&(e.searchParams.delete("just_signed_up"),history.replaceState({},"",e),c())}function c(){var e,t;let n,l=(0,i.zj)();(0,i.BU)("sign_up"),(0,i.b8)("event",{ec:"Signup",ea:"Signup Success"}),(0,i.e$)("conversion",(null==l?void 0:l.adwordsAccountId)&&(null==l?void 0:l.adwordsEventSendTo)?{send_to:"".concat(l.adwordsAccountId,"/").concat("Yo9oCMOM1MYDEKuN5pYB")}:{});let u=(0,i.wJ)();u&&(0,i.Zb)(u,"CompleteRegistration"),(0,a.F)("signup"),"undefined"!=typeof window&&window.PARSELY&&window.PARSELY.loaded&&window.PARSELY.conversions&&window.PARSELY.conversions.trackNewsletterSignup&&window.PARSELY.conversions.trackNewsletterSignup("Newsletter Sign Up"),"bankless"===(null!=(t=null==(n="undefined"!=typeof window?null==(e=window._preloads)?void 0:e.pub:void 0)?void 0:n.subdomain)?t:null)&&(window.history.replaceState({},document.title,(0,s.oRR)({plan:"free"})),(0,o.MY)()),(0,r.G1)()}n(82776)},86500:function(e,t,n){"use strict";n.d(t,{$5:()=>r.$5,Bu:()=>a.T,Jw:()=>o.Jw,TM:()=>o.TM,YT:()=>o.YT,b8:()=>i.b8,fN:()=>o.fN,kE:()=>o.kE,qY:()=>o.qY,sM:()=>o.sM,u4:()=>o.u4});var r=n(25757),i=n(66565),o=n(44803),a=n(43880)},44803:function(e,t,n){"use strict";n.d(t,{Jw:()=>x,MY:()=>W,TM:()=>C,YT:()=>F,fN:()=>U,fe:()=>Y,j6:()=>A,kE:()=>L,qY:()=>S,sH:()=>M,sM:()=>D,u4:()=>N,wc:()=>O});var r,i,o=n(69277),a=n(72343),s=n(53928),l=n(4392),u=n(66565),c=n(7354),d=n(31392),p=n(13022),f=n(82260),m=n(68349),h=n(40659),g=n(16291),b=n(18189),_=n(39318),y=n(41086),v=n(94402),w=n(82776);let S=b.q,E="undefined"!=typeof window,T=!!(E&&window.navigator&&window.navigator.sendBeacon),k=!(0,m.lT)()&&T,P=new c.W({batchOptions:k?{maxBatchSize:8,maxBatchDataSize:1e4}:void 0,send:function(e,t){E&&(k&&t&&e.push(q(e,t)),new Image().src=(0,_.yRP)(k?"/api/v1/firehose/batch":"/api/v1/firehose",{_:new Date().getTime(),d:e.join(",")}))},beacon:function(e,t){if(!E)return;e.push(q(e,"beacon",t));let n=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon("/api/v1/firehose/batch",n)}}),A=()=>{E&&k&&(window.addEventListener("beforeunload",e=>{P.sendBeacon(e)}),window.addEventListener("pagehide",e=>{P.sendBeacon(e)}),document.addEventListener("visibilitychange",e=>{"hidden"===document.visibilityState&&P.sendBeacon(e)}),setInterval(()=>{P.intervalFlush()},6e4))},I=E&&window!=window.top&&(0,v.G)(m.QT),R="browser";function C(){return I}function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n;if(["development","test"].includes((n="production",void 0!==n)?n:"")&&!e)throw Error("`undefined` event passed to FRONTEND track call");G(e,Object.assign({},t))}catch(e){try{window.Sentry&&window.Sentry.captureException(e)}catch(t){console.error("Failed to track event",e)}}}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;N(S.PUBLICATION_VISITED,(0,o._)({visited_publication_id:e.id,visited_publication_subdomain:e.subdomain,source:t},n,(0,w.extractEventAttributionDataFromRecord)(null!=r&&Object.keys(r).length>0?r:(0,h.cf)())))}function x(e){let{post:t,hasPaywall:n,surface:r,markRead:i,user:a,trackerUuid:s,attributionParams:l}=e;N(S.POST_SEEN,(0,o._)({post_id:t.id,post_audience:t.audience,post_type:t.type,has_paywall:n,post_age_minutes:t.post_date&&(0,g.A)().diff(t.post_date,"minute"),surface:r,tracker_uuid:s},(0,w.extractEventAttributionDataFromRecord)(null!=l&&Object.keys(l).length>0?l:(0,h.cf)()))),(!a||i)&&M(t.id)}function M(e){return fetch("/api/v1/posts/".concat(e,"/seen"),{method:"POST"})}function D(e){let{post:t,hasPaywall:n,surface:r,trackerUuid:i}=e;N(S.POST_BOTTOM_SEEN,{post_id:t.id,post_audience:t.audience,post_type:t.type,has_paywall:n,surface:r,tracker_uuid:i})}function L(e){let{post:t}=e;(null==t?void 0:t.id)&&(N(S.POST_PAGE_PINGBACK,{seconds:0,post_id:t.id}),setTimeout(()=>{N(S.POST_PAGE_PINGBACK,{seconds:10,post_id:t.id})},1e4))}function F(e){let{previous:t,url:n}=e;!t||n.includes("_no_an=true")||W()}E&&(navigator.standalone||(null==(r=(i=window).matchMedia)?void 0:r.call(i,"(display-mode: standalone)").matches))&&(R="standalone");let B=()=>document.location.pathname.startsWith("/p/"),O=()=>{var e,t,n;let r=window._preloads,i=(null==r||null==(e=r.post)?void 0:e.id)&&(null==r?void 0:r.pub),o=!!(null==r||null==(t=r.post)?void 0:t.slug)&&(null==r||null==(n=r.post)?void 0:n.slug)===document.location.pathname.split("/")[document.location.pathname.split("/").length-1];return!!(i&&B()&&o)},Y=e=>e?e.is_subscribed?"Paid subs":e.is_free_subscribed?"Free subs":"Anonymous":"Anonymous";function W(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof document||document.location.pathname.startsWith("/embed")&&E&&(null==(n=window)||null==(t=n._preloads)||null==(e=t.pub)?void 0:e.embed_tracking_disabled))return;G(S.PAGES,Object.assign(function(){let e={};if(E){let t=window._preloads&&"post"in window._preloads&&window._preloads.post,n=window.location&&/^\/p\/([^\/]+)/.exec(window.location.pathname),r=window.location&&/\/p-(\d+)/.exec(window.location.pathname);if(n&&n[1]){let r=n[1];t&&t.slug===r&&(e.post_id=t.id,e.post_audience=t.audience,e.post_type=t.type),e.post_slug=r}else r&&r[1]&&(e.post_id=parseInt(r[1]))}return e}(),r));let i=(0,u.wJ)();if(i&&(0,u.Zb)(i,"PageView"),(0,f.F)("pageview"),(0,u.b8)("pageview"),(0,u.BU)("page_view"),E&&!B()&&(0,s.Mz)({path:document.location.pathname,title:document.title,sections:"",authors:""}),E&&window.PARSELY&&window.PARSELY.loaded&&window.PARSELY.beacon&&window.PARSELY.beacon.trackPageView){let e={url:document.location.origin+document.location.pathname+document.location.search,urlref:(0,h.XG)()||"",js:1,data:{}};if((0,p.Ay)("add_section_and_tag_metadata")){if(B()&&!O())return;if(B()){let t=window._preloads;e.data={audience:Y(null==t?void 0:t.user)}}}window.PARSELY.beacon.trackPageView(e)}}function H(e){var t,n,r,i,o,s,u,c,p;let f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},g=null;try{g=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}let b={event:e,timestamp:new Date().toISOString(),properties:Object.assign({browserSessionId:l.O,iframeVisitId:I,r:(0,y.y)("r"),magicUserId:"undefined"!=typeof window&&(null==(r=window)||null==(n=r._preloads)||null==(t=n.user)?void 0:t.is_magic)?window._preloads.user.id:void 0},f),context:{client_type:"web",displayMode:R,page:{referrer:(0,h.XG)(),title:document.title,url:document.location.href,height:null!=(s="undefined"!=typeof window&&window.innerHeight)?s:0,width:null!=(u="undefined"!=typeof window&&window.innerWidth)?u:0},campaign:(0,a.tm)(),timezone:g,screen:{height:null!=(c="undefined"!=typeof window&&(null==(i=window.screen)?void 0:i.height))?c:0,width:null!=(p="undefined"!=typeof window&&(null==(o=window.screen)?void 0:o.width))?p:0},substackColorScheme:(0,d.ZZ)(),systemColorScheme:(0,d.VX)()}};return(0,m.Cw)(JSON.stringify(b))}function q(e,t,n){let r=e.length,i=e.map(e=>e.length).reduce((e,t)=>e+t,0);return H(S.FIREHOSE_BATCH_SENT,{dataSize:i,batchSize:r,batchType:t,eventType:null==n?void 0:n.type})}function G(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||"undefined"==typeof document)return;let o=H(e,i);P.add(o),(null==(r=window)||null==(n=r._preloads)||null==(t=n.user)?void 0:t.is_global_admin)&&console.log("EVENT: ".concat(e),i)}},94729:function(e,t,n){"use strict";n.d(t,{Qd:()=>u,fk:()=>l,x6:()=>s});var r=n(99851),i=n(69277),o=n(32641),a=n(68349);async function s(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i._)({cache:"no-cache"},n),{query:a,json:s}=r,u=(0,o._)(r,["query","json"]),c=e;if(a){let t=(a instanceof URLSearchParams?a:new URLSearchParams(Object.entries(a).reduce((e,t)=>{let[n,r]=t;return void 0!==r&&(Array.isArray(r)?r.forEach(t=>{void 0!==t&&e.push(["".concat(n,"[]"),t])}):e.push([n,r])),e},[]))).toString();t&&(-1!==e.indexOf("?")?c+="&".concat(t):c+="?".concat(t))}s&&(u.body=JSON.stringify(s),u.headers instanceof Headers||(u.headers=new Headers(u.headers)),u.headers.set("Content-Type","application/json")),u.method&&(u.method=u.method.toUpperCase());let d=await fetch(c,u);if(!d.ok){let e;try{e=await d.json()}catch(t){e={}}throw new l(d,e)}return(null==(t=d.headers.get("Content-Type"))?void 0:t.startsWith("application/json"))?d.json():d.text()}class l extends Error{getMessage(e){return(0,a.LJ)(this.body,e)}constructor(e,t){const n=URL.parse?URL.parse(e.url):null;super("".concat(e.status,": ").concat(e.statusText)),(0,r._)(this,"response",void 0),(0,r._)(this,"body",void 0),(0,r._)(this,"url",void 0),this.response=e,this.body=t,this.name="FetchError",this.url=n}}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Something went wrong.";return e instanceof l?e.getMessage():t}},17186:function(e,t,n){"use strict";n.d(t,{X3:()=>a,xm:()=>o});var r=n(87369),i=n.n(r);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"undefined"!=typeof window?i().get(e,t):t},a=(e,t)=>{if("undefined"!=typeof window)return i().set(e,t)}},68349:function(e,t,n){"use strict";n.d(t,{A9:()=>em,Cw:()=>e_,EW:()=>F,Eh:()=>eR,FK:()=>ef,Gr:()=>ec,H7:()=>er,Hm:()=>B,I5:()=>H,LJ:()=>q,LQ:()=>eB,Lm:()=>eb,NN:()=>L,P7:()=>eL,Q2:()=>Z,QT:()=>ek,Sd:()=>ep,TJ:()=>eN,Tf:()=>el,Uj:()=>x,V2:()=>ew,Wy:()=>eF,YK:()=>ed,aS:()=>eA,ar:()=>en,cH:()=>eu,cX:()=>K,dJ:()=>ev,dO:()=>U,gI:()=>J,gK:()=>eI,gm:()=>V,iQ:()=>ei,jL:()=>eg,lT:()=>j,lW:()=>ee,m0:()=>z,nB:()=>ea,nr:()=>X,o7:()=>G,qm:()=>eP,qr:()=>eE,rr:()=>$,sg:()=>M,uX:()=>Y,vL:()=>eT,vy:()=>eo,wb:()=>eS,wp:()=>eC,zY:()=>D,zs:()=>W});var r=n(69277),i=n(79785),o=n(4006),a=n(99862),s=n(72343),l=n(14242);n(74894);var u=n(16291),c=n(96400);n(35884);var d=n(39318),p=n(9036),f=n(98949),m=n(82776);function h(){let e=(0,i._)(["","% off first month"]);return h=function(){return e},e}function g(){let e=(0,i._)(["","% off first year"]);return g=function(){return e},e}function b(){let e=(0,i._)(["","% off first week"]);return b=function(){return e},e}function _(){let e=(0,i._)(["","% off first day"]);return _=function(){return e},e}function y(){let e=(0,i._)(["","% off first payment"]);return y=function(){return e},e}function v(){let e=(0,i._)(["","% off forever"]);return v=function(){return e},e}function w(){let e=(0,i._)([""," off first month"]);return w=function(){return e},e}function S(){let e=(0,i._)([""," off first year"]);return S=function(){return e},e}function E(){let e=(0,i._)([""," off first week"]);return E=function(){return e},e}function T(){let e=(0,i._)([""," off first day"]);return T=function(){return e},e}function k(){let e=(0,i._)([""," off first payment"]);return k=function(){return e},e}function P(){let e=(0,i._)([""," off forever"]);return P=function(){return e},e}function A(){let e=(0,i._)([" at ",""]);return A=function(){return e},e}function I(){let e=(0,i._)([" at ",""]);return I=function(){return e},e}function R(){let e=(0,i._)([" at ",""]);return R=function(){return e},e}function C(){let e=(0,i._)([" at ",""]);return C=function(){return e},e}let N="undefined"==typeof window||!window.addEventListener;N||window.addEventListener("load",()=>{N=!0},!1),"undefined"!=typeof window&&window._preloads;let U="undefined"!=typeof window?new l.A:null,x=e=>{N?e():window.addEventListener("load",e,!1)},M=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,r=null;return function(){null!==r&&clearTimeout(r),"undefined"!=typeof window&&(r=window.setTimeout(()=>e.apply(n,arguments),t))}},D=function(e,t){var n,r,i,o,a,s;let l,{language:u="en"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{iTemplate:d,iPlural:p}=c.TH.i(u);if(e&&!e.loading&&!e.error){if(e.trial_period_days)l=p("1 day free trial","%1 day free trial",e.trial_period_days);else if(e.extra_seats)l=p("an additional seat","%1 additional seats",e.extra_seats);else if(e.percent_off)if("once"===e.duration)if(t)switch(t.interval){case"month":l=d(h(),Math.round(e.percent_off_precise||e.percent_off));break;case"year":l=d(g(),Math.round(e.percent_off_precise||e.percent_off));break;case"week":l=d(b(),Math.round(e.percent_off_precise||e.percent_off));break;case"day":l=d(_(),Math.round(e.percent_off_precise||e.percent_off))}else l=d(y(),Math.round(e.percent_off_precise||e.percent_off));else l="repeating"===e.duration?null===e.duration_in_months||e.duration_in_months%12==0?p("%2% off for 1 year","%2% off for %1 years",(null!=(n=e.duration_in_months)?n:0)/12,"".concat(Math.round(e.percent_off_precise||e.percent_off))):p("%2% off for 1 month","%2% off for %1 months",e.duration_in_months,"".concat(Math.round(e.percent_off_precise||e.percent_off))):d(v(),Math.round(e.percent_off_precise||e.percent_off));else if(e.amount_off)if("once"===e.duration)if(t)switch(t.interval){case"month":l=d(w(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"year":l=d(S(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"week":l=d(E(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"day":l=d(T(),(0,m.centsToPriceString)(e.amount_off,t.currency))}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(r=null==t?void 0:t.currency)?r:"");l=d(k(),n)}else if("repeating"===e.duration)if(null===e.duration_in_months||e.duration_in_months%12==0){let n=(0,m.centsToPriceString)(e.amount_off,null!=(i=null==t?void 0:t.currency)?i:"");l=p("%2 off for 1 year","%2 off for %1 years",(null!=(o=e.duration_in_months)?o:0)/12,n)}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(a=null==t?void 0:t.currency)?a:"");l=p("%2 off for 1 month","%2 off for %1 months",e.duration_in_months,n)}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(s=null==t?void 0:t.currency)?s:"");l=d(P(),n)}return l}},L=function(e,t){let n=new Image;n.onload=()=>{n.onload=n.onerror=null,t&&t(n)},n.onerror=n.onload,n.src=e},F=e=>{let t=document.createElement("a");return t.href=e,(t.hostname||"").replace(/\.localhost$/,"")},B=e=>{let t=document.createElement("a");return t.href=e,t.pathname||""},O=e=>{let t=document.createElement("a");return t.href=e,(t.pathname||"")+(t.search||"")+(t.hash||"")},Y=(e,t)=>{var n;return q((null==e?void 0:e.body)||(null==e||null==(n=e.response)?void 0:n.body),t)},W=e=>{var t,n,r;let i=(null==e?void 0:e.body)||(null==e||null==(t=e.response)?void 0:t.body);return i&&i.error?{msg:i.error}:i&&i.errors&&i.errors.length>0?{html:null==(n=i.errors[i.errors.length-1])?void 0:n.msgHTML,msg:null==(r=i.errors[i.errors.length-1])?void 0:r.msg}:void 0},H=(e,t)=>{let n;try{n=e?JSON.parse(e&&e.responseText):e}catch(e){}return q(n,t)},q=(e,t)=>{if(t=t||"Something went wrong",e&&e.error)return e.error;if(e&&e.errors&&e.errors.length>0){var n;return(null==(n=e.errors[e.errors.length-1])?void 0:n.msg)||t}return t},G=function(){return[(0,o.Y)("input",{type:"email",name:"fake_email",placeholder:"email",style:{position:"absolute",top:-1e4,left:-1e4},"aria-hidden":"true",tabIndex:-1}),(0,o.Y)("input",{type:"password",name:"fake_password",placeholder:"password",style:{position:"absolute",top:-1e4,left:-1e4},"aria-hidden":"true",tabIndex:-1})]},$=function(){if("undefined"!=typeof navigator||"undefined"!=typeof window){let e=navigator.userAgent||navigator.vendor||window.opera;if(e&&(0,f.fJ)(e,{checkFirst4:!0}))return!0}return!1},j=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/(MSIE|Trident)/i.test(window.navigator.userAgent),V=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/Firefox/i.test(window.navigator.userAgent),z=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/Android/i.test(window.navigator.userAgent),J=()=>!!Q(),K=e=>{if("undefined"==typeof window||e||(e=window.navigator),!e)return!1;let t=e;return t.userAgentData&&t.userAgentData.platform?/macOS/.test(t.userAgentData.platform):/Mac/.test(e.platform)},X=()=>!!navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();return e?"⌘":"^"},Q=()=>"undefined"==typeof window?null:(0,f.UN)(),ee=e=>{if("undefined"!=typeof window&&e){if(navigator.clipboard&&navigator.clipboard.writeText)return void navigator.clipboard.writeText(e).catch(()=>{et(e)});et(e)}},et=e=>{var t,n,r;let i;(t=window,n=document,r=navigator,{copy:e=>{let o,a;(i=n.createElement("textArea")).value=e,n.body.appendChild(i),r.userAgent.match(/ipad|iphone/i)?((o=n.createRange()).selectNodeContents(i),(a=t.getSelection()).removeAllRanges(),a.addRange(o),i.setSelectionRange(0,999999)):i.select(),n.execCommand("copy"),n.body.removeChild(i)}}).copy(e);let o=t=>{t&&t.clipboardData?(t.clipboardData.setData("text/plain",e),t.preventDefault()):window.clipboardData&&window.clipboardData.setData("Text",e)};Q()||window.addEventListener("copy",o),setTimeout(()=>{try{let t=document.createElement("input");t.style="position: absolute; top: 0; right: 0; height: 1px; width: 1px;",document.documentElement.appendChild(t),t.value=e,t.contentEditable="true",t.readOnly=!1;let n=document.createRange();n.selectNodeContents(t);let r=window.getSelection();null==r||r.removeAllRanges(),null==r||r.addRange(n),t.setSelectionRange(0,999999),document.execCommand("copy"),document.documentElement.removeChild(t)}catch(e){}window.removeEventListener("copy",o)},0)},en=()=>"undefined"!=typeof window&&window.location.hash?decodeURIComponent(window.location.hash.slice(1)):null,er=function(e){let t=en();if(!t)return;let n=document.getElementById(t);n&&("number"!=typeof e&&(e=-122),document.documentElement.scrollTop=Math.max(0,((e,t)=>{let n="offset".concat((0,m.toTitleCase)(t)),r=0;for(;e&&e!==document.body;)r+=e[n],e="offsetParent"in e&&e.offsetParent||e.parentNode;return r})(n,"top")+e))},ei=(e,t)=>{e.className+=" ".concat(t)},eo=(e,t)=>{e&&(e.className=e.className.replace(RegExp("\\b".concat(t,"\\b"),"g"),"").trim())},ea=(e,t)=>RegExp("\\b".concat(t,"\\b"),"g").test(e.className),es=()=>{let e,t;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(e="visibilitychange",t="hidden"):void 0!==document.msHidden?(e="msvisibilitychange",t="msHidden"):void 0!==document.webkitHidden&&(e="webkitvisibilitychange",t="webkitHidden")),{visibilityChange:e,hidden:t}},el=()=>{let{hidden:e}=es();return!e||!document[e]},eu=e=>{let{visibilityChange:t}=es();t&&document.addEventListener(t,e,!1)},ec=e=>{let{visibilityChange:t}=es();t&&document.removeEventListener(t,e,!1)},ed=e=>new Promise((t,n)=>{if(!window.FileReader)return void n(TypeError("File reader API not found"));let r=new FileReader;r.onerror=n,r.onload=()=>{t(r.result)},r.readAsDataURL(e)}),ep=async e=>{let t,n;if(e){try{t=await ed(e)}catch(e){console.error("Failed to get data URL from file:",e),alert(e.message);return}try{n=await new Promise((t,n)=>{if(!window.FileReader)return void n(TypeError("File reader API not found"));if(!window.DataView)return void n(TypeError("DataView API not found"));let r=new FileReader;r.onerror=n,r.onload=()=>{let e=new DataView(r.result);if(65496!=e.getUint16(0,!1))return t(-2);let n=e.byteLength,i=2;for(;i=e.getUint16(i+2,!1))return t(-1);let n=e.getUint16(i,!1);if(i+=2,65505==n){if(0x45786966!=e.getUint32(i+=2,!1))return t(-1);let n=18761==e.getUint16(i+=6,!1);i+=e.getUint32(i+4,n);let r=e.getUint16(i,n);i+=2;for(let o=0;o{switch(e){case 2:return"rotateY(180deg)";case 3:return"rotateZ(-180deg)";case 4:return"rotateZ(-180deg) rotateY(180deg)";case 5:return"rotateZ(-90deg) rotateY(180deg)";case 6:return"rotateZ(90deg)";case 7:return"rotateZ(90deg) rotateY(180deg)";case 8:return"rotateZ(-90deg)";default:return""}},em=()=>Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)-window.innerHeight,eh=function(){let{redirect:e,email:t,justTrying:n,with_password:r=!1,useOriginalUrl:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"!=typeof e&&(e=(0,d.RY1)({useOriginalUrl:i})),(0,d.yRP)("/account/login",{redirect:e||"",email:t||"",with_password:r?"1":"",justTrying:n||""})},eg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};document.location.href=eh(e)},eb=e=>{window.location.assign((0,d.FCy)(e))},e_=e=>{let t,n,r,i,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",u="",c=0;for(e=ey(e);c>2,o=(3&t)<<4|n>>4,a=(15&n)<<2|r>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),u=u+l.charAt(i)+l.charAt(o)+l.charAt(a)+l.charAt(s);return u},ey=e=>{let t="";for(let n=0;n127&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t},ev=e=>{let t=[window.scrollX,window.scrollY];ew(e),window.scrollTo(...t)},ew=function(e){let{event:t=null,local_navigation:n=!0,replace:i=!1,newTab:o=!1,state:l,campaign:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t&&t.preventDefault(),!e||"string"!=typeof e)return;try{let t=new URL(e);if(!["http:","https:","substack:"].includes(t.protocol))return}catch(e){}if(e.startsWith("#")&&n){if(window.location.hash!==e){var c;i&&(null==(c=window.history)?void 0:c.replaceState)?window.history.replaceState(null!=l?l:window.history.state,null,e):window.location.hash=e}er();return}if(n&&F(e)&&F(e)!==F(window.location.href)&&(n=!1),!n&&u&&(e=(0,s.P)(e,u)),o||t&&("metaKey"in t&&t.metaKey||"ctrlKey"in t&&t.ctrlKey))return void window.open(e,"_blank");let d=history.state;if(n){if(u&&(0,s.x4)((0,r._)({},u)),"react-router"===window.__SUBSTACK_ROUTER_TYPE__)return void window.__reactRouterNavigate(O(e),{replace:i,state:l});if((0,a.route)(O(e),i)){void 0!==l?history.replaceState(l,""):i&&void 0!==d&&history.replaceState(d,""),setTimeout(()=>er(),0);return}}window.location.href=e},eS=(e,t)=>new Promise(n=>{e.setState(t,n)}),eE=(e,t)=>new Promise((n,r)=>{let i=async function(){for(var i=arguments.length,o=Array(i),a=0;a3&&void 0!==arguments[3]?arguments[3]:{};return"function"==typeof t&&(n=t,t="lock"),await eE(e,async function(i){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s{let e=window.crypto||window.msCrypto;if("function"==typeof(null==e?void 0:e.randomUUID))return e.randomUUID();if(e)return"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,t=>(Number(t)^e.getRandomValues(new Uint8Array(1))[0]&15>>Number(t)/4).toString(16));let t=new Date().getTime(),n="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),("x"===e?r:3&r|8).toString(16)})},eP=function(e){var t;let{stripHash:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"!=typeof window&&(null==(t=window.history)?void 0:t.replaceState)){let t=(0,p.m)(window.location.href);if(Array.isArray(e))for(let n of e)delete t[n];else delete t[e];let r="".concat((0,d.yRP)(window.location.pathname,t)).concat(n?"":window.location.hash);window.history.replaceState(window.history.state,document.title,r)}},eA=()=>"undefined"!=typeof window&&(void 0!==document.webkitCurrentFullScreenElement?null!==document.webkitCurrentFullScreenElement:void 0!==document.fullscreenElement&&null!==document.fullscreenElement),eI=e=>"undefined"!=typeof window&&(e.requestFullScreen?(e.requestFullScreen(),!0):e.webkitRequestFullScreen?(e.webkitRequestFullScreen(),!0):!!e.mozRequestFullScreen&&(e.mozRequestFullScreen(),!0)),eR=()=>{if(!eA())return!1;if(document.exitFullscreen)return document.exitFullscreen(),!0;if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)return document.mozCancelFullScreen(),!0;else if(document.msExitFullscreen)return document.msExitFullscreen(),!0;return!1},eC=()=>"undefined"!=typeof window&&!!document.pictureInPictureElement&&!!document.exitPictureInPicture&&(document.exitPictureInPicture(),!0),eN=e=>{let t=document.createElement("a");document.body.appendChild(t),t.href=e,t.target="_blank",t.click(),document.body.removeChild(t)},eU=new Intl.DateTimeFormat(void 0,{timeStyle:"short"}),ex=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),eM=new Intl.DateTimeFormat(void 0,{dateStyle:"long"}),eD=new Intl.DateTimeFormat(void 0,{dateStyle:"long"});function eL(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(e)}let eF=function(e){let{includeTime:t,language:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,u.A)(e).locale(n||"en"),i=(0,u.A)(),{iTemplate:o}=c.TH.i(n);return r.isBefore(i.startOf("year"))?eM.format(r.toDate())+(t?o(A(),eU.format(r.toDate())):""):r.isBefore(i.startOf("day"))?ex.format(r.toDate())+(t?o(I(),eU.format(r.toDate())):""):r.isAfter(i.endOf("year"))?eD.format(r.toDate())+(t?o(R(),eU.format(r.toDate())):""):r.isAfter(i.endOf("day"))?ex.format(r.toDate())+(t?o(C(),eU.format(r.toDate())):""):eU.format(r.toDate())},eB=()=>"undefined"!=typeof window&&!!window._preloads.isDevelopmentEnvironment},81929:function(e,t,n){"use strict";n.d(t,{Jq:()=>_,Oi:()=>h,vw:()=>b});var r=n(69277),i=n(70408),o=n(32641),a=n(4006),s=n(32485),l=n.n(s),u=n(17402),c=n(89490),d=n(35369),p=n(76977),f=n(63136);n(67140);var m=n(62614);let h={size:14,strokeWidth:2.5},g={display:"flex",height:20,paddingX:6,paddingY:2,gap:4,font:"text",fontSize:11,fontWeight:"medium",alignItems:"center"},b=(0,u.forwardRef)((e,t)=>{var{className:n,theme:s="default",priority:u="secondary",leading:f,trailing:h,children:b,fillIcon:_,radius:y="xs",onClick:v,href:w}=e,S=(0,o._)(e,["className","theme","priority","leading","trailing","children","fillIcon","radius","onClick","href"]);let E=void 0!==v||void 0!==w;return(0,a.FD)(d.Nm,(0,i._)((0,r._)({},g,S),{className:l()(n,function(e){let{theme:t="default",priority:n="secondary",clickable:o,radius:a="xs"}=e;return l()(m.A.tag,m.A["theme_".concat(t)],m.A["priority_".concat(n)],o&&m.A.clickable,(0,c.iF)((0,i._)((0,r._)({},g),{cursor:o?"pointer":"inherit",radius:a})))}({theme:s,priority:u,clickable:E,radius:y})),onClick:v,href:w,ref:t,tabIndex:E?0:-1,children:[f&&(0,a.Y)(p.pT,{className:l()(m.A.leading,_&&m.A.fillIcon),alignItems:"center",children:f}),b,h&&(0,a.Y)(p.pT,{className:l()(m.A.trailing,_&&m.A.fillIcon),alignItems:"center",children:h})]}))}),_=(0,u.forwardRef)((e,t)=>{var{className:n,priority:s="primary",leading:u,trailing:c,children:h,fillIcon:b,radius:_="xs",onClick:y,href:v,title:w}=e,S=(0,o._)(e,["className","priority","leading","trailing","children","fillIcon","radius","onClick","href","title"]);let E=void 0!==y||void 0!==v;return(0,a.FD)(d.Nm,(0,i._)((0,r._)((0,i._)((0,r._)({},S),{className:l()(n,m.A.tag,m.A.media,m.A["priority_".concat(s)],E&&m.A.clickable),onClick:y,href:v,ref:t,radius:_,cursor:E?"pointer":"inherit",tabIndex:E?0:-1,minWidth:0,title:null!=w?w:void 0}),g),{children:[u&&(0,a.Y)(p.pT,{className:l()(m.A.leading,b&&m.A.fillIcon),alignItems:"center",children:u}),(0,a.Y)(f.EY,{ellipsis:!0,children:h}),c&&(0,a.Y)(p.pT,{className:l()(m.A.trailing,b&&m.A.fillIcon),alignItems:"center",children:c})]}))});_.displayName="MediaTag"},63136:function(e,t,n){"use strict";n.d(t,{EY:()=>m,Yq:()=>I,nS:()=>S});var r=n(69277),i=n(70408),o=n(32641),a=n(4006),s=n(32485),l=n.n(s),u=n(17402),c=n(84605),d=n(11747),p=n(89490),f=n(24675);let m=e=>{var{className:t,align:n,size:s,weight:u,transform:m}=e,h=(0,o._)(e,["className","align","size","weight","transform"]);h=(0,i._)((0,r._)({},h),{textAlign:null!=n?n:h.textAlign,textTransform:null!=m?m:h.textTransform,fontSize:null!=s?s:h.fontSize,fontWeight:null!=u?u:h.fontWeight});let{iString:g,language:b}=(0,c.GO)(),_=h.children;if(h.translated&&"en"!==b){let e=[],t=[],n=(0,d.oI)(h.children,e,t),r=g(n,...t);if(r&&r!==n)try{_=(0,d.HP)(r,e)}catch(e){console.log("Could not translate ".concat(n),e)}}return(0,a.Y)(p.az,(0,i._)((0,r._)({className:l()(f.A.reset,t)},h),{children:_}))};function h(e){var{className:t,displayName:n}=e,s=(0,o._)(e,["className","displayName"]);let c=(0,u.forwardRef)((e,n)=>{var{className:u}=e,c=(0,o._)(e,["className"]);return(0,a.Y)(m,(0,i._)((0,r._)({},s,c),{ref:n,className:l()(t,u)}))});return c.displayName=n,c}let g=h({as:"h1",font:"display",size:36,weight:"bold",lineHeight:44}),b=h({as:"h2",font:"display",size:30,lineHeight:36,weight:"bold"}),_=h({as:"h3",font:"display",size:24,lineHeight:28,weight:"bold"}),y=h({as:"h4",font:"display",size:20,lineHeight:24,weight:"bold"}),v=h({font:"text",size:19,lineHeight:26,weight:"regular"}),w=h({font:"text",fontSize:17,lineHeight:24,fontWeight:"regular"}),S={font:"text",fontSize:15,lineHeight:20,fontWeight:"regular"},E=h(S),T=h({font:"text",fontSize:13,lineHeight:20,fontWeight:"regular"}),k=h({font:"text",size:11,lineHeight:20,weight:"regular"}),P=h((0,i._)((0,r._)({},{font:"meta",fontSize:11,lineHeight:20,fontWeight:"medium",textTransform:"uppercase",color:"secondary"}),{className:f.A.meta})),A=h({font:"digit",size:12,lineHeight:20,weight:"bold",transform:"uppercase",className:f.A.digit}),I=h({as:"a",decoration:"hover-underline"});h({as:"span"});let R=h({font:"text",color:"primary",className:f.A.marketingBody}),C=h({as:"h1",weight:"regular",className:f.A.marketingHeading1}),N=h({as:"h2",weight:"medium",className:f.A.marketingHeading2}),U=h({as:"h3",weight:"medium",className:f.A.marketingHeading3}),x=h({as:"h4",weight:"medium",className:f.A.marketingHeading4}),M=h({as:"h5",weight:"bold",className:f.A.marketingHeading5}),D=h({as:"h4",weight:"regular",textAlign:"center",className:f.A.marketingQuote}),L=h({as:"h4",size:30,weight:"regular",className:f.A.marketingSubtitle});m.H1=g,m.H2=b,m.H3=_,m.H4=y,m.B1=v,m.B2=w,m.B3=E,m.B4=T,m.B5=k,m.Meta=P,m.Digit=A,m.MarketingBody=R,m.MarketingHeading1=C,m.MarketingHeading2=N,m.MarketingHeading3=U,m.MarketingHeading4=x,m.MarketingHeading5=M,m.MarketingQuote=D,m.MarketingSubtitle=L},17028:function(e,t,n){"use strict";n.d(t,{$n:()=>r.$n,EY:()=>a.EY,I1:()=>o.I1,I4:()=>i.I4,Jb:()=>r.az,K0:()=>r.K0,Nm:()=>r.Nm,QW:()=>s.Q,VP:()=>o.VP,Ye:()=>o.Ye,Yq:()=>a.Yq,az:()=>i.az,cG:()=>l.c,fI:()=>o.fI,iC:()=>u.iC,iF:()=>i.iF,mZ:()=>r.mZ,nS:()=>a.nS,ov:()=>o.ov,pT:()=>o.pT,vj:()=>l.v,yw:()=>i.yw});var r=n(35369),i=n(89490),o=n(76977),a=n(63136),s=n(92028),l=n(16074),u=n(53168)},67140:function(e,t,n){"use strict";n.d(t,{V:()=>s});var r=n(69843),i=n.n(r),o=n(82776);let a=["currency","currency-truncated","dollar","dollar-truncated"],s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD",r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=i()(e)||!isFinite(e)||0===e&&"duration-countdown"!==t&&!l,c=a.includes(t),d=e?c&&r?e/100:e:0,p=1>Math.abs(d),f=.01>Math.abs(d);if(u)return"-";switch(t){case"number":return new Intl.NumberFormat(s,{maximumFractionDigits:2,maximumSignificantDigits:p?2:void 0}).format(d);case"percent":return new Intl.NumberFormat(s,{style:"percent",maximumFractionDigits:2,maximumSignificantDigits:f?2:void 0}).format(d);case"dollar":return new Intl.NumberFormat(s,{style:"currency",currency:"USD",minimumFractionDigits:2*!!p,maximumFractionDigits:2}).format(d);case"currency":{let t=new Intl.NumberFormat(s,{style:"currency",currency:n,minimumFractionDigits:2*!!p,maximumFractionDigits:2});return r?(0,o.centsToPriceString)(e,n):t.format(d)}case"number-truncated":return new Intl.NumberFormat(s,{notation:"compact",compactDisplay:"short",maximumSignificantDigits:p?2:3}).format(d).toUpperCase();case"dollar-truncated":return new Intl.NumberFormat(s,{style:"currency",currency:"USD",notation:"compact",compactDisplay:"short",minimumFractionDigits:p?2:void 0,maximumFractionDigits:2,maximumSignificantDigits:p?void 0:3}).format(d).toUpperCase();case"currency-truncated":return new Intl.NumberFormat(s,{style:"currency",currency:n,notation:"compact",compactDisplay:"short",minimumFractionDigits:p?2:void 0,maximumFractionDigits:2,maximumSignificantDigits:p?void 0:3}).format(d).toUpperCase();case"duration-countdown":{let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=new Intl.NumberFormat(s,{minimumIntegerDigits:2,useGrouping:!1});return"".concat(i.format(n),":").concat(i.format(r),":").concat(i.format(t%60))}case"duration":{let t=e<0,n=t?Math.ceil(e/1e3):Math.floor(e/1e3),r=t?Math.ceil(n/3600):Math.floor(n/3600),i=t?Math.ceil(n%3600/60):Math.floor(n%3600/60),o=n%60,a=new Intl.NumberFormat(s,{style:"unit",unit:"hour",unitDisplay:"narrow"}),l=new Intl.NumberFormat(s,{style:"unit",unit:"minute",unitDisplay:"narrow"}),u=new Intl.NumberFormat(s,{style:"unit",unit:"second",unitDisplay:"narrow"});if(Math.abs(r)>0)return"".concat(a.format(r).toUpperCase(),"\n ").concat(Math.abs(i)>0?" ".concat(l.format(i).toUpperCase()):"","\n ").concat(Math.abs(o)>0?" ".concat(u.format(o).toUpperCase()):"");if(Math.abs(i)>0)return"".concat(l.format(i).toUpperCase(),"\n ").concat(Math.abs(o)>0?" ".concat(u.format(o).toUpperCase()):"");return"".concat(u.format(o).toUpperCase())}default:return"-"}}},32848:function(e,t,n){"use strict";n.d(t,{C8:()=>h,K5:()=>b,NL:()=>_,Of:()=>f,n7:()=>g,xA:()=>y});var r=n(69277),i=n(70408),o=n(32641),a=n(50014),s=n.n(a),l=n(17402),u=n(94729),c=n(38704),d=n(82776);let p={hasLoadedOnce:!1,publications:[],subscriptions:[],publicationUsers:[],publicationMap:new Map,subscriptionMap:new Map,publicationUserMap:new Map,publicationsWithPledges:[]};function f(e){let{isLoggedIn:t}=e,[n,o]=(0,l.useState)((0,i._)((0,r._)({},p),{hasLoadedOnce:!t})),a=e=>{o(t=>{let n=s()([...t.publications,...e.publications],e=>e.id),r=s()([...t.subscriptions,...e.subscriptions],e=>e.publication_id),i=s()([...t.publicationUsers,...e.publicationUsers],e=>e.publication_id);return{hasLoadedOnce:!0,publications:n,subscriptions:r,publicationUsers:i,publicationMap:new Map(n.map(e=>[e.id,e])),subscriptionMap:new Map(r.map(e=>[e.publication_id,e])),publicationUserMap:new Map(i.map(e=>[e.publication_id,e])),publicationsWithPledges:[...t.publicationsWithPledges,...e.publicationsWithPledges]}})};(0,l.useEffect)(()=>{if("serviceWorker"in navigator){let e=async e=>{var t;if((null==(t=e.data)?void 0:t.type)==="subscriptions-update"){let{payload:t}=e.data;t.ok&&a(t.json)}};return navigator.serviceWorker.addEventListener("message",e),()=>{navigator.serviceWorker.removeEventListener("message",e)}}},[]),(0,l.useEffect)(()=>{t&&(async()=>{try{for await(let e of v("/api/v1/subscriptions/page_v2",{getPageInit(e,t){let n=null==e?void 0:e.nextCursor;return n?(0,i._)((0,r._)({},t),{query:(0,i._)((0,r._)({},t.query),{cursor:n})}):null}}))a(e)}catch(e){console.warn(e)}})()},[t]);let d=(e,t)=>{let{subscription:n,publicationUser:a}=t;o(t=>{var o,s,l;let u;return t=n?(0,i._)((0,r._)({},t),{subscriptions:t.subscriptions.map(e=>e.publication_id===n.publication_id?n:e),subscriptionMap:(0,c.Jb)(t.subscriptionMap,e,n)}):m(t,e),t=a?(0,i._)((0,r._)({},t),{publicationUsers:(o=t.publicationUsers,s=t=>t.publication_id===e,l=a,(u=(o=o.slice()).findIndex(s))>=0?o[u]=l:o.push(l),o),publicationUserMap:(0,c.Jb)(t.publicationUserMap,e,a)}):(0,i._)((0,r._)({},t),{publicationUsers:t.publicationUsers.filter(t=>t.publication_id!==e),publicationUserMap:(0,c.QT)(t.publicationUserMap,e)})})},f=async e=>{try{let t=await (0,u.x6)("/api/v1/subscription/".concat(e));d(e,t)}catch(t){t instanceof u.fk&&(404===t.response.status?o(t=>m(t,e)):console.error(t))}};return{result:n,isLoading:!1,hasLoadedOnce:n.hasLoadedOnce,refetch:async()=>n,refetchPublication:f,updatePublication:d,removeByPubId:e=>o(t=>m(t,e)),updateSubscriptions:e=>{o(t=>(0,i._)((0,r._)({},t),{subscriptions:e,subscriptionMap:new Map(e.map(e=>[e.publication_id,e]))}))}}}function m(e,t){let n=e.subscriptions.filter(e=>e.publication_id!==t);return(0,i._)((0,r._)({},e),{subscriptions:n,subscriptionMap:new Map(n.map(e=>[e.publication_id,e]))})}let h=(0,l.createContext)({result:null,isLoading:!1,hasLoadedOnce:!1,refetch:()=>Promise.resolve(p),refetchPublication:()=>Promise.resolve(),updatePublication(){},removeByPubId:()=>{},updateSubscriptions:()=>{}});function g(){return(0,l.useContext)(h)}function b(e){var t;let{subscriptionMap:n,publicationUserMap:r,publicationsWithPledges:i}=null!=(t=g().result)?t:{subscriptionMap:new Map,publicationUserMap:new Map,publicationsWithPledges:[]};return{subscription:n.get(e),publicationUser:r.get(e),is_pledged:!!(null==i?void 0:i.includes(e))}}function _(e){let{subscription:t,publicationUser:n,is_pledged:r}=b(e),i=(null==t?void 0:t.membership_state)==="free_signup",o=(null==t?void 0:t.membership_state)==="subscribed",a=!!(null==t?void 0:t.is_founding),s=!!(n&&(0,d.isAtLeastContributorRole)(n.role));return{subscription:t,publicationUser:n,isFreeSubscribed:i,isPaid:o,isSubscribed:i||o||s,isAuthor:s,isFounding:a,isPledged:r}}function y(e){var t,n;let{publicationUsers:r}=null!=(t=g().result)?t:{publicationUsers:[]};return null!=(n=r.find(t=>t.publication_id===e))?n:null}async function*v(e,t){var{getPageInit:n}=t,r=(0,o._)(t,["getPageInit"]);let i=await (0,u.x6)(e,r);yield i;let a=n(i,r);for(;null!=a;)i=await (0,u.x6)(e,a),yield i,a=n(i,r)}},40659:function(e,t,n){"use strict";n.d(t,{Fg:()=>T,HM:()=>S,XG:()=>g,cf:()=>m,l:()=>_,oy:()=>P,rG:()=>k,tO:()=>b,wX:()=>w});var r=n(69277),i=n(70408),o=n(4006),a=n(17402),s=n(25006),l=n(17186),u=n(49807),c=n(82776),d=n(84985);let p="session_attribution";function f(e){try{(0,l.X3)(p,e)}catch(e){console.error("cannot set attribution data",e)}}function m(){let e;try{var t;e=null!=(t=(0,l.xm)(p))?t:{}}catch(e){return{}}return(0,i._)((0,r._)({},(0,c.extractAttributionDataFromRecord)(e)),{referrer:"undefined"!=typeof window?g():void 0})}let h=null;function g(){var e,t;let n=null!=(t=null==(e=window)?void 0:e._src_ref)?t:new URL(window.location.href).searchParams.get("_src_ref");return document.referrer.startsWith("https://open.substack.com")&&null!=n?n:null!=h?h:document.referrer}function b(e){h=e}function _(){if("undefined"!=typeof window&&"undefined"!=typeof document){if(null==window.location)return;let e={href:window.location.href,referrer:g(),timestamp:+new Date};window.location.hostname===u.sXh.hostname&&function(e){let t=(0,l.xm)(p);if(null==t)f({sessionStart:e.timestamp,originalReferrer:e.referrer,landingPage:e.href,landingSurface:y(e.href),landingSurfaceId:v(e.href),landingPublicationId:e.publicationId,visits:[e]});else{var n,r;let i,o=+new Date;(null==(n=t.visits)?void 0:n.length)===0&&(i=!0),(null==t||null==(r=t.visits)?void 0:r.length)>0&&o-t.visits[0].timestamp>=9e5&&(i=!0),(null==e.referrer||""==e.referrer)&&(i=!0),e.timestamp-t.sessionStart<700&&null==t.landingPublicationId&&null!=e.publicationId&&(i=!0),f({sessionStart:i?e.timestamp:t.sessionStart,originalReferrer:i?e.referrer:t.originalReferrer,landingPage:i?e.href:t.landingPage,landingSurface:i?y(e.href):t.landingSurface,landingSurfaceId:i?v(e.href):t.landingSurfaceId,landingPublicationId:i?e.publicationId:t.landingPublicationId,visits:[e,...t.visits].slice(0,20)})}}(e)}}let y=e=>{let t=new URL((0,u.Ewe)()).hostname;if(null==e)return"feed";let n=new URL(e);return t!==n.hostname?"publisher":n.pathname.startsWith("/chat/")?"chat":e.includes("/note/c-")?"note":e.includes("/post/p-")||n.pathname.startsWith("/p/")||n.pathname.startsWith("/inbox/post/")?"post":e.includes("/profile")||n.pathname.startsWith("/@")?"profile":void 0},v=e=>{if(null==e)return;let t=e.match(/\/[a-z]-(\w+)$/i);return t?t[1]:void 0},w=()=>{let{iframeRef:e,frameReady:t,setFrameReady:n,setAttributionParams:r}=E(),i=(0,s.df)();(0,a.useEffect)(()=>(window.addEventListener("message",l),()=>window.removeEventListener("message",l)),[]);let l=e=>{var t;(null==(t=e.data)?void 0:t.attributionReady)===!0&&n()};return((0,a.useEffect)(()=>{var n,r;if(t&&(null==e||null==(n=e.current)?void 0:n.contentWindow)){let t=e.current.contentWindow,n={href:window.location.href,referrer:g(),timestamp:+new Date,type:"log_and_fetch_attribution",publicationId:null!=(r=null==i?void 0:i.id)?r:void 0};null==t||t.postMessage(n,"".concat((0,u.Ewe)()))}},[t,i]),(0,a.useEffect)(()=>{let e=e=>{var t;(null==(t=e.data)?void 0:t.attributionData)!=null&&r(e.data.attributionData)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),"undefined"==typeof window)?null:(0,o.Y)("iframe",{className:d.A.visitedSurfacesIFrame,ref:e,src:"".concat((0,u.Ewe)(),"/session-attribution-frame"),width:"0",height:"0"})},S=(0,a.createContext)({iframeRef:null,getSessionAttribution:()=>({}),isDefaultValue:!0,frameReady:!1,setFrameReady:()=>{},attributionParams:null,setAttributionParams:()=>{}}),E=()=>(0,a.useContext)(S),T=e=>{let t,{children:n}=e,r=E(),[i,s]=(0,a.useState)(!1),l=(0,a.useRef)(null),[u,c]=(0,a.useState)(null);return t=r.isDefaultValue?{iframeRef:l,getSessionAttribution:()=>null!=u?u:m(),isDefaultValue:!1,frameReady:i,setFrameReady:()=>s(!0),attributionParams:u,setAttributionParams:c}:{iframeRef:r.iframeRef,getSessionAttribution:r.getSessionAttribution,isDefaultValue:!1,frameReady:r.frameReady,setFrameReady:r.setFrameReady,attributionParams:r.attributionParams,setAttributionParams:r.setAttributionParams},(0,o.Y)(S.Provider,{value:t,children:n})};function k(){let{getSessionAttribution:e}=E();return e()}function P(){let{attributionParams:e}=E();return"undefined"!=typeof window&&window.location.hostname===u.sXh.hostname||null!==e}},8312:function(e,t,n){"use strict";n.d(t,{BE:()=>u,OK:()=>m,VW:()=>o,a_:()=>a,n0:()=>h,s1:()=>f,tr:()=>i,tt:()=>p});var r=n(69277);let i="'SF Pro Display', -apple-system, system-ui, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";function o(e){return"keys"in e}let a=[{label:"Serif",families:[{name:"Andada Pro",weights:[600,700,800],defaultWeight:800,fallback:"sans-serif"},{name:"Besley",weights:[700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"Bitter",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"IBM Plex Serif",weights:[500,600,700],defaultWeight:700,fallback:"sans-serif"},{name:"Lora",weights:[500,600,700],defaultWeight:600,fallback:"sans-serif"},{name:"Roboto Slab",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"STIX Two Text",weights:[500,600,700],defaultWeight:700,fallback:"sans-serif"},{name:"Yrsa",weights:[500,600,700],defaultWeight:700,fallback:"sans-serif"}]},{label:"Sans Serif",families:[{name:"System",weights:[700,900],defaultWeight:700,fallback:"sans-serif",keys:{700:"sans",900:"heavy_sans"}},{name:"Fira Sans",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"Inter Tight",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"Lato",weights:[700,900],defaultWeight:900,fallback:"sans-serif"},{name:"Nunito Sans",weights:[600,700,800,900],defaultWeight:800,fallback:"sans-serif"},{name:"PT Sans",weights:[700],defaultWeight:700,fallback:"sans-serif"},{name:"Raleway",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"Roboto",weights:[600,700,800,900],defaultWeight:700,fallback:"sans-serif"},{name:"Source Sans 3",weights:[600,700,800,900],defaultWeight:800,fallback:"sans-serif"}]},{label:"Monospace",families:[{name:"Roboto Mono",weights:[500,600,700],defaultWeight:700,fallback:"monospace"}]}],s=[{name:"Lora",weights:[400],defaultWeight:400,fallback:"sans-serif"},{name:"Roboto Mono",weights:[400],defaultWeight:400,fallback:"monospace"},{name:"Roboto Slab",weights:[400],defaultWeight:400,fallback:"sans-serif"},{name:"Spectral",weights:[400],defaultWeight:400,fallback:"sans-serif"}];function l(e,t){return"".concat(e.toLowerCase().replace(/ /g,"_"),"_").concat(t)}[...a.flatMap(e=>e.families).filter(e=>!o(e)),...s];let u={heading:{fancy_serif:"lora_600",mono:"roboto_mono_700",slab:"roboto_slab_700"},body:{fancy_serif:"lora_400",classic_serif:"spectral_400",mono:"roboto_mono_400",slab:"roboto_slab_400"}};function c(e,t){if(!o(t))for(let n of t.weights){let r={font:t.name,weight:n,fallback:t.fallback};e[l(t.name,n)]=r}}let d=function(){let e={},t={};for(let t of a)for(let n of t.families)c(e,n);for(let e of s)c(t,e);return{heading:e,body:t}}();for(let[e,t]of Object.entries(u.heading)){let n=d.heading[t];n&&(d.heading[e]=n)}for(let[e,t]of Object.entries(u.body)){let n=d.body[t];n&&(d.body[e]=n)}let p=[{key:"fancy_serif",label:"Fancy Serif"},{key:"sans",label:"Sans"},{key:"heavy_sans",label:"Heavy Sans"},{key:"mono",label:"Mono"},{key:"slab",label:"Slab"}];function f(e){let{family:t,weight:n}=e;if(o(t)){let e=t.keys[n];return e||t.keys[t.defaultWeight]}return l(t.name,n)}let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;if("sans"===e)return{fontFamily:i,fontWeight:700};if("heavy_sans"===e)return{fontFamily:i,fontWeight:900};let n=d.heading[e];if(!n)return null;let o=n.font.match(" ")?"'".concat(n.font,"'"):n.font;return(0,r._)({fontFamily:t?n.fallback:[o,n.fallback].join(",")},n.weight&&{fontWeight:n.weight})},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;if("sans"===e)return{fontFamily:i,fontWeight:400};let n=d.body[e];if(!n)return null;let o=n.font.match(" ")?"'".concat(n.font,"'"):n.font;return(0,r._)({fontFamily:t?n.fallback:[o,n.fallback].join(",")},n.weight&&{fontWeight:n.weight})}},56458:function(e,t,n){"use strict";n.d(t,{$P:()=>M,Ed:()=>_,Fk:()=>g,G8:()=>T,Jh:()=>I,Jy:()=>d,NJ:()=>x,QN:()=>w,QP:()=>v,Vr:()=>R,XP:()=>b,Xk:()=>N,a8:()=>y,aw:()=>c,cK:()=>f,fP:()=>S,fk:()=>P,m4:()=>E,pf:()=>A,rI:()=>C,th:()=>p,wq:()=>U,zN:()=>m});var r=n(4016),i=n(27162),o=n(67734),a=n(39318),s=n(49807),l=n(82776);let u=e=>{var t;return!!(null==e?void 0:e.sections)&&(null==(t=e.sections)?void 0:t.length)>0},c=e=>!!(null==e?void 0:e.podcast_enabled),d=e=>!!e&&(e=>{if(!e)return 0;let t=[];return u(e)&&(t=p(e)),+!!c(e)+t.length})(e)>0,p=e=>e&&u(e)?e.sections.filter(e=>e.is_podcast):[],f=e=>!!e&&!!(e.is_free_subscribed&&!e.is_subscribed),m=e=>!!e&&"enabled"===e.payments_state,h=function(e){let{usePreview:t=!1,useDraft:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(null==e?void 0:e.type){case"newsletter":return n?e.draftVoiceoverUpload:e.voiceoverUpload;case"podcast":if(t)return n?e.draftPodcastPreviewUpload:e.podcastPreviewUpload;return n?e.draftPodcastUpload:e.podcastUpload;case"video":return n?e.draftVideoUpload:e.videoUpload;default:return null}},g=function(e){let{usePreview:t=!1,useDraft:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;let r=h(e,{usePreview:t,useDraft:n});if(r){var i;return null!=(i=r.duration)?i:null}if((null==e?void 0:e.type)==="podcast"&&!t){let t=n?e.draft_podcast_duration:e.podcast_duration;return null!=t?t:null}return null},b=e=>!!e&&"podcast"===e.type&&!!e.podcastUpload&&!!e.podcastUpload.is_free_preview,_=e=>{var t;let{post:n}=e;return!!n&&!!(null==(t=n.podcastFields)?void 0:t.free_podcast_url)},y=e=>{var t,n;return e.is_www?null!=(n=e.logo_url)?n:void 0:e.logo_url||e.cover_photo_url||e.author_photo_url||(null==(t=e.author)?void 0:t.photo_url)},v=e=>{var t;return e&&"plans"in e&&Array.isArray(null==e?void 0:e.plans)&&null!=(t=e.plans.find(e=>(0,i.T)({plan:e})))?t:null},w=e=>!!v(e),S=e=>{let{pub:t,currency:n}=e,r=v(t);return r?(0,o.oW)(r,n):null},E=e=>{var t,n;if((0,r.s7)({pub:e}))return"Founders";let i=v(e);return null!=(n=null==i||null==(t=i.metadata)?void 0:t.short_description)?n:null},T=(e,t)=>(null==t?void 0:t.audience)==="founding"&&E(e)||"paid",k=e=>{let{pub:t,url:n}=e;return!!n.includes("api.substack.com")&&(n.includes("/feed/podcast/".concat(t.id,"/s/"))||n.includes("/feed/podcast/".concat(t.id,".rss")))},P=e=>!!e&&!!e.podcast_enabled&&(!e.podcast_feed_url||!k({pub:e,url:e.podcast_feed_url})),A=e=>{var t;let{pub:n,section:r}=e;if(!r.is_podcast)return!1;let i=(null==(t=r.podcastSettings)?void 0:t.podcast_feed_url)||null;return!i||!k({pub:n,url:i})},I=e=>{var t,n;let{pub:r,includeMainPub:i,excludePodcasts:o}=e;if(!r)return[];let u=[];return i&&u.push({name:r.name,description:null!=(n=r.hero_text)?n:"",logoUrl:r.logo_url,sectionId:null,linkUrl:(0,a.qy7)(r),defaultOn:!0}),null==(t=r.sections)||t.forEach(e=>{(!o||!e.is_podcast||(0,l.sectionIsSpecificallyMarkedAsNewsletter)({section:e,pub:r}))&&u.push({name:e.name,description:e.description,logoUrl:e.logo_url,sectionId:e.id,linkUrl:(0,s.Dor)(r,{section:e}),defaultOn:e.is_default_on})}),u};function R(e){let{sub:t}=e;return!!t&&!!t.plan&&!!t.is_founding&&"metadata"in t.plan&&!!t.plan.metadata&&!t.plan.metadata.fixed_price}let C=e=>{var t;let{post:n,section:r,pub:i}=e;return!!n.videoUpload&&("video"===n.type||!!(null==(t=n.podcastFields)?void 0:t.hide_from_feed)||!!(!r&&!i.podcast_enabled)||!!(r&&!r.is_podcast))};function N(e){var t;let{post:n,pub:r,section:i}=e;return(null==(t=n.podcastFields)||!t.hide_from_feed)&&(i?i.is_podcast:c(r))}let U=e=>{var t,n,r,i,o;return!!(null==e||null==(r=e.videoUpload)||null==(n=r.extractedAudio)||null==(t=n.transcription)?void 0:t.transcript_url)||!!(null==e||null==(o=e.podcastUpload)||null==(i=o.transcription)?void 0:i.transcript_url)},x=e=>{var t,n,r,i,o,a;return null!=(a=null!=(o=null==e||null==(n=e.videoUpload)||null==(t=n.extractedAudio)?void 0:t.transcription)?o:null==e||null==(r=e.podcastUpload)?void 0:r.transcription)?a:null==e||null==(i=e.videoUpload)?void 0:i.transcription},M=e=>{var t,n;let{pub:r}=e;return(null==r||null==(t=r.theme)?void 0:t.home_posts)==="list"&&!!(null==r||null==(n=r.theme)?void 0:n.hide_images_from_list)}},4016:function(e,t,n){"use strict";n.d(t,{C3:()=>I,JQ:()=>p,K:()=>u,NO:()=>function e(t){return"pub"in t?e({pubId:t.pub.id}):10845===t.pubId},S2:()=>s,Tu:()=>R,V6:()=>l,b8:()=>g,d4:()=>h,dm:()=>T,eh:()=>A,lu:()=>c,ob:()=>m,ot:()=>P,rD:()=>S,ri:()=>b,s7:()=>a,wj:()=>f,zM:()=>_});var r=n(83673),i=n.n(r);let o=new Set([0x83c163a,0x82bc701,0x81adcb6,0x8455987,0x8487b09,0x85eb9a5,0x861de49,0x8653d00,0x868d293,0x86f9884,0x872b528,0x8798da8,0x87d48d6,0x8809a67,0x883f640,0x8961657,0x8aedf0b,0x8bc9b46,0x8559743,0x887329b,0x888f704,0x88a9886,0x8910626,0x8999664,0x89d3d02,0x8a084ae,0x8c6f81e,0x8cb3c01,0x8cf2aa9,0x90a54a4,0x9aa80e8]);function a(e){let{pub:t,includeTheRampart:n=!1}=e;return!!t&&("thebulwark"===t.subdomain||87281===t.id||!!n&&("therampart"===t.subdomain||1620566===t.id))}function s(e){let{pub:t}=e;return!!t&&228030===t.id}let l=e=>"privatewires"===e?"https://privatewires.net":"pwprod"===e?"https://pirate-wires-island.vercel.app":"piratewires"===e?"https://www.piratewires.com":"thefreedomfrequency"===e?"https://thefreedomfrequency.org":"preamblestaging521"===e?"https://staging-thepreamble.vercel.app":"sharonmcmahon"===e?"https://thepreamble.com":void 0;function u(e){let{pub:t}=e;return!!t&&(2510348===t.id||8467846===t.id)}function c(e){let{pub:t,includeThePrepress:n=!0}=e;return!!t&&("bariweiss"===t.subdomain||260347===t.id||!!n&&("theprepress"===t.subdomain||3116199===t.id))}let d=[/the front page/i,/tgif/i,/the weekend press/i],p=e=>{let{pub:t}=e;return i()(d.map(e=>t.sections.find(t=>t.name.match(e)))).map(e=>e.id)};function f(e){let{pub:t}=e;return 2325511===t.id}function m(e){let{pub:t}=e;return 5619506===t.id}function h(e){let{pub:t}=e;return 2857530===t.id}function g(e){let{pub:t}=e;return!!t&&"polymarket"===t.subdomain}function b(e){let{pub:t}=e;return 471923===t.id}function _(e){let{post:t}=e;return!!t&&o.has(t.id)&&!!t.podcast_preview_upload_id}let y={87908:"morning-shots",87934:"the-triad",87969:"press-pass",87950:"overtime",87957:"bulwark-podcast",87956:"screen-time",87963:"the-next-level",104848:"george-conway-explains-it-all",87971:"the-focus-group",87958:"beg-to-differ",87975:"movie-aisle",87961:"the-secret-podcast",87964:"between-us",87978:"thursday-night-bulwark",135716:"the-michael-steele-podcast",111316:"shield-of-the-republic"},v={62624:"morning-shots",62631:"the-triad",62634:"overtime",62636:"press-pass",62639:"bulwark-podcast",62641:"beg-to-differ",62642:"the-secret-podcast",62644:"the-next-level",62645:"movie-aisle",62646:"between-us",62647:"the-focus-group",62648:"thursday-night-bulwark"},w=new Set(["beg-to-differ","between-us","bulwark-podcast","george-conway-explains-it-all","the-focus-group","the-next-level","the-secret-podcast","thursday-night-bulwark","the-michael-steele-podcast"]),S=e=>{let{sectionId:t}=e;return!!t&&(w.has(y[t])||w.has(v[t]))},E=new Set(["between-us","the-secret-podcast","thursday-night-bulwark"]),T=e=>{let{sectionId:t}=e;return!!t&&(E.has(y[t])||E.has(v[t]))},k=new Set(["bulwark-podcast","the-focus-group","beg-to-differ","george-conway-explains-it-all","the-next-level","the-michael-steele-podcast","shield-of-the-republic"]),P=e=>{let{sectionId:t}=e;return t&&(k.has(y[t])||k.has(v[t]))?["audio","video"]:["audio"]},A=e=>{let{user:t}=e;return t.is_founding?"/account/gifts/founding":"/subscribe?gift=true"};function I(e){let{pub:t}=e;return"privatewires"===t.subdomain||"pwprod"===t.subdomain||"piratewires"===t.subdomain}function R(e){var t;let{post:n,pub:r}=e;if(!I({pub:r}))return!1;let i=null!=(t=n.draft_section_id)?t:n.section_id;if(i&&r.sections){let e=r.sections.find(e=>e.id===i);if(e&&"Pirate Wires Daily"===e.name)return!0}return!1}},28194:function(e,t,n){"use strict";n.d(t,{Ov:()=>i,nW:()=>o,xB:()=>a}),n(42877),n(54584),n(67734);var r=n(82776);function i(e){return"bundle_id"in e}function o(e){return i(e)?"bundle:".concat(e.bundle_id,":").concat(e.interval):e.id}function a(e){let{amount:t,interval:n="",language:i="en",locale:o,isOneOff:a=!1,truncateInterval:s=!1,omitInterval:l=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=(0,r.centsToPriceString)(null!=t?t:e.amount,e.currency,{locale:o});if("forever"!==e.interval){let t=n||e.interval,{iPlural:r,iString:o}=I18N.i(i);if(a||l)return u;if(3===e.interval_count){if("day"===t)return o("%1/three days",u);else if("month"===t)return o("%1/three months",u);else if("week"===t)return o("%1/three weeks",u);else if("year"===t)return o("%1/three years",u)}if("day"===t)return r("%2/day","%2/%1 days",e.interval_count,u);if("month"===t)return s?r("%2/mo","%2/%1 mos",e.interval_count,u):r("%2/month","%2/%1 months",e.interval_count,u);if("week"===t)return r("%2/week","%2/%1 weeks",e.interval_count,u);else if("year"===t)return s?r("%2/yr","%2/%1 yrs",e.interval_count,u):r("%2/year","%2/%1 years",e.interval_count,u)}return u}},56262:function(e,t,n){"use strict";n.r(t),n.d(t,{getAllAudiences:()=>d,getAudiencesForPublicListing:()=>p,getCommentAuthor:()=>R,getCoverImageUrl:()=>C,getDurationForPostPreview:()=>U,getFoundingAudiences:()=>m,getFreePodcastUrl:()=>N,getPaidAudiences:()=>f,getPostAuthor:()=>I,getPreamble:()=>x,isFoundingAudience:()=>g,isPaidAudience:()=>h,isSubscriptionLevel:()=>b,previewSubHasFullAccessToPost:()=>P,pubRoleHasFullAccessToPost:()=>T,pubRolesHaveFullAccessToPost:()=>k,subHasFullAccessToPost:()=>S,userHasAccessToAudience:()=>v,userHasCommentAccess:()=>E,userHasFullAccessToPost:()=>w});var r=n(69277),i=n(32641),o=n(82776);let a=["founding","only_paid","everyone","only_free"],s=["founding","only_paid","everyone"],l=["founding","only_paid"],u=["founding"],c=["free","paid","founding"];function d(){return[...a]}function p(){return[...s]}function f(){return[...l]}function m(){return[...u]}function h(e){return f().includes(e)}function g(e){return m().includes(e)}function b(e){return c.map(String).includes(e)}function _(e,t){if(!t||(null==e?void 0:e.subscription_publication_id)===t){if((null==e?void 0:e.is_founding)||(null==e?void 0:e.is_contributor))return"founding";if(null==e?void 0:e.is_subscribed)return"paid"}return"free"}function y(e){switch(e){case"founding":return["founding"];case"only_paid":return["paid","founding"];case"only_free":return["free"];case"everyone":return["free","paid","founding"];default:throw Error("Unknown audience: ".concat(e))}}function v(e,t,n){let r=_(e,t);return y(n).includes(r)}function w(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");if(e&&e.is_contributor&&e.subscription_publication_id===t.publication_id)return!0;let n=_(e,t.publication_id);return y(t.audience).includes(n)}function S(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");let n=function(e,t){if(!t||(null==e?void 0:e.publication_id)===t){if((null==e?void 0:e.membership_state)==="subscribed"&&(null==e?void 0:e.is_founding))return"founding";if((null==e?void 0:e.membership_state)==="subscribed")return"paid"}return"free"}(e,t.publication_id);return y(t.audience).includes(n)}function E(e,t){if(!t)return!1;if(e&&e.is_contributor&&e.subscription_publication_id===t.publication_id)return!0;let n=_(e,t.publication_id);return"everyone"===t.write_comment_permissions?!!e:"only_paid"===t.write_comment_permissions&&("founding"===n||"paid"===n)}function T(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");let n=(0,o.isAtLeastContributorRole)(null==e?void 0:e.role)||(null==e?void 0:e.membership_state)==="subscribed"&&(null==e?void 0:e.is_founding)?"founding":(null==e?void 0:e.membership_state)==="subscribed"?"paid":"free";return y(t.audience).includes(n)}function k(e,t){return!!(t&&T(null==e?void 0:e[t.publication_id],t))}function P(e,t,n){let{audienceOverride:r}=n;if(!t)return!1;if(!t.audience&&!r)throw Error("Post has no audience");return y(null!=r?r:t.audience).includes(e)}function A(e){let{user_id:t}=e,n=(0,i._)(e,["user_id"]);return(0,r._)({id:t},n)}function I(e,t){var n,r;let{preferredUserId:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=null==(n=t.publishedBylines)?void 0:n.find(e=>e.id===i);if(a)return a;let s=null==(r=t.publishedBylines)?void 0:r[0];if(s)return s;let l=e.contributors.find(e=>e.user_id===i&&(0,o.isAtLeastContributorRole)(e.role));if(l)return A(l);let u=e.contributors.find(e=>e.owner);if(u)return A(u);let c=e.contributors.find(e=>(0,o.isAtLeastContributorRole)(e.role));return c?A(c):{id:e.author_id,name:e.author_name,photo_url:e.author_photo_url,bio:e.author_bio}}function R(e){var t,n,r,i,o,a,s,l,u,c,d,p,f,m,h,g,b,_;return{id:null!=(u=null!=(l=null==(t=e.user)?void 0:t.id)?l:e.user_id)?u:-1,name:null!=(d=null!=(c=null==(n=e.user)?void 0:n.name)?c:e.name)?d:"",handle:null!=(p=null==(r=e.user)?void 0:r.handle)?p:e.handle,photo_url:null!=(f=null==(i=e.user)?void 0:i.photo_url)?f:e.photo_url,bestseller_tier:null!=(h=null!=(m=null==(o=e.user)?void 0:o.bestseller_tier)?m:e.user_bestseller_tier)?h:null,status:null!=(b=null!=(g=null==(a=e.user)?void 0:a.status)?g:e.userStatus)?b:null,primary_publication:null!=(_=null==(s=e.user)?void 0:s.primary_publication)?_:e.user_primary_publication}}function C(e){return!e.cover_image||/12634ced-0eb6-4238-a94a-70ab242c5ad8/.test(e.cover_image)||/fa15c776-f514-42fe-8ee0-4c94148a0a8a/.test(e.cover_image)||/8826edac-0d50-4ba0-b861-f3ed9336878b/.test(e.cover_image)||/49be2356-6491-4a6f-84a5-15e99d23b6d1/.test(e.cover_image)?null:e.cover_image}function N(e){var t,n;let{post:r}=e;return null!=(n=null==(t=r.podcastFields)?void 0:t.free_podcast_url)?n:null}function U(e){var t,n,r,i,o,a,s,l;let{post:u}=e;return null!=(l=null!=(s=null!=(a=null!=(o=null==(t=u.videoUpload)?void 0:t.duration)?o:null==(r=u.podcastUpload)||null==(n=r.full_podcast_info)?void 0:n.duration)?a:null==(i=u.podcastUpload)?void 0:i.duration)?s:u.podcast_duration)?l:0}function x(e,t,n){let{is_freemail:r,is_free_preview:i,sectionEmailRenderElements:a}=n,s=(e,n)=>{var r,i;let o=!("section"in t&&(null==(r=t.section)?void 0:r.ignore_publication_email_settings));return null!=(i=null==a?void 0:a[n])?i:o?null==e?void 0:e[n]:null};return i?s(e.email_render_elements,"free_preview_preamble"):(0,o.isPaidPub)(e)?"everyone"===t.audience?s(e,r?"public_post_free_signup_preamble":"public_post_subscriber_preamble"):h(t.audience)?s(e,"subscriber_post_subscriber_preamble"):void 0:s(e.email_render_elements,"email_preamble_for_free_writer")}},58278:function(e,t,n){"use strict";n.d(t,{HN:()=>u,ID:()=>c,JG:()=>s,d9:()=>a,uB:()=>l});var r=n(12550),i=n.n(r),o=n(82776);let a=function(e){let{softMax:t=32,hardMax:n=48,extension:r=!1,extensionSeparator:o="-"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=s(e);if(a.length>t){let e=a.indexOf("-",t);-1!==e&&(a=a.substr(0,e))}a.length>n&&(a=a.substr(0,n));let l=r&&"string"==typeof r?r:i()().substr(0,3);return a?r&&(a+="".concat(o).concat(l)):a=l,a},s=function(e){let{hashIfEmpty:t=!1,allowUnicode:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(e||"").toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(n?RegExp("[^\\p{L}\\p{N}-]+","gu"):/[^\w-]+/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"");return e&&"string"==typeof e&&!r&&t?Array.from(e).map(e=>e.codePointAt(0)).map(e=>{var t;return null!=(t=null==e?void 0:e.toString(16))?t:""}).join("").substring(0,12):r},l=(e,t)=>s((0,o.truncateText)(e,500,{ellipsis:""}),{allowUnicode:t}),u=(e,t)=>{let n=l(e,!0),r=l(e,!1);return t<0x3f9b46c&&n!==r?r:n},c=e=>{var t;let n,{pub:r,slugOrId:i}=e,{id:o,slug:s}=isNaN(n=parseInt(i))||"".concat(n)!==i?{slug:a(i),id:null}:{slug:null,id:n};return r.authorPagesInfo&&null!=(t=r.authorPagesInfo.find(e=>o?e.user_id===o:a(e.name)===s))?t:null}},50129:function(e,t,n){"use strict";n.d(t,{CP:()=>s,Qg:()=>i,_d:()=>l,bO:()=>u,nJ:()=>r});let r={draft:"draft",review_required:"review_required",edit_review_required:"edit_review_required",published:"published",flagged:"flagged",blocked:"blocked",deleted:"deleted",moderator_approved:"moderator_approved",moderator_removed:"moderator_removed",new_commenter_approval_required:"new_commenter_approval_required"},i=new Set([r.review_required,r.edit_review_required,r.published,r.moderator_approved,r.new_commenter_approval_required]);var o,a,s=((o={}).Removed="removed",o.Unavailable="unavailable",o.BlockedYou="blocked-you",o.YouBlocked="you-blocked",o.YouMuted="you-muted",o.Geoblocked="geoblocked",o);function l(e){return"missing"===e.type}var u=((a={}).comments_disabled="comments_disabled",a.free_subscription_required="free_subscription_required",a.paid_subscription_required="paid_subscription_required",a.founding_subscription_required="founding_subscription_required",a)},19945:function(e,t,n){"use strict";n.d(t,{F7:()=>o,Tb:()=>i,pQ:()=>r,qQ:()=>a});let r=["list","grid","grid-groups","custom"],i={layout:"stacked",navPosition:"bottom",navStyle:"text"},o={backgroundColor:null,layout:"default",publicationNameBackgroundColor:null,publicationNamePosition:"bottom",publicationNameSize:50,publicationNameStyle:"text",showPublicationName:!0},a={backgroundColor:null,imageUrl:null,imageSize:null}},37764:function(e,t,n){"use strict";n.d(t,{E:()=>i.E,HG:()=>r.HG,S8:()=>a.S8,Tb:()=>l.Tb,Yj:()=>o.Y,hn:()=>s.h,j3:()=>a.j3,tL:()=>a.tL});var r=n(12632);n(15606);var i=n(47851),o=n(43708),a=n(75914);n(23246);var s=n(53217),l=n(19945);n(96129)},49807:function(e,t,n){"use strict";n.d(t,{$_T:()=>l.$_,AAD:()=>_,ADu:()=>F,AF5:()=>q,BpC:()=>l.Bp,Bte:()=>O,D0i:()=>p.D0,Dlv:()=>$,Dor:()=>X,EVw:()=>d.EV,EWE:()=>l.EW,Ewe:()=>l.Ew,FCy:()=>p.FC,H$$:()=>A,Hj9:()=>z,Hr8:()=>u.Hr,I_8:()=>E,I_S:()=>p.I_,JQq:()=>et,LG3:()=>I,LRz:()=>ef,M$q:()=>u.M$,MGs:()=>Q,MWx:()=>P,PcW:()=>ei,Pmx:()=>l.Pm,PuM:()=>er,Q6R:()=>b,QMq:()=>L,RKl:()=>w,RVH:()=>u.RV,RYA:()=>u.RY,Rtp:()=>eb,SJN:()=>U,ScI:()=>eh,Sns:()=>J,Tkp:()=>u.Tk,UUj:()=>D,U_V:()=>eo,VRc:()=>u.VR,Vvu:()=>u.Vv,W$o:()=>m.W$,Xrv:()=>M,Z96:()=>C,Zgx:()=>u.Zg,_h3:()=>B,_nG:()=>en,ahR:()=>eu,bzS:()=>j,cSL:()=>K,d4Y:()=>d.d4,d5y:()=>l.d5,dJ9:()=>d.dJ,e$6:()=>S,eV6:()=>v,eX$:()=>p.eX,ehp:()=>ec,erJ:()=>G,fmI:()=>m.fm,gAK:()=>es,gTK:()=>x,gYq:()=>m.gY,ii9:()=>V,j5y:()=>H,jED:()=>T,jQ6:()=>e_,jQM:()=>ed,jS:()=>el,k5Q:()=>ey,kGL:()=>u.kG,lz6:()=>em,muC:()=>R,naY:()=>eg,o4H:()=>m.o4,oT5:()=>u.oT,pU7:()=>y,pi1:()=>u.pi,py2:()=>p.py,q$n:()=>u.q$,qdI:()=>l.qd,rfn:()=>m.rf,sWz:()=>W,sXh:()=>l.sX,so2:()=>u.so,stX:()=>p.st,tLs:()=>ea,tvl:()=>h,v6Q:()=>g,vrI:()=>N,w1V:()=>u.w1,w4p:()=>l.w4,wVQ:()=>Z,wu9:()=>p.wu,wv4:()=>ep,xJz:()=>l.xJ,xWO:()=>Y,xdH:()=>k,xiU:()=>u.xi,yRP:()=>l.yR});var r=n(69277),i=n(70408),o=n(98111),a=n(4016),s=n(58278),l=n(92636),u=n(70189),c=n(41086),d=n(39891),p=n(18947),f=n(82776),m=n(28700);let h="/".concat("inbox"),g="/".concat("chat"),b="/".concat("activity"),_="/explore",y="/".concat("search");function v(e){let{root:t,user:n,addBase:r,skipToken:i=!1,doNotAutoSubmit:o=!1,params:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t?/[&?]$/.test(t)||(t.includes("?")||t.endsWith("%%")?t+="&":t+="?"):t=r?"".concat((0,l.$_)(e),"/subscribe?"):"/subscribe?",null==n?void 0:n.email)a.autoSubmit=!o,a.email=null==n?void 0:n.email;else if(!a.token&&!i){var s;a.token="undefined"!=typeof window&&(null==(s=window._preloads)?void 0:s.original_url)?(0,c.y)(window._preloads.original_url,"token"):null}return t+(0,l.Bp)(a)}function w(e){var t,n;let{pub:i,user:o,params:s}=e;return v(i,{addBase:!0,user:o,params:(0,r._)({},s,(0,a.s7)({pub:i})?{plan:"yearly300usd",upgrade_to_founding:!0}:{selectedPlanId:null==(n=i.plans)||null==(t=n.find(e=>{var t;return null==(t=e.metadata)?void 0:t.founding}))?void 0:t.id})})}function S(e){var t,n;let{pubId:r,postId:i,commentId:o,params:a,noBase:s,jumpToDestination:u}=e,c=!u&&(0,l.PH)()&&(!r||"undefined"!=typeof window&&(null==(n=window._preloads)||null==(t=n.pub)?void 0:t.id)===r),d=c?"/publish":s?"":(0,l.Ew)();return(0,l.yR)("".concat(d,"/chat").concat(r&&!c?"/".concat(r):"").concat(i?"/post/".concat(i):"").concat(o?"/reply/".concat(o):""),a)}function E(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.qd)(),"/send-reader-gifts/").concat(t.id),n)}function T(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/account/gifts"),n)}function k(e){let{giftId:t,token:n,params:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/accept-gift/").concat(t),(0,r._)({token:n},i))}function P(e){return"".concat((0,l.$_)(e),"/account")}function A(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/publish/stats/earnings"),n)}function I(e){let{pub:t}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/account"),{extra_seats:!0})}function R(e){let{addBase:t=!1,baseUrlOptions:n={},section:r="",params:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,l.yR)("".concat(function(e){let{addBase:t,baseUrlOptions:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e,n):"";return"".concat(r,"/publish")}(e,{addBase:t,baseUrlOptions:n}),"/settings"),i);return r&&(o+="#".concat(r)),o}function C(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e):"",i="".concat(r,"/publish/home");return n?(0,l.yR)(i,n):i}function N(e,t){let{addBase:n,params:o,referrer:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n?(0,l.$_)(e):"",u="".concat(s,"/meetings/book/").concat(t),c=(0,i._)((0,r._)({},o),{referrer:a});return o||a?(0,l.yR)(u,c):u}function U(e){let{addBase:t,params:n,referrer:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t?(0,l.$_)(e):"",s="".concat(a,"/meetings"),u=(0,i._)((0,r._)({},n),{referrer:o});return n||o?(0,l.yR)(s,u):s}function x(e){let{user_id:t,user_name:n,utm_source:r,utm_campaign:i,redirect:o}=e,a="".concat((0,l.qd)(),"/users/").concat(t),u=(0,s.JG)(n,{hashIfEmpty:!0});return u&&(a+="-".concat(u)),(0,l.yR)(a,{utm_source:r,utm_campaign:i,redirect:o})}function M(e){let{liveStreamId:t,utm_source:n,utm_campaign:i,params:o}=e;return(0,l.yR)("".concat((0,l.qd)(),"/live-stream/").concat(t),(0,r._)({utm_source:n,utm_campaign:i},o))}function D(e){let{liveStreamId:t,utm_source:n,utm_campaign:i,noBase:o,params:a}=e,s=o?"":(0,l.$_)();return(0,l.yR)("".concat(s,"/live-stream/").concat(t),(0,r._)({utm_source:n,utm_campaign:i},a))}function L(e){let{pub:t,utm_source:n,utm_campaign:r,utm_medium:i}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/livestream"),{utm_source:n,utm_campaign:r,utm_medium:i})}function F(e){let{noBase:t,isGif:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?"":(0,l.$_)();return"".concat(r,"/live-stream/").concat(e,"/preview.").concat(n?"gif":"jpg")}function B(e){let{tab:t,utm_source:n,utm_campaign:r,redirect:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/").concat(t),{utm_source:n,utm_campaign:r,redirect:i})}function O(e){let{subdomain:t,utm_source:n,utm_campaign:r,redirect:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/pub/").concat(t),{utm_source:n,utm_campaign:r,redirect:i})}function Y(e){let{pubKey:t,utm_source:n,utm_campaign:r,r:i,redirect:o,modal:a}=e;return(0,l.yR)("".concat((0,l.qd)(),"/pub/").concat(t,"/chat"),{utm_source:n,utm_campaign:r,redirect:o,modal:a,r:i})}function W(e){let{postId:t,targetReplyId:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s}=e;return(0,l.yR)("".concat((0,l.qd)(),"/chat/posts/").concat(t),{target_reply_id:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s})}function H(e){let{commentId:t,targetReplyId:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s}=e;return(0,l.yR)("".concat((0,l.qd)(),"/chat/replies/").concat(t),{target_reply_id:n,showTarget:o,utm_source:r,utm_campaign:i,redirect:a,modal:s})}function q(e){let{urlParams:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.Zg)(e,{baseUrl:(0,l.qd)(),urlParams:t})}function G(e){let{pub:t,params:n,section:r}=e;return r?(0,l.yR)("".concat((0,l.$_)(t),"/listen/").concat(r.slug,"/archive"),n):(0,l.yR)("".concat((0,l.$_)(t),"/podcast/archive"),n)}function $(e){let t=e.trim();if(/\s/.test(t))return null;try{let e=new URL(t);if(!["http:","https:"].includes(e.protocol))return null;return e}catch(e){return null}}let j=(e,t,n,r)=>{switch(e){case"user":default:return x({user_id:t,user_name:n,utm_source:"mentions"});case"pub":return r?(0,l.yR)(r,{utm_source:"mentions"}):""}};function V(e,t){let{addBase:n=!1,query:r={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.yR)("".concat(n?(0,l.$_)(e):"","/t/").concat(t.slug),r)}function z(e){let{strict:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){if(!t&&(e.startsWith(l.w4)||e.startsWith("https://res.cloudinary.com"))||(t?/^https:\/\/bucketeer[^/]*\.s3\.amazonaws\.com\//.test(e):e.startsWith("https://bucketeer")))return!0;let n="https://".concat((0,f.getPostMediaBucketName)(),".s3.amazonaws.com");if(e.startsWith(n))return!0}return!1}function J(e){return!!function(e){let t;if(!e)return null;try{t=new URL(e)}catch(e){return null}if(!t.hostname.startsWith("open.substack.com"))return null;let n=/\/pub\/([^/?#]+)\/p\/([^/?#]+)/.exec(t.pathname);return n&&n[1]&&n[2]?{subdomain:n[1],slug:n[2],urlParams:Object.fromEntries(t.searchParams)}:null}(e)}function K(e,t){var n,r;let{addBase:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.section?X(e,{addBase:i,section:t.section}):t.post?(0,p.wu)(e,t.post,{noBase:!i}):t.postTag?V(e,t.postTag,{addBase:i}):i&&/^\/[^/]/.test(null!=(n=t.link_url)?n:"")?"".concat((0,l.$_)(e)).concat(t.link_url):null!=(r=t.link_url)?r:""}function X(e){let{addBase:t,section:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(n=n||(null==e?void 0:e.section)))throw Error("Section not found");let r=t?(0,l.$_)(e):"";return"".concat(r,"/s/").concat(n.slug||n.id)}let Z=e=>{var t;let n="".concat(null!=(t=null==e?void 0:e.base)?t:"","/api/v1/fb/auth");return e?(0,l.yR)(n,e):n};function Q(e,t){let{token:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.yR)("".concat((0,l.$_)(e),"/api/v1/post/pdf"),{postId:t,token:n})}function ee(e){var t;let n=e.match(/^https?:\/\/open\.substack\.com(?:\.localhost:5000)?\/pub\/([^\/]+)/);return n||(n=e.match(/^https?:\/\/([^\.]+)\.substack\.com/))?null!=(t=n[1])?t:null:null}function et(e){let{url:t,currentSubdomain:n,currentCustomDomain:r}=e;if(J(t))return n===ee(t);let i=!!t.match(/http:\/\/\w*\.substack\.com\.localhost:5000/),o=n?(0,a.V6)(n):void 0;return o?new URL(o).hostname.replace(/^www\./,"")===new URL(t).hostname.replace(/^www\./,""):r&&!i?r.replace(/^www\./,"")===new URL(t).hostname.replace(/^www\./,""):n===ee(t)}let en=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e):"";return(0,l.yR)("".concat(r,"/account/cancel"),n)},er=function(e,t){let{addBase:n,referrer:o,params:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n?(0,l.$_)(e):"",u="".concat(s,"/publish/posts/detail/").concat(t),c=(0,i._)((0,r._)({},a),{referrer:o});return a||o?(0,l.yR)(u,c):u},ei=function(e,t){let{pinnedEntityId:n,addBase:o,referrer:a,params:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=o?(0,l.$_)(e):"",c="".concat(u,"/publish/posts/detail/").concat(t,"/discussion"),d=(0,i._)((0,r._)({},s),{referrer:a,pinnedEntityId:n});return s||a?(0,l.yR)(c,d):c},eo=function(e,t){let{addBase:n,referrer:o,params:a,selectionForQuote:s,alreadyPublished:u}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=n?(0,l.$_)(e):"",d="".concat(c,"/publish/posts/detail/").concat(t,"/share-center"),p=(0,i._)((0,r._)({},a),{referrer:o,selectionForQuote:s,alreadyPublished:u});return a||o||s||u?(0,l.yR)(d,p):d},ea=function(e,t){let{addBase:n,params:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(null==e?void 0:e.id))return"";let o=n?(0,l.$_)(e):"";return(0,l.yR)("".concat(o,"/leaderboard?"),(0,r._)({},i,(null==t?void 0:t.id)&&{referrer_token:t.id.toString(36)}))},es=(e,t)=>{if(!e)return"";let n=(0,l.$_)(e);return"".concat(o.T.SURVEY_URL_PREFIX).concat(n,"/survey/").concat(t,"?token=").concat(o.T.SURVEY_TOKEN)};function el(e){return"".concat((0,l.Ew)(),"/browse/").concat(e)}function eu(e){return(0,l.c$)(h,e)}function ec(e){return(0,l.c$)(g,e)}function ed(e){return(0,l.c$)(b,e)}function ep(e){return"".concat((0,l.Ew)(),"/api/v1/list/cover_image/").concat(e.id,".jpg")}function ef(e){let{userId:t,userName:n}=e;return"".concat(t,"-").concat((0,s.d9)(n))}function em(e){let{userId:t,userName:n,noBase:r=!0}=e,i=ef({userId:t,userName:n}),o=r?"":(0,l.Ew)();return"".concat(o,"/api/v1/user/").concat(i,"/public_profile")}function eh(e){return!!e&&e.includes("generic.png")}function eg(){let{utm_medium:e,post_id:t,publication_subdomain:n,downloadAll:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.yR)("".concat((0,l.$_)({subdomain:null!=n?n:""},{forceSubdomain:!0}),"/publish/post/").concat(t),{tab:"clips",utm_medium:e,downloadAll:r})}function eb(e){let{categoryId:t,ranking:n,utm_source:r,focusedPubId:i,backAction:o}=e;return(0,l.yR)("".concat((0,l.$_)(),"/leaderboard/").concat(t).concat("for-you"===t?"":"/".concat("trending"===n?"rising":n)),{utm_source:r,focusedPubId:i,backAction:o})}function e_(){return"".concat((0,l.Ew)(),"/explore")}function ey(e){let{query:t,utm_source:n,fromSuggestedSearch:r,searching:i}=e;return(0,l.yR)("/search/".concat(encodeURIComponent(t)),{utm_source:n,fromSuggestedSearch:r,searching:i})}},39318:function(e,t,n){"use strict";n.d(t,{$_T:()=>b.$_T,ADu:()=>eg,Aih:()=>eM,BpC:()=>b.BpC,CHS:()=>P,Cv_:()=>e8,D09:()=>g.D0,DNs:()=>F,DS2:()=>eQ,Dlv:()=>b.Dlv,EVw:()=>b.EVw,EWE:()=>b.EWE,EZZ:()=>eG,Erh:()=>m.Er,Ewe:()=>b.Ewe,FCy:()=>b.FCy,G79:()=>e9,Gn4:()=>eW,H10:()=>eK,H_d:()=>eC,I_S:()=>b.I_S,J2y:()=>ek,Ji1:()=>g.Ji,L56:()=>T,LJG:()=>ey,M:()=>C,MYz:()=>e$,Nlh:()=>ex,OFB:()=>ea,OKG:()=>eT,Ojn:()=>eF,P1Q:()=>K,P5z:()=>es,Po_:()=>em,Pzx:()=>eX,Q1d:()=>eO,RF$:()=>j,RPh:()=>ef,RY1:()=>X,SAZ:()=>e_,T$x:()=>ej,T86:()=>eA,TRu:()=>ew,Tnu:()=>ev,Tvl:()=>en,U4Y:()=>et,UuW:()=>eZ,W$o:()=>h.W$,WY0:()=>H,XV8:()=>U,Xt9:()=>L,YL9:()=>eV,Z96:()=>b.Z96,_cT:()=>eR,_nG:()=>b._nG,a7q:()=>Z,aJp:()=>V,b1y:()=>ez,bGb:()=>B,bgT:()=>eH,c8C:()=>N,cxW:()=>y.cx,cxh:()=>e4,d4Y:()=>b.d4Y,dJ9:()=>b.dJ9,dVy:()=>eY,eV6:()=>er,ed9:()=>eP,f5H:()=>eo,fOI:()=>S,fsB:()=>eE,fxv:()=>q,gEL:()=>eU,gKg:()=>e2,gWk:()=>G,gYq:()=>b.gYq,hdL:()=>k,laT:()=>eu,mWT:()=>ec,man:()=>e6,muC:()=>b.muC,my9:()=>W,nUM:()=>ei,n_I:()=>el,oMA:()=>A,oOP:()=>E,oRR:()=>w,oSl:()=>eq,oT5:()=>p.oT,pIF:()=>g.pI,pJR:()=>eI,q$g:()=>I,qCG:()=>e3,qw6:()=>eN,qy7:()=>D,r$1:()=>e1,rDG:()=>x,rfn:()=>b.rfn,rj:()=>Q,rmE:()=>eJ,sTG:()=>e5,stX:()=>b.stX,t6y:()=>M,t77:()=>z,tFi:()=>$,tbS:()=>eL,w8b:()=>Y,wHz:()=>y.wH,wpu:()=>J,wu9:()=>b.wu9,xPB:()=>ee,yRA:()=>O,yRP:()=>b.yRP,yX_:()=>e0,zw3:()=>y.zw});var r=n(69277),i=n(70408),o=n(32641),a=n(69843),s=n.n(a),l=n(3843),u=n(66684),c=n(4016),d=n(58278),p=n(70189),f=n(9036),m=n(18947),h=n(28700),g=n(46058),b=n(49807),_=n(57324),y=n(55298);let v=[/\/embed$/,/\/embed\/podcast\//];function w(e,t){let{skipHash:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof e&&(t=e,e=document.location.pathname+document.location.search+document.location.hash);let r=(0,b.yRP)(e.split("?")[0].split("#")[0],Object.assign((0,f.m)(e),t));return -1===e.indexOf("#")||n||(r+=e.substr(e.indexOf("#"))),r}(0,b.$_T)();let S=function(e){let{params:t={},signedIn:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,b.D0i)(n,e);return(0,b.yRP)("".concat((0,b.$_T)(e),"/"),(0,r._)({lli:i},t))},E=e=>!e||!e.startsWith("/")||e.startsWith("//")||!/\.svg(\?|#|$)/.test(e)?e:"".concat(b.w4p,"/").concat(e),T=e=>(e||"").replace(/^(\w+:)?\/\//g,""),k=e=>{let t=(0,b.Ewe)();return"".concat(t,"/search/").concat(encodeURIComponent("$".concat(e)))},P=e=>{let t=(0,b.$_T)({subdomain:"admin"});return e?"".concat(t,"/users/").concat(e):t},A=(e,t)=>{let n=(0,b.$_T)({subdomain:"admin"});return(0,b.yRP)("".concat(n,"/customer_support_mode"),{for_pub:t?t.subdomain:void 0,redirect:e})},I=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=b.xJz;return(0,b.yRP)((0,b.d5y)("".concat("reader",".").concat(t)),{utm_source:e})},R=function(e){let{query:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=b.xJz;return(0,b.yRP)("".concat((0,b.d5y)(n)).concat(e),t)},C=e=>R("/activity",{query:e}),N=e=>R("/inbox/saved",e),U=function(e,t){let{params:n={},redirect:i=null,source:o=null,postUuid:a=null,inbox:s=null,hostOverride:l=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return"";let u=l?a?"".concat(l,"/p/").concat(a):"".concat(l,"/p/").concat(t):a?"".concat((0,b.qdI)(),"/pub/").concat(e,"/drafts/").concat(a):"".concat((0,b.qdI)(),"/pub/").concat(e,"/p/").concat(t),c=(0,r._)({utm_source:o,redirect:i,inbox:s},n);return(0,b.yRP)(u,c)};function x(e,t,n,r){let{maxParents:i=3,token:o}=r;if(!n||!n.ancestor_path)return(0,m.Er)(e,t,n);let a=n.ancestor_path.split("."),s=a.length{let{pub:t,section:n,addBase:r=!0}=e,i=r?(0,b.$_T)(t):"";return n?"".concat(i,"/listen/").concat(n.slug||n.id):"".concat(i,"/podcast")},D=function(e){let{params:t,section:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n?"/s/".concat(n.slug||n.id):"";return(0,b.yRP)("".concat(r,"/archive"),t)},L=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,b.$_T)(e):"";return(0,b.yRP)("".concat(r,"/archive"),n)},F=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,b.$_T)(e):"";return(0,b.yRP)("".concat(r,"/about"),n)},B=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,b.$_T)(e):"";return(0,b.yRP)("".concat(r,"/sitemap"),n)},O=function(e){let t,{params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.primary_publication)t=(0,b.$_T)(e.primary_publication);else{if(!e.subdomain)return;t=(0,b.$_T)({subdomain:e.subdomain})}let r="".concat(t,"/publish/home");return(0,b.yRP)(r,n)},Y=function(e,t){let{addBase:n,tab:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n?(0,b.$_T)(e):"",o={tab:r};return"string"==typeof t?o.email=t:t&&"object"==typeof t&&"email"in t?o.email=t.email:t&&"object"==typeof t&&"userId"in t&&(o.userId=t.userId),(0,b.yRP)("".concat(i,"/publish/subscribers/details"),o)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,b.yRP)("".concat((0,b.$_T)(e),"/subscribe"),t);return -1===n.indexOf("?")?"".concat(n,"?"):n},H=function(e){return"".concat((0,b.$_T)(e),"/subscribe?plan=founding&")},q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.yRP)("/account/login",e)},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?(0,b.yRP)("".concat((0,b.Ewe)(),"/refer/").concat(e),t):null},$=function(){let{utm_source:e,section:t,highlightNotification:n,modal:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.yRP)("".concat((0,b.Ewe)(),"/settings"),{utm_source:e,section:t,highlightNotification:n,modal:r})},j=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.yRP)("".concat((0,b.Ewe)(),"/settings/subscriptions"),{utm_source:e})},V=e=>"".concat((0,b.$_T)(e),"/?utm_source=").concat(_.VU.substack,"&utm_medium=").concat(_.Jn.email,"&utm_content=").concat(_.fL.share,"&action=share"),z=(e,t)=>{var{startAtSubscribeFlow:n}=t,i=(0,o._)(t,["startAtSubscribeFlow"]);let a="".concat((0,b.$_T)(e),"/listen");if(i){let e=(0,b.BpC)(i);e&&(a+="?".concat(e))}return n?er(e,(0,r._)({addBase:!0,next:a,skipPodcastSetupPage:!0},i)):a},J=function(e){var t;let{addBase:n,params:o,noSection:a,section:s,user:l,startAtSubscribeFlow:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d="";if(n&&(d+=(0,b.$_T)(e)),(s=null!=(t=null!=s?s:(null==e?void 0:e.is_www)?null:null==e?void 0:e.section)?t:null)&&!a&&(d+="/s/".concat(s.slug||s.id)),d+="/account/add-podcast",l&&l.email&&!(0,c.lu)({pub:e})&&(o=(0,i._)((0,r._)({},o),{email:l.email}),d+="/email"),o){let e=(0,b.BpC)(o);e&&(d+="?".concat(e))}return u?er(e,(0,r._)({addBase:!0,next:d,skipPodcastSetupPage:!0},o)):d},K=e=>{for(let t=0;t{let{useOriginalUrl:t}=e;if(t&&"undefined"!=typeof window&&window._preloads.original_url)try{let e=new URL(window._preloads.original_url);return"".concat(e.pathname).concat(e.search).concat(e.hash)}catch(e){}return"".concat(document.location.pathname).concat(document.location.search).concat(document.location.hash)},Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{for_pub:t,email:n,prefilled_email:r,with_password:i,error:o,message:a,change_user:s,justTrying:l,useOriginalUrl:u,isOAuth:c,only_allow_signin:d}=e,{redirect:p}=e;return"string"!=typeof p&&(p=X({useOriginalUrl:null!=u&&u})),(0,b.yRP)("".concat((0,b.Ewe)(),"/sign-in"),{redirect:p,for_pub:t,email:n,prefilled_email:r,with_password:i,error:o,message:a,change_user:s,justTrying:l,isOAuth:c,only_allow_signin:d})},Q=function(){let{params:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.yRP)("".concat((0,b.Ewe)(),"/profile/edit"),e)},ee=function(){let{isAbbreviated:e,redirect:t,postRedirectToast:n,pubId:i=null,referringUserKey:o=null,params:a={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=null;if(t)try{s=new URL(t),n&&s.searchParams.set("profile-setup-message",n)}catch(e){s=new URL((0,b.Ewe)())}let l=(0,r._)({action:"signup",isAbbreviated:e,redirect:s?s.toString():null,pubId:i},a);return o&&(l.r=o),(0,b.yRP)("".concat((0,b.Ewe)(),"/"),l)},et=(e,t)=>"".concat((0,b.Ewe)(),"/discover").concat(e?"/category/".concat(e.slug):"/recomendations").concat("all"===t?"/all":""),en=function(){let{query:e,params:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="".concat((0,b.Ewe)(),"/search");return e&&(n="".concat((0,b.Ewe)(),"/search/").concat(encodeURIComponent(e))),w(n,t)};function er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var{signedIn:n=!1,addBase:i=!1,root:a,user:s}=t,l=(0,o._)(t,["signedIn","addBase","root","user"]);let u=(0,b.D0i)(n,e);return(0,b.eV6)(e,{root:a,user:s,addBase:i,params:(0,r._)({},void 0===u?{}:{lli:u},l)})}let ei=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,b.yRP)("".concat((0,b.$_T)(e),"/recommendations"),t)},eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return w("".concat((0,b.Ewe)(),"/signup"),e)},ea=function(e){let{addBase:t,baseUrlOptions:n,params:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t?(0,b.$_T)(e,n):"";return(0,b.yRP)("".concat(i,"/publish/recommendations"),r)},es=function(e){let{addBase:t,baseUrlOptions:n,params:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t?(0,b.$_T)(e,n):"";return(0,b.yRP)("".concat(i,"/publish/settings/homepage_links"),r)},el=e=>"".concat((0,b.$_T)(e),"/invite"),eu=function(e,t){let{utm_source:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,b.gYq)(e,{utm_source:n})},ec=e=>{let{pub:t,token:n=null}=e,{section:r}=t;if(r){var i;return(null==(i=r.podcastSettings)?void 0:i.podcast_feed_url)?r.podcastSettings.podcast_feed_url:ed({pubId:t.id,sectionId:r.id,token:n})}return t.podcast_feed_url?t.podcast_feed_url:ed({pubId:t.id,sectionId:null,token:n})};function ed(e){let{pubId:t,sectionId:n,token:r}=e;if(n){let e="".concat((0,b.$_T)({subdomain:"api"}),"/feed/podcast/").concat(t,"/s/");return r?e+="".concat(n,"/private/").concat(r,".rss"):e+="".concat(n,".rss"),e}let i="".concat((0,b.$_T)({subdomain:"api"}),"/feed/podcast/").concat(t);return r?i+="/private/".concat(r,".rss"):i+=".rss",i}let ep=function(e){let{noOverride:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.support_email&&!t?e.support_email:"support+".concat(e.subdomain,"@substack.com"):"support@substack.com"},ef=(e,t)=>"https://support.substack.com/hc/en-us?s=".concat(encodeURIComponent(ep(e,t))),em=(e,t)=>{let n=eh(e,t);return(0,b.dJ9)(n,null,{skipDomainValidation:!0,quality:"auto:best",version:4})},eh=(e,t)=>(0,b.yRP)("".concat((0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_preview/").concat(t.id,"/twitter.jpg"),{isDraft:t.is_draft||t.is_scheduled}),eg=e=>{let t=eb(e);return(0,b.dJ9)(t,null,{skipDomainValidation:!0,quality:"auto:best",version:1})},eb=e=>"".concat((0,b.Ewe)(),"/live-stream/").concat(e.liveStream.id,"/card.jpg"),e_=(e,t,n,r,i)=>{let o=ey(e,t,n,r);return(0,b.dJ9)(o,null,{skipDomainValidation:!0,quality:"auto:best",version:11,attachment:!!i,filename:i})},ey=(e,t,n,i)=>(0,b.yRP)("".concat((0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_selection_image/").concat(t.id,"/").concat(n,".jpg"),(0,r._)({},i)),ev=(e,t,n)=>(0,b.yRP)("".concat((0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_selection_image/").concat(t.id,"/image/").concat(n,".jpg")),ew=e=>(0,b.dJ9)("".concat(eS(e)),null,{quality:"auto:best",version:9,skipDomainValidation:!0}),eS=e=>{let{hashString:t}=n(82776),r="".concat((0,b.$_T)(e,{forceSubdomain:!0}),"/twitter/subscribe-card.jpg"),i=t(JSON.stringify({subdomain:e.subdomain,homepage_type:e.homepage_type,logo_url:e.logo_url,name:e.name,hero_text:e.hero_text,author_name:e.author_name,author_bio:e.author_bio,author_photo_url:e.author_photo_url,theme:e.theme,theme_var_background_pop:e.theme_var_background_pop,theme_var_cover_bg_color:e.theme_var_cover_bg_color}));return i?r+="?v=".concat(i):r+="?v=bust",r},eE=(e,t,n,r)=>{let i=eT(e,t,n);return(0,b.dJ9)(i,null,{quality:"auto:best",skipDomainValidation:!0,version:13,attachment:!!r,filename:r})},eT=(e,t,o)=>{let{hashString:a}=n(82776),s=a("".concat(t.social_title+t.title+t.description+t.cover_image));return(0,b.yRP)("".concat((0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/press_kit/").concat(t.id,".jpg"),(0,i._)((0,r._)({},o),{isDraft:"is_draft"in t&&t.is_draft,hash:s}))},ek=e=>{let{pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l,version:u}=e,c=(e=>{let{pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l}=e,u="".concat((0,b.$_T)(t),"/api/v1/press_kit/asset/").concat(n,"/").concat(r,"/").concat(i),c=new URLSearchParams;o&&c.append("aspectRatio",o),a&&c.append("mode",a),s&&c.append("audience",s),l&&c.append("preloadS3Assets","true");let d=c.toString();return d?"".concat(u,"?").concat(d):u})({pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l});return(0,b.dJ9)(c,null,{quality:"auto:best",version:u})},eP=function(e,t,n,r){let{useRootDomain:i=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=eA(e,t,n,{useRootDomain:i});return(0,b.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eA=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=null;if(Object.values(l.Fh).includes(t))o="arr";else if(Object.values(l.ai).includes(t))o="subscribers";else throw Error("endpoint for milestone not found [".concat(t,"]"));return(0,b.yRP)("".concat(i?(0,b.$_T)():(0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/milestone_assets/").concat(o,".jpg"),(0,r._)({milestone:t},n,i&&{subdomain:e.subdomain}))},eI=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=eR(e,t,n,{useRootDomain:i});return(0,b.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eR=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,b.yRP)("".concat(i?(0,b.$_T)():(0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/subscription_note_assets/").concat(t.id,".png"),(0,r._)({},n,i&&{subdomain:e.subdomain}))},eC=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=eN(e,t,n,{useRootDomain:i});return(0,b.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eN=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,b.yRP)("".concat(i?(0,b.$_T)():(0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/pledge_note_assets/").concat(t.id,".jpg"),(0,r._)({},n,i&&{subdomain:e.subdomain}))},eU=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=ex(e,n,{useRootDomain:i});return(0,b.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:11,attachment:!!r,filename:r})},ex=function(e,t){let{useRootDomain:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,b.yRP)("".concat(n?(0,b.$_T)():(0,b.$_T)(e,{forceSubdomain:!0}),"/api/v1/publication_assets/image.jpg"),(0,r._)({},t,n&&{subdomain:e.subdomain}))},eM=e=>{let{userId:t,variant:n,aspectRatio:r}=e;return(0,b.dJ9)(eD({userId:t,variant:n,aspectRatio:r}),null,{quality:"auto:best",skipDomainValidation:!0,version:1})},eD=e=>{let{userId:t,variant:n,aspectRatio:r}=e;return(0,b.yRP)("".concat((0,b.$_T)(),"/api/v1/profile/assets/").concat(t,"/").concat(n),{aspectRatio:r})},eL=e=>{let{noteId:t,variant:n,type:r,aspectRatio:i="stories"}=e;return(0,b.yRP)("".concat((0,b.$_T)(),"/api/v1/note/asset/").concat(t,"/").concat(n,"/").concat(r),{aspectRatio:"stories"===i?void 0:"grid"})},eF=e=>{let t=eB(e);return(0,b.dJ9)(t,null,{quality:"auto:best",version:9})},eB=e=>(0,b.yRP)("/api/v1/latex/jpeg",{expression:e}),eO=e=>"substack://publications/".concat(e.id,"/threads"),eY=e=>e.startsWith("/publish"),eW=e=>{var t,n;let r;return(r=(0,b.Dlv)(e))&&r.pathname.startsWith("/p/")&&null!=(n=null==(t=(0,b.Dlv)(e))?void 0:t.pathname.split("/")[2])?n:null},eH=function(){let{redirect:e,for_pub:t,utm_source:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=e||"",(0,b.yRP)("".concat((0,b.Ewe)(),"/sign-out"),{redirect:e,for_pub:t,utm_source:n})},eq=550,eG=728,e$=[424,848,1272,1456],ej=1200,eV=2880,ez=320,eJ=550,eK=function(e){var t,n;let{post:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;let i="substack-video";if("audio"===e.media_type&&(s()(e.thumbnail_id)||1===e.thumbnail_id))return null==r||null==(t=r.podcast_episode_image_info)?void 0:t.url;let o=e.post_id?"https://".concat(i,".s3.amazonaws.com/video_upload/post/").concat(e.post_id):"https://".concat(i,".s3.amazonaws.com/video_upload/user/").concat(e.user_id);return"".concat(o,"/").concat(e.id,"/transcoded-").concat((null!=(n=e.thumbnail_id)?n:1).toString().padStart(5,"0"),".png")},eX=function(e){var t;let{isStatic:r,post:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{videoPlayerDimensions:o}=n(82776),{height:a,width:s}=o(e,{isStatic:r});return(0,b.dJ9)(null!=(t=eK(e,{post:i}))?t:"",2*s,{crop:s/a<1920/1080?"pad":"fill",height:2*a,trailingSegments:r?["l_".concat("play_button_usfui2",",w_144,e_colorize:0")]:[]})},eZ=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,b.yRP)("https://substack.com/app-link/publications/".concat(e.id,"/drafts/").concat(t),n)},eQ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.yRP)("".concat((0,b.Ewe)(),"/app"),e)},e0=function(){let{pathOnly:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="/img/podcast/generic.png";return e?t:"".concat((0,b.Ewe)()).concat(t)},e1=()=>{let e=e0({pathOnly:!0});return(0,b.dJ9)(e,1400)},e2=e=>(0,b.yRP)("https://twitter.com/intent/tweet",e),e6=e=>{let{text:t,query:n}=e;return(0,b.yRP)("https://bsky.app/intent/compose",(0,i._)((0,r._)({},n),{text:t}))},e8=e=>{var t;let{post:n,height:r}=e;return(null==(t=n.videoUpload)?void 0:t.is_mux)?"/api/v1/video/upload/".concat(n.videoUpload.id,"/preview.gif?height=").concat(r):null},e4=e=>{let{userId:t,pub:n,addBase:r=!1}=e;if(!n.authorPagesInfo)return null;let i=n.authorPagesInfo.find(e=>e.user_id===t);if(!i)return null;let o=r?(0,b.$_T)(n):"";return"".concat(o,"/w/").concat((0,d.d9)(i.name))},e3=e=>{let{campaignId:t,medium:n,userId:r,pubId:i,url:o,postId:a,referrer:s,placementId:l,clientPlatform:c}=e,d=null;o&&(d=(0,u.A)(o));let p=null;s&&(p=(0,u.A)(s));let f=a?String(a).replace(/\D/g,""):null;a&&/\D/.test(String(a))&&console.log('Corrupted postId detected: "'.concat(a,'" (cleaned to: "').concat(f,'")'),{medium:n,campaignId:t,pubId:i,userId:r,url:o,postId:a});let m=new URL("".concat((0,b.$_T)(),"/sponsorship-campaigns/").concat(t,"/link"));m.searchParams.set("pub_id",String(i)),m.searchParams.set("medium",n),c&&m.searchParams.set("client_platform",c);let h="00000000000000000000000000000000";return r&&m.searchParams.set("user_id",h),f&&m.searchParams.set("post_id",f),p&&m.searchParams.set("referrer",p),d&&m.searchParams.set("url",d),l&&m.searchParams.set("placement_id",l),m.toString().replace(h,String(r))},e5=e=>{let{campaignId:t,pub:n}=e;return"".concat((0,b.$_T)(n),"/publish/sponsorship-campaigns/").concat(t)},e9=(e,t)=>e&&t?"".concat((0,b.$_T)(e),"/api/v1/video/upload/").concat(t,"/download"):""},28700:function(e,t,n){"use strict";n.d(t,{W$:()=>d,dt:()=>a,fm:()=>l,gY:()=>u,o4:()=>c,rf:()=>s});var r=n(69277),i=n(58278),o=n(92636);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.c$)("/profile/".concat(e),(0,r._)({},t))}function s(e,t){let{searchParams:n,noBase:r,baseUrl:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=r?"":null!=a?a:(0,o.Ew)(),l="".concat(s,"/profile/").concat(function(e){let{id:t,name:n,handle:r}=e;if(r)return"@".concat(r);let o=(0,i.JG)(n,{hashIfEmpty:!0});return"".concat(t).concat(o?"-".concat(o):"")}({id:e,name:t}));return(0,o.yR)(l,n)}let l=function(e){let{searchParams:t,noBase:n,baseUrl:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n?"":null!=r?r:(0,o.Ew)(),a="".concat(i,"/@").concat(e);return(0,o.yR)(a,t)};function u(e){let{utm_source:t,utm_content:n,utm_campaign:i,noBase:o,baseUrl:a,noHandle:u,extraParams:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=(0,r._)({},c,t||n||i?{utm_source:t,utm_content:n,utm_campaign:i}:void 0),p=u?void 0:(null==e?void 0:e.handle)||(null==e?void 0:e.author_handle);return p?l(p,{noBase:o,baseUrl:a,searchParams:d}):s(e.author_id||e.user_id||e.id,e.user_profile_name||e.author_name||e.name,{noBase:o,baseUrl:a,searchParams:d})}function c(e,t,n){return(0,o.c$)("".concat(u(e,{noBase:!0}),"/").concat(null!=t?t:"subscribers"),n)}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.yR)("".concat((0,o.Ew)(),"/profile/start"),e)}},82776:function(e,t,n){"use strict";n.r(t),n.d(t,{AUDIENCE_ADJECTIVES:()=>ek,CENTS_PER_EMAIL:()=>e$,CORE_SUPPORTED_LANGUAGES:()=>eO,ChatError:()=>eJ,DEFAULT_GIFT_LENGTH_DAYS:()=>eR,DEFAULT_GRANT_NUMBER:()=>eC,DEFAULT_MAX_BYLINES:()=>rp,DEFAULT_PREVIEW_LIMIT:()=>er,DEFAULT_PREVIEW_LIMIT_EMAIL:()=>ei,DEFAULT_PROFILE_PAGE_SUBSCRIPTIONS_LIMIT:()=>en,EEA_COUNTRIES:()=>tb,EU_COUNTRIES:()=>tg,GIFT_LENGTH_MONTHS:()=>eI,GRACE_PERIOD_COUPON_TRIAL_DAYS:()=>et,GRACE_PERIOD_DAYS:()=>Z,HOMEPAGE_TYPE_CHANGE_CUTOFF:()=>eA,LINK_SUPPORTED_COUNTRIES:()=>t_,LIVE_STREAM_CONTENT_WARNINGS:()=>rx,MANUAL_BILLING_DAYS_UNTIL_DUE:()=>Q,MAX_BANK_PAYMENT_ATTEMPTS:()=>ea,MAX_FILE_SIZE:()=>B,MAX_MEDIA_FILE_SIZE:()=>L,MAX_MEDIA_UPLOAD_CHUNK_SIZE:()=>F,MAX_PG_BIGINT:()=>ed,MAX_PG_INT:()=>eu,MAX_PODCAST_FIELD_LENGTH:()=>ef,MAX_PODCAST_FILE_SIZE:()=>D,MAX_SECTION_DESCRIPTION_LENGTH:()=>em,MIN_MONTH_GAP_BETWEEN_PAUSES:()=>eo,MONTH_NAMES:()=>eL,NO_PLATFORM_CUSTOMER_CLONE_COUNTRIES:()=>eq,NO_REPLY_EMAIL:()=>e5,NZD_COUNTRIES:()=>ty,OLD_PODCAST_CATEGORIES:()=>eD,PODCAST_CATEGORIES:()=>eM,PODCAST_SECTIONS_TO_MARK_AS_NEWSLETTERS:()=>ej,PUBLICATION_TIER_DESCRIPTIONS:()=>ru,PUB_IDS_TO_NOT_SHOW_FOLLOW_PROMPT_ON:()=>C,READ_WORDS_PER_MINUTE:()=>es,RTL_LANGUAGES:()=>eY,SCHEDULED_LIVE_STREAM_NOTIFY_WINDOW_HOURS:()=>eV,SECURITY_QUESTIONS:()=>eT,SENDER_REMINDER_2_DELAY_SINCE_LAST_REMINDER:()=>eU,SENDER_REMINDER_3_DELAY_SINCE_LAST_REMINDER:()=>ex,SENDER_REMINDER_DELAY:()=>eN,SPEAK_WORDS_PER_MINUTE:()=>el,SPECIAL_SUBDOMAINS:()=>eE,STRIPE_COUNTRIES_WITH_TRANSFERS_ENABLED:()=>rM,STRIPE_DAYS_UNTIL_DUE:()=>ee,STRIPE_TAX_ID_TYPES:()=>eF,SUBSCRIPTION_WORDS:()=>n1,SUBSTACK_PUBLICATION_IDS:()=>z,SUBSTACK_PUBLICATION_ID_BETA:()=>G,SUBSTACK_PUBLICATION_ID_BLOGOLD:()=>q,SUBSTACK_PUBLICATION_ID_COMPANY:()=>Y,SUBSTACK_PUBLICATION_ID_LIBRARYOLD:()=>W,SUBSTACK_PUBLICATION_ID_ON:()=>O,SUBSTACK_PUBLICATION_ID_PRODUCTLAB:()=>V,SUBSTACK_PUBLICATION_ID_READ:()=>$,SUBSTACK_PUBLICATION_ID_STORIESOLD:()=>H,SUBSTACK_PUBLICATION_ID_THREADSPILOT:()=>j,SUBSTACK_USER_ID:()=>J,SUBSTACK_USER_IDS:()=>X,SUBSTACK_WRITERS_USER_ID:()=>K,SUPPORTED_CURRENCIES:()=>tv,SUPPORTED_LANGUAGES:()=>eB,SUPPORTED_LANGUAGES_IN_LANGUAGE:()=>eW,SUPPORTED_SEARCH_LANGUAGES:()=>eH,TERSE_AUDIENCE_ADJECTIVES:()=>eP,WEEK_IN_SECONDS:()=>eG,anonymousName:()=>nQ,areCommentsLocked:()=>nh,areHuesEqual:()=>tW,assertIsDefined:()=>N,assertIsError:()=>U,averageVectors:()=>rN,balanceTextWithCharacterWidths:()=>tm,baschezScoreToEmojis:()=>tK,baschezToCategory:()=>tJ,canDeleteComment:()=>nw,canDeletePost:()=>nE,canEditComment:()=>nv,canManageCommentAsPrimaryUser:()=>ny,canPostComments:()=>ng,canReplyToPost:()=>e3,canReportComment:()=>nT,canSeeCommenterEmails:()=>np,canSeeComments:()=>nf,canSeeTranscription:()=>nm,centsToDollarString:()=>tI,centsToPriceString:()=>tA,colorLightness:()=>tG,colorLuma:()=>t$,commentsEnabledForPost:()=>nu,couldPostCommentsIfSubscribed:()=>nb,coverPageFreeSubscriberCount:()=>t9,currencySymbol:()=>tk,decimalToPercent:()=>nr,defaultAudienceForPub:()=>nA,defaultCommentLevelForPub:()=>nU,defaultSendEmailForPub:()=>nx,dollarFormatter:()=>tR,dollarStringToCents:()=>tC,endsWithPunctuation:()=>ts,ensureInList:()=>rC,escapeNewlines:()=>nl,extractAttributionDataFromRecord:()=>rL,extractEventAttributionDataFromRecord:()=>rF,flowTextBasedOnWidth:()=>rP,formatArray:()=>tV,formatBytes:()=>nK,formatEllipsis:()=>ta,formatPercentForDisplay:()=>nn,formatPodcastDuration:()=>rg,formatPodcastDurationLower:()=>rb,formattedBytesToNumber:()=>nX,foundingMemberDescription:()=>n5,fromEnv:()=>rT,getAttributionDirectMap:()=>rt,getAttributionOptions:()=>rr,getAttributionPatternMatchPlatforms:()=>rn,getByLine:()=>eK,getBylineUsers:()=>nq,getCopyrightedContentBucketName:()=>ew,getCurrencyForCountry:()=>tw,getGiftValueText:()=>tx,getGlobalBanMessage:()=>eh,getImageUrlFromBucketKey:()=>ev,getInitalPayment:()=>tU,getModerationPolicyName:()=>e_,getNext5HoursAfterMidnight:()=>rh,getNumberWithCommas:()=>t5,getOpennodePaymentUrl:()=>n9,getPlanTitle:()=>rS,getPostCtaPresentParticiple:()=>nO,getPostCtaText:()=>nB,getPostEmbedMeta:()=>eQ,getPostMediaBucketName:()=>ey,getPrintedByline:()=>nG,getPrintedPostType:()=>nY,getPublicationBanMessage:()=>eb,getReadableAttribution:()=>re,getRemovedContentBucketName:()=>eS,getRestackEmailSubject:()=>nW,getScheduledAt:()=>ni,getSectionBasedSubjectOverride:()=>rD,getSubscribeText:()=>eZ,getSubscriptionSentenceWithCustomWords:()=>n8,getSubscriptionWord:()=>n4,getSuperscriptNumberString:()=>n3,getTrialEndOverride:()=>nM,getUserBanMessage:()=>eg,getValidAudienceLevels:()=>nR,getWithIndefiniteArticle:()=>ry,get_month_name:()=>nD,handleDocumentLinkClick:()=>nz,hasFoundingPlan:()=>nI,hashString:()=>rv,hexToHSV:()=>tB,hexToRgb:()=>tO,hidePaidPostsFor:()=>e1,isAppAttribution:()=>ri,isAtLeastContributorRole:()=>e0,isBigIntId:()=>ep,isIntId:()=>ec,isNotMainEntry:()=>nJ,isNotesAttribution:()=>ro,isPaidPub:()=>nP,isPinnable:()=>rd,isProbablyEmail:()=>rs,isSearchEngineCrawlerQuick:()=>nZ,isSubstackNetworkAttribution:()=>ra,isTouchDevice:()=>rA,isUUID:()=>n$,isValidCommentLevel:()=>nN,isZeroDecimalCurrency:()=>tE,joinLines:()=>tX,kFormatter:()=>rw,longestSetOfWordsBelowCost:()=>tf,mode:()=>nF,normalizeHex:()=>tF,numberToHumanFileSize:()=>n7,numberToOrderOfMagnitude:()=>t6,numberToOrderOfMagnitudeString:()=>t8,numberToOrdinal:()=>t1,numberToRoughRankingString:()=>t3,numberToRoughShortString:()=>t4,numberToString:()=>t2,onlyOwnsRootComment:()=>nS,oxfordComma:()=>nL,paymentPeriodToPlan:()=>rc,pluralize:()=>na,possessive:()=>ns,postSocialDescription:()=>n0,preventOrphans:()=>ti,profilePageFreeSubscriberCountString:()=>nt,pubCurrency:()=>tS,pubHasPaymentsEnabled:()=>nk,pubRoleForManagingComment:()=>n_,pubUsesZeroDecimalCurrency:()=>tT,pubsWithCustomSubscriptionWords:()=>n6,randomString:()=>tZ,resolveTwitterShareText:()=>eX,restacksEnabledForPost:()=>nc,rgbToHex:()=>tY,rgbaToString:()=>tH,roughFreeSubscriberCount:()=>t7,roughFreeSubscriberCountString:()=>ne,roundPriceUp:()=>tN,sanitizeInlineText:()=>rl,satoshiToBitcoin:()=>tP,secondsToHHMMSS:()=>tD,secondsToLargestUnit:()=>tM,sectionIsSpecificallyMarkedAsNewsletter:()=>ez,setDateToMidnightPST:()=>rm,shouldHidePostFromArchive:()=>nH,shouldUseInlineComments:()=>e2,showCommentsOnPost:()=>nd,simpleBalanceText:()=>tu,smartenQuotes:()=>tr,sortSubscriptions:()=>e8,spellOutNumber:()=>no,startsWithVowel:()=>r_,streamToBuffer:()=>rk,stringCost:()=>tp,stripInvalidBytes:()=>e9,subscriptionTypeText:()=>e4,textLengthAlphaNumericMinimumValidator:()=>rE,toFlagEmoji:()=>rU,toMillis:()=>nj,toSentenceCase:()=>t0,toTitleCase:()=>tQ,transformDocumentLink:()=>nV,truncAndFormatArray:()=>tj,truncateBytes:()=>e7,truncateNumber:()=>tz,truncateText:()=>tt,truncateToValidBytes:()=>te,truncateWords:()=>tn,userFromReferralKey:()=>rR,userReferralKey:()=>rI,validCommentLevels:()=>nC,validateColor:()=>tq,validateHex:()=>tL,videoPlayerDimensions:()=>rf});var r=n(99851),i=n(69277),o=n(70408),a=n(79785),s=n(2404),l=n.n(s),u=n(69843),c=n.n(u),d=n(6585),p=n.n(d),f=n(3843),m=n(98111),h=n(4016);n(50129);var g=n(2256),b=n(44289),_=n(48863),y=n(60639),v=n(65606),w=n(49705).Buffer;function S(){let e=(0,a._)(["Your account is currently suspended. We've removed your publication from public view due to a violation of Substack's ",". If you believe this is a mistake, visit our"]);return S=function(){return e},e}function E(){let e=(0,a._)(["We've removed your publication from public view due to a violation of Substack's ",". If you believe this was a mistake, you can submit an appeal to our Standards & Enforcement team"]);return E=function(){return e},e}function T(){let e=(0,a._)(["","k"]);return T=function(){return e},e}function k(){let e=(0,a._)(["","m"]);return k=function(){return e},e}function P(){let e=(0,a._)(["","b"]);return P=function(){return e},e}function A(){let e=(0,a._)(["","t"]);return A=function(){return e},e}function I(){let e=(0,a._)(["Over "," subscribers"]);return I=function(){return e},e}function R(){let e=(0,a._)(["Get "," in your inbox"]);return R=function(){return e},e}let C=[21267,260347];function N(e){if(null==e)throw new y.uV("Expected value to be defined, but received ".concat(e))}function U(e){if(!(e instanceof Error))throw new y.uV("Expected value to be an Error, but received ".concat(e))}let x=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],M=["CA","AU","HK","NZ"],D=0x15e00000,L=0x500000000,F=0x3200000,B=0x2bc00000,O=1,Y=46438,W=86696,H=81318,q=87805,G=508885,$=737237,j=1014268,V=1056696,z=[1,46438,86696,81318,87805,508885,737237,1014268,1056696],J=0x4d8b0ef,K=0x27ead30,X=[0x4d8b0ef,0x27ead30],Z=16,Q=45,ee=30,et=2/24,en=1e3,er=356,ei=256,eo=6,ea=3,es=220,el=150,eu=0x7fffffff;function ec(e){return"number"==typeof e&&Number.isInteger(e)&&e>0&&e<=eu}let ed=Number.MAX_SAFE_INTEGER;function ep(e){return"number"==typeof e&&Number.isInteger(e)&&e>0&&e<=ed}let ef=25e4,em=1e3;function eh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"general";return"Your account is currently suspended. Something you posted may have violated Substack's ".concat(e_(e),". If you believe this is a mistake, you can submit an appeal to our Standards & Enforcement team here:")}function eg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t);return n(S(),e_(e,t))}function eb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t);return n(E(),e_(e,t))}function e_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t);switch(e){case"hate":return n("Hate policy");case"illegal":return n("Illegal & Harmful Activities policy");case"impersonation":return n("Impersonation policy");case"plagiarism":return n("Plagiarism policy");case"porn":return n("Nudity, Porn, & Erotica policy");case"private_information":return n("Private Information policy");case"spam":return n("Spam & Phishing policy");default:return n("Content Guidelines, Terms of Service, or Publisher Agreement")}}function ey(){let e="substack-post-media";if(!e)throw new y.uV("postMediaBucketName is not defined");return e}function ev(e){return"https://".concat(ey(),".s3.amazonaws.com/").concat(e)}function ew(){return"substack-post-media"===ey()?"substack-copyrighted-media":"substack-copyrighted-media-staging"}function eS(){return"substack-post-media"===ey()?"substack-removed-media":"substack-removed-media-staging"}let eE=["cdn","cloudinary","delivery","jobs","mailgun","mail","support","www","callback","api","admin","reader","sublink","random","your","dashboard","open"],eT=["In what city or town did your parents meet?","What was your first teacher's last name?","What is your earliest memory?","What was the make and model of your first car?","What was the first concert you attended?","Where did you go on your first date?","What was your first favorite band?","What was your first computer or smartphone?","What is your least favorite color?","What was the first video game you beat?","Who was your favorite artist, musician, or celebrity when you were a teenager?"],ek={everyone:"public",only_free:"free-only",only_paid:"subscribers-only",founding:"founding-only"},eP={everyone:"public",only_free:"free-only",only_paid:"subscriber's",founding:"subscriber's"},eA=new Date("2020-01-16"),eI=1,eR=30,eC=3,eN=2592e5,eU=6048e5,ex=1728e6,eM={Arts:["Books","Design","Fashion & Beauty","Food","Performing Arts","Visual Arts"],Business:["Careers","Entrepreneurship","Investing","Management","Marketing","Non-Profit"],Comedy:["Comedy Interviews","Improv","Stand-Up"],Education:["Courses","How To","Language Learning","Self-Improvement"],Fiction:["Comedy Fiction","Drama","Science Fiction"],Government:[],History:[],"Health & Fitness":["Alternative Health","Fitness","Medicine","Mental Health","Nutrition","Sexuality"],"Kids & Family":["Education for Kids","Parenting","Pets & Animals","Stories for Kids"],Leisure:["Animation & Manga","Automotive","Aviation","Crafts","Games","Hobbies","Home & Garden","Video Games"],Music:["Music Commentary","Music History","Music Interviews"],News:["Business News","Daily News","Entertainment News","News Commentary","Politics","Sports News","Tech News"],"Religion & Spirituality":["Buddhism","Christianity","Hinduism","Islam","Judaism","Religion","Spirituality"],Science:["Astronomy","Chemistry","Earth Sciences","Life Sciences","Mathematics","Natural Sciences","Nature","Physics","Social Sciences"],"Society & Culture":["Documentary","Personal Journals","Philosophy","Places & Travel","Relationships"],Sports:["Baseball","Basketball","Cricket","Fantasy Sports","Football","Golf","Hockey","Rugby","Running","Soccer","Swimming","Tennis","Volleyball","Wilderness","Wrestling"],Technology:[],"True Crime":[],"TV & Film":["After Shows","Film History","Film Interviews","Film Reviews","TV Reviews"]},eD={Arts:["Books","Design","Fashion & Beauty","Food","Literature","Performing Arts","Visual Arts"],Business:["Business News","Careers","Investing","Management & Marketing","Shopping"],Comedy:[],Education:["Educational Technology","Higher Education","K-12","Language Courses","Training"],"Games & Hobbies":["Automotive","Aviation","Hobbies","Other Games","Video Games"],"Government & Organizations":["Local","National","Non-Profit","Regional"],Health:["Alternative Health","Fitness & Nutrition","Self-Help","Sexuality"],"Kids & Family":[],Music:[],"News & Politics":[],"Religion & Spirituality":["Buddhism","Christianity","Hinduism","Islam","Judaism","Other","Spirituality"],"Science & Medicine":["Medicine","Natural Sciences","Social Sciences"],"Society & Culture":["History","Personal Journals","Philosophy","Places & Travel"],"Sports & Recreation":["Amateur","College & High School","Outdoor","Professional"],Technology:["Gadgets","Tech News","Podcasting","Software How-To"],"TV & Film":[]},eL=["January","February","March","April","May","June","July","August","September","October","November","December"],eF=[{name:"eu_vat",description:"European VAT number"},{name:"au_abn",description:"Australian Business Number (AU ABN)"},{name:"au_arn",description:"Australian Taxation Office Reference Number"},{name:"br_cnpj",description:"Brazilian CNPJ number"},{name:"br_cpf",description:"Brazilian CPF number"},{name:"bg_uic",description:"Bulgaria Unified Identification Code"},{name:"ca_bn",description:"Canadian BN"},{name:"ca_gst_hst",description:"Canadian GST/HST number"},{name:"ca_pst_bc",description:"Canadian PST number (British Columbia)"},{name:"ca_pst_mb",description:"Canadian PST number (Manitoba)"},{name:"ca_pst_sk",description:"Canadian PST number (Saskatchewan)"},{name:"ca_qst",description:"Canadian QST number (Qu\xe9bec)"},{name:"cl_tin",description:"Chilean TIN"},{name:"eu_oss_vat",description:"European One Stop Shop VAT number for non-Union scheme"},{name:"ge_va",description:"Georgian VAT"},{name:"hk_br",description:"Hong Kong BR number"},{name:"hu_tin",description:"Hungary tax number (ad\xf3sz\xe1m)"},{name:"is_vat",description:"Icelandic VAT"},{name:"in_gst",description:"Indian GST number"},{name:"id_npwp",description:"Indonesian NPWP number"},{name:"il_vat",description:"Israel VAT"},{name:"jp_cn",description:"Japanese Corporate Number (*Hōjin Bangō*)"},{name:"jp_rn",description:"Japanese Registered Foreign Businesses' Registration Number (*Tōroku Kokugai Jigyōsha no Tōroku Bangō*) "},{name:"li_uid",description:"Liechtensteinian UID number"},{name:"my_frp",description:"Malaysian FRP number"},{name:"my_itn",description:"Malaysian ITN C"},{name:"my_sst",description:"Malaysian SST number"},{name:"mx_rfc",description:"Mexican RFC number"},{name:"nz_gst",description:"New Zealand GST number"},{name:"no_vat",description:"Norwegian VAT number"},{name:"ru_inn",description:"Russian INN"},{name:"ru_kpp",description:"Russian KPP"},{name:"sa_vat",description:"Saudi Arabia VAT"},{name:"sg_gst",description:"Singaporean GST"},{name:"sg_uen",description:"Singaporean UEN"},{name:"si_tin",description:"Slovenia tax number (davčna številka)"},{name:"za_vat",description:"South African VAT number"},{name:"kr_brn",description:"Korean BRN"},{name:"es_cif",description:"Spanish CIF number"},{name:"ch_vat",description:"Switzerland VAT number"},{name:"tw_vat",description:"Taiwanese VAT"},{name:"th_vat",description:"Thai VAT"},{name:"ua_vat",description:"Ukrainian VAT"},{name:"ae_trn",description:"United Arab Emirates TRN"},{name:"gb_vat",description:"United Kingdom VAT number"},{name:"us_ein",description:"United States EIN"}],eB={ar:"Arabic",ca:"Catalan",da:"Danish",de:"German",es:"Spanish",fr:"French",it:"Italian",ja:"Japanese",nb:"Norwegian",nl:"Dutch",pl:"Polish",pt:"Portuguese","pt-br":"Brazilian Portuguese","en-gb":"British English",sv:"Swedish",tr:"Turkish"},eO=["en","ar","ca","da","de","es","fr","it","ja","nb","nl","pl","pt","sv","tr"],eY=["ar"],eW={ar:"العربية",ca:"Catal\xe0",da:"Dansk",de:"Deutsch",es:"Espa\xf1ol",fr:"Fran\xe7ais",it:"Italiano",ja:"日本語",nb:"Norsk",nl:"Nederlands",pl:"Polski",pt:"Portugu\xeas","pt-br":"Portugu\xeas do Brasil","en-gb":"English (UK)",sv:"Svenska",tr:"T\xfcrk\xe7e"},eH=["ar","cs","de","el","en","es","fr","hi","hu","id","it","ja","ko","la","nl","no","pl","pt","ro","ru","sv","th","tr","vi","zh"],eq=["IN"],eG=604800,e$=.0064,ej={therampart:{sectionIds:[62635]},thebulwark:{sectionIds:[87956]}},eV=3,ez=e=>{var t;let{section:n,pub:r}=e;return!!(null==(t=ej[r.subdomain])?void 0:t.sectionIds.includes(n.id))};class eJ extends Error{constructor({status:e,errType:t,errMessage:n,pub:a,body:s}){super(n),(0,r._)(this,"name",void 0),(0,r._)(this,"status",void 0),(0,r._)(this,"response",void 0),this.name=this.constructor.name,this.status=e,this.response={body:(0,o._)((0,i._)({},s),{status:t,error:n})},a&&(this.response.body.publication=a),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}function eK(e){var t,n,r,i;let{skipMultiContributorCheck:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("popularinformation"===e.subdomain)return"Judd Legum";if("whyisthisinteresting"===e.subdomain)return"Noah & Colin";if("informant"===e.subdomain)return"Nick Martin";if("colinmeloy"===e.subdomain)return"Colin Meloy";if("petition"===e.subdomain||"russiandissent"===e.subdomain)return null;if("mattlabash"===e.subdomain)return"Matt Labash";if("wmbrown"===e.subdomain)return"Matt Hranek";if("bigtechontrial"===e.subdomain)return"Matt Stoller";if("thegreenspoon"===e.subdomain)return"Greta and Fanny";if("exponentialview"===e.subdomain)return"Azeem Azhar";if("thegodpod"===e.subdomain)return"God";if(!o&&"object"==typeof e&&"contributors"in e&&(null==(i=e.contributors)?void 0:i.length)>1)return null;let a=e.name||e.subdomain;for(let i of["object"==typeof e&&"contributors"in e&&(null==(n=e.contributors)||null==(t=n[0])?void 0:t.name),"object"==typeof e&&"author_name"in e&&e.author_name,e.email_from_name,null==e||null==(r=e.author)?void 0:r.name])if(i&&(i=i.split(/(,|\||\s-|-\s|\bfrom\b|\bat\b)/g)[0].trim())&&!i.startsWith(a)&&!a.startsWith(i)&&!i.endsWith(a)&&!a.endsWith(i))return i;return null}function eX(e){var t;let{pub:n,post:r}=e,i=(null==n?void 0:n.twitter_screen_name)||n&&f.im[null==n?void 0:n.subdomain],o=null!=(t=null==r?void 0:r.title)?t:null==n?void 0:n.name;return n&&!r&&(o="Subscribe to ".concat(o)),i&&(!r||n&&(!r.publishedBylines.length||r.publishedBylines.some(e=>e.id===n.author_id)))&&(o+=", by @".concat(i)),o}function eZ(e){let{now:t=!1,isFreeSubscribed:n=!1,isMobile:r=!1,isPledged:i=!1,pledgesEnabled:o=!1,language:a,foundingUpsell:s,isFoundingSubscribed:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"Subscribe";let{iString:u}=I18N.i(a||e.language);return n8(e,()=>{if(n&&e.plans&&s&&!l)return u("Upgrade to founding");if(n&&e.plans&&r&&t)return u("Upgrade now");if(n&&e.plans&&r&&!t)return u("Upgrade");if(n&&e.plans&&!r&&t)return u("Upgrade to paid now");if(n&&e.plans&&!r&&!t)return u("Upgrade to paid");else if(n&&o&&!i&&t)return u("Pledge your support now");else if(n&&o&&!i&&!t)return u("Pledge your support");else if(t)return u("Subscribe now");return u("Subscribe")},a=>(n&&e.plans?t0(r?a.upgrade:a.upgradeToPaid):n&&o&&!i?"Pledge your support":t0(n4(e,"subscribe")))+(t?" now":""))}function eQ(e){let{date:t,bylines:r,like_count:i,comment_count:o,language:a="en"}=e,{iPlural:s}=I18N.i(a),l=n(16291).A,u=[];return u.push(l(t).locale(a).fromNow()),i&&u.push(s("1 like","%1 likes",i)),o&&u.push(s("1 comment","%1 comments",o)),r&&r.length&&u.push(tV(r.map(e=>e.name).filter(e=>null!==e),a)),u.join(" \xb7 ")}function e0(e){return!!e&&b.q.includes(e)}let e1=["astralcodexten"];function e2(e,t){return!(!["astralcodexten","company","library","on","blog","stories"].includes(null==e?void 0:e.subdomain)&&((null==t?void 0:t.type)!=="podcast"||(0,h.lu)({pub:e}))&&((null==t?void 0:t.type)!=="video"||(0,h.lu)({pub:e})))}let e6=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toUpperCase().replace(/^(THE|A|AN)\s+/,"")};function e8(e){return e.sort((e,t)=>{var n,r,i,o;if(!e)return 1;if(!t||"subscribed"===e.membership_state&&"subscribed"!==t.membership_state)return -1;if("subscribed"===t.membership_state&&"subscribed"!==e.membership_state)return 1;let a=e6("publication"in e?null==(n=e.publication)?void 0:n.name:"pub"in e?null==(r=e.pub)?void 0:r.name:""),s=e6("publication"in t?null==(i=t.publication)?void 0:i.name:"pub"in t?null==(o=t.pub)?void 0:o.name:"");return as)})}function e4(e){if(e.expiry&&new Date(e.expiry)>new Date)switch(e.type){case"gift":return"Gifted Subscription";case"comp":return"Comped Subscription";default:return"Paid Subscriber"}return!e.email_disabled||e.email_settings&&Object.values(e.email_settings||{}).some(e=>"individual"===e)?"Free Subscriber":e.email_settings&&Object.values(e.email_settings||{}).some(e=>"digest"===e)?"Follows in Digests":"Emails Disabled"}function e3(e){let{post:t,user:n}=e;return!!(t&&n&&n.has_publication&&!n.is_admin&&!n.is_contributor&&t.slug!==g._B)}let e5="no-reply@substack.com";function e9(e){if(!e||"string"!=typeof e)return e;e=e.replace(/[\u0000-\u0008\u000B-\u001F\u007F\uFFFD]/g,e=>e.length>1?e:" ");try{return encodeURIComponent(e),e}catch(e){}return e.replace(/[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g,e=>e.length>1?e:" ")}function e7(e,t){let n=new TextEncoder().encode(e);return n.length>t?new TextDecoder().decode(n.slice(0,t)):e}function te(e){for(;;)try{return encodeURIComponent(e),e}catch(t){e=e.substring(0,e.length-1)}}function tt(e,t){let{words:n=null,ellipsis:r="…",extension:i=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return e;let o=!1;if(n){let t=new RegExp("^(\\w+\\W+){".concat(n-1,"}\\w+")).exec(e);t&&(o=!0,e=t[0])}return t&&e.length>t&&(o=!0,e=e.substring(0,t-r.length)),o&&(e=te(e)+r,i&&(e+=i)),e}function tn(e,t){let{ellipsis:n="…",quotationMarks:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return e;r&&(t-=2);let i=e;if(e&&e.length>t){let r=e.split(/\s+/),o=[],a=0;for(;a<=t;){let e=r.shift();if(!e||a+e.length>t)break;o.push(e),a+=e.length+1}i=ta(o.join(" "),n)}return r&&(i.endsWith(" ")||i.startsWith(" "))&&(i=i.trim()),r?'"'.concat(i,'"'):i}function tr(e){return e?e.replace(/(^|[\s([{<])"/g,"$1“").replace(/"/g,"”").replace(/(^|[\s([{<])'/g,"$1‘").replace(/'/g,"’"):""}let ti=e=>{var t;if(!e)return"";let n=e.trim(),r=n.split(/\s/);return(null!=(t=r[r.length-1])?t:"").length>5?n:n.replace(/(\s)(\S+)$/,"\xa0$2")},to=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-./:;<=>?@[\]^_`{|}~]+$/g;function ta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"…";return"".concat(e.replace(to,"")).concat(t)}function ts(e){return/[!.?](?:\s+)?$/.test(e)}let tl=new Set([" ","-"]);function tu(e){let{maxCharsPerLine:t=55,maxLines:n=2,preferWide:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.length<=t)return[e];let i=t*n;if(e.length>i){let t=i;for(;t>=0&&" "!==e.charAt(t);)t--;e=ta(e.slice(0,t))}let o=r?t:Math.floor(e.length/n),a=-1,s=0,l=[];for(;s+o/[A-Z]/.test(e),td=e=>/[\s-]/.test(e);function tp(e,t){let n=0;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{},i=e;if(tp(e,r)<=t)return[e];let o=[];for(let i=0;ie+t.length,0){var t,n;return(null==(n=e.draft_plans)||null==(t=n[0])?void 0:t.currency)||"usd"};function tE(e){return["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"].includes(e.toUpperCase())}function tT(e){return tE(tS(e))}function tk(e){let{locale:t="en-US"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Intl.NumberFormat(t,{style:"currency",currency:e,minimumFractionDigits:0,maximumFractionDigits:0}).format(0).replace(/\d/,"").trim()}let tP=e=>e/1e8;function tA(e,t){let{forceDecimals:n=!1,locale:r="en-US"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new Intl.NumberFormat(r,{style:"currency",currency:t,minimumFractionDigits:n||e%100&&!tE(t)?2:0,maximumFractionDigits:"btc"===t?8:2}).format("btc"===t?tP(e):tE(t)?e:e/100);return"usd"===t&&"undefined"!=typeof window&&window._preloads&&window._preloads.country&&M.includes(window._preloads.country)&&(i="US".concat(i)),i}function tI(e){return new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(e/100)}let tR=new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0});function tC(e){if(!e)return null;if("string"!=typeof e)throw Error("Bad type for dollar string");let t=e.replace(/[^0-9.]/g,"");return t?Math.round(100*Number(t)):null}function tN(e){let t=e/100;return 100*(t=t<50?Math.ceil(t):5*Math.ceil(t/5))}function tU(e){let{quantity:t=1,coupon:n=null,noTrial:r=!1,trial_end_override:i=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r&&(e.trial_period_days||n&&n.trial_period_days||i&&i>Date.now()/1e3+120))return 0;let o=e.amount*t;return n&&n.percent_off?o=Math.round(o*(1-(n.percent_off_precise||n.percent_off)/100)):n&&n.amount_off&&(o=Math.max(0,o-n.amount_off)),o}function tx(e){let t,n,r,i,{interval:o="month",interval_count:a=eI,multiplier:s=1,min:l=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(let i of e){if(r){if(r!=i.currency)continue}else r=i.currency;"month"==i.interval?(!t||i.amount1&&void 0!==arguments[1]?arguments[1]:{},{iCombo:m}=I18N.i(d);if((e=Math.round(e))<(n||60))return(t=Math.round(e),u)?t:l&&s?m("secondsToLargestUnit","second","seconds",t):l&&!s?m("secondsToLargestUnit","sec","secs",t):!s&&p?m("secondsToLargestUnit","%1 sec ago","%1 secs ago",t):!s&&f?m("secondsToLargestUnit","%1 sec left","%1 secs left",t):s?p?m("secondsToLargestUnit","%1 second ago","%1 seconds ago",t):f?m("secondsToLargestUnit","%1 second left","%1 seconds left",t):m("secondsToLargestUnit","%1 second","%1 seconds",t):m("secondsToLargestUnit","%1 sec","%1 secs",t);if(e<(r||3600)&&c&&!u&&!l)return(t=Math.round(e/60),!s&&p)?m("secondsToLargestUnit","%1 min ago","%1 mins ago",t):!s&&f?m("secondsToLargestUnit","%1 min left","%1 mins left",t):s?p?m("secondsToLargestUnit","less than %1 second ago","less than %1 seconds ago",t):f?m("secondsToLargestUnit","less than %1 second left","less than %1 seconds left",t):m("secondsToLargestUnit","less than %1 minute","less than %1 minutes",t):m("secondsToLargestUnit","less than %1 min","less than %1 mins",t);if(e<(r||3600))return(t=Math.round(e/60),u)?t:l&&s?m("secondsToLargestUnit","minute","minutes",t):l&&!s?m("secondsToLargestUnit","min","mins",t):!s&&p?m("secondsToLargestUnit","%1 min ago","%1 mins ago",t):!s&&f?m("secondsToLargestUnit","%1 min left","%1 mins left",t):s?p?m("secondsToLargestUnit","%1 minute ago","%1 minutes ago",t):f?m("secondsToLargestUnit","%1 minute left","%1 minutes left",t):m("secondsToLargestUnit","%1 minute","%1 minutes",t):m("secondsToLargestUnit","%1 min","%1 mins",t);if(e<(i||86400))return(t=Math.round(e/60/60),u)?t:l&&s?m("secondsToLargestUnit","hour","hours",t):l&&!s?m("secondsToLargestUnit","hr","hrs",t):!s&&p?m("secondsToLargestUnit","%1 hr ago","%1 hrs ago",t):!s&&f?m("secondsToLargestUnit","%1 hr left","%1 hrs left",t):s?p?m("secondsToLargestUnit","%1 hour ago","%1 hours ago",t):p?m("secondsToLargestUnit","%1 hour left","%1 hours left",t):m("secondsToLargestUnit","%1 hour","%1 hours",t):m("secondsToLargestUnit","%1 hr","%1 hrs",t);if(e<(o||604800))return(t=Math.round(e/60/60/24),u)?t:l?m("secondsToLargestUnit","day","days",t):p?m("secondsToLargestUnit","%1 day ago","%1 days ago",t):f?m("secondsToLargestUnit","%1 day left","%1 days left",t):m("secondsToLargestUnit","%1 day","%1 days",t);else if(e<(a||0x1e187e0))return(t=Math.round(e/60/60/24/7),u)?t:l&&s?m("secondsToLargestUnit","week","weeks",t):l&&!s?m("secondsToLargestUnit","wk","wks",t):!s&&p?m("secondsToLargestUnit","%1 wk ago","%1 wks ago",t):!s&&f?m("secondsToLargestUnit","%1 wk left","%1 wks left",t):s?p?m("secondsToLargestUnit","%1 week ago","%1 weeks ago",t):f?m("secondsToLargestUnit","%1 week left","%1 weeks left",t):m("secondsToLargestUnit","%1 week","%1 weeks",t):m("secondsToLargestUnit","%1 wk","%1 wks",t);return(t=Math.round(e/60/60/24/365.25),u)?t:l&&s?m("secondsToLargestUnit","year","years",t):l&&!s?m("secondsToLargestUnit","yr","yrs",t):!s&&p?m("secondsToLargestUnit","%1 yr ago","%1 yrs ago",t):!s&&f?m("secondsToLargestUnit","%1 yr left","%1 yrs left",t):s?p?m("secondsToLargestUnit","%1 year ago","%1 years ago",t):f?m("secondsToLargestUnit","%1 year left","%1 years left",t):m("secondsToLargestUnit","%1 year","%1 years",t):m("secondsToLargestUnit","%1 yr","%1 yrs",t)}function tD(e){let{strict:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!1},n=Math.floor(e/60/60),r=Math.floor(e/60)%60,i=Math.floor(e%60);if(!t)return"".concat((n?"".concat(n,":"):"")+(n?"0".concat(r).slice(-2):r),":").concat("0".concat(i).slice(-2));let o=e=>e.toString().padStart(2,"0"),a=o(n),s=o(r),l=o(i);return"".concat(a,":").concat(s,":").concat(l)}function tL(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function tF(e){return"#"!==e[0]&&(e="#".concat(e)),e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,r)=>t+t+n+n+r+r)}function tB(e){let t;function n(e,t){"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)&&(e="100%");let n="string"==typeof e&&-1!=e.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}e=tF(e);let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),i=parseInt(null==r?void 0:r[1],16),o=parseInt(null==r?void 0:r[2],16),a=parseInt(null==r?void 0:r[3],16);i=n(i,255);let s=Math.max(i,o=n(o,255),a=n(a,255)),l=Math.min(i,o,a),u=s-l;if(s==l)t=0;else{switch(s){case i:t=(o-a)/u+6*(o.11&&t.h<.56){if(t.s>.25&&t.v>.5){if(t.s<.6&&t.v>.8)return!0;else if(t.s>.6)return!0}}else if(t.s>.25&&t.v>.5)return!0;return!1}function tG(e,t){let n=tO(e);return n?(n.r=Math.max(0,Math.min(255,Math.round(n.r*t))),n.g=Math.max(0,Math.min(255,Math.round(n.g*t))),n.b=Math.max(0,Math.min(255,Math.round(n.b*t))),tY(n)):e}function t$(e){let{r:t,g:n,b:r}=tO(e);return t/=255,n/=255,r/=255,.2126*(t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}function tj(e,t){let{name:n=e=>e,restWord:r="other",noNames:i="people",pluralizeRest:o=!0,showRestCount:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=e.map(n).filter(Boolean).slice(0,t);if(0===s.length)s.push(na(e.length,i));else if(s.length1&&o?"s":""))}return tV(s)}function tV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t),r="";return 1===e.length?r=e[0]:2===e.length?r=e.join(" ".concat(n("and")," ")):e.length>2&&(r="".concat(e.slice(0,-1).join(", "),", ").concat(n("and")," ").concat(e.slice(-1))),r}function tz(e){let{minSignificantDigits:t=1,language:n="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e<1e3)return e.toString();let{iTemplate:r}=I18N.i(n),i=e=>{let n=Math.max(t-1-Math.floor(Math.log10(e)),0);return Math.round(e*Math.pow(10,n))/Math.pow(10,n)};return 1e3>Math.round(e/1e3)?(e/=1e3,r(T(),i(e))):1e3>Math.round(e/1e6)?(e/=1e6,r(k(),i(e))):1e3>Math.round(e/1e9)?(e/=1e9,r(P(),i(e))):(e/=1e12,r(A(),i(e)))}let tJ=e=>Math.max(0,Math.min(5,Math.floor(Math.log(Math.max(e,1))/Math.LN10+1e-9))-1),tK=e=>"\uD83D\uDD25".repeat(tJ(e));function tX(e,t,n){let r=(e||"").trim().split(/[\s\r]*\n[\s\r]*/g).map(e=>e.trim()).filter(e=>e),i=[];for(;r.length>0;){let e=r.shift(),o=i[i.length-1];o&&o.length{var t;return(null==(t=e[0])?void 0:t.toUpperCase())+e.substr(1).toLowerCase()}).join(" ")}function t0(e,t){var n;let r=t?e.substr(1).toLowerCase():e.substr(1);return(null==(n=e[0])?void 0:n.toUpperCase())+r}function t1(e){let t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function t2(e){let{precision:t=0,language:n="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=Number(e.replace(/,/g,""))),new Intl.NumberFormat(n,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:t}).format(e)}function t6(e){return c()(e)?0:Math.pow(10,Math.floor(Math.log10(e)))||0}function t8(e,t){let{iString:n}=I18N.i(t);if(e<100)return n("tens");if(e<1e3)return n("hundreds");if(e<1e4)return n("thousands");if(e<1e5)return n("tens of thousands");if(e<1e6)return n("hundreds of thousands");else if(e<1e7)return n("millions");else if(e<1e8)return n("tens of millions");else if(e<1e9)return n("hundreds of millions");else if(e<1e10)return n("billions");else if(e<1e11)return n("tens of billions");else if(e<1e12)return n("hundreds of billions");else if(e<1e13)return n("trillions");else if(e<1e14)return n("tens of trillions");else if(e<1e15)return n("hundreds of trillions");return n("gagillions")}function t4(e){let{maximumFractionDigits:t=1,plusSignifier:n="+"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.toLocaleString(void 0,{notation:"compact",maximumFractionDigits:t,roundingMode:"floor"});return e>=1e3?"".concat(r).concat(n):e>0?r:"0"}function t3(e){return e<=10?"#".concat(e):e<=25?"Top 25":e<=50?"Top 50":e<=100?"Top 100":""}function t5(e){if(e<1e3)return null;let t=1e3*Math.floor(e/1e3);return t>=1e6&&(t=1e5*Math.floor(e/1e5)),t2(t)}function t9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t),r=t5(e);return r?n(I(),r):null}function t7(e){let t;return e?(t=e<1e3?1:e<1e4?100:e<1e6?1e3:1e5,Math.floor(e/t)*t):0}function ne(e){let t=t7(e);return t&&0!==t?t4(t):null}function nt(e,t){let{iString:n}=I18N.i(t);return e&&0!==e?"".concat(ne(e)," ").concat(n(1===e?"subscriber":"subscribers")):n("See subscribers")}let nn=e=>1>Number(e)?"< 1%":"".concat(e,"%");function nr(e){let{rounded:t=!1,display:n=!1,decimalPlaces:r=-1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=100*parseFloat(e);return(r>=0&&(i=i.toFixed(r)),t&&(i=Math.floor(i)),n)?nn(Number(i)):i}function ni(e){var t;return(null==e||null==(t=e.postSchedules)?void 0:t.length)&&e.postSchedules[0]&&e.postSchedules[0].trigger_at?new Date(e.postSchedules[0].trigger_at):"scheduled_at"in e&&e&&e.scheduled_at?e.email_sent_at&&e.should_send_email?void 0:new Date(Math.max(new Date(e.scheduled_at).getTime(),Date.now())):void 0}function no(e){if(0===e)return"zero";if(1===e)return"one";if(2===e)return"two";if(3===e)return"three";if(4===e)return"four";else if(5===e)return"five";else if(6===e)return"six";else if(7===e)return"seven";else if(8===e)return"eight";else if(9===e)return"nine";else if(10===e)return"ten";else if(11===e)return"eleven";else if(12===e)return"twelve";return t2(e)}function na(e,t){let n,r,{zero_fallback:i="",just_word:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t.lastIndexOf(" ")+1,s=t.substr(a),l=t.substr(0,a);return(["person","people"].includes(s)?(n="".concat(l,"person"),r="".concat(l,"people")):["Person","People"].includes(s)?(n="".concat(l,"Person"),r="".concat(l,"People")):["reply","replies"].includes(s)?(n="".concat(l,"reply"),r="".concat(l,"replies")):["Reply","Replies"].includes(s)?(n="".concat(l,"Reply"),r="".concat(l,"Replies")):["entry","entries"].includes(s)?(n="".concat(l,"entry"),r="".concat(l,"entries")):["Entry","Entries"].includes(s)?(n="".concat(l,"Entry"),r="".concat(l,"Entries")):["match","matches"].includes(s)?(n="".concat(l,"match"),r="".concat(l,"matches")):["Match","Matches"].includes(s)?(n="".concat(l,"Match"),r="".concat(l,"Matches")):(n=t,r="".concat(t,"s")),o||(n="".concat(t2(e)," ").concat(n),r="".concat(t2(e)," ").concat(r)),!e&&i)?i:1==e?n:r}function ns(e){return"".concat(e,"’").concat("s"===e[e.length-1]?"":"s")}function nl(e){return e.replace(/\n/g,"\\n")}function nu(e){let{publication:t,post:n}=e;return!(!n||["adhoc_email","page"].includes(null==n?void 0:n.type))&&t.community_enabled&&n&&"none"!==n.write_comment_permissions}function nc(e){let{publication:t,post:n}=e;return!!(t.community_enabled&&n)}function nd(e){let{publication:t,post:n}=e;return(null==n?void 0:n.type)!=="page"&&(null==n?void 0:n.type)!=="adhoc_email"&&(null==n?void 0:n.slug)!==g._B&&(n&&n.comment_count>0||nu({publication:t,post:n}))}let np=e=>!!(e&&e.is_contributor);function nf(e,t){let{bypassContentAccessCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{userHasFullAccessToPost:i}=n(56262);return!t.is_geoblocked&&(!!(e&&t.publishedBylines&&t.publishedBylines.find(t=>t.id===e.id))||r||i(e,t))}function nm(e,t){let{bypassContentAccessCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{userHasFullAccessToPost:i}=n(56262);return!!(e&&t.publishedBylines&&t.publishedBylines.find(t=>t.id===e.id))||r||i(e,t)}let nh=e=>"thread"===e.type&&"none"===e.write_comment_permissions;function ng(e,t,r){let{userHasFullAccessToPost:i,isFoundingAudience:o}=n(56262),a=e&&"id"in e?e.id:null;if(a&&t.publishedBylines&&t.publishedBylines.find(e=>e.id===a)||e&&e.is_contributor)return{canReply:!0};switch(t.write_comment_permissions||r.default_write_comment_permissions){case"everyone":return{canReply:!0};case"none":return{canReply:!1,repliesDisabledReason:"comments_disabled"};case"only_paid":{if(o(t.audience)){let n=!!e&&i(e,t);return{canReply:n,repliesDisabledReason:n?void 0:"founding_subscription_required"}}let n=!!(e&&e.is_subscribed);return{canReply:n,repliesDisabledReason:n?void 0:"paid_subscription_required"}}}return{canReply:!1}}function nb(e,t,n){return ng((0,o._)((0,i._)({},e),{is_subscribed:!0}),t,n).canReply}function n_(e,t){var n;return e&&t&&(null==(n=e.dashboard_pubs)?void 0:n.find(e=>e.can_post_notes_as_primary_user&&e.primary_user_id===t.user_id&&(!(null==t?void 0:t.publication_id)||(null==t?void 0:t.publication_id)===(null==e?void 0:e.id))))||null}function ny(e,t){return!!n_(e,t)}let nv=(e,t)=>!!(t&&e&&e.id===t.user_id||ny(e,t));function nw(e,t,n){let{pub:r,parentComments:i}=n;if(!e||!t)return!1;if(e.id===t.user_id)return!0;if(t.publication_id&&t.post_id){if(nE(e,r))return!0}else if(nS({user:e,comment:t,parentComments:i}))return!0;else if(ny(e,t))return!0;else if(r&&r.contributors.find(t=>t.user_id===e.id&&"community_moderator"===t.role))return!0;return!1}function nS(e){var t;let{user:n,comment:r,parentComments:i}=e;if(!n||!r||r.publication_id&&r.post_id||n.id===r.user_id||n.is_contributor)return!1;let o=Number(null==(t=r.ancestor_path)?void 0:t.split(".").filter(Boolean)[0]);if(!o)return!1;let a=null==i?void 0:i.find(e=>(null==e?void 0:e.id)===o);return n.id===(null==a?void 0:a.user_id)}function nE(e,t){return!!e&&!!(e.id===(null==t?void 0:t.author_id)||(null==t?void 0:t.contributors.find(t=>t.user_id===e.id&&e0(t.role))))}function nT(e,t){return!!e&&!!t&&e.id!==t.user_id}function nk(e){return!!e.plans}function nP(e){return!!(e.plans||e.has_subscribers)}function nA(e){let{type:t,coupon:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.plans&&"page"!==t?n?"only_free":"only_paid":"everyone"}function nI(e){let{pub:t}=e;return!!(t.plans&&t.plans.find(e=>{var t;return(null==(t=e.metadata)?void 0:t.founding)==="yes"}))}function nR(e){let{pub:t}=e;if(!t.plans)return["everyone"];let n=["everyone","only_paid"];return nI({pub:t})&&n.push("founding"),n}function nC(e,t,n){if("thread"===t)switch(e){case"only_paid":case"founding":return["only_paid"];default:return["everyone"]}switch(e){case"only_paid":case"founding":return["only_paid","none"];case"everyone":if(n)return["only_paid","everyone","none"];return["everyone","none"];default:return["none"]}}function nN(e,t,n,r){return null!=e&&nC(t,n,r).includes(e)}function nU(e,t,n,r){return nN(n.default_write_comment_permissions,e,t,r)?n.default_write_comment_permissions:nC(e,t,r)[0]}function nx(e,t,n){return"page"!==t&&("only_free"===n||!!e.default_post_publish_send_email)}function nM(e,t,n){return t&&"forever"===t.interval?0:Math.max(0,...[e.trial_end_override>Date.now()/1e3?e.trial_end_override:0,t&&"trial_period_days"in t&&t.trial_period_days&&Math.round((Date.now()+24*t.trial_period_days*36e5)/1e3),n&&n.trial_period_days&&Math.round((Date.now()+24*n.trial_period_days*36e5)/1e3)].filter(e=>e))}let nD=e=>eL[new Date(e).getMonth()];function nL(e){let{noBreakSpace:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t?"\xa0":" ",r=[];if(1==e.length&&e[0])r=[e[0]];else if(2==e.length&&e[0]&&e[1])r=[e[0],"".concat(n,"and").concat(n),e[1]];else if(e.length>=3)for(let t=0;tr.join(""),r}function nF(e){var t;let n=new Map;for(let t of e){let e=n.get(t);e=(e||0)+1,n.set(t,e)}return null==(t=Array.from(n).sort((e,t)=>t[1]-e[1])[0])?void 0:t[0]}function nB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t);return n("thread"===e.type?"View thread":"podcast"===e.type?"Listen":"Read")}function nO(e){let{isFinalWord:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"podcast"===e?"listening".concat(t?"":" to"):"video"===e?"watching":"reading"}function nY(e){return"newsletter"===e?"post":"podcast"===e?"episode":"adhoc_email"===e?"email":"video"===e?"video":e}function nW(e){return"".concat(tt(e.title||"Untitled post",115))}function nH(e){return 10475===e.publication_id&&18994===e.section_id}function nq(e){let{isDraft:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?((t?e.draftBylines:e.publishedBylines)||[]).filter(e=>e.name):[]}function nG(e,t){let{isDraft:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=nq(t,{isDraft:n});return r.length>0?tV(r.map(e=>e.name).filter(e=>null!==e)):null}function n$(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(String(e))}function nj(e){return"string"==typeof e?p()(e)||0:"number"==typeof e?e:0}function nV(e){let t=e=>new RegExp("^.*".concat(e));if(e){if(e.includes(m.T.CHECKOUT_URL))return e.replace(t(m.T.CHECKOUT_URL),"/subscribe?");else if(e.includes(m.T.FOUNDING_CHECKOUT_URL))return e.replace(t(m.T.FOUNDING_CHECKOUT_URL),"/subscribe?plan=founding&");else if(e.includes(m.T.REFERRAL_URL))return e.replace(t(m.T.REFERRAL_URL),"/?showWelcome=true");else if(e.includes(m.T.UNSUBSCRIBE_URL))return e.replace(t(m.T.UNSUBSCRIBE_URL),"/account?");else if(e.includes(m.T.ONE_CLICK_UNSUBSCRIBE_URL))return e.replace(t(m.T.ONE_CLICK_UNSUBSCRIBE_URL),"/account?");else if(/^.*%%.*%%/.test(e))return null}return e}function nz(e){let t=nV(e);if(t){let e=window.open(t,"_blank");(null==e?void 0:e.focus)&&e.focus()}}function nJ(e){var t;return!e||["publish","account"].includes(null!=(t=(document.location&&document.location.pathname||"").split("/")[1])?t:"")}function nK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";let n=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,n)).toFixed(t<0?0:t))," ").concat(x[n])}function nX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return 0;let[t,n]=e.split(" "),r=x.indexOf(n);return r<0?0:Number(t)*Math.pow(1024,r)}function nZ(e){return/Googlebot/i.test(e||"")?"Google":/bingbot/i.test(e||"")||/BingPreview/i.test(e||"")?"Bing":/Slurp/i.test(e||"")?"Yahoo":/DuckDuckBot/i.test(e||"")?"DDG":!!/Baiduspider/i.test(e||"")&&"Baidu"}function nQ(e,t,n,r){return e.name?e.name:(n&&n.author_id===r.id||t&&t.publishedBylines&&t.publishedBylines.find(e=>e.id===r.id))&&e.email||"Someone"}function n0(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",{iTemplate:r}=I18N.i(n);return e&&e.description||t.hero_text||r(R(),t.name)}let n1=[{pubs:["thebulwark"],subscription:"membership",donateItem:"membership",subscriber:"member",subscribe:"join",subscribeTo:"join",upgrade:"join",upgradeTo:"join",upgradeToPaid:"join",upgradeSubscriptionTo:"upgrade your membership to"},{pubs:["georgesaunders"],donateItem:"scholarship"},{pubs:["thecoddlingmovie"],subscribe:new Date>new Date("2024-02-22T08:00:00Z")?"watch the film":"pre-order the film"}],n2={subscription:"subscription",donateItem:"subscription",subscriber:"subscriber",subscribe:"subscribe",subscribeTo:"subscribe to",upgrade:"upgrade",upgradeTo:"upgrade to",upgradeToPaid:"upgrade to paid",upgradeSubscriptionTo:"upgrade your subscription to"},n6=n1.flatMap(e=>e.pubs);function n8(e,t,n){let r=n1.find(t=>t.pubs.includes(null==e?void 0:e.subdomain))||null,o=r?(0,i._)({},n2,r):null;return o?n(o):t()}function n4(e,t){let n=e?n1.find(t=>t.pubs.includes(e.subdomain)):void 0,r=n&&n[t];if(!r&&!(r=n2[t]))throw Error("".concat(t," is not a valid subscription word"));return r}function n3(e){let t={0:8304,1:185,2:178,3:179,4:8308,5:8309,6:8310,7:8311,8:8312,9:8313};return String.fromCodePoint(...Array.from("".concat(e)).map(e=>t[e]))}let n5=e=>{var t,n,r;return null==e||null==(r=e.plans)||null==(n=r.find(e=>{var t;return null==(t=e.metadata)?void 0:t.founding}))||null==(t=n.metadata)?void 0:t.short_description},n9=e=>"https://".concat("","checkout.opennode.com/").concat(e);function n7(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=0===e?0:Math.floor(Math.log(e)/Math.log(1024));return"".concat(+(e/Math.pow(1024,t)).toPrecision(3)).concat(["B","KB","MB","GB","TB"][t])}function re(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(!e)return null;let{iString:n}=I18N.i(t),r=n("Substack Network"),i=n("Substack App"),o=n("Substack Live Video");if(ro(e))return i;let a={"blog.substack.com":r,"library.substack.com":r,"substack-network":r,"on.substack.com":r,"open.substack.com":i,"post-end-cta":"Post Footer CTA","stories.substack.com":r,"substack-activity-items":i,"substack-app":i,"substack-boost":r,"substack-categories-discovery":i,"substack-categories-discovery-search":i,"substack-chat":i,"substack-comment-links":r,"substack-country-leaderboards":i,"substack-cross-posts":r,"substack-facepiles":r,"substack-feed-item":i,"substack-follow-recommendations":i,"substack-guest-post-bio":r,"substack-homepage-recommendations":r,"substack-ios-in-app-purchase":"Substack iOS In-App Purchase","substack-leaderboards":i,"substack-live-stream":o,"substack-media-player":i,"substack-mentions":r,"substack-notes":i,"substack-onboarding-discovery":i,"substack-paid-gift":i,"substack-post-embeds":r,"substack-post-reply-comment":r,"substack-presubscribe":i,"substack-publication-embeds":r,"substack-reader-discovery":i,"substack-reader-profile-discovery":i,"substack-reader-shared":"Reader sharing","substack-your-weekly-stack":n("Substack Network — Your Weekly Stack"),"substack-recommendation-email":r,"substack-recommendations-page":r,"substack-referral":r,"substack-signup-flow":r,"substack-subscriber-referral":r,"substack-twitter-link":i,"substack-twitter-suggest":i,"substack-xp-post-template":r,"substack-xp-read-next":r,"substack.com":i,"t.co":"Twitter","www.substack.com":i,external:n("external form / api"),"googleads.g.doubleclick.net":"Google","score-upsell":n("Boost upsell to engaged subscribers"),"substack-boost-subscribe-page-upsell":n("Boost upsell on another publication")}[e];return a||(/(\b|\.)facebook\./.test(e)?"Facebook":/(\b|\.)instagram\./.test(e)?"Instagram":/(\b|\.)linkedin\./.test(e)?"LinkedIn":/(\b|\.)youtube\./.test(e)?"YouTube":/(\b|\.)duckduckgo\./.test(e)?"DuckDuckGo":/(\b|\.)medium\./.test(e)?"Medium":/(\b|\.)reddit\./.test(e)?"Reddit":/(\b|\.)bing\./.test(e)?"Bing":/(\b|\.)google\./.test(e)?"Google":(null==e?void 0:e.includes("."))?e:tQ(e.replace(/-/g," ")))}function rt(){return{"Substack Network":["blog.substack.com","library.substack.com","substack-network","on.substack.com","stories.substack.com","substack-boost","substack-comment-links","substack-cross-posts","substack-facepiles","substack-guest-post-bio","substack-homepage-recommendations","substack-mentions","substack-post-embeds","substack-post-reply-comment","substack-publication-embeds","substack-recommendation-email","substack-recommendations-page","substack-referral","substack-signup-flow","substack-subscriber-referral","substack-xp-post-template","substack-xp-read-next","substack-your-weekly-stack"],"Substack App":["open.substack.com","substack-activity-items","substack-app","substack-categories-discovery","substack-categories-discovery-search","substack-chat","substack-country-leaderboards","substack-feed-item","substack-follow-recommendations","substack-leaderboards","substack-media-player","substack-notes","substack-onboarding-discovery","substack-paid-gift","substack-presubscribe","substack-reader-discovery","substack-reader-profile-discovery","substack-twitter-link","substack-twitter-suggest","substack.com","www.substack.com"],Import:["import"],Direct:["direct"],"Substack Live Video":["substack-live-stream"],"Post Footer CTA":["post-end-cta"],"Substack iOS In-App Purchase":["substack-ios-in-app-purchase"],"Reader sharing":["substack-reader-shared"],Twitter:["t.co"],Google:["googleads.g.doubleclick.net"],"external form / api":["external"],"Boost upsell to engaged subscribers":["score-upsell"],"Boost upsell on another publication":["substack-boost-subscribe-page-upsell"]}}function rn(){return["Facebook","Instagram","LinkedIn","YouTube","DuckDuckGo","Medium","Reddit","Bing"]}function rr(){return[...Object.keys(rt()),...rn()]}function ri(e){return!!ro(e)||["substack-activity-items","substack-app","substack-categories-discovery","substack-categories-discovery-search","substack-chat","substack-country-leaderboards","substack-feed-item","substack-follow-recommendations","substack-ios-in-app-purchase","substack-leaderboards","substack-live-stream","substack-media-player","substack-notes","substack-onboarding-discovery","substack-paid-gift","substack-presubscribe","substack-reader-discovery","substack-reader-profile-discovery","substack-twitter-link","substack-twitter-suggest","substack.com"].includes(e)}function ro(e){return["substack-feed-item","notes_inline_suggestions","notes_sidebar_suggestions","feed-nux","feed-twitter-suggestions","notes_all_suggestions","note_permalink_upsell","notes_likes","note_inline_upsell","notes_restacks","notes_quote_attachment","notes_context","substack-notes","profile-page-notes","notes-inline-suggestions","subscribe_header_notes","notes-all-suggestions","notes-like-list","new-follower-email","media-player"].includes(e)}function ra(e){return!ri(e)&&/substack/i.test(e)}let rs=e=>/^\S+@\S+\.\S+$/.test(e),rl=e=>(e||"").replace(/\s+/g," "),ru={"-2":{short:"Deleted - Flagged as spam",long:"This publication is deleted and every page will show a flagged error"},"-1":{short:"Noindexed - In moderation queue",long:"This publication is temporarily not available to search engines because it is pending moderation, where it will be approved or deleted"},0:{short:"Noindexed - New Pub",long:'This publication is temporarily not available to search engines because the author needs to create a new post other than "coming-soon"'},1:{short:"Available",long:"This publication is available to search engines"},2:{short:"Available w/priority",long:"This publication is available to search engines and is given priority SEO treatment"}};function rc(e){return e?e<3456e3?"monthly":e<8121600?"quarterly":e<0xf53700?"semiannual":e<3456e4?"annual":e>3888e3?"lifetime":"other":"free"}function rd(e){return e&&("newspaper"===e.homepage_type||"magaziney"===e.homepage_type)}let rp=35;function rf(e){let t,n,{isStatic:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.width>=e.height*(960/540)?n=Math.round((t=r?550:960)*(e.height/e.width)):e.width>=e.height?n=Math.round((t=r?550:728)*(e.height/e.width)):t=n=r?550:728,{height:n,width:t}}function rm(e){let t=n(16291).A,r=t(e);return t.utc([r.year(),r.month(),r.date(),8,0,0]).toDate()}function rh(){let{now:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(16291).A,r=e?t(e):t(),i=r.utc().startOf("day").add(5,"hour");return i.isBefore(r)&&(i=i.utc().add(1,"day")),i}function rg(e){let t=Math.round(e/60),n=Math.floor(t/60);return"".concat(n?"".concat(n,"HR "):"").concat(t%60,"M")}function rb(e){let t=Math.round(e/60),n=Math.floor(t/60),r=t%60;return n?"".concat(n,"h ").concat(r,"m"):r?"".concat(r,"m"):"".concat(Math.round(e),"s")}function r_(e){let t=e.toLowerCase()[0];return["a","e","i","o","u"].includes(null!=t?t:"")}function ry(e){return"".concat(e.toLowerCase().startsWith("uni watch")?"a":r_(e)?"an":"a"," ").concat(e)}function rv(e){return e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0)}function rw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iContext:n}=I18N.i(t),r=n("thousandsAbbreviation","K");return Math.abs(e)>9999?"".concat(Math.sign(e)*(Math.abs(e)/1e3).toFixed(1)).concat(r):(Math.sign(e)*Math.abs(e)).toString()}function rS(e){var t,n,r,i,o;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:s}=I18N.i(a);return s((null==(t=e.metadata)?void 0:t.short_description_english)==="Stammleser"||(null==(n=e.metadata)?void 0:n.short_description_english)==="Gr\xfcndungsmitglied"?"Founding Member":(null==(r=e.metadata)?void 0:r.short_description_english)?null==(i=e.metadata)?void 0:i.short_description_english:(null==(o=e.metadata)?void 0:o.short_description)?e.metadata.short_description:"year"===e.interval?"Annual":"forever"===e.interval?"Founding Membership":"month"===e.interval&&3===e.interval_count?"Quarterly":"month"===e.interval&&6===e.interval_count?"Semiannually":"day"===e.interval?"Daily":"week"===e.interval?"Weekly":"Monthly")}let rE=function(){let{minLength:e,maxLength:t,minAlphaNumeric:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=>{if(!r)return"Missing input";if(e&&r.lengtht)return"Must be at most ".concat(t," characters long");let i=RegExp("\\P{P}|`","gu"),o=r.match(i);if(!o||(null==o?void 0:o.length)<(null!=n?n:e))return"Must contain at least ".concat(null!=n?n:e," non-punctuation characters");let a=["`"],s=0;return(o.forEach(e=>{a.includes(e)&&(s+=1)}),o.length-s<(null!=n?n:e))?"Must contain at least ".concat(null!=n?n:e," non-punctuation characters"):null}};function rT(e,t){let n=v.env[e];if(void 0!==n)return n;if(void 0!==t)return t;throw Error("Missing required env var ".concat(e))}function rk(e){return new Promise((t,n)=>{let r=[];e.on("data",e=>r.push(e)),e.once("end",()=>t(w.concat(r))),e.once("error",n)})}function rP(e){let{maxWidth:t=55,maxLines:n=2,charWidth:r=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],o="",a=0;for(let s of e.split(" ")){let e=s.length*r;if(a+e<=t)o?(o+=" ".concat(s),a+=e+r):(o=s,a=e);else if(i.push(o),o=s,a=e,i.length===n)break}if(i.length===n&&o){let e=t-a;e>=3?o+="...":o="".concat(o.substring(0,o.length-(3-e)),"..."),i[n-1]=o}else o&&i.push(o);return i}function rA(){return"undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0)}function rI(e){return(null==e?void 0:e.id)&&e.id.toString(36)||null}function rR(e){if(!e)return null;let t=parseInt(e,36);return ec(t)?t:null}function rC(e,t){return"string"!=typeof e?t[0]:t.includes(e)?e:t[0]}function rN(e){var t,n,r;let i=Array(null==(t=e[0])?void 0:t.length).fill(0);for(let t=0;tString.fromCodePoint(e.toUpperCase().codePointAt()+127397)).join("")}let rx=[{label:"Generic",value:"generic",url:"https://substack.com/content",message:void 0},{label:"Copyright Infringement",value:"copyright_infringement",url:"https://substack.com/dispute",message:"Warning: We have detected potential copyrighted content in your stream. Please remove any unauthorized content immediately to avoid additional enforcement actions from being taken against this stream or your account."},{label:"Explicit Content",value:"explicit_content",url:"https://substack.com/content",message:"Warning: We have detected a potential violation of Substack's Nudity/Porn/Erotica policy. As a reminder, Substack does not allow visual depictions of sexual acts. Please remove any violating content to avoid additional enforcement actions from being taken against this stream or your account."},{label:"Harmful and Illegal Activities",value:"harmful_and_illegal_activities",url:"https://substack.com/content",message:"We have detected a potential violation of Substack's Harmful & Illegal Activities policy. As a reminder, Substack does not allow content that promotes harmful or illegal activities, including material that advocates, threatens, or shows your causing harm to yourself, other people, or animals. Please remove any violating content to avoid additional enforcement actions from being taken against this stream or your account."}],rM=["US","GB","CA","FR","DE","ES","IT","NL","PL","GR","BE","IE","PT"];function rD(e,t,n){var r,i;if(!(0,h.C3)({pub:e}))return;let o=null;if("section"in t&&t.section?o=t.section:t.section_id&&(o=null==(r=e.sections)?void 0:r.find(e=>e.id===t.section_id)),!o&&t.draft_section_id&&n&&(o=null==(i=e.sections)?void 0:i.find(e=>e.id===t.draft_section_id)),!(!o||(0,h.Tu)({post:t,pub:e})||o.name.includes("Pirate Wires")))return"".concat(o.name," // ").concat(t.title||t.draft_title)}function rL(e){var t,n,r;return{sessionStarted:null!=(t=e.sessionStarted)?t:e.sessionStart,landingReferrer:null!=(n=e.landingReferrer)?n:e.originalReferrer,landingUrl:null!=(r=e.landingUrl)?r:e.landingPage,landingSurface:e.landingSurface,landingSurfaceId:e.landingSurfaceId,landingPublicationId:e.landingPublicationId}}function rF(e){var t;let n,r=+new Date,i=null!=(t=e.session_started_at)?t:e.sessionStarted;null!=i&&"number"==typeof i&&(n=new Date(i<2e4?r-1e3*i:i));let o=e.landingPublicationId;null==o&&null!=e.deepLink&&(o=(0,_.qc)(e.deepLink).publicationID);let a=e.landingSurfaceId,s=e.landingSurface;if(null==a&&null==s&&null!=e.deepLink){let t=(0,_.qc)(e.deepLink);s=t.surface,a=t.surfaceID}return{session_started_at:n,deep_link:e.deepLink,referrer:e.referrer,landing_referrer:e.landingReferrer,landing_url:e.landingUrl,landing_surface:s,landing_surface_id:String(a),landing_publication_id:o}}},69706:function(e,t,n){"use strict";n.d(t,{B7:()=>o,UH:()=>u,VE:()=>s,Zi:()=>r,d8:()=>a,fo:()=>i,qr:()=>l});let r=1,i=1.5,o=16/9,a=1.91,s=3,l=1.91,u={square:1,editorial:1.5,thumb:1.91,landscape:16/9,portrait:9/16,instagram:.8,social:1.91,cover:3}}}]);