(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,590238,e=>{"use strict";var t=e.i(537989),i=e.i(827049),o=e.i(695203),a=e.i(604323),l=e.i(797770),s=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,s.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[i.pageLocaleAtom,e.pageLocale],[o.deviceClassAtom,e.deviceClass],[a.metricsArticleDataAtom,e.metricsArticleData],[l.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},703123,e=>{"use strict";let t=(0,e.i(751931).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(694914);var t=e.i(297647),i=e.i(241722),o=e.i(477716),a=e.i(475566),l=e.i(352194),s=e.i(671525),r=e.i(901351),n=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),g=e.i(703123),m=e.i(404893),h=e.i(367810),b=e.i(251392);function p({onLoad:e,prompt:p=!0,isUserLoggedIn:x}){let A=(0,l.useTranslations)("GoogleLogin"),f=(0,a.useSetAtom)(m.googleLoginInitilizedAtom),{loginWithGoogle:y,error:v,clearError:S}=function(){let e=(0,l.useTranslations)("GoogleLogin"),[t,i]=(0,o.useState)(null),m=(0,a.useSetAtom)(n.userHasLoggedInBeforeAtom),h=(0,a.useAtomValue)(g.gsiEmailStatesAtom),{updateEmailSubscriptions:b}=(0,u.useEmailPreferences)(),{refresh:p}=(0,s.usePageNavigation)(),{syncPreferencesFromUpsx:x}=(0,c.usePreferences)(),{authSuccess:A,authRedirect:f}=(0,d.useUserLogin)();return{loginWithGoogle:(0,o.useCallback)(async t=>{let{credential:o}=t;i(null);try{let e=await r.upsxClient.auth.loginWithGoogle({google_id_token:o}),t=e?.isFirstLogin;await A({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:a,marketing:l,alwaysSubscribe:s}=h||{};return(t||s)&&await b({newsletter:i,weekly:a,marketing:l}).catch(e=>{console.error("Failed to update email subscriptions",e)}),f(),!0}catch(t){console.error("Failed to login with Google",t);try{let o=t?.data,a=o?.messageCode;if(!a)throw Error("No Error Message");switch(a){case 1e3:case 1026:case 1033:i({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:i({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){i({header:e("somethingWentWrong")})}return!1}},[m,x,p,A,f,b,h]),error:t,clearError:(0,o.useCallback)(()=>{i(null)},[])}}(),k=(0,b.useRefMemo)(y);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{k.current?.(e)}}),f(!0)),e?.(),!x&&p&&t?.prompt()},id:"google-gsi-script"}),(0,t.jsx)(h.Dialog,{open:!!v,onOpenChange:e=>!e&&S(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:v?.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:v?.body||""}}),primaryAction:{label:A("cancel")}})})]})}e.s(["GoogleAuthScript",()=>p],874905)},622958,e=>{"use strict";var t=e.i(297647),i=e.i(274432),o=e.i(632137),a=e.i(352194);let l=()=>{let e=(0,a.useTranslations)("Header");return(0,t.jsx)("div",{className:(0,o.cn)("m-4 md:hidden"),children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{style:{boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 0 32px 0 rgba(0, 0, 0, 0.12)"},className:(0,o.cn)("box-border flex h-12 w-full items-center rounded-3xl border-2 border-[#3A61CC00] bg-white! pl-9.5 text-gray-900 outline-0! transition-all hover:border-blue-500 focus-visible:border-blue-500 focus-visible:text-gray-400"),type:"button",onClick:()=>{document?.querySelector?.(".twcSearchTrigger")?.click?.()},children:e("searchPlaceholderText")}),(0,t.jsx)(i.Search,{className:"absolute top-1/2 left-4 flex size-4 -translate-y-1/2 transform items-center text-gray-900"})]})})};e.s(["FakeSearchBar",0,l,"default",0,l])},321044,e=>{"use strict";var t=e.i(297647),i=e.i(477716),o=e.i(475566),a=e.i(663333),l=e.i(41385),s=e.i(959194),r=e.i(890972),n=e.i(622958);function c({locale:e,pageType:c}){let u=(0,o.useAtomValue)(a.deviceClassAtom),d=(0,o.useAtomValue)(l.mobileWebSubnavVariantAtom),g=(0,s.getPartner)(),{links:m,basePath:h}=(0,i.useMemo)(()=>{let t=[{label:"Ski",slug:"explore/ski"},{label:"Surf",slug:"explore/surf"},{label:"Bike",slug:"explore/bike"},{label:"Home & Garden",slug:"explore/home-garden"}];return"variant-b"===d&&(t=[{label:"Top Stories",slug:"/"},...t]),{links:t,basePath:"en-US"===e?"":`/${e}`}},[d,e]);return"mobile"!==u||"control"===d||"samsung"===g?null:(0,t.jsxs)(t.Fragment,{children:["explore"===c&&(0,t.jsx)(n.default,{}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r.SubnavigationUI,{links:m,basePath:h,bleed:!0})})]})}e.s(["MobileWebSubnavExperiment",()=>c])},711899,e=>{e.v(t=>Promise.all(["static/chunks/8198254d842f31ab.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/775f6992a5490e4c.js"].map(t=>e.l(t))).then(()=>t(72990)))}]);