1import{r as g,j as e}from"../chunks/vendor-react-DdEP1kCQ.js";import{r as q,x as W,k as B,R as V,T as Z,S as J,P as Q,y as b,d as w,u as O,q as X,B as K,J as ee}from"../chunks/core-Bpuic6mr.js";import{p as se}from"../chunks/sciam-CvuG93yt.js";import{a as S}from"../chunks/pricing-C6VtaTQN.js";import{F as ie}from"../chunks/Faq-CD5jDRNx.js";import{N as R}from"../chunks/Notice-DIOat8pd.js";import{D as te}from"../chunks/DefaultLayout-B4mESSua.js";import"../chunks/vendor-shared-ShLQKC4n.js";import"../chunks/Header-DuP3RNUx.js";import"../chunks/sciam-B_IQ-Vo8.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="041a2fdd-2eab-4c94-8b85-8cc41b734054",s._sentryDebugIdIdentifier="sentry-dbid-041a2fdd-2eab-4c94-8b85-8cc41b734054")}catch{}})();function re(s,i,r){const t=s?.chargebee_plans?.[r];if(!t){console.error(`[purchase] No Chargebee plan IDs have been configured for offer=${s?.id} env=${r}`);return}let a=t.cb_plan_id;return i==="CA"?a=t.cb_plan_id_ca:i==="EU"?a=t.cb_plan_id_eu:(i==="ROW"||i==="INT")&&(a=t.cb_plan_id_row),a}function D(s,i){const{entitlements:r}=q(),{isLoggedIn:t}=W(),{isLoggedIn:a,register:c,login:_}=B(),u=re(s,i,r.environment),j=se.find(y=>y.id===u),p=V(),T=Z(j,p);return g.useCallback(y=>{y.preventDefault(),console.log("[usePurchaseHandler]",{planId:u,eligibility:T,event:y}),J.setObject("sa_checkout_cf",{clean_path:window.location.pathname,full_path:window.location.href.toString().replace(window.location.origin,""),target_plan:u});const U=new URLSearchParams({plan:u});s?.promo_code&&U.set("coupon",s.promo_code);const F=new URLSearchParams(window.location.search);["plan","coupon","debug","flag"].forEach(M=>F.delete(M));const $=F.toString(),C=`/checkout/?${U}${$?"&"+$:""}`;if(!t)return c(C);if(!a)return _(C);window.location.href=C},[u,s?.promo_code,!!p,T?.userHasSimilarPlan,t])}const ae="/static/assets/icon-digital-sub-BVfm4Liy.png",ce="/static/assets/icon-print-sub-BjDs7iuF.png",ne="/static/assets/iconPrintDigitalSub2-BtKXeVnS.png",_e="/static/assets/unlimitedIconsPlus-D0TkLn5N.png",oe="/static/assets/unlimitedIconsPlusInternational-Dgncz2E2.png",f={print:{name:"Print",description:"10 print issues of Scientific American delivered to your home"},digital:{name:"Digital",description:"Access all of Scientific American's stories online"},"print-digital":{name:"Print & Digital",description:"Get print + digital access to all the science"},unlimited:{name:"Unlimited",description:"Get print + ad-free digital access to all the science"}};function I(s,i){return s==="print"?[ce,"A magazine icon"]:s==="digital"?[ae,"A laptop and a mobile phone displaying the SciAm logo"]:s==="print-digital"?[ne,"A magazine and laptop icon"]:s==="unlimited"&&i==="US"?[_e,"A laptop, a mobile phone, magazine and a tote bag displaying the SciAm logo. The laptop and phone are overlayed with a seal that says 'Ad-Free Browsing' in a circle."]:s==="unlimited"?[oe,"A laptop and a mobile phone and a magazine displaying the SciAm logo. The laptop and phone are overlayed with a seal that says 'Ad-Free Browsing' in a circle."]:[]}function h(s,i){let r=s.display_price,t=s.strikeout_price;return i==="CA"?(r=s.display_price_ca,t=s.strikeout_price_ca):i==="EU"?(r=s.display_price_eu,t=s.strikeout_price_eu):(i==="ROW"||i==="INT")&&(r=s.display_price_row,t=s.strikeout_price_row),r=isNaN(r)?r:S(r,{stripTrailingZero:!0}),t&&!isNaN(t)&&(t=S(t,{stripTrailingZero:!0})),{display_price:r,strikeout_price:t}}const Y=g.createContext(null),x=()=>{const s=b(),i=g.useContext(Y);if(!i)throw new Error("useOffer must be used within an OfferProvider");return{...i,plan:s}};function N({offer:s,region:i="US",children:r}){const t=i||"US";if(!s)throw new Error("OfferProvider requires an offer");const{entitlements:a}=q(),c=a.environment,_=s.chargebee_plans?.[c]||s.chargebee_plans?.prod,u=_?.[`cb_plan_id_${t.toLowerCase()}`]||_?.cb_plan_id||"";return e.jsx(Q,{planId:u,children:e.jsx(Y.Provider,{value:{offer:s,region:t},children:r})})}const P={"30_free":{duration:"30 days",price:"$0"},"90_for_1":{duration:"90 days",price:"$1"},"60_for_1":{duration:"60 days",price:"$1"},"5_MO":{duration:"5 months",price:"$10"},"6_MO":{duration:"6 months",price:"$30"}},E={unlimited:"199",digital:"39","print-digital":{US:"79",CA:"89",EU:"99",INT:"99"}},le=["digital","unlimited","print-digital"],ue=(s,i)=>{const{trial_phase:r}=s;let t;if(r!==null&&r in P)t=S(P[r].price,{stripTrailingZero:!0});else{const{display_price:a}=h(s,i);t=a}return t},k=(s,i)=>{const{product:r}=s;let t;return r==="unlimited"||r==="digital"?t=E[r]:t=E["print-digital"][i],S(t,{str
1ipTrailingZero:!0})},me=s=>{for(const i in s)if(s[i].trial_phase||s[i].renewal_disclaimer||s[i].strikeout_price||s[i].strikeout_price_ca||s[i].strikeout_price_eu||s[i].strikeout_price_row)return!0;return!1},de=s=>{for(const i in s)if(s[i].is_gift)return!0;return!1},fe="getsciamsub__strikeout-2U68v",ge="getsciamsub__strikeout-2U68v",pe="getsciamsub__printoffer__price__container-cdYQ9",be="getsciamsub__printoffer__price__container-cdYQ9",he="getsciamsub__printoffer__price-qtX2R",xe="getsciamsub__printoffer__price-qtX2R",je="getsciamsub__printoffer__price__dollarsign-0yaSc",ye="getsciamsub__printoffer__price__dollarsign-0yaSc",we="getsciamsub__printoffer__duration--XiP-",Se="getsciamsub__printoffer__duration--XiP-",Ne="getsciamsub__offercard__price__dollarsign-qQTIo",Pe="getsciamsub__offercard__price__dollarsign-qQTIo",ke="getsciamsub__offercard__price-bT9jn",ve="getsciamsub__offercard__price-bT9jn",Ce="getsciamsub__offercard__strikeout__price-Ox-Fe",Ae="getsciamsub__offercard__strikeout__price-Ox-Fe",Oe="getsciamsub__offercard__duration-7XhsR",De="getsciamsub__offercard__duration-7XhsR",Ie="getsciamsub__comparisonplan__price__dollarsign-5qP09",Te="getsciamsub__comparisonplan__price__dollarsign-5qP09",Ue="getsciamsub__comparisonplan__price-ztCp9",Fe="getsciamsub__comparisonplan__price-ztCp9",$e="getsciamsub__comparisonplan__price__number-PWcvA",Re="getsciamsub__comparisonplan__price__number-PWcvA",Ee="getsciamsub__comparisonplan__strikeout__price-0Dttl",Le="getsciamsub__comparisonplan__strikeout__price-0Dttl",Ge="getsciamsub__comparisonplan__duration--VI2e",qe="getsciamsub__comparisonplan__duration--VI2e",d={getsciamsub__strikeout:fe,getsciamsubStrikeout:ge,getsciamsub__printoffer__price__container:pe,getsciamsubPrintofferPriceContainer:be,getsciamsub__printoffer__price:he,getsciamsubPrintofferPrice:xe,getsciamsub__printoffer__price__dollarsign:je,getsciamsubPrintofferPriceDollarsign:ye,getsciamsub__printoffer__duration:we,getsciamsubPrintofferDuration:Se,getsciamsub__offercard__price__dollarsign:Ne,getsciamsubOffercardPriceDollarsign:Pe,getsciamsub__offercard__price:ke,getsciamsubOffercardPrice:ve,getsciamsub__offercard__strikeout__price:Ce,getsciamsubOffercardStrikeoutPrice:Ae,getsciamsub__offercard__duration:Oe,getsciamsubOffercardDuration:De,getsciamsub__comparisonplan__price__dollarsign:Ie,getsciamsubComparisonplanPriceDollarsign:Te,getsciamsub__comparisonplan__price:Ue,getsciamsubComparisonplanPrice:Fe,getsciamsub__comparisonplan__price__number:$e,getsciamsubComparisonplanPriceNumber:Re,getsciamsub__comparisonplan__strikeout__price:Ee,getsciamsubComparisonplanStrikeoutPrice:Le,getsciamsub__comparisonplan__duration:Ge,getsciamsubComparisonplanDuration:qe};function A({styleMode:s,text:i,display_price:r}){const t=!i;return t&&(r=r.replace("$","")),e.jsxs("span",{className:d[`getsciamsub__${s}__price`],children:[i,t&&e.jsx("span",{className:d[`getsciamsub__${s}__price__dollarsign`],children:e.jsx("sup",{children:"$"})}),e.jsx("span",{className:d[`getsciamsub__${s}__price__number`],children:r})]})}function v({card:s,display_price:i,strikeout_price:r=null,mode:t=""}){let a=t==="print"&&"printoffer"||t==="compare"&&"comparisonplan"||t==="offer"&&"offercard";if(s.formatting==="start_for")return e.jsx(A,{text:"Start For ",display_price:i,styleMode:a});if(s.formatting==="start_free")return e.jsx(A,{text:"Free Trial",styleMode:a});let c="year";return s.trial_phase&&(c=P[s.trial_phase].duration),e.jsxs(e.Fragment,{children:[r&&e.jsxs("span",{className:d[`getsciamsub__${a}__strikeout__price`],children:[e.jsx("span",{className:d[`getsciamsub__${a}__dollarsign`],children:e.jsx("sup",{children:"$"})}),e.jsx("s",{className:d.getsciamsub__strikeout,children:r.replace("$","")}),"Â "]}),e.jsx(A,{display_price:i,styleMode:a}),s.formatting!=="amount_first_year"&&e.jsxs("span",{className:d[`getsciamsub__${a}__duration`],children:["/",c]}),s.formatting==="amount_first_year"&&e.jsxs("span",{className:d[`getsciamsub__${a}__duration`],children:["/first ",c]})]})}const Be="getsciamsub__disclaimer__container-i3KV-",Ye="getsciamsub__disclaimer__wrap-DbOJD",ze="getsciamsub__disclaimer_desc-GESls",He="getsciamsub__disclaimer_offer-e4gfT",Me="getsciamsub__disclaimer__link-DljET",m={getsciamsub__disclaimer__container:Be,getsciamsub__disclaimer__wrap:Ye,getsciamsub__disclaimer_desc:ze,getsciamsub__disclaimer_offer:He,getsciamsub__disclaimer__link:Me};function We({offers:s,region:i}){return le.map(r=>{const t=s[r];if(!t)return null;const{trial_phase:a}=t,c=P[a]?.duration||"1 year",_=ue(t,i),u=k(t,i);return e.jsx(g.Fragment,{children:e.jsxs("p",{className:m.getsciamsub__disclaimer_desc,children:["For the ",e.jsx("span",{className:m.getsciamsub__disclaimer_offer,children:r})," ","subscription you agree to be charged ",_," plus sales tax where applicable for"," ",c,". After ",c,", your subscription will automatically renew at a rate of ",u," a year, plus sales tax where applicable."]})},r)})}const L=()=>e.jsxs("span",{children:["Please note that you have consented to the following automatic renew
1al terms as part of your purchase: Your subscription will automatically renew for an additional 12 months at the end of your current term and subsequent terms. The payment method you provided will be charged the then-current subscription rate at the time of renewal, which may differ from your original subscription rate. Current subscription rates are available"," ",e.jsx("a",{href:"https://www.scientificamerican.com/page/frequently-asked-questions/products/",target:"_blank",children:"here"}),". We will email you prior to the renewal to remind you of the renewal rate and the date of the expected charge. You may cancel at any time by accessing your"," ",e.jsx("a",{href:"https://www.scientificamerican.com/account/",target:"_blank",children:"subscription management page"})," ","or contacting us at ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),". Cancellations will take place at the end of your current, paid subscription term and are not eligible for a refund."]});function Ve({offerPageData:s={},region:i="US"}){const{offers:r}=s;if(de(r))return;const t=me(r);return s.does_not_autorenew?e.jsx("section",{className:m.getsciamsub__disclaimer__container,children:e.jsxs("div",{className:m.getsciamsub__disclaimer__wrap,children:["You can manage your subscription at any time in your"," ",e.jsx("a",{href:"/account/",className:m.getsciamsub__disclaimer__link,children:"subscription management page"}),". Your subscription will expire at the end of your current subscription term. If you have any questions, email us at"," ",e.jsx("a",{href:"mailto:[email protected]",className:m.getsciamsub__disclaimer__link,children:"[email protected]."})]})}):e.jsx("section",{className:m.getsciamsub__disclaimer__container,children:e.jsx("div",{className:m.getsciamsub__disclaimer__wrap,children:t?e.jsxs("div",{className:m.getsciamsub__disclaimer_desc,children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Automatic Renewal Program:"})," You can cancel your subscription at any time."]}),e.jsx("br",{}),e.jsx(We,{offers:r,region:i}),e.jsx("p",{children:e.jsx(L,{})})]}):e.jsxs("p",{className:m.getsciamsub__disclaimer_desc,children:[e.jsx("strong",{children:"Automatic Renewal Program:"})," You can cancel your subscription at any time. After your initial term, your subscription will automatically renew until you cancel.",e.jsx(L,{})]})})})}const Ze="getsciamsub__comparison__container-PvZrI",Je="getsciamsub__comparison__layout-irR4Y",Qe="getsciamsub__comparison__grid-svrxw",Xe="zAboveOutline-4cUWb",Ke="getsciamsub__comparison__product-Asx2h",es="x__symbol-rSmbZ",ss="getsciamsub__comparison__hdr-s2BNk",is="getsciamsub__item__hdr-loJN6",ts="getsciamsub__comparison__list-VQUdM",rs="getsciamsub__comparison__item-citBt",as="getsciamsub__offer__button-YoPDY",cs="getsciamsub__comparisonplan__price__container---Q7l",l={getsciamsub__comparison__container:Ze,getsciamsub__comparison__layout:Je,getsciamsub__comparison__grid:Qe,zAboveOutline:Xe,getsciamsub__comparison__product:Ke,x__symbol:es,getsciamsub__comparison__hdr:ss,getsciamsub__item__hdr:is,getsciamsub__comparison__list:ts,getsciamsub__comparison__item:rs,getsciamsub__offer__button:as,getsciamsub__comparisonplan__price__container:cs},ns=({card:s,region:i})=>{let{display_price:r,strikeout_price:t}=h(s,i);return e.jsx(e.Fragment,{children:e.jsx("div",{className:l.getsciamsub__comparisonplan__price__container,children:e.jsx(v,{card:s,display_price:r,mode:"compare",strikeout_price:t})})})},_s={"print-digital":s=>["Digital access to all stories","All online issues since 1845","iOS and Android App","10 Print Issues","","","","",""].filter(i=>typeof i=="string"),digital:s=>["Digital access to all stories","All online issues since 1845","iOS and Android App",s==="US"&&"","","","","",""].filter(r=>typeof r=="string"),unlimited:s=>["Digital access to all stories","All online issues since 1845","iOS and Android App",s==="US"&&e.jsxs("span",{children:[e.jsx("b",{children:"New"})," SciAm tote bag"]}),"10 print issues","Ad-free website experience","Print and online special editions","Newsletter from Editor in Chief","Digital access to gift ($39 value)"].filter(
1Boolean)};function os({region:s="US",offers:i={}}){const r=Object.keys(i).slice(0,2);return e.jsxs("section",{className:l.getsciamsub__comparison__layout,children:[e.jsx("h2",{className:l.getsciamsub__comparison__hdr,children:"Compare Plans"}),e.jsx("div",{className:l.getsciamsub__comparison__grid,children:r.map(t=>e.jsxs(N,{offer:i[t],region:s,children:[e.jsxs("div",{className:l.getsciamsub__comparison__product,children:[e.jsx("h3",{className:l.getsciamsub__item__hdr,children:f[t].name}),e.jsx(ns,{card:i[t],region:s})]}),e.jsx("ul",{className:l.getsciamsub__comparison__list,children:_s[t](s).map((a,c)=>a?e.jsx("li",{className:l.getsciamsub__comparison__item,children:e.jsx("span",{className:l.zAboveOutline,children:a})},c):e.jsx("li",{role:"presentation","aria-hidden":!0,className:w(l.getsciamsub__comparison__item,l.x__symbol)},c))}),e.jsx(ls,{className:l.zAboveOutline,children:"Select"})]},t))})]})}function ls({className:s,children:i}){const{offer:r,region:t}=x(),{eligibility:a}=b(),c=D(r,t);return a.blockedGiftCheckout?e.jsx("div",{children:e.jsxs("small",{style:{display:"block",color:"var(--color-red)",fontSize:"0.8rem",padding:"1rem"},children:["Gift subscriptions are not available at this time.",e.jsx("br",{})," Please check back soon."]})}):a.enabledForCheckout?a.userHasSimilarPlan?e.jsx("div",{style:{display:"block",padding:"1rem"},children:"Your Current Plan"}):e.jsx("button",{className:w(l.getsciamsub__offer__button,s),disabled:!a.isPurchasable,onClick:_=>c(_),children:i}):e.jsx("div",{children:e.jsx("small",{style:{display:"block",color:"var(--color-red)",fontSize:"0.8rem",padding:"1rem"},children:"This offer is not available for purchase at this time."})})}function us({region:s="US",offerPageData:i={}}){return e.jsx(e.Fragment,{children:i.offers.digital&&i.offers.unlimited&&e.jsx("section",{className:l.getsciamsub__comparison__container,children:e.jsx(os,{region:s,offers:i.offers})})})}const ms="getsciamsub__offercard__container-AE1uG",ds="getsciamsub__offercard__layout-RAWjN",fs="getsciamsub__singlecard__layout-n7xqW",gs="getsciamsub__offercard__info-rBrcF",ps="getsciamsub__offercard__cta-7-Gmd",bs="getsciamsub__offercard__featured__banner-Aa1uN",hs="getsciamsub__offercard__term-D-ZeD",xs="getsciamsub__offercard__term__image-VCQdZ",js="getsciamsub__offercard__description-TomqS",ys="getsciamsub__offercard__button-6Jqzi",ws="getsciam__offercard__renewal_disclaimer-VhMDR",Ss="getsciamsub__offercard__price__container-E2J9J",n={getsciamsub__offercard__container:ms,getsciamsub__offercard__layout:ds,getsciamsub__singlecard__layout:fs,getsciamsub__offercard__info:gs,getsciamsub__offercard__cta:ps,getsciamsub__offercard__featured__banner:bs,getsciamsub__offercard__term:hs,getsciamsub__offercard__term__image:xs,getsciamsub__offercard__description:js,getsciamsub__offercard__button:ys,getsciam__offercard__renewal_disclaimer:ws,getsciamsub__offercard__price__container:Ss},Ns=({card:s,region:i})=>{let{display_price:r,strikeout_price:t}=h(s,i);return e.jsx(e.Fragment,{children:e.jsx("div",{className:n.getsciamsub__offercard__price__container,children:e.jsx(v,{card:s,display_price:r,strikeout_price:t,mode:"offer"})})})};function Ps(){const{offer:s,region:i}=x(),r=k(s,i),{does_not_autorenew:t}=O().offerPageData,[a,c]=I(s.product,i);return e.jsx("li",{className:n.getsciamsub__offercard__container,children:e.jsxs("div",{className:n.getsciamsub__offercard__layout,children:[s.banner_text&&e.jsx("div",{className:n.getsciamsub__offercard__featured__banner,children:s.banner_text}),e.jsx("h2",{className:n.getsciamsub__offercard__term,children:f[s.product].name}),e.jsx(Ns,{card:s,region:i}),e.jsx("p",{className:n.getsciamsub__offercard__description,children:f[s.product].description}),e.jsx("img",{className:n.getsciamsub__offercard__term__image,src:a,height:100,alt:c}),e.jsx(z,{children:"Select"}),!t&&s.renewal_disclaimer&&e.jsxs("p",{className:n.getsciam__offercard__renewal_disclaimer,children:["Renews at ",r,"/year"]})]})})}function z({className:s,children:i}){const{offer:r,region:t}=x(),a=D(r,t),{eligibility:c}=b();return c.userHasSimilarPlan?e.jsx("button",{disabled:!0,className:w(n.getsciamsub__offercard__button,s),children:"Your Current Plan"}):e.jsx("button",{className:w(n.getsciamsub__offercard__button,s),onClick:_=>a(_),disabled:!c.enabledForCheckout,"aria-label":c.enabledForCheckout?`Select ${r.product}`:void 0,children:c.enabledForCheckout?i:"Offer Unavailable"})}const ks=()=>{const{offer:s,region:i}=x(),{display_price:r,strikeout_price:t}=h(s,i);return e.jsx(e.Fragment,{children:e.jsx("div",{className:n.getsciamsub__offercard__price__container,children:e.jsx(v,{card:s,display_price:r,strikeout_price:t,mode:"offer"})})})};function vs(){const{offer:s,region:i}=x(),{eligibility:r}=b(),t=k(s,i),[a,c]=I(s.product,i);return e.jsx("li",{className:n.getsciamsub__offercard__container,children:e.jsxs("div",{className:n.getsciamsub__offercard__layout,children:[s.banner_text&&e.jsx("div",{className:n.getsciamsub__offercard__featured__banner,children:s.banner_text}),e.jsx("h2",{className:n.getsciamsub__offercard__term,children:f[s.product].name}),e.jsxs("div",{className:n.getsciamsub__singlecard__layout,children:[e.jsxs("section",{className:n.getsciamsub__offercard__info,children:[e.jsx(ks,{card:s,region:i}),e.jsx("p",{className:n.getsciamsub__offercard__description,children:f[s.product].description})]}),e.jsxs("section",{className:n.getsciamsub__offercard__cta,children:[e.jsx("img",{className:n.getsciamsub__offercard__term__image,src:a,alt:c}),e.jsx(z,{children:r.enabledForCheckout?"Subscribe":"Offer Unavailable"}),s.renewal_disclaimer&&e.jsxs("p",{className:n.getsciam__offercard__renewal_disclaimer,children:["Renews at ",t,"/year"]})]})]})]})})}const Cs="getsciamsub__offergrid__container-yQIfL",As="getsciamsub__offergrid__singleproduct__container-afZBg",G={getsciamsub__offergrid__container:Cs,getsciamsub__offergrid__singleproduct__container:As};function Os({region:s="US",offerPageData:i={}}){let r=Object.keys(i.offers).length,t=Object.keys(i.offers);if(r===1){let a=t[0];return e.jsx("ul",{className:G.getsciamsub__offergrid__singleproduct__container,children:e.jsx(N,{offer:i.offers[a],region:s,children:e.jsx(vs,{})})})}if(r>=2)return e.jsx("ul",{className:G.getsciamsub__offergrid__container,children:Object.keys(i.offers).slice(0,2).map(a=>{const c=i.offers[a];return e.jsx(N,{offer:c,region:s,children:e.jsx(Ps,{})},c.product)})})}const Ds="getsciamsub__grid__page__container-kW-oC",Is="getsciamsub__grid__header__container-sbTLW",Ts="getsciamsub__grid__hed-dxhny",Us="getsciamsub__grid__subhed-CJeuD",Fs="getsciamsub__otheroffer__container-SWEZL",$s="getsciamsub__otheroffer__layout-Dyqd9",Rs="getsciamsub__otheroffer__icon-FN-z8",Es="getsciamsub__otheroffer__hed-hAV-x",Ls="getsciamsub__otheroffer__desc-qQ4Gd",Gs="getsciamsub__otheroffer__txt-fXjuW",qs="getsciamsub__otheroffer__button-44q6N",Bs="getsciamsub__plangrid__moreoptions__hed-KViUG",Ys="getsciamsub__linktoallsubs__container--YjIo",zs="getsciamsub__linktoallsubs__layout-P3gKi",Hs="getsciamsub__linktoallsubs__link-k5Goo",Ms="getsciamsub__otheroffer__button__wrap-8D7Ma",Ws="getsciamsub__offercard__renewal_disclaimer-ejZpk",Vs="ineligible_notice-1fYDI",o={getsciamsub__grid__page__container:Ds,getsciamsub__grid__header__container:Is,getsciamsub__grid__hed:Ts,getsciamsub__grid__subhed:Us,getsciamsub__otheroffer__container:Fs,getsciamsub__otheroffer__layout:$s,getsciamsub__otheroffer__icon:Rs,getsciamsub__otheroffer__hed:Es,getsciamsub__otheroffer__desc:Ls,getsciamsub__otheroffer__txt:Gs,getsciamsub__otheroffer__button:qs,getsciamsub__plangrid__moreoptions__hed:Bs,getsciamsub__linktoallsubs__container:Ys,getsciamsub__linktoallsubs__layout:zs,getsciamsub__linktoallsubs__link:Hs,getsciamsub__otheroffer__button__wrap:Ms,getsciamsub__offercard__renewal_disclaimer:Ws,ineligible_notice:Vs},Zs="/static/assets/icon-gift-sub-D3M7uBn8.png";function Js({card:s,region:i}){const{display_price:r,strikeout_price:t}=h(s,i);return e.jsx(v,{card:s,display_price:r,strikeout_price:t,mode:"print"})}function Qs(){return e.jsx("section",{className:o.getsciamsub__linktoallsubs__container,children:e.jsx("section",{className:o.getsciamsub__linktoallsubs__layout,children:e.jsxs("p",{className:o.getsciamsub__linktoallsubs__txt,children:[e.jsx("strong",{children:"Looking for something else?"})," ",e.jsx("a",{href:"/getsciam/",className:o.getsciamsub__linktoallsubs__link,children:"See all of our subscription options"}),"."]})})})}function H({title:s,description:i,icon:r,buttonText:t,buttonHref:a,disabled:c=!1,buttonOnClick:_=()=>{}}){const u=a?"a":"button";return e.jsx("section",{className:o.getsciamsub__otheroffer__container,children:e.jsxs("section",{className:o.getsciamsub__otheroffer__layout,children:[e.jsx("img",{src:r,className:o.getsciamsub__otheroffer__icon,alt:""}),e.jsxs("div",{className:o.getsciamsub__otheroffer__desc,children:[e.jsx("h3",{className:o.getsciamsub__otheroffer__hed,children:s}),e.jsx("p",{className:o.getsciamsub__otheroffer__txt,children:i})]}),e.jsx("div",{className:o.getsciamsub__otheroffer__button__wrap,children:e.jsx(u,{href:a,className:o.getsciamsub__otheroffer__button,onClick:_,disabled:c,
1children:t})})]})})}function Xs(){return e.jsx(H,{title:"Give a Gift",description:`Your friends and family may love Scientific American too! 2 Click here if you would like to give a subscription.`,icon:Zs,buttonText:"Gift SciAm",buttonHref:"/getsciam/gift/"})}function Ks({offer:s,region:i}){const r=D(s,i),{eligibility:t}=b(),a=k(s,i),c=e.jsxs(e.Fragment,{children:[e.jsx("span",{children:f[s.product].description}),"Â ",e.jsx(Js,{region:i,card:s}),s.renewal_disclaimer&&e.jsxs("span",{className:o.getsciamsub__offercard__renewal_disclaimer,children:["Renews at ",a,"/year"]})]});if(t.enabledForCheckout)return e.jsx(H,{title:f[s.product].name,description:c,icon:I(s.product,i)[0],buttonText:t.userHasSimilarPlan?"Your Current Plan":"Select",disabled:t.userHasSimilarPlan,buttonOnClick:_=>{r(_)}})}function ei(){return e.jsx(R,{type:"info",className:o.ineligible_notice,children:e.jsx(R.Content,{children:e.jsx("p",{children:"You've already signed up for a promotional subscription in the past year and aren't eligible for another one at this time. View your best current offers below."})})})}const si={unlimited:"Learn and share the most exciting discoveries, innovations and ideas shaping our world today. Unlimited subscribers receive 11 print issues, ad-free website experience, print and online special editions, a newsletter from the Editor in Chief, online access to monthly issues of Scientific American, access to the full digital archive from 1845 to today (more than 7,000 issues), and access to the Scientific American iOS and Android app.","print-digital":"Learn and share the most exciting discoveries, innovations and ideas shaping our world today. Print subscribers receive one year of Scientific American issues delivered to your home, online access to monthly issues of Scientific American, access to the full digital archive from 1845 to today (more than 7,000 issues), and access to the Scientific American iOS and Android app.",digital:"Learn and share the most exciting discoveries, innovations and ideas shaping our world today. Digital subscribers receive online access to monthly issues of Scientific American, access to the full digital archive from 1845 to today (more than 7,000 issues), and access to the Scientific American iOS and Android app."};function ii(){const{meta:s,offerPageData:i,shared:{latestIssue:r}}=O(),t=K(r.image_url,900);Object.keys(i.offers);const a=Object.keys(i.offers).map(c=>{const _=i.offers[c];return{"@context":"https://schema.org","@type":"Product",mpn:_.product,name:`Scientific American ${_.product_name} Subscription`,description:si[c],image:t,offers:{"@type":"Offer",price:_.display_price,priceCurrency:"USD",availability:"https://schema.org/OnlineOnly",url:s.canonicalUrl}}});return e.jsx(e.Fragment,{children:a.map(c=>e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}},`json-ld-${c.name}`))})}function ti({offerPageData:s={},region:i="US"}){i||="US";const r=Object.keys(s.offers).length===1,t=X();Object.create(globalThis.import_meta_env||null).PUBLIC_CHECKOUTS==="0"&&t?.checkouts,s.offers["print-digital"];const{isLoading:a,isLoggedIn:c}=B(),[_,u]=g.useState(!1);return g.useEffect(()=>{u(c&&!!window.location.search.match(/notice=ineligible-for-offer/))},[c]),e.jsx(e.Fragment,{children:e.jsxs("div",{className:o.getsciamsub__grid__page__container,children:[e.jsxs("section",{className:o.getsciamsub__grid__header__container,children:[e.jsx("h1",{className:o.getsciamsub__grid__hed,dangerouslySetInnerHTML:{__html:s.title}}),e.jsx("p",{className:o.getsciamsub__grid__subhed,dangerouslySetInnerHTML:{__html:s.body}
2})]}),_&&e.jsx(ei,{}),e.jsx(Os,{region:i,offerPageData:s}),e.jsx(ii,{}),e.jsx(us,{region:i,offerPageData:s}),e.jsx("section",{children:e.jsx("h2",{className:o.getsciamsub__plangrid__moreoptions__hed,children:"More Options"})}),Object.keys(s.offers).slice(2).map(j=>{const p=s.offers[j];return e.jsx(N,{offer:p,region:i,children:e.jsx(Ks,{region:i,offer:p})},j)}),s.show_gift_link&&e.jsx(Xs,{}),r&&e.jsx(Qs,{}),e.jsx(Ve,{offerPageData:s,region:i}),e.jsx(ie,{})]})})}function fi(){const{offerPageData:s}=O(),{region:i}=ee();return e.jsx(te,{showCta:!1,children:e.jsx(ti,{offerPageData:s,region:i||"US"})})}export{fi as default};
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.