PageSourceSearch

https://whatsappening.tech/assets/root-DvKA6D3I.js

js whatsappening.tech collected 2026-10-04 12:45:10 UTC 114,558 bytes, 84 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="826a98d7-2427-5c8e-abed-38a8bf56b38d")}catch(e){}}();
3import{a as e,t}from"./jsx-runtime-CMgEUHpv.js";import{P as n,V as r,_ as i,a,g as o,h as s,m as c,x as l}from"./dist-CAHjj65Z.js";import{t as u}from"./useTranslation-BymTnaHx.js";import{D as d,O as f,S as p,T as m,d as h,f as g,i as _,k as v,n as y,p as b,r as x,s as S,t as C}from"./components-B8bHjdou.js";import{n as w}from"./exports-CsgSliUa.js";import{r as T}from"./performance-Bmo8PG2J.js";import{n as E}from"./i18next-BaeBzRnv.js";import{t as D}from"./utils-CjUr88hv.js";import{n as O,r as k,t as A}from"./dist-CrEJxMHP.js";import{c as ee,l as te,r as ne,s as re}from"./types-BpAlB3Az.js";import{t as ie}from"./classnames-PxzWHlFm.js";import{t as ae}from"./ComponentErrorBoundary-6y1vzF6e.js";import{t as j}from"./Text-B4PqLHDw.js";import{t as M}from"./Fallback-XSo-r-93.js";import{t as N}from"./BreakpointsContainer-B1e5IlOp.js";import{t as P}from"./Typography-DJfjxaJy.js";import{n as oe,o as se,t as F}from"./useWebThemeContext-BJu9VsBR.js";import{t as ce}from"./CheckIcon-BbyyufbO.js";import{t as le}from"./XMarkIcon-CtiWC60Y.js";import{t as ue}from"./MarkDownRender-D4I8PP9R.js";import{t as de}from"./ChevronDownIcon-Ezx0ffYN.js";import{a as fe,i as pe,n as me,o as he,r as ge,s as _e,t as ve}from"./SlideUpModal-CBCD62fe.js";import{t as ye}from"./SparklesIcon-BCz0Vi5N.js";import{t as be}from"./XMarkIcon-DiiMYgcz.js";import{t as xe}from"./PoweredByBeehiiv-IvsR0uAS.js";import{i as Se,r as Ce,t as we}from"./local_storage-CooKze2L.js";import{t as Te}from"./useNonRevalidatingFetcher-DstApf5k.js";import{n as Ee}from"./useToast-aQCYBESc.js";import{a as De,i as Oe,n as ke,o as Ae,r as I,t as L}from"./popover-CeauQKpN.js";import{a as je,i as Me,n as Ne,o as Pe,r as Fe,t as Ie}from"./YoutubeIcon-C4prtiyt.js";import{t as R}from"./useIsLoggedIn-hXilkn2W.js";import{t as Le}from"./CreateAction-A4WIAi98.js";import{t as Re}from"./Image-B1Otrzxn.js";import{t as ze}from"./Main-BbvYU_r3.js";import{t as z}from"./Button-DG1GtAKw.js";import{t as B}from"./menu-BwR_gk66.js";import{t as Be}from"./dialog-DQRLOcH9.js";import{t as Ve}from"./transition-zOPc9j2i.js";import{t as He}from"./disclosure-Z-IQsoqQ.js";import{t as Ue}from"./getNormalizedCategory-BviP1vmp.js";import{t as We}from"./ProgressIndicator-tdz9wH2C.js";import{t as Ge}from"./useIsMobile-BU77Oiqq.js";import{n as Ke,t as qe}from"./useCookies-DFpesh5i.js";import{t as Je}from"./useSignupRedirects-CLiwBByh.js";import{t as Ye}from"./useTypedLoaderData-p1j97aJ6.js";import{t as Xe}from"./useWebBuilderCommunicator-YvR86u0w.js";import{t as Ze}from"./shouldRevalidateLoaderData-cxDIbqj1.js";var V=e(r()),Qe=`positions`;function $e({getKey:e,...t}){let{isSpaMode:n}=g(),r=c(),i=s();d({getKey:e,storageKey:Qe});let a=V.useMemo(()=>{if(!e)return null;let t=e(r,i);return t===r.key?null:t},[]);if(n)return null;let o=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];
3typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return V.createElement(`script`,m({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${o})(${p(JSON.stringify(Qe))}, ${p(JSON.stringify(a))})`}}))}var et=(e,t)=>{e.postMessage(t)};function tt(e={cacheType:`jit`}){let t=c(),n=(0,V.useRef)(null),r=(0,V.useRef)(!0);(0,V.useEffect)((()=>{let i=()=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{let n,i={location:t,isSsr:r.current};switch(e.cacheType){case`jit`:default:n=`REMIX_NAVIGATION`;break;case`precache`:n=`REMIX_PRECACHE`;break;case`custom`:n=e.eventName,i={...i,...e.payload||{}}}((e,t)=>{`serviceWorker`in navigator&&navigator.serviceWorker.controller&&et(navigator.serviceWorker.controller,{type:e,payload:t})})(n,i)}),25)};return i(),`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`controllerchange`,i),()=>{n.current&&clearTimeout(n.current),`serviceWorker`in navigator&&navigator.serviceWorker.removeEventListener(`controllerchange`,i),r.current&&=!1}}),[t])}var nt=({crossOrigin:e,manifestUrl:t=`/manifest.webmanifest`})=>V.createElement(`link`,{rel:`webmanifest`,href:t,crossOrigin:e});(function(){try{if(typeof window>`u`||typeof document>`u`||!new URLSearchParams(window.location.search).get(`birdie-recording`))return;if(!document.getElementById(`birdie-recording-preload-style`)){var e=document.createElement(`style`);e.id=`birdie-recording-preload-style`,e.textContent=`
4                html, body {
5                    overflow: hidden !important;
6                }
7                #birdie-recording-preload-overlay {
8                    position: fixed;
9                    inset: 0;
10                    background: #fff;
11                    z-index: 2147483647;
12                    pointer-events: auto;
13                }
14            `,(document.head||document.documentElement).appendChild(e)}if(!document.getElementById(`birdie-recording-preload-overlay`)){var t=document.createElement(`div`);t.id=`birdie-recording-preload-overlay`,document.documentElement&&document.documentElement.appendChild(t)}}catch{}})();var rt=[];function it(){return typeof window>`u`?{}:(window.birdieSettings||(window.birdieSettings={}),window.birdieSettings)}function at(e,t={}){if(e&&typeof e==`object`)return e;let n={};return t.contact_id!==void 0&&(n.id=t.contact_id),t.contact_name!==void 0&&(n.name=t.contact_name),t.contact_email!==void 0&&(n.email=t.contact_email),t.contact_phone!==void 0&&(n.phone=t.contact_phone),Object.keys(n).length?n:void 0}function ot(e){let t=document.getElementById(`birdie-snippet`);if(t)return t;let n=`https://app.birdie.so/widget/${e==`e4bf56a2`?`embed_birdie`:`embed`}/${e}`;if(document.head){if(!document.querySelector(`link[data-birdie-preconnect]`)){let e=document.createElement(`link`);e.rel=`preconnect`,e.href=`https://app.birdie.so`,e.crossOrigin=`anonymous`,e.setAttribute(`data-birdie-preconnect`,`true`),document.head.appendChild(e)}if(!document.querySelector(`link[data-birdie-preload]`)){let e=document.createElement(`link`);e.rel=`preload`,e.as=`script`,e.href=n,e.setAttribute(`data-birdie-preload`,`true`),document.head.appendChild(e)}}let r=document.createElement(`script`);r.src=n,r.async=!0,r.id=`birdie-snippet`,r.referrerPolicy=`origin`;let i=document.scripts?.[0];return i?.parentNode?i.parentNode.insertBefore(r,i):document.head?document.head.appendChild(r):document.documentElement.appendChild(r),r}function st({clientId:e,metadata:t,contact:n,onReady:r,singleHandlerPerEvent:i=!0,...a}){if(!e){console.error(`[Birdie] Missing required clientId in initBirdie()`);return}if(typeof window>`u`)return;let o=it(),s=at(n,a);o.metadata=t,s!==void 0&&(o.contact=s),Object.assign(window.birdieSettings,a),window.birdieSettings.onBirdieReady=()=>{try{lt({singleHandlerPerEvent:i})}catch(e){console.error(`[Birdie] guard install error`,e)}rt.forEach(e=>{try{e(window.birdie)}catch(e){console.error(`[Birdie] onReady error`,e)}}),rt=[]},r&&ct(r),ot(e)}function ct(e){typeof window>`u`||(window.birdie?e(window.birdie):rt.push(e))}function lt({singleHandlerPerEvent:e}){let t=window.birdie;if(!t||t.__pkgGuardsInstalled)return;let n=t.on?.bind(t),r=t.off?.bind(t),i=new Map;t.onOnce=(e,n)=>{let r=i=>{try{n(i)}finally{t.off?.(e,r)}};t.on(e,r)},e&&n&&r&&(t.on=(e,t)=>{let a=i.get(e);if(a)try{r(e,a)}catch{}return i.set(e,t),n(e,t)},t.off=(e,t)=>(i.get(e)===t&&i.delete(e),r(e,t))),t.__pkgGuardsInstalled=!0}var ut=!1,dt,ft=({publication:e})=>{let t=D().VITE_BIRDIE_CLIENT_ID;return t&&(ut?dt!==e.id&&(window.birdie&&window.birdie.metadata!==void 0&&(window.birdie.metadata={publication:{id:e.id}}),dt=e.id):(st({clientId:t,metadata:{publication:{id:e.id}}}),dt=e.id,ut=!0)),null},H=e(ie(),1),U=t();function pt(){let e=D();return(0,U.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`window.__AppGlobals__=${JSON.stringify(e)};`}})}var mt=({pixelId:e,marketingCookies:t})=>{let n=(0,V.useRef)(null),r=(0,V.useRef)(),i=(0,V.useRef)();return(0,V.useEffect)(()=>{let a=!0,o=()=>
14{if(a)try{let r=e?.trim();if(!r?.match(/^\d+$/)||!t||document.getElementById(`facebook-pixel`))return;let i=document.createElement(`script`);i.id=`facebook-pixel`,i.async=!0,i.innerHTML=`
15          (function(){try{
16            !function(f,b,e,v,n,t,s)
17            {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
18            n.callMethod.apply(n,arguments):n.queue.push(arguments)};
19            if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
20            n.queue=[];t=b.createElement(e);t.async=!0;
21            t.src=v;s=b.getElementsByTagName(e)[0];
22            s.parentNode.insertBefore(t,s)}(window, document,'script',
23            'https://connect.facebook.net/en_US/fbevents.js');
24            fbq('init', "${r}");
25            fbq("track", "PageView");
26          }catch{/*swallow exception*/}})();
27        `,document.head.appendChild(i),n.current=i}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?r.current=window.requestIdleCallback(o,{timeout:2e3}):i.current=setTimeout(o,100),()=>{a=!1,r.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(r.current),i.current!==void 0&&clearTimeout(i.current);try{n.current?.parentNode&&n.current.parentNode.removeChild(n.current)}catch{}}},[e,t]),null},ht=e=>{let t=e?`granted`:`denied`;return{ad_personalization:t,ad_storage:t,ad_user_data:t,analytics_storage:t}},gt=e=>{window.dataLayer=window.dataLayer||[];function t(...e){window.dataLayer.push(arguments)}t(`consent`,`update`,ht(e))},_t=({pixelId:e,marketingCookies:t,consentModeEnabled:n})=>{let r=(0,V.useRef)(null),i=(0,V.useRef)(null),a=(0,V.useRef)(void 0),o=(0,V.useRef)(void 0),s=(0,V.useRef)(t),c=(0,V.useRef)(void 0),l=e?.trim(),u=!!l?.match(/^G-[A-Z0-9]{8,}$/),d=n||t;return s.current=t,(0,V.useEffect)(()=>{if(!n||!u||!l){c.current=void 0;return}if(document.getElementById(`ga-pixel`))return;let e=s.current,t=document.createElement(`script`);return t.id=`ga-pixel`,t.innerHTML=`
28      (function(){try{
29      window.dataLayer = window.dataLayer || [];
30      function gtag(){dataLayer.push(arguments);}
31      gtag('consent', 'default', ${JSON.stringify(ht(!1))});
32      gtag('consent', 'update', ${JSON.stringify(ht(e))});
33      gtag('js', new Date());
34      gtag('config', '${l}', {
35        page_path: window.location.pathname,
36      });
37      }catch{/*swallow exception*/}})();
38    `,document.head.appendChild(t),c.current=e,()=>{t.remove(),c.current=void 0}},[n,l,u]),(0,V.useEffect)(()=>{!n||!u||c.current===t||(gt(t),c.current=t)},[n,t,u]),(0,V.useEffect)(()=>{let e=!0,t=()=>{if(!(!e||!u||!l||!d))try{if(document.getElementById(`ga-pixel-loader`))return;let e=document.createElement(`script`);if(e.id=`ga-pixel-loader`,e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${l}`,document.head.appendChild(e),r.current=e,!n){let e=document.createElement(`script`);e.async=!0,e.id=`ga-pixel`,e.innerHTML=`
39            (function(){try{
40            window.dataLayer = window.dataLayer || [];
41            function gtag(){dataLayer.push(arguments);}
42            gtag('js', new Date());
43            gtag('config', '${l}', {
44              page_path: window.location.pathname,
45            });
46            }catch{/*swallow exception*/}})();
47          `,document.head.appendChild(e),i.current=e}}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?a.current=window.requestIdleCallback(t,{timeout:2e3}):o.current=setTimeout(t,100),()=>{e=!1,a.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(a.current),o.current!==void 0&&clearTimeout(o.current),r.current?.remove(),r.current=null,i.current?.remove(),i.current=null}},[n,d,l,u]),null},vt=({pixelId:e,marketingCookies:t})=>{let n=c(),r=(0,V.useRef)(null),i=(0,V.useRef)(null),a=(0,V.useRef)(),o=(0,V.useRef)();return(0,V.useEffect)(()=>{try{window.gtag&&window.gtag(`config`,e?.trim(),{page_path:n.pathname})}catch{}},[n,e]),(0,V.useEffect)(()=>{let n=!0,s=()=>{if(n)try{let n=e?.trim();if(!n?.match(/^UA-\d{6,}(-\d)?$/)||!t||document.getElementById(`ga-pixel`))return;let a=document.createElement(`script`);a.id=`ga-pixel-loader`,a.async=!0,a.src=`https://www.googletagmanager.com/gtag/js?i
47d=${n}`,document.head.appendChild(a),r.current=a;let o=document.createElement(`script`);o.async=!0,o.id=`ga-pixel`,o.innerHTML=`
48          (function(){try{
49            window.dataLayer = window.dataLayer || [];
50            function gtag(){dataLayer.push(arguments);}
51            gtag('js', new Date());
52          }catch{/*swallow exception*/}})();
53        `,document.head.appendChild(o),i.current=o}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?a.current=window.requestIdleCallback(s,{timeout:2e3}):o.current=setTimeout(s,100),()=>{n=!1,a.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(a.current),o.current!==void 0&&clearTimeout(o.current);try{r.current?.parentNode&&r.current.parentNode.removeChild(r.current)}catch{}try{i.current?.parentNode&&i.current.parentNode.removeChild(i.current)}catch{}}},[e,t]),null},yt=({pixelId:e,dataProcessingCookies:t})=>{let n=(0,V.useRef)(null),r=(0,V.useRef)(),i=(0,V.useRef)();return(0,V.useEffect)(()=>{let a=!0,o=()=>{if(a)try{let r=e?.trim();if(!r?.match(/^GTM-[A-Z0-9]{5,}$/)||!t||document.getElementById(`gtm-pixel`))return;let i=document.createElement(`script`);i.id=`gtm-pixel`,i.innerHTML=`
54          (function(){try{
55            (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
56            new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
57            j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
58            'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
59            })(window,document,'script','dataLayer','${r}');
60          }catch{/*swallow exception*/}})();
61        `,document.head.appendChild(i),n.current=i}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?r.current=window.requestIdleCallback(o,{timeout:2e3}):i.current=setTimeout(o,100),()=>{a=!1,r.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(r.current),i.current!==void 0&&clearTimeout(i.current);try{n.current?.parentNode&&n.current.parentNode.removeChild(n.current)}catch{}}},[e,t]),null},bt=({pixelId:e})=>{let t=(0,V.useRef)(null),n=(0,V.useRef)(),r=(0,V.useRef)();return(0,V.useEffect)(()=>{let i=!0,a=()=>{if(i)try{let n=e?.trim();if(!n||document.getElementById(`gtm-iframe`))return;let r=document.createElement(`iframe`);r.id=`gtm-iframe`,r.src=`https://www.googletagmanager.com/ns.html?id=${n}`,r.height=`0`,r.width=`0`,r.style.display=`none`,r.style.visibility=`hidden`,document.head.appendChild(r),t.current=r}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?n.current=window.requestIdleCallback(a,{timeout:2e3}):r.current=setTimeout(a,100),()=>{i=!1,n.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(n.current),r.current!==void 0&&clearTimeout(r.current);try{t.current?.parentNode&&t.current.parentNode.removeChild(t.current)}catch{}}},[e]),null},xt=({pixelId:e,marketingCookies:t})=>{let n=(0,V.useRef)(null),r=(0,V.useRef)(),i=(0,V.useRef)();return(0,V.useEffect)(()=>{let a=!0,o=()=>{if(a)try{let r=e?.trim();if(!r?.match(/^[A-Z0-9]{10,}$/)||!t||document.getElementById(`tiktok-pixel`))return;let i=document.createElement(`script`);
61i.id=`tiktok-pixel`,i.async=!0,i.innerHTML=`
62          (function(){try{
63              !function (w, d, t) {
64                w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
65                ttq.load('${r}');
66                ttq.page(); // initial page view event
67              }(window, document, 'ttq');
68          }catch{/*swallow exception*/}})();
69        `,document.head.appendChild(i),n.current=i}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?r.current=window.requestIdleCallback(o,{timeout:2e3}):i.current=setTimeout(o,100),()=>{a=!1,r.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(r.current),i.current!==void 0&&clearTimeout(i.current);try{n.current?.parentNode&&n.current.parentNode.removeChild(n.current)}catch{}}},[e,t]),null},St=({pixelId:e,marketingCookies:t})=>{let n=c(),r=(0,V.useRef)(null),i=(0,V.useRef)(),a=(0,V.useRef)();return(0,V.useEffect)(()=>{try{window.twq&&window.twq(`track`,`PageView`)}catch{}},[n]),(0,V.useEffect)(()=>{let n=!0,o=()=>{if(n)try{let n=e?.trim();if(!n?.match(/^[a-z0-9]{5,}$/)||!t||document.getElementById(`twitter-pixel`))return;let i=document.createElement(`script`);i.id=`twitter-pixel`,i.async=!0,i.innerHTML=`
70          (function(){try{
71            !function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
72            },s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',
73            a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
74            // Insert Twitter Pixel ID and Standard Event data below
75            twq('init','${n}');
76          }catch{/*swallow exception*/}})();
77        `,document.head.appendChild(i),r.current=i}catch{}};return typeof window<`u`&&`requestIdleCallback`in window?i.current=window.requestIdleCallback(o,{timeout:2e3}):a.current=setTimeout(o,100),()=>{n=!1,i.current!==void 0&&`cancelIdleCallback`in window&&window.cancelIdleCallback(i.current),a.current!==void 0&&clearTimeout(a.current);try{r.current?.parentNode&&r.current.parentNode.removeChild(r.current)}catch{}}},[e,t]),null};function W(){let[e,t]=(0,V.useState)(`browser tab`),n=()=>{window.matchMedia(`(display-mode: standalone)`).matches&&t(`standalone`)};return(0,V.useEffect)(()=>(e!==`standalone`&&window.matchMedia(`(display-mode: standalone)`).matches&&t(`standalone`),window.addEventListener(`DOMContentLoaded`,n),()=>{window.removeEventListener(`DOMContentLoaded`,n)}),[e]),e}var Ct=({code:e})=>{let t=e?.trim();return t?(0,U.jsx)(`meta`,{name:`google-site-verification`,content:t}):null},wt=()=>{let e=D();return(0,V.useEffect)(()=>{if(e.VITE_HUMAN_ENABLED===`true`)try{let t=document.createElement(`script`);return t.src=e.VITE_HUMAN_URL||``,t.async=!0,document.head.appendChild(t),()=>{document.head.contains(t)&&document.head.removeChild(t)}}catch(e){console.error(`Error loading Human script:`,e)}},[e]),null},G=({children:e,title:t,publication:n,isProdEnv:r,rootStyles:i,cookies:a,cookiesSet:o})=>{let{noScript:s}=b(`root`)??{},l=c(),{i18n:d}=u(),p=W(),[m]=f(),h=m.get(`version`)===`draft`,g=m.has(`content_tags`)||m.has(`q`)&&l.pathname===`/`,v=l.pathname===`/subscribe`,y=l.pathname===`/`,C=l.pathname.startsWith(`/p/`),w=l.pathname.startsWith(`/c/`),T=l.pathname.startsWith(`/authors`),E=l.pathname.startsWith(`/t/`),D=l.pathname===`/test_home_page`,O=n?.enable_cookie_banner,k=a?.beehiiv_honey,A=!O,ee=!O;O&&(A=O&&k?JSON.parse(k)?.marketing||!1:!(O&&!k),ee=O&&k?JSON.parse(k)?.dataProcessing||!1:!(O&&!k));let te=n?.facebook_pixel,ne=n?.twitter_pixel,re=n?.tiktok_pixel,ie=n?.google_analytics_pixel,j=n?.google_analytics_4_pixel,M=n?.gtm_pixel,N=n?.gsc_verification_code,P=``;v&&(P=`bg-wt-subscribe_background text-wt-text-on-subscribe_background`),(y||C||w||T||E)&&(P=`bg-wt-background text-wt-text-on-background`);let oe=`width=device-width, initial-scale=1, shrink-to-fit=no${p===`standalone`?`, user-scalable=no`:``}`;return(0,U.jsxs)(`html`,{lang:d.language,className:`h-full antialiased`,children:[(0,U.jsxs)(`head`,{children:[(0,U.jsx)(`meta`,{charSet:`utf-8`}),(0,U.jsx)(`meta`,{name:`viewport`,content:oe}),(0,U.jsx)(`meta`,{name:`mobile-web-app-capable`,content:`yes`}),(0,U.jsx)(`meta`,{name:`apple-mobile-web-app-capable`,content:`yes`}),(0,U.jsx)(`meta`,{name:`apple-mobile-web-app-status-bar-style`,content:`black-translucent`}),(0,U.jsx)(`meta`,{name:`theme-color`,content:`#000000`}),(0,U.jsx)(pt,{}),(0,U.jsx)(wt,{}),t?(0,U.jsx)(`title`,{children:t}):null,n?.web_template?.pwa_enabled&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`
78window.addEventListener("beforeinstallprompt", (e) => {
79  e.preventDefault();
80  window.__DeferredPrompt__ = e;
81});
82          `}}),(0,U.jsx)(nt,{})]}),(0,U.jsx)(_,{}),(0,U.jsx)(`style`,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i}}),(0,U.jsx)(`link`,{rel:`apple-touch-icon`,href:n?.logo?.thumb?.url}),(0,U.jsx)(`link`,{rel:`apple-touch-startup-image`,href:n?.thumbnail?.url}),(0,U.jsx)(x,{}),r&&(0,U.jsxs)(ae,{fallbackRender:()=>null,children:[(0,U.jsx)(Ct,{code:N}),(0,U.jsx)(yt,{dataProcessingCookies:ee,pixelId:M}),(0,U.jsx)(mt,{marketingCookies:A,pixelId:te}),(0,U.jsx)(St,{marketingCookies:A,pixelId:ne}),(0,U.jsx)(xt,{marketingCookies:A,pixelId:re}),o&&(0,U.jsx)(_t,{marketingCookies:A,pixelId:j,consentModeEnabled:!!n?.ga4_consent_mode_enabled}),(0,U.jsx)(vt,{marketingCookies:A,pixelId:ie})]}),w&&(0,U.jsx)(`script`,{type:`text/javascript`,async:!0,src:`https://embeds.beehiiv.com/attribution.js`})]}),(0,U.jsxs)(`body`,{suppressHydrationWarning:!0,className:(0,H.default)(`flex h-full flex-col`,P),children:[r&&(0,U.jsx)(ae,{fallbackRender:()=>null,children:(0,U.jsx)(bt,{dataProcessingCookies:ee,pixelId:M})}),(0,U.jsx)(`div`,{className:(0,H.default)(h&&!D&&`pointer-events-none`),children:e}),!g&&!h&&(0,U.jsx)($e,{}),!s&&(0,U.jsx)(S,{})]})]})},Tt=({text:e,fontFamily:t})=>{let n=new Date().getFullYear(),{t:r}=u(),{webTheme:i}=F();return(0,U.jsx)(P,{weight:`light`,className:`!text-xs`,fontFamily:t,color:i.footer_text_color,children:r(`footer.copyright_simple`,{year:n,name:e})})};function Et({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15`}))}var Dt=V.forwardRef(Et);function Ot({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3.7
825 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5`}))}var kt=V.forwardRef(Ot);function At({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4.5 12a7.5 7.5 0 0 0 15 0m-15 0a7.5 7.5 0 1 1 15 0m-15 0H3m16.5 0H21m-1.5 0H12m-8.457 3.077 1.41-.513m14.095-5.13 1.41-.513M5.106 17.785l1.15-.964m11.49-9.642 1.149-.964M7.501 19.795l.75-1.3m7.5-12.99.75-1.3m-6.063 16.658.26-1.477m2.605-14.772.26-1.477m0 17.726-.26-1.477M10.698 4.614l-.26-1.477M16.5 19.794l-.75-1.299M7.5 4.205 12 12m6.894 5.785-1.149-.964M6.256 7.178l-1.15-.964m15.352 8.864-1.41-.513M4.954 9.435l-1.41-.514M12.002 12l-3.75 6.495`}))}var jt=V.forwardRef(At);function Mt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z`}))}var Nt=V.forwardRef(Mt);function Pt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z`}))}var Ft=V.forwardRef(Pt);function It({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z`}))}var Lt=V.forwardRef(It);function Rt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z`}))}var zt=V.forwardRef(Rt);function Bt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z`}))}var Vt=V.forwardRef(Bt);function Ht({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{d:`M5.85 3.5a.75.75 0 0 0-1.117-1 9.719 9.719 0 0 0-2.348 4.876.75.75 0 0 0 1.479.248A8.219 8.219 0 0 1 5.85 3.5ZM19.267 2.5a.75.75 0 1 0-1.118 1 8.22 8.22 0 0 1 1.987 4.124.75.75 0 0 0 1.48-.248A9.72 9.72 0 0 0 19.266 2.5Z`}),V.createElement(`path`,{fillRule:`evenodd`,d:`M12 2.25A6.75 6.75 0 0 0 5.25 9v.75a8.217 8.217 0 0 1-2.119 5.52.75.75 0 0 0 .298 1.206c1.544.57 3.16.99 4.831 1.243a3.75 3.75 0 1 0 7.48 0 24.583 24.583 0 0 0 4.83-1.244.75.75 0 0 0 .298-1.205 8.217 8.217 0 0 1-2.118-5.52V9A6.75 6.75 0 0 0 12 2.25ZM9.75 18c0-.034 0-.067.002-.1a25.05 25.05 0 0 0 4.496 0l.002.1a2.25 2.25 0 1 1-4.5 0Z`,clipRule:`evenodd`}))}var Ut=V.forwardRef(Ht);function Wt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{d:`M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM20.57 16.476c-.223.082-.448.161-.674.238L7.319 4.137A6.75 6.75 0 0 1 18.75 9v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206Z`}),V.createElement(`path`,{fillRule:`evenodd`,d:`M5.25 9c0-.184.007-.366.022-.546l10.384 10.384a3.751 3.751 0 0 1-7.396-1.119 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z`,clipRule:`evenodd`}))}var Gt=V.forwardRef(Wt);function Kt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{fillRule:`evenodd`,d:`M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z`,clipRule:`evenodd`}))}var qt=V.forwardRef(Kt);function Jt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{d:`M4.913 2.658c2.075-.27 4.19-.408 6.337-.408 2.147 0 4.262.139 6.337.408 1.922.25 3.291 1.861 3.405 3.727a4.403 4.403 0 0 0-1.032-.211 50.89 50.89 0 0 0-8.42 0c-2.358.196-4.04 2.19-4.04 4.434v4.286a4.47 4.47 0 0 0 2.433 3.984L7.28 21.53A.75.75 0 0 1 6 21v-4.03a48.527 48.527 0 0 1-1.087-.128C2.905 16.58 1.5 14.833 1.5 12.862V6.638c0-1.97 1.405-3.718 3.413-3.979Z`}),V.createElement(`path`,{d:`M15.75 7.5c-1.376 0-2.739.057-4.086.169C10.124 7.797 9 9.103 9 10.609v4.285c0 1.507 1.128 2.814 2.67 2.94 1.243.102 2.5.157 3.768.165l2.782 2.781a.75.75 0 0 0 1.28-.53v-2.39l.33-.026c1.542-.125 2.67-1.433 2.67-2.94v-4.286c0-1.505-1.125-2.811-2.664-2.94A49.392 49.392 0 0 0 15.75 7.5Z`}))}var Yt=V.forwardRef(Jt);function Xt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{fillRule:`evenodd`,d:`M11.828 2.25c-.916 0-1.699.663-1.85 1.567l-.091.549a.798.798 0 0 1-.517.608 7.45 7.45 0 0 0-.478.198.798.798 0 0 1-.796-.064l-.453-.324a1.875 1.875 0 0 0-2.416.2l-.243.243a1.875 1.875 0 0 0-.2 2.416l.324.453a.798.798 0 0 1 .064.796 7.448 7.448 0 0 0-.198.478.798.798 0 0 1-.608.517l-.55.092a1.875 1.875 0 0 0-1.566 1.849v.344c0 .916.663 1.699 1.567 1.85l.549.091c.281.047.508.25.608.517.06.162.127.321.198.478a.798.798 0 0 1-.064.796l-.324.453a1.875 1.875 0 0 0 .2 2.416l.243.243c.648.648 1.67.733 2.416.2l.453-.324a.798.798 0 0 1 .796-.064c.157.071.316.137.478.198.267.1.47.327.517.608l.092.55c.15.903.932 1.566 1.849 1.566h.344c.916 0 1.699-.663 1.85-1.567l.091-.549a.798.798 0 0 1 .517-.608 7.52 7.52 0 0 0 .478-.198.798.798 0 0 1 .796.064l.453.324a1.875 1.875 0 0 0 2.416-.2l.243-.243c.648-.648.733-1.67.2-2.416l-.324-.453a.798.798 0 0 1-.064-.796c.071-.157.137-.316.198-.478.1-.267.327-.47.608-.517l.55-.091a1.875 1.875 0 0 0 1.566-1.85v-.344c0-.916-.663-1.699-1.567-1.85l-.549-.091a.798.798 0 0 1-.608-.517 7.507 7.507 0 0 0-.198-.478.798.798 0 0 1 .064-.796l.324-.453a1.875 1.875 0 0 0-.2-2.416l-.243-.243a1.875 1.875 0 0 0-2.416-.2l-.453.324a.798.798 0 0 1-.796.064 7.462 7.462 0 0 0-.478-.198.798.798 0 0 1-.517-.608l-.091-.55a1.875 1.875 0 0 0-1.85-1.566h-.344ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z`,clipRule:`evenodd`}))}var Zt=V.forwardRef(Xt);function Qt({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{fillRule:`evenodd`,d:`M4.125 3C3.089 3 2.25 3.84 2.25 4.875V18a3 3 0 0 0 3 3h15a3 3 0 0 1-3-3V4.875C17.25 3.839 16.41 3 15.375 3H4.125ZM12 9.75a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5H12Zm-.75-2.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H12a.75.75 0 0 1-.75-.75ZM6 12.75a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5H6Zm-.75 3.75a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75ZM6 6.75a.75.75 0 0 0-.75.75v3c0 .414.336.75.75.75h3a.75.75 0 0 0 .75-.75v-3A.75.75 0 0 0 9 6.75H6Z`,clipRule:`evenodd`}),V.createElement(`path`,{d:`M18.75 6.75h1.875c.621 0 1.125.504 1.125 1.125V18a1.5 1.5 0 0 1-3 0V6.75Z`}))}var $t=V.forwardRef(Qt);function en({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{fillRule:`evenodd`,d:`M8.25 6.75a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0ZM15.75 9.75a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM2.25 9.75a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM6.31 15.117A6.745 6.745 0 0 1 12 12a6.745 6.745 0 0 1 6.709 7.498.75.75 0 0 1-.372.568A12.696 12.696 0 0 1 12 21.75c-2.305 0-4.47-.612-6.337-1.
82684a.75.75 0 0 1-.372-.568 6.787 6.787 0 0 1 1.019-4.38Z`,clipRule:`evenodd`}),V.createElement(`path`,{d:`M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z`}))}var tn=V.forwardRef(en);function nn({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{d:`M5.25 6.375a4.125 4.125 0 1 1 8.25 0 4.125 4.125 0 0 1-8.25 0ZM2.25 19.125a7.125 7.125 0 0 1 14.25 0v.003l-.001.119a.75.75 0 0 1-.363.63 13.067 13.067 0 0 1-6.761 1.873c-2.472 0-4.786-.684-6.76-1.873a.75.75 0 0 1-.364-.63l-.001-.122ZM18.75 7.5a.75.75 0 0 0-1.5 0v2.25H15a.75.75 0 0 0 0 1.5h2.25v2.25a.75.75 0 0 0 1.5 0v-2.25H21a.75.75 0 0 0 0-1.5h-2.25V7.5Z`}))}var rn=V.forwardRef(nn);function an({title:e,titleId:t,...n},r){return V.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?V.createElement(`title`,{id:t},e):null,V.createElement(`path`,{fillRule:`evenodd`,d:`M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z`,clipRule:`evenodd`}))}var on=V.forwardRef(an),sn=({href:e,children:t})=>e?(0,U.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,U.jsx)(y,{to:`/upgrade`,prefetch:`intent`,children:t}),cn=({children:e})=>(0,U.jsx)(`div`,{className:`flex grow basis-0 flex-col gap-y-3`,children:e}),ln=({children:e})=>(0,U.jsx)(`div`,{className:`flex flex-col gap-y-2`,children:e}),K=({path:e,text:t})=>{let{webTheme:n}=F();return(0,U.jsx)(y,{to:e,className:`sm:max-w-36 sm:text-wrap`,children:(0,U.jsx)(P,{as:`p`,size:`xs`,weight:`regular`,color:n.footer_text_color,fontFamilyv2:n.font_body,children:t})})},un=({text:e,color:t})=>{let{webTheme:n}=F();return(0,U.jsx)(P,{as:`p`,size:`xs`,weight:`semibold`,color:t||n?.footer_text_color,fontFamilyv2:n?.font_header,children:e})},dn=({isPremiumEnabled:e,isLoggedIn:t,isReferralEnabled:n,publication:r,subscription:i})=>{let{t:a}=u(),{webTheme:o}=F();return(0,U.jsxs)(cn,{children:[(0,U.jsx)(un,{text:a(`nav.mobile_sections.account`)}),(0,U.jsxs)(ln,{children:[e&&(0,U.jsx)(sn,{href:r.web_template.external_upgrade_page_href,children:(0,U.jsx)(P,{as:`p`,size:`xs`,weight:`regular`,color:o.footer_text_color,fontFamilyv2:o.font_body,children:a(`nav.links.upgrade`)})}),t&&i&&(0,U.jsx)(K,{path:`/subscribe/${i?.subscriber_id||``}/manage`,text:a(`nav.links.manage`)}),n&&i&&(0,U.jsx)(K,{path:`/subscribe/${i?.subscriber_id||``}/referrals`,text:a(`nav.links.referrals`)})]})]})},fn=({hasMultiplePublications:e,hasAuthorsPage:t})=>{let{t:n}=u();return(0,U.jsxs)(cn,{children:[(0,U.jsx)(un,{text:n(`nav.links.home`)}),(0,U.jsxs)(ln,{children:[(0,U.jsx)(K,{path:`/`,text:n(`meta.titles.posts`)}),e&&(0,U.jsx)(K,{path:`/publications`,text:`Newsletters`}),t&&(0,U.jsx)(K,{path:`/authors`,text:n(`author.authors`)})]})]})},pn=({navGroups:e})=>{let{webTheme:t}=F();return(0,U.jsx)(U.Fragment,{children:e.map(e=>e.is_category_group||!e?.nav_links?.length?null:(0,U.jsxs)(cn,{children:[(0,U.jsx)(un,{text:e.title}),(0,U.jsx)(ln,{children:e?.nav_links?.map(e=>e.external_link?(0,U.jsx)(`a`,{style:{...t.footer_external_link_underline_color&&{color:t.footer_external_link_underline_color}},href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,className:`underline`,children:(0,U.jsx)(un,{text:e.cta_text,color:t?.footer_external_link_color})},e.id):(0,U.jsx)(K,{path:`/c/${e.href}`,text:e.cta_text},e.id))})]},e.id))})},mn=({publication:e})=>{let{webTheme:t}=F();return(0,U.jsxs)(`div`,{className:`flex w-full flex-col items-center sm:items-start`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-x-2 py-4`,children:[(0,U.jsx)(`img`,{src:e.logo.thumb.url,alt:e.description,width:40,height:40,className:(0,H.default)(`overflow-hidden`)}),(0,U.jsx)(P,{as:`p`,size:`md`,weight:`semibold`,color:t?.footer_text_color,fontFamilyv2:t?.font_body,children:e.name})]}),(0,U.jsx)(`div`,{className:`text-center sm:text-left`,children:(0,U.jsx)(P,{as:`p`,size:`sm`,weight:`regular`,color:t?.footer_text_color,fontFamilyv2:t?.font_body,children:e.description})})]})},hn=({publication:e,subscription:t,signupWidgetConfigs:n})=>{let{webTheme:r}=F(),{web_template:i,premium_enabled:a,has_referral_program:o}=e,s=R(),c=a,l=o,u=i?.multi_pub_ids?.length>=1,d=i?.author_ids?.length>=1,f=s||c,p=i.nav_groups?i.nav_groups.filter(e=>!e.is_category_group).slice(0,f?1:2):[];return(0,U.jsx)(N,{as:`footer`,className:`py-8`,style:{backgroundColor:r?.footer_background_color},children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-y-6`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-1 gap-y-6 sm:grid-cols-3`,children:[(0,U.jsx)(`div`,{className:`sm:px-6`,children:(0,U.jsx)(mn,{publication:e})}),(0,U.jsxs)(`div`,{className:(0,H.default)(`mx-auto hidden sm:flex sm:flex-row`,p.length>
820?`w-10/12`:`w-1/2`),children:[(0,U.jsx)(fn,{hasMultiplePublications:u,hasAuthorsPage:d}),f&&(0,U.jsx)(dn,{isPremiumEnabled:c,isLoggedIn:s,isReferralEnabled:l,publication:e,subscription:t}),(0,U.jsx)(pn,{navGroups:p})]}),(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-y-4 sm:items-start sm:px-6`,children:[(0,U.jsx)(ne,{signupStyles:n}),(0,U.jsx)(ke,{publication:e,bgColor:r?.footer_text_color,fillColor:r?.footer_background_color})]})]}),(0,U.jsxs)(`div`,{className:`flex w-full flex-col items-center gap-y-4 sm:flex-row sm:justify-between sm:px-6`,children:[(0,U.jsx)(`div`,{className:`w-full text-center sm:w-1/2 sm:text-left`,children:(0,U.jsx)(Tt,{text:e?.copyright_text||e.name})}),(0,U.jsx)(`div`,{className:`flex w-full flex-col items-center gap-y-4 sm:w-1/2 sm:flex-row sm:justify-end sm:gap-x-4`,children:(0,U.jsx)(xe,{publication:e})})]})]})})},gn=()=>{let{publication:e,subscription:t,signupWidgetConfigs:n}=b(`root`);return(0,U.jsx)(hn,{publication:e,subscription:t,signupWidgetConfigs:n})},q=({path:e,text:t,asTitle:n=!1})=>(0,U.jsx)(y,{to:e,children:(0,U.jsx)(j,{as:`span`,type:`body`,theme:`navs`,weight:`medium`,className:`text-sm opacity-75 hover:text-wt-primary`,children:t})}),_n=({text:e})=>(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-md font-semibold sm:block`,children:e}),vn=({isPremiumEnabled:e,isLoggedIn:t,isReferralEnabled:n,publication:r,subscription:i})=>{let{t:a}=u();return(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(_n,{text:a(`nav.mobile_sections.account`)}),(0,U.jsxs)(`div`,{className:`mb-2 flex flex-col`,children:[e&&(0,U.jsx)(sn,{href:r.web_template.external_upgrade_page_href,children:(0,U.jsx)(j,{as:`span`,type:`body`,theme:`navs`,weight:`medium`,className:`text-sm opacity-75 hover:text-wt-primary`,children:a(`nav.links.upgrade`)})}),t&&i&&(0,U.jsx)(q,{path:`/subscribe/${i?.subscriber_id||``}/manage`,text:a(`nav.links.manage`)}),n&&i&&(0,U.jsx)(q,{path:`/subscribe/${i?.subscriber_id||``}/referrals`,text:a(`nav.links.referrals`)})]})]})},yn=({hasMultiplePublications:e,hasAuthorsPage:t})=>{let{t:n}=u();return(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(_n,{text:n(`nav.links.home`)}),(0,U.jsx)(q,{path:`/`,text:n(`meta.titles.posts`)}),e&&(0,U.jsx)(q,{path:`/publications`,text:`Newsletters`}),t&&(0,U.jsx)(q,{path:`/authors`,text:n(`author.authors`)})]})},bn=({navGroups:e})=>(0,U.jsx)(U.Fragment,{children:e.map(e=>e.is_category_group||!e?.nav_links?.length?null:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(_n,{text:e.title}),(0,U.jsx)(`div`,{className:`mb-2 flex flex-col`,children:e?.nav_links?.map(e=>e.external_link?(0,U.jsx)(`a`,{href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(j,{as:`span`,type:`body`,theme:`navs`,className:`text-sm opacity-75 hover:text-wt-primary`,children:e.cta_text})},e.id):(0,U.jsx)(q,{path:`/c/${e.href}`,text:e.cta_text},e.id))})]},e.id))}),xn=({publication:e,isLoggedIn:t,subscription:n})=>{let{web_template:r}=e,{nav_groups:i}=r,a=e.premium_enabled,o=e.has_referral_program,s=t||a;return(0,U.jsx)(`div`,{children:(0,U.jsx)(`div`,{className:`flex w-full`,children:(0,U.jsxs)(`div`,{className:`flex w-full justify-start space-x-6`,children:[(0,U.jsx)(`div`,{className:`flex flex-col`,children:(0,U.jsx)(yn,{hasMultiplePublications:r?.multi_pub_ids?.length>=1,hasAuthorsPage:e?.web_template?.author_ids?.length>=1})}),s&&(0,U.jsx)(vn,{isPremiumEnabled:a,isLoggedIn:t,isReferralEnabled:o,publication:e,subscription:n}),(0,U.jsx)(`div`,{className:`flex space-x-6`,children:i&&(0,U.jsx)(bn,{navGroups:i})})]})})})},Sn=({publication:e,subscription:t})=>{let n=R(),r=new Date().getFullYear(),{t:i}=u(),{web_template:a}=e,o=e.copyright_text||e.name,s=e.tiktok_url,c=e.twitter_url,l=e.youtube_url,d=e.facebook_url,f=e.instagram_url,p=e.linkedin_url,m=e.threads_url,h=e.discord_url,g=e.bluesky_url,_=e.private&&!n;return(0,U.jsxs)(`footer`,{className:`flex w-full flex-col bg-wt-tertiary px-4 py-10`,children:[(0,U.jsx)(`h2`,{id:`footer-heading`,className:`sr-only`,children:`Footer`}),(0,U.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col-reverse justify-between space-x-0 md:flex-row md:space-x-8`,children:[(0,U.jsx)(`div`,{className:`w-full`,children:(0,U.jsxs)(`div`,{className:`w-full max-w-lg`,children:[(0,U.jsxs)(`div`,{className:`flex space-x-4`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(`div`,{className:`h-10 w-10 overflow-hidden rounded`,children:e.logo.thumb.url&&(0,U.jsx)(Re,{src:e.logo.thumb.url,alt:e.name,maxWidth:200,aspectRatio:`square`})})}),(0,U.jsxs)(`div`,{children:[e.name&&(0,U.jsx)(j,{as:`h4`,type:`title`,size:`lg`,theme:`navs`,weight:`bold`,children:e.name}),e.description&&(0,U.jsx)(j,{as:`p`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide opacity-75`,children:e.description})]})]}),(0,U.jsxs)(`div`,{className:`w-full pt-4`,children:[n&&a.logged_subscribe_form?(0,U.jsx)(U.Fragment,{}):(0,U.jsx)(U.Fragment,{children:!_&&(0,U.jsx)(Le,{publication:e})}),(0,U.jsx)(`div`,{className:`mt-4 flex items-center`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)(`div`,{className:`flex flex-col space-y-1`,children:(0,U.jsx)(`div`,{className:`flex space-x-2 transition-all`,children:(0,U.jsxs)(`div`,{className:`flex items-end space-x-2`,children:[c&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(c),"aria-label":`X`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Ne,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),p&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(p),"aria-label":`LinkedIn`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Me,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),l&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(l),"aria-label":`Youtube`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Ie,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),s&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(s),"aria-label":`Tiktok`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Fe,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),d&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(d),"aria-label":`Facebook`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Pe,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),f&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(f),"aria-label":`Instagram`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(je,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),m&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(m),"aria-label":`Threads`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Oe,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),h&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(h),"aria-label":`Discord`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(De,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})}),g&&(0,U.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:I(g),"aria-label":`Bluesky`,children:(0,U.jsx)(j,{as:`span`,type:`body`,size:`sm`,theme:`navs`,weight:`medium`,className:`text-md tracking-wide`,children:(0,U.jsx)(Ae,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})})})]})})})})})]})]})}),(0,U.jsx)(`div`,{className:`flex hidden w-full flex-grow flex-col justify-between md:block`,children:!_&&(0,U.jsx)(xn,{publication:e,isLoggedIn:n,subscription:t})})]}),(0,U.jsxs)(`div`,{className:`mt-8 flex flex-col items-center justify-between space-y-4 border-t border-white/20 pt-6 sm:flex-row sm:space-y-0`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(`div`,{className:`flex flex-col items-center space-x-2 md:flex-row`,children:(0,U.jsx)(`div`,{className:`flex items-center space-x-0 md:space-x-2`,children:(0,U.jsx)(j,{as:`span`,theme:`navs`,className:`extra-light text-xs`,children:i(`footer.copyright_simple`,{year:r,name:o})})})})}),(0,U.jsx)(xe,{publication:e})]})]})]})},Cn=Object.freeze({right:`origin-top-right right-0`,left:`origin-top-right left-0`,center:`origin-top-center right-0`}),wn=({children:e,buttonChild:t,direction:n=`right`,className:r,style:i={}})=>{let{classes:a}=F();return(0,U.jsx)(U.Fragment,{children:(0,U.jsxs)(B,{as:`div`,className:`relative inline-block text-left`,children:[(0,U.jsx)(B.Button,{"aria-label":`Menu`,className:`rounded-full transition-all`,children:t}),(0,U.jsx)(Ve,{as:V.Fragment,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,U.jsx)(B.Items,{className:(0,H.default)(a.radius,`absolute mt-2 bg-white bg-wt-tertiary shadow-lg ring-1 ring-black/5 focus:outline-none`,Cn[n],r),style:i,children:e})})]})})},Tn=({subscriberId:e,isReferralEnabled:t,avatarUrl:n,isPremiumEnabled:r,isPremiumTierSubscriber:i,isLoggedIn:a,publication:s})=>{let l=c(),d=o(),[p]=f(),[m,h]=(0,V.useState)(!1),{t:g}=u(),_=v(),b=s?.web_template?.author_ids?.length>=1,x=s?.web_template?.multi_pub_ids?.length>=1,S=()=>{p.has(`email`)&&d(l.pathname),h(!1)},C=()=>{h(!0)},w=()=>{let e=new FormData;e.append(`pathname`,window?.location?.pathname),_(e,{method:`post`,action:`/logout`})};return(0,U.jsxs)(U.Fragment,{children:[!e&&(0,U.jsx)(fe,{isOpen:m,handleCloseModal:S,publication:s}),(0,U.jsxs)(wn,{buttonChild:(0,U.jsx)(`div`,{className:`mt-1.5`,children:a?(0,U.jsx)(`div`,{className:`h-6 w-6 overflow-hidden rounded-full`,children:(0,U.jsx)(`img`,{className:`h-6 w-6 rounded-full`,src:n,alt:`The logged in user`})}):(0,U.jsx)(kt,{className:`h-6 w-6 stroke-1 text-wt-text-on-tertiary opacity-60 hover:opacity-100`})}),children:[r&&!i&&(0,U.jsx)(B.Item,{children:({active:e})=>(0,U.jsx)(sn,{href:s.web_template.external_upgrade_page_href,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(Lt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:g(`nav.links.upgrade`)})]})})}),x&&(0,U.jsx)(B.Item,{children:({active:e})=>(0,U.jsx)(y,{to:`/publications`,prefetch:`intent`,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(Ft,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:`Newsletters`})]})})}),b&&(0,U.jsx)(B.Item,{children:({active:e})=>(0,U.jsx)(y,{to:`/authors`,prefetch:`intent`,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(zt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:g(`author.authors`)})]})})}),e&&(0,U.jsx)(B.Item,{children:({active:t})=>(0,U.jsx)(y,{to:`/subscribe/${e}/manage`,prefetch:`intent`,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(jt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:g(`nav.links.manage`)})]})})}),t&&e&&(0,U.jsx)(B.Item,{children:({active:t})=>(0,U.jsx)(y,{to:`/subscribe/${e}/referrals`,prefetch:`intent`,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(Vt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:g(`nav.links.referrals`)}
82)]})})}),a?(0,U.jsx)(B.Item,{children:({active:e})=>(0,U.jsx)(`button`,{onClick:w,className:`w-full whitespace-nowrap text-xs text-wt-text-on-tertiary`,children:(0,U.jsxs)(`div`,{className:`group flex items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(Dt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(`div`,{className:`whitespace-nowrap text-xs text-wt-text-on-tertiary sm:block`,children:g(`shared.cta.logout`)})]})})}):(0,U.jsx)(B.Item,{children:({active:e})=>(0,U.jsx)(`button`,{onClick:C,className:`w-full whitespace-nowrap text-xs text-wt-text-on-tertiary`,children:(0,U.jsxs)(`div`,{className:`group flex w-full items-center space-x-2 rounded-wt px-3 py-2 hover:bg-black/5`,children:[(0,U.jsx)(Dt,{className:`h-3 w-3 text-wt-text-on-tertiary`}),(0,U.jsx)(`div`,{className:`whitespace-nowrap text-xs text-wt-text-on-tertiary sm:block`,children:g(`shared.cta.login`)})]})})})]})]})},En=({url:e,name:t})=>(0,U.jsx)(y,{className:`transition:all rounded-wt px-2 py-1 hover:bg-black/5`,to:`/`,children:(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[e&&(0,U.jsx)(`div`,{className:`h-8 w-8 overflow-hidden rounded-wt`,children:(0,U.jsx)(Re,{className:`h-full w-full rounded-wt object-contain`,src:e,alt:`${t} logo`,maxWidth:100,aspectRatio:`square`})}),(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`sm:text-md wt-text-primary hidden text-sm sm:block`,children:t})]})}),Dn=({children:e,popoverContent:t})=>{let[n,r]=(0,V.useState)(!1);return(0,U.jsx)(L,{className:`relative cursor-pointer`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:({open:r})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(L.Button,{className:`  inline-flex items-center rounded-wt px-2 py-2 hover:bg-black/5 focus:outline-none focus-visible:ring-2`,children:[e,(0,U.jsx)(de,{className:` ml-2 h-3 w-3 text-wt-text-on-tertiary transition duration-150 ease-in-out`,"aria-hidden":`true`})]}),(0,U.jsx)(Ve,{as:V.Fragment,show:n,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,U.jsx)(L.Panel,{className:`absolute left-0 right-0 mt-2 min-w-36 origin-top-right rounded-md bg-white bg-wt-tertiary shadow-lg ring-1 ring-black/5 focus:outline-none`,children:(0,U.jsx)(`div`,{className:`overflow-hidden rounded-lg ring-1 ring-black/5`,children:t})})})]})})},On=({children:e,subLinks:t,webTemplate:n})=>{let r=n.enable_customize_category_ids,i=n.category_ids;return(0,U.jsx)(Dn,{popoverContent:(0,U.jsx)(U.Fragment,{children:t.map(e=>r&&!i.includes(e.id)?null:(0,U.jsx)(y,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,to:`/t/${Ue(e.display)}`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-xs sm:block`,children:e.display})},e.id))}),children:e})},kn=({children:e,subLinks:t})=>(0,U.jsx)(Dn,{popoverContent:(0,U.jsx)(U.Fragment,{children:t.map(e=>e.external_link?(0,U.jsx)(`a`,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-xs sm:block`,children:e.cta_text})},e.id):(0,U.jsx)(y,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,to:`/c/${e.href}`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-xs sm:block`,children:e.cta_text})},e.id))}),children:e}),An=({link:e})=>e.external_link?(0,U.jsx)(`a`,{className:`transition:all rounded-wt px-2 py-2 hover:bg-black/5`,href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`whitespace-nowrap text-xs sm:block`,children:e.cta_text})}):(0,U.jsx)(y,{className:`transition:all rounded-wt px-2 py-2 hover:bg-black/5`,to:`/c/${e.href}`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`hidden whitespace-nowrap text-xs sm:block`,children:e.cta_text})}),jn=({publication:e})=>{let{content_tags:t,web_template:n}=e;return(0,U.jsx)(`div`,{className:`z-20 flex gap-1`,children:n?.nav_groups?.map(e=>e.is_category_group?(0,U.jsx)(On,{subLinks:t,webTemplate:n,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-xs sm:block`,children:e.title})},e.id):e.nav_links.length===0?null:e.nav_links.length===1?(0,U.jsx)(An,{link:e.nav_links[0]},e.id):(0,U.jsx)(kn,{subLinks:e.nav_links,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`navs`,className:`text-xs sm:block`,children:e.title})},e.id))})},Mn=({open:e,setOpen:t,title:n,children:r,bottomChildren:i})=>(0,U.jsx)(Ve.Root,{show:e,as:V.Fragment,children:(0,U.jsxs)(Be,{as:`div`,className:`relative`,onClose:t,children:[(0,U.jsx)(`div`,{className:`fixed inset-0`}),(0,U.jsx)(`div`,{className:`fixed inset-0 z-40 overflow-hidden`,children:(0,U.jsx)(`div`,{className:`absolute inset-0 overflow-hidden`,children:(0,U.jsx)(`div`,{className:`pointer-events-none fixed inset-y-0 right-0 flex pl-10`,children:(0,U.jsx)(Ve.Child,{as:V.Fragment,enter:`transform transition ease-in-out duration-500 sm:duration-700`,enterFrom:`translate-x-full`,enterTo:`translate-x-0`,leave:`transform transition ease-in-out duration-500 sm:duration-700`,leaveFrom:`translate-x-0`,leaveTo:`translate-x-full`,children:(0,U.jsx)(Be.Panel,{className:`pointer-events-auto w-screen`,children:(0,U.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-y-auto bg-white py-6 shadow-xl`,children:[(0,U.jsx)(`div`,{className:`px-4 sm:px-6`,children:(0,U.jsx)(`div`,{className:`flex items-start justify-between`,children:(0,U.jsx)(`div`,{className:`fixed bottom-4 left-0 z-20 flex w-full items-center px-4`,children:i})})}),(0,U.jsxs)(`div`,{className:`relative flex-1 px-4 pb-40 pr-6`,children:[r,(0,U.jsx)(`div`,{className:`fixed right-4 top-4`,children:(0,U.jsx)(`button`,{type:`button`,className:`border-gray z-40 rounded-wt border bg-white p-1 text-gray-400 hover:text-gray-500 focus:outline-none`,onClick:()=>{t(!1),window.scrollTo({top:0,behavior:`smooth`})},children:(0,U.jsx)(le,{className:`h-4 w-4`,"aria-hidden":`true`})})})]})]})})})})})})]})}),Nn=({text:e})=>(0,U.jsx)(j,{as:`span`,type:`title`,theme:`primary`,className:`text-sm font-semibold sm:block`,children:e}),J=({path:e,text:t,onClick:n,asTitle:r=!1})=>(0,U.jsx)(y,{to:e,onClick:n,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:r?`primary`:`default`,className:r?`text-sm font-semibold capitalize sm:block`:`text-sm hover:text-wt-primary`,children:t})}),Pn=({publication:e,isLoggedIn:t,subscription:n})=>{let{t:r}=u(),{handleOpenModal:i}=pe(),[a,o]=(0,V.useState)(!1),{content_tags:s,web_template:c}=e,{nav_groups:l,enable_customize_category_ids:d,category_ids:f}=c,p=e.premium_enabled,m=e.has_referral_program,h=t||p,g=c?.multi_pub_ids?.length>=1,_=e?.web_template?.author_ids?.length>=1,v=()=>{o(!1)};return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`flex items-center`,children:(0,U.jsx)(`button`,{type:`button`,onClick:e=>{o(!0)},children:t?(0,U.jsx)(`div`,{className:`h-6 w-6 overflow-hidden rounded-full`,children:(0,U.jsx)(`img`,{className:`h-6 w-6 rounded-full`,src:n?.avatar_url,alt:`The logged in user`})}):(0,U.jsx)(kt,{className:`h-6 w-6 stroke-1 text-wt-text-on-tertiary opacity-60 hover:opacity-100`})})}),(0,U.jsx)(Mn,{open:a,setOpen:o,title:r(`nav.mobile_title`),bottomChildren:(0,U.jsx)(`div`,{className:`w-full`,children:t?(0,U.jsx)(C,{method:`post`,action:`/logout`,onClick:v,children:(0,U.jsx)(`input`,{type:`submit`,value:r(`shared.cta.logout`)||``,className:`wt-button-font text-md inline-flex w-full cursor-pointer items-center justify-center rounded-md rounded-wt border border-gray-300 bg-white py-2 font-medium text-gray-700 focus:outline-none focus:ring-2 focus:ring-wt-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-400`})}):(0,U.jsxs)(`div`,{className:`flex w-full flex-col space-y-2 bg-white`,children:[(0,U.jsx)(z,{type:`button`,variant:`ghost`,className:`shadow-none`,onClick:()=>i(`login`),children:r(`shared.cta.login`)}),(0,U.jsx)(z,{type:`button`,variant:`primary`,onClick:()=>i(`signup`),children:r(`shared.cta.subscribe`)})]})}),children:(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(Nn,{text:r(`nav.links.home`)}),(0,U.jsx)(J,{path:`/`,text:r(`meta.titles.posts`),onClick:v}),g&&(0,U.jsx)(J,{path:`/publications`,text:`Newsletters`,onClick:v}),_&&(0,U.jsx)(J,{path:`/authors`,text:r(`author.authors`),onClick:v})]}),h&&(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(Nn,{text:r(`nav.mobile_sections.account`)}),(0,U.jsxs)(`div`,{className:`mb-2 flex flex-col`,children:[p&&(0,U.jsx)(sn,{href:e.web_template.external_upgrade_page_href,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`default`,className:`text-sm hover:text-wt-primary`,children:r(`nav.links.upgrade`)})}),t&&n&&(0,U.jsx)(J,{path:`/subscribe/${n?.subscriber_id||``}/manage`,text:r(`nav.links.manage`),onClick:v}),m&&n&&(0,U.jsx)(J,{path:`/subscribe/${n?.subscriber_id||``}/referrals`,text:r(`nav.links.referrals`),onClick:v})]})]}),(0,U.jsx)(`div`,{className:`flex flex-col space-y-2`,children:l?.map(e=>{if(e.is_category_group)return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Nn,{text:e.title}),(0,U.jsx)(`div`,{className:`mb-2 flex flex-col`,children:s?.map(e=>d&&!f.includes(e.id)?null:(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{path:`/t/${Ue(e.display)}`,text:e.display,onClick:v})},e.id))})]},e.id);if(!e?.nav_links?.length)return null;if(e?.nav_links?.length===1){let t=e?.nav_links?.[0];return t.external_link?(0,U.jsx)(`a`,{href:t.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`primary`,className:`text-sm font-semibold capitalize sm:block`,children:t.cta_text})},e.id):(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{asTitle:!0,path:`/c/${t.href}`,text:t.cta_text,onClick:v})},e.id)}return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Nn,{text:e.title}),(0,U.jsx)(`div`,{className:`mb-2 flex flex-col`,children:e?.nav_links?.map(e=>e.external_link?(0,U.jsx)(`a`,{href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(j,{as:`span`,type:`title`,theme:`default`,className:`text-sm hover:text-wt-primary`,children:e.cta_text})},e.id):(0,U.jsx)(J,{path:`/c/${e.href}`,text:e.cta_text,onClick:v},e.id))})]},e.id)})})]})})]})},Fn=400,In=()=>{let e=(0,V.useRef)(null),t=(0,V.useRef)(null),[n,r]=(0,V.useState)(!1),[i,a]=(0,V.useState)(0),[o,s]=(0,V.useState)(!1),c=e=>{t.current&&(t.current.offsetWidth-e<Fn?!n&&r(!0):r(!1))};return(0,V.useEffect)(()=>{!o&&t.current&&e.current&&(a(e.current.offsetWidth),c(e.current.offsetWidth),s(!0))},[o,t.current,e.current]),(0,V.useEffect)(()=>{let e=()=>{o&&c(i)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[o,t.current]),{shouldUseMobileMenu:n,menuRef:e,navRef:t,isMounted:o}},Ln=({publication:e,isLoggedIn:t,subscription:n})=>{let{navRef:r,menuRef:i,isMounted:a,shouldUseMobileMenu:o}=In(),s=n?.tier===`premium`,c=!t&&!e.private;return(0,U.jsx)(`nav`,{ref:r,className:`flex items-center justify-between bg-wt-tertiary px-4 py-2`,children:(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,U.jsx)(En,{url:e.logo.thumb.url,name:e.name}),(0,U.jsx)(`div`,{ref:i,className:(0,H.default)(!a&&`opacity-0`,o?`hidden`:`z-20 block`),children:(0,U.jsx)(jn,{publication:e})})]}),(0,U.jsxs)(`div`,{className:`z-20 flex items-center`,children:[c&&(0,U.jsx)(`div`,{className:`mr-2`,children:(0,U.jsx)(z,{variant:`primary`,linkProps:{to:`/subscribe`,prefetch:`intent`},children:e.cta_text})}),(0,U.jsx)(`div`,{children:o?(0,U.jsx)(Pn,{publication:e,isLoggedIn:t,subscription:n}):(0,U.jsx)(Tn,{isLoggedIn:t,avatarUrl:n?.avatar_url,subscriberId:n?.subscriber_id,isPremiumEnabled:e.premium_enabled,isReferralEnabled:e.has_referral_program,isPremiumTierSubscriber:s,publication:e})})]})]})})},Rn=({redirects:e,currentStep:t,progress:n=0,publication:r})=>{let i=r.web_template.signup_flow_messaging.success_message,a=t?.page_message,o=e&&e?.length>1;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`fixed z-20 flex h-14 w-full justify-center bg-white shadow-lg`,children:[(0,U.jsx)(`div`,{className:`overflow-hidden rounded-full bg-white`,children:(0,U.jsx)(`img`,{className:`absolute left-1/2 top-7 z-10 h-14 w-14 -translate-x-1/2 transform rounded-full`,src:r.web_template.signup_flow_avatar_url,alt:`avatar`})}),o&&(0,U.jsx)(`div`,{className:`absolute top-14 w-full`,children:(0,U.jsx)(We,{currentProgress:n,variant:`signup-flow`})})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`mb-2 h-14`}),(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center space-y-2 pb-4 pt-8 text-center`,children:[i&&(0,U.jsx)(P,{as:`p`,size:`sm`,className:`font-medium`,children:r.web_template.signup_flow_messaging.success_message}),a&&(0,U.jsx)(P,{as:`h4`,size:`xl`,weight:`semibold`,children:t?.page_message})]})]})]})},Y=({url:e,name:t,textColor:n,fontFamily:r})=>{let{webTheme:i,classes:a}=F();return(0,U.jsx)(y,{className:(0,H.default)(a.radius,`transition:all px-2 py-1 hover:bg-black/5`),to:`/`,children:(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[e&&(0,U.jsx)(`div`,{className:`w-8 h-8 overflow-hidden rounded-wt`,children:(0,U.jsx)(Re,{className:`object-contain w-full h-full rounded-wt`,src:e,alt:`${t} logo`,maxWidth:100,aspectRatio:`square`})}),(0,U.jsx)(P,{as:`span`,color:n,fontFamilyv2:i.navbar_font_family,className:`hidden text-sm sm:text-md wt-text-primary md:block`,children:t})]})})},zn=400,Bn=()=>{let e=(0,V.useRef)(null),[t,n]=(0,V.useState)(!1),[r,i]=(0,V.useState)(0),[a,o]=(0,V.useState)(!1),s=r=>{e.current&&(document.getElementsByTagName(`nav`)[0].offsetWidth-r<zn?!t&&n(!0):n(!1))};return(0,V.useEffect)(()=>{!a&&e.current&&(i(e.current.offsetWidth),s(e.current.offsetWidth),o(!0))},[a,e.current]),(0,V.useEffect)(()=>{let e=()=>{a&&s(r)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[a]),{shouldUseMobileMenu:t,menuRef:e,isMounted:a}},Vn=({children:e,popoverContent:t,theme:n})=>{let[r,i]=(0,V.useState)(!1),{classes:a}=F();
82return(0,U.jsx)(L,{className:`cursor-pointer`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:({open:i})=>(0,U.jsxs)(`div`,{className:``,children:[(0,U.jsxs)(L.Button,{style:{color:n?.navbar_text_color||`#000`,fontFamily:n?.navbar_font_family,zIndex:0},className:(0,H.default)(a.radius,`inline-flex items-center px-2 py-2 hover:bg-black/5 focus:outline-none focus-visible:ring-2`),children:[e,(0,U.jsx)(`div`,{style:{color:n?.navbar_text_color||`#000`},children:(0,U.jsx)(de,{className:` ml-2 h-3 w-3 transition duration-150 ease-in-out`,"aria-hidden":`true`})})]}),(0,U.jsx)(Ve,{as:V.Fragment,show:r,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,U.jsx)(L.Panel,{style:{backgroundColor:n?.navbar_background_color},className:(0,H.default)(a.radius,`absolute z-50 w-[180px] min-w-36 origin-top-right overflow-hidden shadow-lg ring-1 ring-black/5 focus:outline-none`),children:(0,U.jsx)(`div`,{className:`overflow-hidden rounded-lg ring-1 ring-black/5`,children:t})})})]})})},Hn=({children:e,subLinks:t,webTemplate:n,theme:r})=>{let i=n.enable_customize_category_ids,a=n.category_ids;return(0,U.jsx)(Vn,{theme:r,popoverContent:(0,U.jsx)(U.Fragment,{children:t.map(e=>i&&!a.includes(e.id)?null:(0,U.jsx)(y,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,to:`/t/${Ue(e.display)}`,children:(0,U.jsx)(P,{as:`span`,color:r.navbar_text_color,fontFamilyv2:r.navbar_font_family,className:`text-xs sm:block`,children:e.display})},e.id))}),children:e})},Un=({children:e,subLinks:t,theme:n})=>(0,U.jsx)(Vn,{theme:n,popoverContent:(0,U.jsx)(U.Fragment,{children:t.map(e=>e.external_link?(0,U.jsx)(`a`,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,href:e.href,target:`_blank`,rel:`nofollow noreferrer noopener`,children:(0,U.jsx)(P,{as:`span`,color:n.navbar_text_color,fontFamily:n.navbar_font_family,className:`text-xs sm:block`,children:e.cta_text})},e.id):(0,U.jsx)(y,{className:`flex rounded-wt px-3 py-2.5 hover:bg-black/5`,to:`/c/${e.href}`,children:(0,U.jsx)(P,{as:`span`,color:n.navbar_text_color,fontFamily:n.navbar_font_family,className:`text-xs sm:block`,children:e.cta_text})},e.id))}),children:e}),Wn=({href:e,children:t,className:n,isExternalLink:r})=>r?(0,U.jsx)(`a`,{className:n,href:e,target:`_blank`,rel:`nofollow noreferrer noopener`,children:t}):(0,U.jsx)(y,{className:n,to:e,children:t}),Gn=({link:e,theme:t})=>{let n=e.external_link;return(0,U.jsx)(Wn,{href:n?e.href:`/c/${e.href}`,isExternalLink:n,className:`transition:all rounded-wt px-2 py-2 hover:bg-black/5`,children:(0,U.jsx)(P,{as:`span`,color:t.navbar_text_color,fontFamilyv2:t.navbar_font_family,className:`whitespace-nowrap text-xs sm:block`,children:e.cta_text})})},X=({publication:e,theme:t})=>{let{content_tags:n,web_template:r}=e,{menuRef:i,isMounted:a,shouldUseMobileMenu:o}=Bn();return(0,U.jsx)(`div`,{ref:i,className:(0,H.default)(!a&&`opacity-0`,o?`hidden`:`block`),children:(0,U.jsx)(`div`,{className:`z-20 flex gap-1`,children:r?.nav_groups?.map(e=>e.is_category_group?(0,U.jsx)(Hn,{subLinks:n,webTemplate:r,theme:t,children:(0,U.jsx)(P,{as:`span`,color:t.navbar_text_color,fontFamilyv2:t.navbar_font_family,className:`text-xs sm:block`,children:e.title})},e.id):e.nav_links.length===0?null:e.nav_links.length===1?(0,U.jsx)(Gn,{link:e.nav_links[0],theme:t},e.id):(0,U.jsx)(Un,{subLinks:e.nav_links,theme:t,children:(0,U.jsx)(P,{as:`span`,color:t.navbar_text_color,fontFamilyv2:t.navbar_font_family,className:`text-xs sm:block`,children:e.title})},e.id))})})},Kn=()=>{let{cookies:e,cookiesSet:t,setCookie:n}=Ce(),[r,i]=(0,V.useState)([]);return(0,V.useEffect)(()=>{t&&e?.notifications_read&&i(JSON.parse(e?.notifications_read))},[t,e]),{readNotifications:r,readNotificationsCount:r.length,handleReadNotification:e=>{n({name:`notifications_read`,value:JSON.stringify([...r,e]),days:4})},handleReadAllNotifications:e=>{let t=e.map(e=>e.id);n({name:`notifications_read`,value:JSON.stringify(t),days:4})}}},qn=()=>{let e=Te(),[t,n]=(0,V.useState)([]),[r,i]=(0,V.useState)(0),a=e.data,o=a?.pagination?.total||0,s=a?.pagination?.page||0,{readNotifications:c,readNotificationsCount:l}=Kn(),u=c.length,d=t.length+l<o,f=()=>{let t=new URLSearchParams;t.set(`page`,String(r+1)),e.load(`/notifications?${t.toString()}`)},p=e=>l===0?e:e.filter(e=>!c.includes(e.id)),m=(0,V.useMemo)(()=>{let e=a?.pagination?.total||0;return e-=c.length,e<0?0:e},[a,l]);return(0,V.useEffect)(()=>{f()},[]),(0,V.useEffect)(()=>{n(p(t))},[u]),(0,V.useEffect)(()=>{a&&(i(r+1),n(p([...t,...a.notifications])))}
82,[s]),{notificationsCount:m,notifications:t,isLoading:e?.state!==`idle`,fetchMoreNotifications:f,hasMoreToFetch:d}},Jn=({fetchMoreNotifications:e})=>(0,U.jsx)(`div`,{className:`flex w-full justify-center px-4 pb-4`,children:(0,U.jsx)(z,{type:`button`,variant:`flush`,className:`flex w-full justify-center`,btnSize:`sm`,onClick:e,children:`Load more`})}),Yn=({notifications:e})=>{let{handleReadAllNotifications:t}=Kn();return(0,U.jsx)(`div`,{className:`flex w-full justify-center px-4 pt-4`,children:(0,U.jsx)(z,{type:`button`,variant:`ghost`,className:`flex w-full justify-center`,btnSize:`sm`,onClick:()=>t(e),children:`Mark all as read`})})},Xn=({children:e,notificationsCount:t,background:n,color:r})=>(0,U.jsx)(wn,{direction:`right`,className:`z-50 w-[250px] sm:w-[300px]`,style:{background:n||`#fff`},buttonChild:(0,U.jsx)(`div`,{className:`mt-1.5 rounded hover:bg-black/5`,style:{color:r},children:t>0?(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`div`,{className:`absolute -right-1 -top-1 rounded-full bg-red-500 px-1 text-xs text-white`,children:t>9?`9+`:t}),(0,U.jsx)(qt,{className:`h-6 w-6`})]}):(0,U.jsx)(qt,{className:`h-6 w-6`})}),children:(0,U.jsx)(`div`,{className:`h-80 overflow-auto`,children:e})}),Zn=()=>(0,U.jsx)(`div`,{className:`h-6 w-full rounded bg-gray-300/80`}),Qn=()=>(0,U.jsx)(`div`,{className:`flex w-full animate-pulse flex-col space-y-6`,children:(0,U.jsxs)(`div`,{className:`space-y-4`,children:[(0,U.jsx)(Zn,{}),(0,U.jsx)(Zn,{}),(0,U.jsx)(Zn,{}),(0,U.jsx)(Zn,{})]})}),$n=({notifications:e,isLoading:t,textColor:n})=>{let{handleReadNotification:r}=Kn(),{webTheme:i}=F(),a=i?.navbar_text_color;return t?(0,U.jsx)(`div`,{className:`p-2`,children:(0,U.jsx)(Qn,{})}):e.length>0?(0,U.jsx)(`ul`,{className:`divide-y`,children:e.map(e=>{let t=ge(e.created_at),n;try{let t=new URL(e.url);n=t.pathname+t.search}catch(e){n=`/`,console.error(e)}return(0,U.jsx)(`li`,{className:`relative first:rounded-t-md last:rounded-b-md`,children:(0,U.jsx)(B.Item,{children:(0,U.jsxs)(y,{to:n,onClick:()=>r(e.id),className:`flex w-full flex-row space-x-2 px-3 py-3 hover:underline`,children:[(0,U.jsx)(`div`,{className:`pt-1`,style:{color:a},children:(0,U.jsx)(Yt,{className:`h-4 w-4`})}),(0,U.jsxs)(`div`,{className:`flex w-full flex-col space-y-2`,children:[(0,U.jsx)(P,{as:`span`,color:a,fontFamilyv2:i?.navbar_font_family,className:`text-sm sm:block`,children:(0,U.jsx)(ue,{children:e.message})}),(0,U.jsx)(`div`,{className:`flex flex-row space-x-2`,children:(0,U.jsx)(P,{as:`span`,color:a,fontFamilyv2:i?.navbar_font_family,className:`text-xs sm:block`,children:(0,U.jsx)(`small`,{className:`font-regular my-auto text-xs`,children:t})})})]})]})})},e.id)})}):(0,U.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center space-y-2 p-2`,children:[(0,U.jsx)(P,{as:`span`,color:a,fontFamilyv2:i?.navbar_font_family,children:(0,U.jsx)(Nt,{className:`mx-auto h-6 w-6`})}),(0,U.jsx)(P,{as:`span`,color:a,fontFamilyv2:i?.navbar_font_family,children:`No new notifications`})]})},er=({notificationsCount:e,isLoading:t,notifications:n,fetchMoreNotifications:r,hasMoreToFetch:i})=>{let a=e>0,{webTheme:o}=F();return(0,U.jsx)(Xn,{notificationsCount:e,background:o?.navbar_background_color,color:o?.navbar_text_color,children:(0,U.jsxs)(`div`,{className:`flex h-full flex-col justify-between`,children:[(0,U.jsxs)(`div`,{className:`h-full`,children:[a&&(0,U.jsx)(Yn,{notifications:n}),(0,U.jsx)($n,{isLoading:t,notifications:n,textColor:o?.navbar_text_color})]}),i&&r&&(0,U.jsx)(Jn,{fetchMoreNotifications:r})]})})},tr=()=>{let{notifications:e,isLoading:t,notificationsCount:n,fetchMoreNotifications:r,hasMoreToFetch:i}=qn();return(0,U.jsx)(er,{notificationsCount:n,isLoading:t,notifications:e,fetchMoreNotifications:r,hasMoreToFetch:i})},nr=()=>(0,U.jsx)(ae,{fallbackRender:()=>(0,U.jsx)(er,{notificationsCount:0,isLoading:!1,notifications:[],hasMoreToFetch:!1}),children:(0,U.jsx)(tr,{})}),Z=({text:e,Icon:t,link:n})=>{let{webTheme:r}=F();return n.type===`external`&&B.Item,(0,U.jsx)(B.Item,{children:({active:i})=>(0,U.jsxs)(y,{to:n.href,className:`flex items-center space-x-2 px-6 py-3`,children:[t&&(0,U.jsx)(`div`,{style:{color:r?.navbar_text_color},children:(0,U.jsx)(t,{className:`h-4 w-4`})}),(0,U.jsx)(P,{as:`span`,className:``,color:r.navbar_text_color,weight:`medium`,fontFamilyv2:r.navbar_font_family,size:`sm`,children:e})]})})},rr=()=>{let[e,t]=(0,V.useState)(null),[n,r]=(0,V.useState)(!1),[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(!1);return(0,V.useEffect)(()=>
82{if(typeof window>`u`)return;let e=async()=>{if(`serviceWorker`in navigator)try{t(await navigator.serviceWorker.getRegistration()??null)}catch(e){console.error(`Error getting service worker registration:`,e)}else console.warn(`Service Workers are not supported in this browser.`)},n=()=>{e()};return`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`controllerchange`,n),e(),()=>{`serviceWorker`in navigator&&navigator.serviceWorker.removeEventListener(`controllerchange`,n)}},[]),(0,V.useEffect)(()=>{if(e){if(e.pushManager===void 0)return;e.pushManager.getSubscription().then(e=>{r(!!e),a(e)}),Notification.permission===`granted`?s(!0):s(!1)}},[e]),{isSubscribed:n,pushSubscription:i,requestPermission:()=>o?`granted`:(Notification.requestPermission().then(e=>e===`granted`?(s(!0),e):(s(!1),e)),`default`),subscribeToPush:(t,n,i)=>{e!==null&&e.pushManager!==void 0&&e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}).then(e=>{r(!0),a(e),n?.(e)},e=>{i?.(e)})},unsubscribeFromPush:(t,n)=>{e!==null&&e.pushManager!==void 0&&e.pushManager.getSubscription().then(e=>{e&&e.unsubscribe().then(()=>{r(!1),a(null),t?.(e)},e=>{n?.(e)})}).catch(e=>{n?.(e)})},canSendPush:o}};function ir(){let e=D(),t=R(),{subscribeToPush:n,unsubscribeFromPush:r,isSubscribed:i,canSendPush:a}=rr();async function o(){if(!t){k.error(E(`nav.push.enable.error`));return}if(i)await r(e=>{fetch(`/push/unsubscribe`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}),k.success(E(`nav.push.disable.success`));else{if(!a&&await Notification.requestPermission()!==`granted`)return;await n(e.VAPID_PUBLIC_KEY,e=>{fetch(`/push/subscribe`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}),k.success(E(`nav.push.enable.success`))}}return{onEnable:o,isSubscribed:i}}var ar=()=>{let{webTheme:e}=F(),t=R(),{isSubscribed:n,onEnable:r}=ir(),i=W(),{t:a}=u(),o=a(n?`nav.push.disable.label`:`nav.push.enable.label`),s=n?Gt:Ut;return i===`standalone`?(0,U.jsx)(B.Item,{children:(0,U.jsxs)(`div`,{className:`flex cursor-pointer items-center space-x-2 px-6 py-3`,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&r()},children:[(0,U.jsx)(`div`,{style:{color:t?e?.navbar_text_color:`#a1a1aa`},children:(0,U.jsx)(s,{className:`h-4 w-4`})}),(0,U.jsx)(P,{as:`span`,className:``,color:t?e?.navbar_text_color:`#a1a1aa`,weight:`medium`,fontFamilyv2:e.navbar_font_family,size:`sm`,children:o})]})}):null};function or(){let e=/android/i.test(window.navigator.userAgent),t=`standalone`in window.navigator&&window.navigator.standalone||window.matchMedia(`(display-mode: standalone)`).matches;return e&&!t}function sr(){let e=/iphone|ipad|ipod/i.test(window.navigator.userAgent),t=/macintosh/i.test(window.navigator.userAgent)&&navigator.maxTouchPoints>2,n=`standalone`in window.navigator&&window.navigator.standalone;return(e||t)&&!n}function cr(){document.dispatchEvent(new CustomEvent(`beehiiv:showInstallPrompt`))}var lr=({className:e})=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,className:e,children:(0,U.jsx)(`path`,{fill:`currentColor`,d:`M7 23q-.825 0-1.412-.587T5 21V3q0-.825.588-1.412T7 1h7v5H7v12h10v-2h2v5q0 .825-.587 1.413T17 23zm11-9l-5-5l1.4-1.4l2.6 2.6V3h2v7.2l2.6-2.6L23 9z`})}),ur=()=>{let{webTheme:e}=F(),t=or(),n=sr(),r=t||n,i=R(),a=W(),{t:o}=u(),s=lr,c=o(`nav.install.label`);return r&&a!==`standalone`?(0,U.jsx)(B.Item,{children:(0,U.jsxs)(`div`,{className:`flex items-center px-6 py-3 space-x-2 cursor-pointer`,onClick:()=>{if(!i){k.error(o(`nav.install.not_logged_in`));return}cr()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&cr()},children:[(0,U.jsx)(`div`,{style:{color:i?e?.navbar_text_color:`#a1a1aa`},children:(0,U.jsx)(s,{className:`w-4 h-4`})}),(0,U.jsx)(P,{as:`span`,className:``,color:i?e?.navbar_text_color:`#a1a1aa`,weight:`medium`,fontFamilyv2:e.navbar_font_family,size:`sm`,children:c})]})}):null},dr=({children:e,defaultOpen:t=!1,titleChildren:n,className:r,onClick:i,iconColor:a})=>(0,U.jsx)(He,{defaultOpen:t,children:({open:t})=>(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsxs)(He.Button,{onClick:i,className:(0,H.default)(`flex justify-between space-x-4`,r),children:[(0,U.jsx)(`div`,{children:n}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`div`,{className:`rounded-sm bg-transparent p-1 hover:bg-gray-50/10`,style:{color:a},children:(0,U.jsx)(on,{className:(0,H.default)(`transition-50 h-4 w-4 transition-transform`,t?`rotate-0`:`rotate-180 transform`)})})})]}),(0,U.jsx)(He.Panel,{children:e})]})}),fr=({navGroup:e,children:t})=>{let{webTheme:n}=F();return(0,U.jsx)(dr,{className:`py-2 pl-6 pr-4`,iconColor:n.navbar_text_color,titleChildren:(0,U.jsx)(`div`,{className:`flex items-center pt-0.5`,children:(0,U.jsx)(P,{as:`span`,className:``,color:n.navbar_text_color,weight:`medium`,fontFamilyv2:n.navbar_font_family,size:`sm`,children:e.title})}),children:(0,U.jsx)(`div`,{className:`pl-4`,children:t})})},pr=({publication:e})=>{let t=e.web_template,n=e.content_tags,r=t.enable_customize_category_ids,i=t.category_ids;return(0,U.jsx)(`div`,{className:``,children:t.nav_groups.length>0&&t.nav_groups.map(e=>{if(e.is_category_group)return(0,U.jsx)(fr,{navGroup:e,children:n?.map(e=>r&&!i.includes(e.id)?null:(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{link:{href:`/t/${Ue(e.display)}`,type:`internal`},text:e.display})},e.id))},e.id);if(e.nav_links.length===0)return null;if(e.nav_links.length===1){let t=e.nav_links[0].external_link;return(0,U.jsx)(Z,{text:e.nav_links[0].cta_text,link:{href:t?e.nav_links[0].href:`/c/${e.nav_links[0].href}`,type:e.nav_links[0].external_link?`external`:`internal`}},e.id)}return(0,U.jsx)(fr,{navGroup:e,children:e.nav_links.map(e=>{let t=e.external_link;return(0,U.jsx)(Z,{text:e.cta_text,link:{href:t?e.href:`/c/${e.href}`,type:t?`external`:`internal`}},e.id)})},e.id)})})},mr=({theme:e,dropdownDirection:t=`right`,publication:n})=>{let{subscription:r}=b(`root`),{t:i}=u(),{handleOpenModal:a}=pe(),o=Ge(),s=!!r,{web_template:c,premium_enabled:l,has_referral_program:d}=n,f=c?.author_ids?.length>=1,p=c?.multi_pub_ids?.length>
82=1,m=r?.tier===`premium`,h=l,g=d,_=r?.id,v=r?.avatar_url;return(0,U.jsxs)(wn,{direction:t,className:`z-50 sm:w-[300px]`,style:{background:e?.navbar_background_color||`#fff`,width:o?`calc(100vw - 32px)`:void 0},buttonChild:(0,U.jsx)(`div`,{className:`mt-1.5 rounded hover:bg-black/5`,style:{color:e?.navbar_text_color||`#000`},children:v?(0,U.jsx)(`div`,{className:`h-6 w-6 overflow-hidden rounded-full`,children:(0,U.jsx)(`img`,{className:`h-6 w-6 rounded-full`,src:v,alt:`The logged in user`})}):(0,U.jsx)(kt,{className:`h-6 w-6`})}),children:[(0,U.jsx)(pr,{publication:n}),(0,U.jsxs)(`div`,{children:[h&&!m&&(0,U.jsx)(U.Fragment,{children:n.web_template.external_upgrade_page_href?(0,U.jsx)(Z,{text:`Upgrade`,link:{href:n.web_template.external_upgrade_page_href,type:`external`},Icon:ye}):(0,U.jsx)(Z,{text:`Upgrade`,link:{href:`/upgrade`,type:`internal`},Icon:ye})}),p&&(0,U.jsx)(Z,{text:`Newsletters`,link:{href:`/publications`,type:`internal`},Icon:$t}),f&&(0,U.jsx)(Z,{text:i(`author.authors`),Icon:tn,link:{href:`/authors`,type:`internal`}}),s&&(0,U.jsx)(Z,{text:i(`nav.links.manage`),link:{href:`/subscribe/${_}/manage`,type:`internal`},Icon:Zt}),g&&_&&(0,U.jsx)(Z,{text:i(`nav.links.referrals`),link:{href:`/subscribe/${_}/referrals`,type:`internal`},Icon:rn}),c?.pwa_enabled&&(0,U.jsx)(ur,{}),c?.pwa_enabled&&(0,U.jsx)(ar,{})]}),s?(0,U.jsx)(`div`,{className:`flex w-full flex-col p-2`,children:(0,U.jsx)(C,{method:`post`,action:`/logout`,children:(0,U.jsx)(z,{variant:`ghost`,type:`submit`,style:{background:e.navbar_button_secondary_background_color,borderColor:e.navbar_button_secondary_border_color,color:e.navbar_button_secondary_text_color,fontFamily:e.font_button,fontWeight:500,width:`100%`},children:i(`shared.cta.logout`)})})}):(0,U.jsxs)(`div`,{className:`flex flex-col space-y-2 p-2`,children:[(0,U.jsx)(B.Item,{children:(0,U.jsx)(z,{variant:`ghost`,onClick:()=>{a(`login`)},style:{background:e.navbar_button_secondary_background_color,borderColor:e.navbar_button_secondary_border_color,color:e.navbar_button_secondary_text_color,fontFamily:e.font_button,fontWeight:500},children:i(`shared.cta.login`)})}),(0,U.jsx)(B.Item,{children:(0,U.jsx)(z,{variant:`primary`,onClick:()=>{a(`signup`)},style:{background:e.navbar_button_primary_background_color,border:`1px solid ${e.navbar_button_primary_background_color}`,color:e.navbar_button_primary_text_color,fontFamily:e.font_button,fontWeight:500},children:n.cta_text})})]})]})},Q=(e,t)=>e||t,$=({ctaText:e,showActions:t,hideDropdown:n=!1,publication:r})=>{let{webTheme:i}=F(),a=r.web_template?.notifications_enabled,o=Ge(),{navbar_button_primary_background_color:s,color_primary:c,navbar_button_primary_text_color:l,navbar_button_primary_border_color:d,navbar_button_secondary_border_color:f,color_text_on_primary:p,navbar_button_secondary_background_color:m,color_secondary:h,navbar_button_secondary_text_color:g,color_text_on_secondary:_,color_border:v,navbar_button_primary_shadow:y,navbar_button_secondary_shadow:b,navbar_login_button_desktop_enabled:x,font_button:S}=i,C=Q(s,c),w=Q(l,p),T=Q(m,h),E=Q(g,_),D=Q(d,c),O=Q(f,v),k=se[y||`none`],A=se[b||`none`],{t:ee}=u(),{handleOpenModal:te}=pe();return(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[t?(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[x&&(0,U.jsx)(z,{style:{background:T,border:`1px solid ${O}`,color:E,fontFamily:S},variant:`ghost`,onClick:()=>{te(`login`)},className:(0,H.default)(`!text-sm !font-semibold`,A),children:ee(`shared.cta.login`)}),(0,U.jsx)(z,{linkProps:{to:`/subscribe`,prefetch:`intent`},style:{background:C,border:`1px solid ${D}`,color:w,fontFamily:S},variant:`primary`,className:(0,H.default)(`whitespace-nowrap !text-sm !font-semibold`,k),children:e}),a&&(0,U.jsx)(nr,{})]}):(0,U.jsx)(`div`,{className:`flex items-center`,children:a&&(0,U.jsx)(nr,{})}),!n&&(0,U.jsx)(mr,{dropdownDirection:o?`center`:`right`,theme:i,publication:r})]})},hr=({publication:e,showActions:t,theme:n})=>(0,U.jsx)(N,{as:`nav`,className:`w-full py-2`,style:{backgroundColor:n?.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex items-center justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,U.jsx)(Y,{fontFamily:n.navbar_font_family,url:e.logo.thumb.url,name:e.name,textColor:n.navbar_text_color}),(0,U.jsx)(X,{publication:e,theme:n})]}),(0,U.jsx)($,{ctaText:e.cta_text,showActions:t,publication:e})]})}),gr=({publication:e,isLoggedIn:t,subscription:n,isAdminLoggedIn:r,showActions:i,theme:a})=>(0,U.jsx)(N,{as:`nav`,className:`w-full py-2`,style:{backgroundColor:a.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex items-center justify-between`,children:[(0,U.jsx)(Y,{url:e.logo.thumb.url,name:e.name,textColor:a.navbar_text_color,fontFamily:a.navbar_font_family}),(0,U.jsx)(X,{publication:e,theme:a}),(0,U.jsx)($,{ctaText:e.cta_text,showActions:i,publication:e})]})}),_r=({publication:e,isLoggedIn:t,subscription:n,isAdminLoggedIn:r,showActions:i,theme:a})=>(0,U.jsx)(N,{as:`nav`,className:`w-full py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex justify-between`,children:[(0,U.jsx)(Y,{url:e.logo.thumb.url,name:e.name,textColor:a.navbar_text_color,fontFamily:a.navbar_font_family}),(0,U.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,U.jsx)(X,{publication:e,theme:a}),(0,U.jsx)($,{ctaText:e.cta_text,showActions:i,publication:e})]})]})}),vr=({publication:e,isLoggedIn:t,subscription:n,isAdminLoggedIn:r,showActions:i,theme:a})=>(0,U.jsx)(N,{as:`nav`,className:`w-full py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex justify-between`,children:[(0,U.jsx)(X,{publication:e,theme:a}),(0,U.jsx)(Y,{url:e.logo.thumb.url,name:e.name,textColor:a.navbar_text_color,fontFamily:a.navbar_font_family}),(0,U.jsx)($,{ctaText:e.cta_text,showActions:i,publication:e})]})}),yr=({color:e})=>(0,U.jsx)(`div`,{className:`h-[1px] w-full opacity-5`,style:{backgroundColor:e}}),br=({publication:e,isLoggedIn:t,subscription:n,isAdminLoggedIn:r,showActions:i,theme:a})=>(0,U.jsxs)(`div`,{className:`w-full`,children:[(0,U.jsx)(N,{as:`nav`,className:`py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex justify-between`,children:[(0,U.jsx)(Y,{url:e.logo.thumb.url,name:e.name,textColor:a.navbar_text_color,fontFamily:a.navbar_font_family}),(0,U.jsx)($,{ctaText:e.cta_text,showActions:i,publication:e})]})}),(0,U.jsx)(yr,{color:a?.navbar_text_color}),(0,U.jsx)(N,{as:`nav`,className:`py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsx)(`div`,{className:`mx-auto flex justify-center`,children:(0,U.jsx)(X,{publication:e,theme:a})})})]}),xr=({publication:e,isLoggedIn:t,subscription:n,isAdminLoggedIn:r,showActions:i,theme:a})=>(0,U.jsxs)(`div`,{className:`w-full`,children:[(0,U.jsx)(N,{as:`nav`,className:`py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsxs)(`div`,{className:`mx-auto flex items-center justify-between`,children:[(0,U.jsx)(`div`,{className:`w-1/3`,children:(0,U.jsx)(mr,{theme:a,dropdownDirection:`left`,publication:e})}),(0,U.jsx)(`div`,{className:`mx-auto flex w-1/3 justify-center`,children:(0,U.jsx)(Y,{url:e.logo.thumb.url,name:e.name,textColor:a.navbar_text_color,fontFamily:a.navbar_font_family})}),(0,U.jsx)(`div`,{className:`flex w-1/3 justify-end`,children:(0,U.jsx)($,{hideDropdown:!0,ctaText:e.cta_text,showActions:i,publication:e})})]})}),(0,U.jsx)(yr,{color:a?.navbar_text_color}),(0,U.jsx)(N,{as:`nav`,className:`py-2`,style:{backgroundColor:a?.navbar_background_color},children:(0,U.jsx)(`div`,{className:`mx-auto flex justify-center`,children:(0,U.jsx)(X,{publication:e,theme:a})})})]}),Sr=e=>!e||![`template-1`,`template-2`,`template-3`,`template-4`,`template-5`,`template-6`].includes(e)?`template-1`:e,Cr=({publication:e,subscription:t,isAdminLoggedIn:n,isLoggedin:r})=>{let{webTheme:i}=F(),a=Sr(i?.navbar_template),o=!r&&!e.private,s={"template-1":hr,"template-2":gr,"template-3":_r,"template-4":vr,"template-5":br,"template-6":xr}[a];return(0,U.jsx)(s,{publication:e,isLoggedIn:r,subscription:t,isAdminLoggedIn:n,showActions:o,theme:i})},wr=({showLoggedInToast:e})=>{let[t,n]=f(),r=t.get(`subscription`),i=t.get(`opt_in_email`),a=t.get(`logout`),{t:o}=u();(0,V.useEffect)(()=>{r&&(r===`success`?O.success(o(`notifications.subscribe.success`)):r===`error`&&O.error(o(`notifications.subscribe.error`)),t.delete(`subscription`),n(t))},[r,t,n,o]),(0,V.useEffect)(()=>{a&&(a===`success`&&O.success(o(`notifications.logout.success`)),t.delete(`logout`),n(t))},[a,t,n,o]),(0,V.useEffect)(()=>{i&&i===`error`&&(O.success(o(`notifications.optin.error`)),t.delete(`opt_in_email`),n(t))},[i,t,n,o]),(0,V.useEffect)(()=>{e&&O.success(o(`login.success.title`))},[e,o])},Tr=()=>{let{pathname:e}=c(),[t]=f(),[n,r]=(0,V.useState)(!1),i=e===`/`,a=e.startsWith(`/p/`),o=e.startsWith(`/c/`),s=e.startsWith(`/t/`)||o||i||a,l=e===`/landing_page`,u=e===`/login`||e===`/login-otp`,d=e===`/create_password`,p=e===`/reset_password`,m=e===`/update_password`,h=e.startsWith(`/forms`)&&t.has(`preview`),g=e.startsWith(`/subscribe`)&&!e.includes(`/manage`)&&!e.includes(`/billing`)&&!e.includes(`/preferences`)&&!e.includes(`/referrals`),_=e===`/test_home_page`,v=e===`/recommendations`,y=e.startsWith(`/polls`),b=l||u||d||p||m||g||e===`/upgrade`||v||y||h||n||_,x=e.startsWith(`/forms`),S=e===`/upgrade`,C=e.startsWith(`/subscribe`)&&e.endsWith(`/manage`),w=e.startsWith(`/subscribe`)&&e.endsWith(`/billing`),T=e.startsWith(`/subscribe`)&&e.endsWith(`/preferences`),E=e.startsWith(`/subscribe`)&&e.endsWith(`/referrals`),D=S||C||w||T||x||e===`/publications`||e===`/publications/`||E;return(0,V.useEffect)(()=>{try{r(!!localStorage?.getItem(we.SIGNUP_REDIRECTS))}catch{r(!1)}},[e]),s?{isNavShowing:!0,isFooterShowing:!0}:b?{isNavShowing:!1,isFooterShowing:!1}:D?{isNavShowing:!0,isFooterShowing:!1}:{isNavShowing:!0,isFooterShowing:!0}},Er=(0,V.createContext)(void 0),Dr=({children:e,analyticsProps:t})=>{let n=re(t);return(0,U.jsx)(Er.Provider,{value:n,children:e})},Or=({cookies:e,setCookie:t,removeCookie:n,cookiesSet:r,children:i,visitToken:a,referralId:o,currentPath:s,postId:c})=>(0,U.jsx)(Se.Provider,{value:{cookies:e,setCookie:t,removeCookie:n,cookiesSet:r,visitToken:a,referralId:o,currentPath:s,postId:c},children:(0,U.jsx)(`div`,{className:`flex min-h-screen flex-col`,children:i})});function kr(e){(0,V.useEffect)(()=>
82{if(typeof window>`u`)return;let t=async()=>{if(`serviceWorker`in navigator)try{let t=await navigator.serviceWorker.getRegistration();t?.active&&t.active.postMessage({type:`update_icon`,payload:{icon:e?.icon}})}catch(e){console.error(`Error getting service worker registration:`,e)}},n=()=>{t()};return`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`controllerchange`,n),t(),()=>{`serviceWorker`in navigator&&navigator.serviceWorker.removeEventListener(`controllerchange`,n)}},[e?.icon])}var Ar=e=>{let[t,n]=f(),r=t.get(e);(0,V.useEffect)(()=>{r&&(t.delete(e),n(t,{replace:!0}))},[e])},jr=()=>{let[e,t]=f(),n=e.get(`submission_error`),r=e.get(`submission_success`);(0,V.useEffect)(()=>{n&&(k.error(`There was an error submitting the form. Please reload the page and try again.`),e.delete(`submission_error`),t(e,{replace:!0})),r&&(k.success(`Success`),e.delete(`submission_success`),t(e,{replace:!0}))},[n,r])},Mr=()=>{let[e,t]=f(),n=e.get(`toast`),r=e.get(`message`),i=e.get(`title`),a=e.get(`toastId`);(0,V.useEffect)(()=>{if(n&&r){let o=`${i?`${i}\n`:``}${r}`,s=Ee({id:a||void 0},e=>e!==void 0);n===`success`?k.success(o,s):k.error(o,s),e.delete(`toast`),e.delete(`message`),e.delete(`title`),e.delete(`toastId`),t(e,{replace:!0})}},[n,r,i,a,e,t])},Nr=({language:e,setCookie:t})=>{let{i18n:n}=u();(0,V.useEffect)(()=>{n.changeLanguage(e),t({name:`language`,value:e,days:30})},[n,e])},Pr=({tier:e,isLoggedIn:t})=>{let[n]=f(),r=n.get(`status`)===`subscribed`,i=t||r,a=n.get(`upgraded`)===`true`;return{isLoggedInOrSubscribed:i,isPremiumSubscription:e===`premium`||a}},Fr=({justLoggedIn:e,setCookie:t})=>{let[n,r]=(0,V.useState)(!1),i=v(),{t:a}=u(),o=c(),s=()=>{t({name:`admin_logged_in`,value:`true`,days:0});let e=new FormData;e.append(`logout_admin`,`true`),e.append(`pathname`,o.pathname),i(e,{method:`post`,action:`/logout`})};return(0,V.useEffect)(()=>{e&&(k.success(a(`login.success.admin`)),t({name:`admin_logged_in`,value:`true`,days:4}))},[e,t]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,onClick:()=>r(!0),className:`pointer-events-auto fixed right-3 top-14 z-40 flex rounded-lg bg-white p-2 shadow-xl ring-1 ring-black ring-opacity-5 lg:right-4`,children:(0,U.jsx)(_e,{className:`h-4 w-4 text-wt-primary`})}),(0,U.jsx)(ve,{title:`${a(`admin.modal.title`)}`,description:`${a(`admin.modal.description`)}`,isOpen:n,onClose:()=>r(!1),children:(0,U.jsxs)(`div`,{className:`flex w-full justify-end space-x-2`,children:[(0,U.jsx)(z,{type:`button`,variant:`ghost`,className:`shadow-none`,onClick:()=>{s(),r(!1)},children:a(`shared.cta.logout`)}),(0,U.jsx)(z,{type:`button`,variant:`primary`,onClick:()=>r(!1),children:a(`shared.cta.continue`)})]})})]})},Ir=()=>{let e=(0,V.useContext)(Er);if(!e)throw Error(`useNectarAnalyticsContext must be used within a NectarAnalyticsProvider`);return e},Lr=e=>{let t=e.tagName.toLowerCase();if(t===`input`){let t=e.getAttribute(`type`);return t===`submit`?`submit`:t===`button`?`button`:t===`checkbox`?`checkbox`:t===`radio`?`radio`:`input`}if(t===`a`){let t=e.getAttribute(`href`);if(t){if(t.startsWith(`mailto:`))return`email`;if(t.startsWith(`tel:`))return`phone`}return`link`}let n=e.closest(`a`);if(n){let e=n.getAttribute(`href`);if(e){if(e.startsWith(`mailto:`))return`email`;if(e.startsWith(`tel:`))return`phone`}return`link`}return t===`button`?`button`:t===`select`?`select`:t===`textarea`||t===`label`?`input`:t===`summary`?`summary`:t===`img`?`img`:t===`span`?`span`:t===`svg`?`svg`:t===`p`?`p`:t===`h1`?`h1`:t===`h2`?`h2`:t===`h3`?`h3`:t===`h4`?`h4`:t===`h5`?`h5`:t===`h6`?`h6`:t===`div`?`div`:t===`section`?`section`:t===`article`?`article`:t===`header`?`header`:t===`footer`?`footer`:t===`nav`?`nav`:t===`main`?`main`:t===`aside`?`aside`:t===`body`?`body`:t===`form`?`form`:t===`fieldset`?`fieldset`:t===`legend`?`legend`:t===`ul`?`ul`:t===`ol`?`ol`:t===`li`?`li`:t===`table`?`table`:t===`tr`?`tr`:t===`td`?`td`:t===`th`?`th`:t===`body`?`body`:t===`html`?`html`:t===`u`?`u`:t===`strong`?`strong`:t===`b`?`b`:t===`em`?`em`:t===`i`?`i`:t===`path`?`path`:`unknown`},Rr=(e,t)=>{let n=e.getAttribute(t);if(n){if(n.startsWith(`/`))return window.location.origin+n;
82if(n.startsWith(`#`))return window.location.href+n;if(n.startsWith(`http`))return n}},zr=e=>{if(e.tagName.toLowerCase()===`a`)return Rr(e,`href`);let t=e.closest(`a`);if(t)return Rr(t,`href`);if(e.tagName.toLowerCase()===`form`)return Rr(e,`action`)},Br=()=>{let e=Ir(),t=(0,V.useCallback)(t=>{let n=t.target;if(!n)return;let r=Lr(n),i=zr(n),a=n.tagName.toLowerCase();e.trackClick({clickType:r,clickUrl:i,clickRawTagName:a})},[e]);(0,V.useEffect)(()=>(document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`click`,t,!0)}),[t])},Vr=()=>{let e=c(),t=i(),n=(0,V.useRef)(``),r=Ir();(0,V.useEffect)(()=>{e.pathname!==n.current&&t.state===`idle`&&(r.trackPageView(),n.current=e.pathname)},[e.pathname,t.state,r]),(0,V.useEffect)(()=>{r.trackPageView(),n.current=e.pathname},[r,e.pathname])},Hr=()=>(Vr(),Br(),null),Ur=({value:e,selectedCookies:t,setSelectedCookies:n,disabled:r})=>{let{t:i}=u();return(0,U.jsxs)(`button`,{type:`button`,onClick:()=>{t.includes(e)?n(t.filter(t=>t!==e)):n([...t,e])},className:`flex flex-row space-x-2 ${r&&`opacity-40`}`,disabled:r,children:[(0,U.jsx)(`div`,{className:`rounded border border-white p-0.5 ${!t.includes(e)&&!r?`hover:bg-gray-800`:`bg-white`}`,children:(0,U.jsx)(ce,{className:`h-4 w-4 text-black`})}),(0,U.jsx)(`p`,{className:`my-auto text-sm font-semibold text-white`,children:i(`cookie_banner.cookies.${e.toLowerCase().replace(/ /g,`_`)}`)})]})},Wr=({publication:e,cookies:t,setCookie:n,ga4ConsentModeEnabled:r})=>{let{t:i}=u(),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)([`Marketing Cookies`,`Data Processor Cookies`]),[l,d]=(0,V.useState)(!1),f=(0,V.useRef)(null),p=e=>{n({name:`beehiiv_honey`,value:JSON.stringify(e),days:1e3}),r&&gt(e.marketing),o(!1)};(0,V.useEffect)(()=>{let n=e.enable_cookie_banner&&!t.beehiiv_honey;o(n);let r=setTimeout(()=>{n&&f.current&&f.current.classList.add(`!opacity-100`,`!translate-y-[0%]`)},1e3);return()=>clearTimeout(r)},[t,e.enable_cookie_banner]);let m=e=>{e.preventDefault();let t=e.currentTarget.value,n={marketing:!1,dataProcessing:!1};t===`customize`&&d(!0),t===`back`&&d(!1),t===`decline`&&(n.marketing=!1,n.dataProcessing=!1,p(n)),t===`accept`&&(n.marketing=!0,n.dataProcessing=!0,p(n)),t===`allow-selection`&&(n.marketing=s.includes(`Marketing Cookies`),n.dataProcessing=s.includes(`Data Processor Cookies`),p(n))};return a?(0,U.jsxs)(`div`,{ref:f,className:`fixed bottom-0 left-0 z-50 w-full -translate-y-[100%] bg-black p-4 opacity-0 transition-all duration-500 md:bottom-4 md:left-4 md:w-96 md:rounded-lg`,children:[l?(0,U.jsxs)(`div`,{className:`flex w-full flex-col space-y-1`,children:[(0,U.jsx)(`p`,{className:`text-lg font-bold text-white`,children:i(`cookie_banner.customize_title`)}),(0,U.jsxs)(`p`,{className:`text-sm text-white`,children:[i(`cookie_banner.customize_description`),` `,(0,U.jsx)(`a`,{href:`https://www.beehiiv.com/tou`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:i(`footer.terms_of_use`)}),` `,i(`cookie_banner.for_more_info`),`.`]}),(0,U.jsxs)(`div`,{className:`mt-4 flex flex-col space-y-3`,children:[(0,U.jsx)(Ur,{value:`Necessary Cookies`,selectedCookies:s,setSelectedCookies:c,disabled:!0}),(0,U.jsx)(Ur,{value:`Marketing Cookies`,selectedCookies:s,setSelectedCookies:c,disabled:!1}),(0,U.jsx)(Ur,{value:`Data Processor Cookies`,selectedCookies:s,setSelectedCookies:c,disabled:!1})]})]}):(0,U.jsxs)(`div`,{className:`flex w-full flex-col space-y-1`,children:[(0,U.jsx)(`p`,{className:`font-bold text-white`,children:i(`cookie_banner.title`)}),(0,U.jsxs)(`p`,{className:`text-sm text-white`,children:[i(`cookie_banner.read`),` `,(0,U.jsx)(`a`,{href:`https://www.beehiiv.com/privacy`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:i(`footer.privacy_policy`)}),` `,i(`shared.cta.and`),` `,(0,U.jsx)(`a`,{href:`https://www.beehiiv.com/tou`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:i(`footer.terms_of_use`)}),` `,i(`cookie_banner.for_more_info`),`.`]})]}),l?(0,U.jsxs)(`div`,{className:`mt-3 flex gap-1.5`,children:[(0,U.jsx)(`button`,{type:`button`,onClick:m,value:`back`,className:`flex-1 rounded-sm border border-white p-2 px-4 text-sm text-white`,children:i(`cookie_banner.actions.back`)}),(0,U.jsx)(`button`,{type:`button`,value:`allow-selection`,className:`flex-1 rounded-sm border border-white p-2 px-4 text-sm text-white`,onClick:m,children:i(`cookie_banner.actions.allow_selection`)})]}):(0,U.jsxs)(`div`,{className:`mt-3 flex gap-1.5`,children:[(0,U.jsx)(`button`,{type:`button`,className:`flex-1 rounded-sm border border-white p-2 px-4 text-sm text-white`,onClick:m,value:`accept`,children:i(`cookie_banner.actions.accept`)}),(0,U.jsx)(`button`,{type:`button`,value:`customize`,className:`flex-1 rounded-sm border border-white p-2 px-4 text-sm text-white`,onClick:m,children:i(`cookie_banner.actions.customize`)}),(0,U.jsx)(`button`,{type:`button`,className:`flex-1 rounded-sm border border-white p-2 px-4 text-sm text-white`,onClick:m,value:`decline`,children:i(`cookie_banner.actions.decline`)})]})]}):null},Gr=({publication:e,signupWidgetConfigs:t})=>{let{isLoginModalOpen:n,isSignupModalOpen:r,handleCloseModal:i}=pe(),{t:a}=u();return(0,U.jsxs)(`div`,{children:[n&&(0,U.jsx)(fe,{isOpen:n,handleCloseModal:i,publication:e}),r&&(0,U.jsx)(he,{title:`${a(`subscribe.modal_header`)} ${e?.name||``}`,description:e?.description||``,publication:e,isOpen:r,onClose:i,alternativeAction:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{className:`opacity-75`,children:[a(`login.already_a_subscriber`),` `]}),(0,U.jsx)(y,{to:`/login`,className:`inline-flex justify-center underline`,children:a(`meta.titles.login`)})]}),children:(0,U.jsx)(ne,{signupStyles:t})})]})},Kr=({debug:e=!1})=>(0,U.jsx)(te,{children:()=>(0,U.jsx)(qr,{debug:e})});function qr({debug:e=!1}){let t=R(),n=W(),{onEnable:r}=ir(),{publication:i}=b(`root`)??{},{t:a}=u(),[o,s]=Jr(),[c,l]=(0,V.useState)(!o&&t);async function d(){l(!1),await r(),s(!0)}function f(){k(a(`pwa.enable_push_notification_prompt.enable_push_notifications_from_menu`),{icon:`ℹ️`}),l(!1),s(!0)}return o||n!==`standalone`||!t||!c?null:(0,U.jsx)(`div`,{className:`fixed inset-0 z-50 bg-[rgba(0,0,0,0.5)]`,children:(0,U.jsx)(`div`,{className:`absolute top-0 w-full rounded-b-xl border bg-white p-6 text-gray-950`,children:(0,U.jsxs)(`div`,{className:`flex gap-6`,children:[(0,U.jsx)(`img`,{src:i.logo.thumb.url,alt:i.name,className:`h-16 w-16 flex-none overflow-clip rounded-lg`}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(`p`,{children:a(`pwa.enable_push_notification_prompt.enable_push_notifications_from_menu`)}
82),(0,U.jsxs)(`div`,{className:`flex justify-end gap-4`,children:[(0,U.jsx)(z,{type:`button`,variant:`ghost`,onClick:f,children:a(`pwa.enable_push_notification_prompt.maybe_later`)}),(0,U.jsx)(z,{type:`button`,variant:`primary`,onClick:d,children:a(`pwa.enable_push_notification_prompt.enable`)})]})]})]})})})}function Jr(){let e=!1;typeof document<`u`&&(e=localStorage.getItem(`enablePushNotificationPromptShown`)===`true`);let[t,n]=(0,V.useState)(e);return[t,e=>{localStorage.setItem(`enablePushNotificationPromptShown`,String(e)),n(e)}]}var Yr=({className:e})=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,className:e,children:(0,U.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:32,d:`M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40m160-64l-80-80l-80 80m80 193V48`})}),Xr=({debug:e=!1})=>(0,U.jsx)(te,{children:()=>(0,U.jsx)(Zr,{debug:e})});function Zr({debug:e=!1}){let t=c().pathname===`/`,n=or(),r=sr(),i=n||r,a=R(),o=W(),s=o===`standalone`||o===`fullscreen`,{publication:l}=b(`root`)??{},[d,f]=Qr(),[p,m]=(0,V.useState)(t&&!d&&s&&i&&a),{t:h}=u(),g=window.__DeferredPrompt__;function _(){g&&(f(!0),g.prompt(),g.userChoice.then(e=>{e.outcome===`accepted`&&console.log(`Installing app`),m(!1)}))}function v(){k.success(h(`pwa.install_prompt.install_success`))}return(0,V.useEffect)(()=>(window.addEventListener(`appinstalled`,v),()=>{window.removeEventListener(`appinstalled`,v)}),[]),(0,V.useEffect)(()=>{function e(e){e.preventDefault(),m(!0),f(!0)}return document.addEventListener(`beehiiv:showInstallPrompt`,e),()=>{document.removeEventListener(`beehiiv:showInstallPrompt`,e)}},[d,f,p]),!e&&!n&&!r||!p?null:(0,U.jsx)(`div`,{className:`fixed inset-0 z-50 bg-[rgba(0,0,0,0.5)]`,children:(0,U.jsxs)(`div`,{className:`absolute bottom-0 w-full p-6 bg-white border rounded-t-xl text-gray-950`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,onClick:()=>{m(!1),f(!0)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(m(!1),f(!0))},children:[(0,U.jsx)(`h1`,{className:`text-2xl font-bold`,children:h(`pwa.install_prompt.install_prompt`)}),(0,U.jsx)(`div`,{children:(0,U.jsx)(be,{className:`w-6 h-6`})})]}),(0,U.jsxs)(`div`,{className:`flex gap-4 p-4 mt-6 bg-gray-100 border border-gray-200 rounded`,children:[(0,U.jsx)(`img`,{src:l.logo.thumb.url,alt:l.name,className:`w-16 h-16 rounded-lg overflow-clip`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold`,children:l.name}),(0,U.jsx)(`p`,{children:l.configured_domain})]})]}),n&&(0,U.jsxs)(`div`,{className:`flex flex-col items-center mx-6 my-8`,children:[(0,U.jsx)(z,{type:`button`,variant:`primary`,onClick:_,children:h(`pwa.install_prompt.install_cta`)}),(0,U.jsx)(`p`,{className:`mt-4`,children:h(`pwa.install_prompt.install_sub_cta`)})]}),r&&(0,U.jsxs)(`ol`,{className:`mx-6 mt-4 mb-4 space-y-6 list-decimal`,children:[(0,U.jsxs)(`li`,{className:`relative pl-0`,children:[h(`pwa.install_prompt.tap_on`),` `,(0,U.jsx)(`div`,{className:`relative inline-block px-1 py-1 text-blue-400 bg-gray-100 border-gray-200 top-2`,children:(0,U.jsx)(Yr,{className:`w-6 h-6`})}),` `,h(`pwa.install_prompt.in_the_browser`)]}),(0,U.jsxs)(`li`,{className:`pl-0`,children:[h(`pwa.install_prompt.scroll_down`),` `,(0,U.jsx)(`span`,{className:`inline-block px-1 py-1 text-sm font-semibold bg-gray-100 border-gray-200`,children:h(`pwa.install_prompt.add_to_home_screen`)})]}),(0,U.jsxs)(`li`,{className:`pl-0`,children:[h(`pwa.install_prompt.look_for`),` `,(0,U.jsx)(`img`,{src:l.logo.thumb.url,alt:l.name,className:`inline-block w-6 h-6 rounded-lg overflow-clip`}),` `,h(`pwa.install_prompt.icon_on_home_screen`)]})]})]})})}function Qr(){let e=!1;if(typeof document<`u`&&typeof localStorage<`u`)try{e=localStorage.getItem(`pwaPromptShown`)===`true`}catch(e){console.warn(`localStorage access denied:`,e)}let[t,n]=(0,V.useState)(e);return(0,V.useEffect)(()=>(document.addEventListener(`beehiiv:showInstallPrompt`,cr),()=>{document.removeEventListener(`beehiiv:showInstallPrompt`,cr)}),[]),[t,e=>{if(typeof localStorage<`u`)try{localStorage.setItem(`pwaPromptShown`,String(e))}catch(e){console.warn(`localStorage access denied:`,e)}n(e)}]}var $r=()=>{let{t:e}=u();return(0,U.jsx)(`div`,{className:`mx-auto flex min-h-screen w-full items-center justify-center bg-gray-100 px-4 py-24`,children:(0,U.jsx)(`div`,{className:`mx-auto max-w-max`,children:(0,U.jsx)(`main`,{className:`sm:flex`,children:(0,U.jsxs)(`div`,{className:`bg-white p-8 rounded-lg shadow-lg max-w-3xl`,children:[(0,U.jsx)(`h1`,{className:`text-3xl text-center font-extrabold tracking-tight text-gray-900 sm:text-5xl`,children:e(`errors.website_suspended.title`)}),(0,U.jsx)(`p`,{className:`mt-2 mb-2 text-lg text-gray-500 text-center`,children:e(`errors.website_suspended.description`)})]})})})})},ei=()=>[{rel:`preconnect`,href:`https://fonts.googleapis.com`}
82,{rel:`preconnect`,href:`https://fonts.gstatic.com`}],ti={i18n:[`common`]},ni=({data:e})=>{if(e?.publication?.name){let t=e?.publication.tags.map(e=>e.name).join(`, `),n=[`https://fonts.googleapis.com/css2?family=${e?.publication?.web_theme?.header_font.split(` `).join(`+`)}&display=swap`,`https://fonts.googleapis.com/css2?family=${e?.publication?.web_theme?.body_font.split(` `).join(`+`)}&display=swap`,`https://fonts.googleapis.com/css2?family=${e?.publication?.web_theme?.button_font.split(` `).join(`+`)}&display=swap`,...e?.publication?.web_template?.global_fonts],r=[...new Set(n)].map(e=>({tagName:`link`,rel:`stylesheet`,href:e})),i=[{title:e?.publication.name},{keywords:t},{author:e?.publication.email_sender_name},{description:e?.publication.description},{tagName:`link`,rel:`icon`,href:e?.publication?.logo?.thumb?.url,as:`image`},...r];return(e?.publication.noindex_enabled||e?.publication.private)&&i.push({robots:`noindex`}),e?.publication?.rss_feeds?.length&&i.push({tagName:`link`,rel:`alternate`,type:`application/rss+xml`,title:`${e?.publication.name} RSS Feed`,href:e?.publication.rss_feeds[0].url}),i}return[{title:`beehiiv`},{description:`The newsletter platform built for growth.`},{keywords:`Newsletter, Email, Growth, Platform, SaaS, Creator`}]},ri=async({serverLoader:e})=>{let t=await e();if(!t?.publication)throw Error(`RefreshPageError`);return t};ri.hydrate=!0;var ii=T(()=>{let{isLoggedIn:e,subscription:t,admin:n,publication:r,rootStyles:i,isProdEnv:o,webThemev2:s,hasWebBuilderV2:c,currentPath:l,showLoggedInToast:u,isInitialLoadFromSwarm:d,signupWidgetConfigs:f,canShowCookieBanner:p,SENTRY_RELEASE:m}=Ye();tt(),Xe({isInitialLoadFromSwarm:d,publicationId:r.id});let{isLoggedInOrSubscribed:g,isPremiumSubscription:_}=Pr({isLoggedIn:e,tier:t?.tier}),{cookies:v,setCookie:y,cookiesSet:x,removeCookie:S}=Ke({initialCookies:{popup_closed:g,email_capture_disabled:g,[qe]:_}});Nr({language:r?.language,setCookie:y});let C=!!v.visit_token;ee({shouldCreateVisitToken:x&&!C,setCookie:y}),me({setCookie:y,cookiesSet:x}),Ar(`jwt_token`),Ar(`admin_token`),Ar(`status`),Ar(`upgraded`),Ar(`close_draft_preview`),jr(),Mr(),wr({showLoggedInToast:e&&u}),kr({icon:r?.logo?.thumb?.url});let{isNavShowing:w,isFooterShowing:T}=Tr(),{progress:E,redirects:D,currentStep:O}=Je(r),k=W(),ne=b(`routes/p/$slug`)?.post?.id;(0,V.useEffect)(()=>{k===`standalone`&&m!==window.__AppGlobals__?.SENTRY_RELEASE&&(console.log(`Reloading page due to new release. Old release: ${window.__AppGlobals__?.SENTRY_RELEASE}, New release: ${m}`),window.location.reload())},[m,k]);let re={batchSize:r.nectar_analytics_settings.batch_size,batchTimeoutMs:r.nectar_analytics_settings.batch_timeout_ms,pageViewTracking:r.nectar_analytics_settings.page_view_tracking,clickTracking:r.nectar_analytics_settings.click_tracking,ipTracking:r.nectar_analytics_settings.ip_tracking},ie={enabled:r.nectar_analytics_enabled,nectarId:r.nectar_id,publicationId:r.id,postId:ne,subscriptionId:t?.id?Number(t.id):void 0,email:t?.email,settings:re};return h().find(e=>e?.handle?.layout)?.handle?.layout||(0,U.jsx)(G,{publication:r,rootStyles:i,isProdEnv:o,cookies:v,cookiesSet:x,children:(0,U.jsx)(oe,{webTheme:s,isEnabled:c,children:(0,U.jsx)(Dr,{analyticsProps:ie,children:(0,U.jsxs)(Or,{cookies:v,setCookie:y,cookiesSet:x,removeCookie:S,visitToken:v.visit_token,referralId:v.referral_id,currentPath:l,postId:ne,children:[(0,U.jsx)(te,{children:()=>(0,U.jsx)(ft,{publication:r})}),n&&(0,U.jsx)(Fr,{setCookie:y,justLoggedIn:x&&!v.admin_logged_in&&!!n}),(0,U.jsx)(Gr,{publication:r,signupWidgetConfigs:f}),(0,U.jsx)(A,{position:`top-center`}),(0,U.jsx)(Hr,{}),p?(0,U.jsx)(Wr,{publication:r,cookies:v,setCookie:y,ga4ConsentModeEnabled:!!(r.ga4_consent_mode_enabled&&r.google_analytics_4_pixel)}):null,r.website_suspended?null:(0,U.jsx)(U.Fragment,{children:w&&!E?c?(0,U.jsx)(Cr,{publication:r,subscription:t,isLoggedin:e,isAdminLoggedIn:!!n}):(0,U.jsx)(Ln,{publication:r,isLoggedIn:e,subscription:t}):(0,U.jsx)(U.Fragment,{})}),E?(0,U.jsx)(Rn,{progress:E,redirects:D,currentStep:O,publication:r}):null,(0,U.jsx)(ze,{noLayout:!w&&!T,children:(0,U.jsx)(a,{context:{publicationId:r?.id,cookies:v,setCookie:y,cookiesSet:x,removeCookie:S,visitToken:v.visit_token,referralId:v.referral_id,admin:n,isLoggedIn:e}})}),r.website_suspended?null:(0,U.jsx)(U.Fragment,{children:T?c?(0,U.jsx)(gn,{}):(0,U.jsx)(Sn,{publication:r,subscription:t}):(0,U.jsx)(U.Fragment,{})}),r?.web_template?.pwa_enabled&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Xr,{}),(0,U.jsx)(Kr,{})]})]})})})})});function ai(){let e=l();if((0,V.useEffect)(()=>{n(e)||w(e,{tags:{keyword:`remix-error-boundary`}})},[e]),n(e))switch(e.status){case 400:return(0,U.jsx)(G,{children:(0,U.jsx)(M,{errorCode:`400`,publicationPresent:!1})});case 410:return(0,U.jsx)(G,{children:(0,U.jsx)($r,{})});case 404:return(0,U.jsx)(G,{children:e.data===`DirectLinkExpired`?(0,U.jsx)(M,{customTitle:`Uh oh, it looks like this link is expired.`,customDescription:(0,U.jsx)(U.Fragment,{children:`The Publication needs to update a few things on their end to resume.`}),errorCode:`404`,publicationPresent:!1}):(0,U.jsx)(M,{errorCode:`404`,publicationPresent:!1})});default:return(0,U.jsx)(G,{children:(0,U.jsx)(M,{errorCode:`${e.status}`,error:e})})}let t=`0`;if(e instanceof Error){let n=e.message??``;if(n.startsWith(`{`))try{let e=JSON.parse(n);t=e.status??`0`,n=e.message??``}catch{}}return(0,U.jsx)(G,{title:`Error!`,children:(0,U.jsx)(M,{errorCode:t,error:e})})}var oi=Ze;export{ai as ErrorBoundary,ri as clientLoader,ii as default,ti as handle,ei as links,ni as meta,oi as shouldRevalidate};
83//# sourceMappingURL=root-DvKA6D3I.js.map
84//# debugId=826a98d7-2427-5c8e-abed-38a8bf56b38d

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.