"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["7566"],{72925:function(e,t,n){n.d(t,{Z:()=>i});let i={themedSelectOption:"themedSelectOption-uLytVj",noUnderline:"noUnderline-eUUJmS",podcastPaywallMenuButton:"podcastPaywallMenuButton-pkG3vq",paywallMenuDropdown:"paywallMenuDropdown-r7kYMC",paywallMenuDropdownItem:"paywallMenuDropdownItem-DQmkqr",paywallMenuDropdownIcon:"paywallMenuDropdownIcon-hVB_f0",paywallMenuDropdownItemTop:"paywallMenuDropdownItemTop-fWca_0",paywallMenuDropdownDeleteItem:"paywallMenuDropdownDeleteItem-ChWkG9"}},99987:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),r=n(99282),l=n(16584),a=n(64515);let o=e=>(0,l.BX)(a.l,(0,r._)((0,i._)({},e),{name:"PlayIconRound",svgParams:{height:24,width:24},children:[(0,l.tZ)("path",{className:"outer-circle",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,l.tZ)("path",{className:"inner-triangle",d:"M10 8L16 12L10 16V8Z","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}))},25956:function(e,t,n){n.d(t,{I:()=>N,s:()=>X});var i=n(7409),r=n(99282),l=n(98848),a=n(16584),o=n(30396),s=n(94184),d=n.n(s),c=n(59543),h=n(1548),u=n(3862),p=n(20888),m=n(24658),g=n(4211),Z=n(8845),f=n(95441),v=n(60807),w=n(25530),b=n(98422),y=n(15771),B=n(80026),_=n(19081),I=n(98012),x=n(63651),C=n(37175),M=n(24407);let X=e=>{let{theme:t,isMobile:n}=e;switch(t){case"full-width-image":return n?{height:620,width:350}:{height:880,width:1440};case"landscape-image":return n?{height:200,width:330}:{height:440,width:750};default:return n?{height:450,width:450}:{height:750,width:550}}},N=e=>{var{postTheme:t,inThreadHead:n}=e,r=(0,l._)(e,["postTheme","inThreadHead"]);if(!t||n)return(0,a.tZ)(T,(0,i._)({},r));let o=D[t.header_variant];return o?(0,a.tZ)(o,(0,i._)({postTheme:t},r)):null},k=e=>{let{postTheme:t}=e,{setTheme:n}=(0,Z.T)();(0,o.d4)(()=>{n(null!=t?t:null)},[])},T=e=>{let{post:t,title:n,pub:i}=e;return k({postTheme:null}),(0,a.BX)(_.tu,{paddingBottom:24,children:[(0,a.tZ)(g.Z,{preset:"h4-sans-condensed",children:n}),(0,a.tZ)(H,{post:t,preset:"lg-preview-byline",pub:i})]})},R=e=>{var t,n,i;let{postTheme:r,imageHeight:l,imageWidth:o,aspectRatio:s,post:c,pub:h}=e,u=null!==(t=r.post_preview_crop_gravity)&&void 0!==t?t:"auto",m=r.cover_image_caption?(0,C.toHtml)(JSON.stringify(r.cover_image_caption),!1,{postId:null!==(n=null==c?void 0:c.id)&&void 0!==n?n:null,pubId:null!==(i=null==h?void 0:h.id)&&void 0!==i?i:null}):null;return r.cover_image?(0,a.BX)("figure",{className:d()(M.Z.headerImageContainer,M.Z["".concat(r.header_variant,"-container")]),children:[(0,a.tZ)(p.e,{className:M.Z.headerImage,imageProps:{smartCrop:!0,gravity:u,height:l},maxWidth:null!=o?o:l/s,src:r.cover_image,style:{aspectRatio:s}}),m?(0,a.tZ)("figcaption",{children:(0,a.tZ)(_.gq,{justifyContent:"end",paddingTop:8,children:(0,a.tZ)(g.Z,{dangerouslySetInnerHTML:{__html:m},preset:"caption"})})}):null]}):null},H=e=>{let{post:t,pub:n,fontColor:l="accent",showThemedMeta:o=!0,preset:s="article-byline"}=e,{iString:d,language:c}=(0,f.M1)(),{isMobile:p}=(0,b.v9)();return(0,a.tZ)(B.xu,{paddingTop:24,children:(0,a.tZ)(u.E,{className:M.Z.bylineWrapper,hideFaces:!0,hideMeta:!0,post:t,pub:n,renderBylines:e=>{let{publishedBylines:u,getLinkProps:m}=e;return(0,a.tZ)(_.hs,{alignItems:"baseline",className:M.Z.bylineContainer,direction:{mobile:"row",desktop:"column"},gap:8,justifyContent:"space-between",wrap:"wrap",children:"article-byline"===s?(0,a.BX)(a.HY,{children:[(0,a.BX)(g.Z,{color:l,preset:"article-byline",children:[d("By "),(0,a.tZ)(h.M,{array:u,formatter:e=>m(e).href?(0,a.tZ)(g.Z,(0,r._)((0,i._)({as:"a"},m(e)),{color:l,native:!0,preset:"article-byline",children:e.name})):(0,a.tZ)(g.Z,{as:"span",color:l,preset:"article-byline",children:e.name}),limit:4})]}),o&&(0,a.tZ)(_.hs,{direction:{mobile:"row",desktop:"column"},paddingTop:16*!p,children:(0,a.BX)(g.Z,{preset:"timestamp",children:[(0,I.Z)(t.post_date).locale(c).format("MM.DD.YY"),t.section?(0,a.BX)(a.HY,{children:[" — ",(0,a.tZ)(g.Z,{as:"a",href:(0,x.Ucy)(n,{section:t.section}),preset:"timestamp",children:t.section.name})]}):null]})})]}):(0,a.BX)(g.Z,{color:l,preset:s,children:[d("By "),(0,a.tZ)(h.M,{array:u,formatter:e=>m(e).href?(0,a.tZ)(g.Z,(0,r._)((0,i._)({as:"a"},m(e)),{color:l,preset:s,children:e.name})):(0,a.tZ)(g.Z,{as:"span",color:l,preset:s,children:e.name}),limit:4})," — ",(0,I.Z)(t.post_date).locale(c).format("MM.DD.YY")]})})}})})},D={"portrait-image":e=>{let{post:t,postTheme:n,title:i,subtitle:r,pub:l}=e,{isMobile:o}=(0,b.v9)(),{isPrint:s}=(0,w.v)(),d=(0,v.aF)();k({postTheme:n});let{height:c,width:h}=X({isMobile:o,theme:null==n?void 0:n.header_variant});return(0,a.BX)(a.HY,{children:[(0,a.BX)(_.hs,{className:M.Z.customThemeHeader,direction:o?"column":"row",children:[(0,a.BX)(_.tu,{justifyContent:"center",children:[(0,a.BX)(_.tu,{gap:16*!!o,children:[(0,a.tZ)(g.Z,{preset:s?"h2-serif":o?"h1-text":"h1-serif",children:null!=i?i:t.is_draft?t.draft_title:t.title}),(0,a.tZ)(B.xu,{paddingTop:24*!o,children:(0,a.tZ)(g.Z,{preset:"d1-sans-regular",children:r})})]}),(0,a.tZ)(_.tu,{gap:16,children:(0,a.tZ)(H,{post:t,pub:l})})]}),(0,a.tZ)(R,{aspectRatio:h/c,imageHeight:c,imageWidth:h,post:t,postTheme:n,pub:l})]}),(0,a.tZ)(m.R,{post:t,pub:l,user:d,variant:"newsletter-post"})]})},"landscape-image":e=>{let{post:t,postTheme:n,pub:i,title:r,subtitle:l}=e,{isMobile:o}=(0,b.v9)();k({postTheme:n});let s=(0,v.aF)(),{isPrint:d}=(0,w.v)(),{width:c,height:h}=X({isMobile:o,theme:n.header_variant}),u=c/h;return(0,a.BX)(a.HY,{children:[(0,a.BX)(_.tu,{className:M.Z.customThemeHeader,children:[(0,a.tZ)(g.Z,{preset:d?"h2-serif":"h1-serif",children:r}),o&&(0,a.tZ)(g.Z,{preset:"d1-sans-regular",children:l}),(0,a.BX)(_.hs,{direction:o?"column-reverse":"row",gap:o?8:40,children:[(0,a.tZ)(R,{aspectRatio:u,imageHeight:c/u,imageWidth:c,post:t,postTheme:n,pub:i}),(0,a.BX)(_.tu,{flex:"fill",justifyContent:"space-between",paddingBottom:12,children:[!o&&(0,a.tZ)(g.Z,{preset:"d1-sans-regular",children:l}),(0,a.tZ)(_.tu,{gap:16,children:(0,a.tZ)(H,{post:t,pub:i})})]})]})]}),(0,a.tZ)(m.R,{post:t,pub:i,user:s,variant:"newsletter-post"})]})},"full-width-image":e=>{var t;let{post:n,pub:i,postTheme:r,title:l,subtitle:o}=e,{isMobile:s}=(0,b.v9)();k({postTheme:r});let{isPrint:d}=(0,w.v)(),c=null===(t=n.postTags)||void 0===t?void 0:t.filter(e=>{var t,i;return e.name!==(null===(i=n.publishedBylines)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.name)}),{language:u}=(0,f.M1)(),p=(0,v.aF)(),{width:Z}=X({isMobile:s,theme:r.header_variant});return(0,a.BX)(a.HY,{children:[(0,a.tZ)(_.hs,{alignItems:"center",className:M.Z.fullWidthImageHeader,direction:"column",justifyContent:s?"end":"center",style:{backgroundImage:"linear-gradient(rgba(22, 22, 19, 0.65), rgba(22, 22, 19, 0.65))\n ".concat(r.cover_image?", url(".concat((0,x.zF4)(r.cover_image,2*Z,{quality:"auto:best",smartCrop:!0}),")"):"")},children:(0,a.BX)(_.tu,{alignItems:"center",className:M.Z.fullWidthHeaderContent,justifyContent:s?"start":"center",paddingX:s?32:40,children:[(0,a.tZ)(_.hs,{direction:{mobile:"row",desktop:"column"},paddingBottom:s?56:64,paddingTop:16*!s,children:(0,a.BX)(g.Z,{color:"white",preset:"timestamp",children:[(0,I.Z)(n.post_date).locale(u).format("MM.DD.YY"),c?(0,a.BX)(a.HY,{children:[" — ",(0,a.tZ)(h.M,{array:c,formatter:e=>e?(0,a.tZ)(g.Z,{as:"a",color:"white",href:(0,x.Mk9)(i,e),preset:"timestamp",children:null==e?void 0:e.name}):"",limit:s?1:4})]}):null]})}),(0,a.BX)(_.tu,{alignItems:"center",gap:24,children:[(0,a.tZ)(g.Z,{color:"white",preset:d?"h3-condensed":"h1-sans",children:l}),(0,a.tZ)(B.xu,{className:M.Z.fullWidthHeaderSubtitle,children:(0,a.tZ)(g.Z,{color:"white",preset:"d1-serif",children:o})})]}),(0,a.tZ)(_.tu,{alignItems:"center",paddingTop:s?32:120,children:(0,a.tZ)(H,{fontColor:"white",post:n,pub:i,showThemedMeta:!1})})]})}),(0,a.tZ)(m.R,{post:n,pub:i,user:p,variant:"newsletter-post"})]})},title_and_image_only:e=>{let{post:t,pub:n,postTheme:i,title:r,subtitle:l}=e,{isMobile:o}=(0,b.v9)();k({postTheme:i});let s=(0,v.aF)(),{iString:h}=(0,f.M1)(),u=(null==s?void 0:s.is_contributor)&&(null==t?void 0:t.id)?(0,a.tZ)(y.zx,{href:(0,x.ANx)(n,t.id,{params:{back:document.location.href}}),leading:(0,a.tZ)(c.Z,{size:20}),localNavigation:!1,priority:"secondary",children:h("Edit")}):null;return(0,a.tZ)("div",{className:M.Z.titleAndImageContainer,children:(0,a.BX)(_.tu,{gap:o?24:40,paddingBottom:64,children:[(0,a.tZ)("div",{className:d()(M.Z.titleAndImageHeader,{[M.Z.noImage]:!i.cover_image}),children:o?(0,a.BX)(_.tu,{gap:24,children:[u&&(0,a.tZ)(_.gq,{alignSelf:"start",children:u}),(0,a.tZ)(g.Z,{preset:"h1-serif",children:r}),i.cover_image&&(0,a.tZ)(_.gq,{children:(0,a.tZ)(p.e,{className:M.Z.image,imageIsFixedWidth:!0,maxWidth:540,src:i.cover_image,useRetinaSizing:!0})}),l&&(0,a.tZ)(g.Z,{preset:"d1-sans-regular",children:l})]}):(0,a.BX)(a.HY,{children:[(0,a.BX)(_.tu,{children:[u&&(0,a.tZ)(_.gq,{alignSelf:"start",children:u}),(0,a.tZ)(g.Z,{preset:"h1-serif",children:r}),(0,a.tZ)(_.tu,{gap:24,children:l&&(0,a.tZ)(g.Z,{preset:"d1-sans-regular",children:l})})]}),i.cover_image&&(0,a.tZ)(_.gq,{justifyContent:"end",children:(0,a.tZ)(p.e,{imageIsFixedWidth:!0,maxWidth:540,src:i.cover_image,useRetinaSizing:!0})})]})}),(0,a.tZ)("div",{className:M.Z.thickRule})]})})}}},33224:function(e,t,n){n.d(t,{lF:()=>l,ld:()=>o,up:()=>i,xm:()=>r}),n(94654);let i=e=>{let{finishedSelection:t,transcriptionRows:n}=e,i=n[t.begin.rowIndex],r=n[t.finish.rowIndex],l=i.words[t.begin.wordIndex],a=r.words[t.finish.wordIndex];return{start:l.start,end:a.end}},r=e=>{let{startRow:t,endRow:n,startOffset:i,endOffset:r,startNodeText:l,endNodeText:a}=e,o=0!==i&&" "!==l[i-1]&&" "!==l[i],s=l.slice(0,i).trim(),d=0===s.length?0:s.split(/\s+/).length-+!!o,c=t.words[d],h=a.slice(0,r).trim().split(/\s+/).length,u=n.words[h-1];return{start:c.start,end:u.end}},l=e=>{let{selectStart:t,selectEnd:n,alignedRows:i}=e,r=e=>{var t;let{rowIndex:n,offset:r,text:l}=e,a=i[n];a||console.error("Row at index",n,"does not exist");let o=l.slice(0,r).trim().split(/\s+/).length;(o<1||o>a.words.length)&&console.error("Calculated number of words",o,"is out of bounds");let s=a.words[o-1];return"number"!=typeof s.originalIndex&&console.error("Word's original index is not a number",s.originalIndex),null!==(t=null==s?void 0:s.originalIndex)&&void 0!==t?t:0};return[r(t),r(n)]},a=e=>e<.5?2*e*e:-1+(4-2*e)*e,o=e=>{let{virtualizedListRef:t,start:n,end:i,duration:r}=e,l=performance.now(),o=e=>{let s=e-l,d=a(Math.min(s/r,1));t.current&&(t.current.scrollTo(n+(i-n)*d),sg});var i=n(7409),r=n(99282),l=n(98848),a=n(16584),o=n(49550),s=n(23279),d=n.n(s),c=n(98661),h=n(95441),u=n(15771),p=n(80026),m=n(20392);function g(e){var{tabs:t,value:n,onChange:s,ariaLabel:u}=e,g=(0,l._)(e,["tabs","value","onChange","ariaLabel"]);let{iString:f}=(0,h.M1)(),w=(0,c.useRef)(null),b=(0,c.useRef)(null),y=t.findIndex(e=>e.value===n);return(0,c.useLayoutEffect)(()=>{let e=e=>{let t=b.current,n=w.current;if(!n||!t||e<0)return;let i=n.getElementsByClassName(m.Z.tab)[e];if(!i)return;let r=i.getBoundingClientRect(),l=n.getBoundingClientRect();requestAnimationFrame(()=>{t.style.setProperty("--highlight-width","".concat(r.width,"px")),t.style.setProperty("--highlight-x","".concat(r.left-l.left,"px"))})},t=()=>e(y);t();let n=w.current,i=new ResizeObserver(d()(t,200));return n&&i.observe(n),()=>{i.disconnect()}},[y,t]),(0,a.tZ)(o.O.Group,{manual:!0,selectedIndex:-1===y?0:y,onChange:e=>{var n;let i=null===(n=t[e])||void 0===n?void 0:n.value;void 0!==i&&s(i)},children:(0,a.tZ)(o.O.List,(0,r._)((0,i._)({as:p.X2,className:m.Z.container,height:40,position:"relative",ref:w,"aria-label":null!=u?u:"".concat(f("Tabs"))},g),{children:()=>(0,a.BX)(a.HY,{children:[t.map((e,t)=>(0,a.tZ)(Z,{tab:e,children:e.label},e.value)),(0,a.tZ)(v,{ref:b})]})}))})}function Z(e){let{tab:t,children:n}=e;return(0,a.tZ)(o.O,{as:c.Fragment,children:()=>(0,a.BX)(u.kG,{position:"relative",className:m.Z.tab,radius:"xs",resetCss:!0,gap:6,showFocus:!0,animate:!0,userSelect:"none",children:[t.leadingIcon,(0,a.tZ)(f,{children:n}),t.trailingIcon]})})}let f=e=>{let{children:t}=e;return(0,a.tZ)(p.xv.B4,{as:"span",weight:"semibold",size:14,ellipsis:!0,animate:!0,children:t})},v=(0,p.zo)({position:"absolute",className:m.Z.highlight})},15186:function(e,t,n){if(n.d(t,{Z:()=>m}),2787!=n.j)var i=n(7409);if(2787!=n.j)var r=n(99282);var l=n(16584);if(2787!=n.j)var a=n(49550);var o=n(98661),s=n(95441),d=n(15771),c=n(80026),h=n(17172),u=n(45783),p=n(20346);function m(e){let{tabs:t,value:n,onChange:d,ariaLabel:m}=e,{iString:v}=(0,s.M1)(),w=(0,o.useRef)(null),b=(0,o.useRef)(null),{props:y,hasOverflow:B}=(0,h.aZ)(w),{state:_}=(0,u.eK)(w),I=e=>{let t=b.current,n=w.current;if(!n||!t||e<0)return;let i=n.getElementsByClassName(p.Z.segment)[e];if(!i)return;let r=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=parseInt(window.getComputedStyle(n).paddingLeft),o=r.left-l.left-a+n.scrollLeft;requestAnimationFrame(()=>{t.style.setProperty("--highlight-width","".concat(r.width,"px")),t.style.setProperty("--highlight-x","".concat(o,"px"))})},x=t.findIndex(e=>e.value===n);return(0,o.useLayoutEffect)(()=>{I(x)},[t,n,x]),(0,o.useEffect)(()=>{I(x)},[t,n,x]),(0,l.BX)(Z,{children:[(0,l.tZ)(a.O.Group,{manual:!0,selectedIndex:-1===x?0:x,onChange:e=>{var n;let i=null===(n=t[e])||void 0===n?void 0:n.value;void 0!==i&&d(i)},children:(0,l.tZ)(a.O.List,(0,r._)((0,i._)({as:c.X2},y),{ref:w,className:p.Z.container,position:"relative",cursor:B()?"grab":"default",gap:4,padding:4,radius:"sm",overflow:"auto",scrollBar:"hidden",outline:"detail","aria-label":null!=m?m:"".concat(v("Tabs")),children:()=>(0,l.BX)(l.HY,{children:[t.map((e,t)=>(0,l.tZ)(g,{tab:e,index:t,children:e.label},e.value)),(0,l.tZ)(f,{ref:b})]})}))}),(0,l.tZ)(u.R3,{direction:"left",isVisible:_.showLeft}),(0,l.tZ)(u.R3,{direction:"right",isVisible:_.showRight})]})}function g(e){let{tab:t,index:n,children:i}=e;return(0,l.tZ)(a.O,{as:o.Fragment,children:e=>{let{selected:r}=e;return(0,l.tZ)(d.zx,{className:p.Z.segment,leading:t.leadingIcon,trailing:t.trailingIcon,priority:r?"tertiary":"quaternary",size:"sm",children:i},n)}})}let Z=(0,c.zo)({display:"flex",direction:"column",position:"relative",bg:"primary",radius:"sm",minWidth:0,overflow:"hidden"}),f=(0,c.zo)({position:"absolute",height:32,radius:"xs",bg:"secondary",sizing:"border-box",className:p.Z.highlight})}}]);