{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/tVN7Coq0UHh62BlKwLVJ/oCN0LZCANB4CEaY7BVLc/is_sent_via_superhuman_link.js", "ssg:https://framerusercontent.com/modules/klLRvhIbJVlZimk3R0YY/gwMknfib6uoSZdkBUyUD/signup_state.js", "ssg:https://framerusercontent.com/modules/7dP0Zc59fAwwAhnv1WBk/9qGu0FM7uyQhKCH2ElaF/signup_overrides.js"],
  "sourcesContent": ["export function isSentViaSuperhumanLink(){const searchParams=new URLSearchParams(window.location.search);const expectedMedium=searchParams.get(\"utm_medium\")===\"signature\"||searchParams.get(\"utm_medium\")===\"calendar-event\";return searchParams.get(\"utm_source\")===\"product\"&&expectedMedium&&!!searchParams.get(\"utm_campaign\");}\nexport const __FramerMetadata__ = {\"exports\":{\"isSentViaSuperhumanLink\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./is_sent_via_superhuman_link.map", "import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";export const useStore=createStore({emailAddress:\"\",error:null,isLoading:false,modalToShow:null,shouldOfferFreeTrialWithoutCreditCard:false,signup:null});\nexport const __FramerMetadata__ = {\"exports\":{\"useStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./signup_state.map", "/**\n * This file contains higher-order components that we use with\n * elements in the Signup Modal component to add onClick handlers.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";import Events from\"https://framerusercontent.com/modules/Bh7OD6mPVlBw5dTkdVTZ/8ZdQK4nPcHVLfOJzPZLE/events.js\";import PixelTracking from\"https://framerusercontent.com/modules/2HBcjP4BsBjuCflGhU85/dmotRbCxbJx70rSLgVse/pixel_tracking.js\";import{isReferralLink}from\"https://framerusercontent.com/modules/T47pd6wbrNPfgLwVvvsX/i6ITmzFC2666tJIdayk2/is_referral_link.js\";import{isOneYearFreePromo,isThreeMonthsFreePromo,isTwoMonthsFreePromo,isOneMonthFreePromo}from\"https://framerusercontent.com/modules/PlUx5k6hAiGlleJntPsL/I2gOttiKeIgCQfe9c9bt/is_promo_campaign.js\";import{ORIGIN,SIGNUP_MODALS}from\"https://framerusercontent.com/modules/qGoVzbWYhJxr4Ja3txj9/KE4IceoNIk2eugQ0HmGI/constants.js\";import{getNextParams,proceedToNextPage}from\"https://framerusercontent.com/modules/qGHhAhPP4GjLBgzghi13/5xAKPPeLLrQqnFtx1yJu/signup_helpers.js\";import{useStore}from\"https://framerusercontent.com/modules/klLRvhIbJVlZimk3R0YY/gwMknfib6uoSZdkBUyUD/signup_state.js\";import{notifyBugsnag}from\"https://framerusercontent.com/modules/72DtnTuY0dUSYfWaaHNb/u0CHuE1E2eFa2LQlOSAR/bugsnag.js\";export function withClickSignupCTA(Component){return props=>{const[text,setText]=React.useState(props.text);const[showEmojis,setShowEmojis]=React.useState(props.showEmojis);React.useEffect(()=>{if(isOneYearFreePromo()){setText(\"Get 1 Year Free\");setShowEmojis(true);}else if(isThreeMonthsFreePromo()){setText(\"Get 3 Months Free\");setShowEmojis(true);}else if(isTwoMonthsFreePromo()){setText(\"Get 2 Months Free\");setShowEmojis(true);}else if(isOneMonthFreePromo()){setText(\"Claim Free Month\");setShowEmojis(true);}},[]);function isAIPage(){const isAI=window.location.pathname.split(\"/\")[1].startsWith(\"ai\");return isAI;}function isNotionMailPage(){const isNotionMailPage=window.location.pathname.split(\"/\")[1].startsWith(\"notion\");return isNotionMailPage;}function handleSignupCTAClicked(){const params=new URLSearchParams(window.location.search);if(isReferralLink()){const code=window.location.pathname.split(\"/\")[2]||\"\";if(code){params.append(\"referral_code\",code);}}const is30mpcPromo=window.location.pathname.split(\"/\")[1]===\"30mpc\";if(is30mpcPromo){params.append(\"source\",\"referral_link\");params.append(\"promo_code\",\"30mpc\");params.append(\"next\",\"checkout\");}if(isAIPage()||isNotionMailPage()){params.append(\"promo_code\",\"v7Gn2RGs\");}const paramsAsString=params.toString();// Remove any params after a trailing '?' (esc sequence %3F) that were added by affiliates\nconst cleanParams=paramsAsString.split(\"%3F\")[0];window.location.href=cleanParams?\"/signup?\"+cleanParams:\"/signup\";}return /*#__PURE__*/_jsx(Component,{...props,text:text,showEmojis:showEmojis,onClick:handleSignupCTAClicked});};}export function withEmailCheckConfirmed(Component){return props=>{const[store]=useStore();const handleEmailCheckConfirmed=React.useCallback(()=>{Events.action(\"confirm_gmail_check\");PixelTracking.signup({isTeam:false,callback:async()=>{let nextPage=\"pricing\";const params=new URLSearchParams(window.location.search);const wasAlreadyOnPricing=Boolean(params.get(\"tier\"));if(wasAlreadyOnPricing){nextPage=\"checkout\";}if(store.shouldOfferFreeTrialWithoutCreditCard){nextPage=\"onboarding\";}const nextParams=getNextParams(store.emailAddress,store.signup,store.shouldOfferFreeTrialWithoutCreditCard);const nextUrl=ORIGIN+\"/\"+nextPage+\"?\"+nextParams;try{// Make sure to await the async proceedToNextPage function\nawait proceedToNextPage(store.emailAddress,store.signup.signupSecret,nextPage,nextUrl);}catch(error){notifyBugsnag(`Error proceeding to the next page: ${error}`);}}});},[store]);return /*#__PURE__*/_jsx(Component,{onClick:handleEmailCheckConfirmed,className:props.className+\" confirmEmailButton\",...props});};}export function withEmailCheckDeclined(Component){return props=>{const[_,setStore]=useStore();function handleEmailCheckDeclined(){Events.action(\"decline_gmail_check\");setStore({modalToShow:SIGNUP_MODALS.TURNED_DOWN});}return /*#__PURE__*/_jsx(Component,{onClick:handleEmailCheckDeclined,className:props.className+\" declineEmailButton\",...props});};}export function withClickSecurityReviewButton(Component){return props=>{const handleSecurityReviewClick=()=>{Events.action(\"security_review_click\");const searchParams=new URLSearchParams({subject:\"Superhuman Review\",body:\"Hello!\\n\\nI would love to use Superhuman, but it isn't yet enabled at my company.\"});window.open(`mailto:welcome@superhuman.com?${searchParams.toString()}`,\"_blank\");};return /*#__PURE__*/_jsx(Component,{onClick:handleSecurityReviewClick,...props});};}export function withVerticalCentering(Component){return props=>{const style={...props.style,position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\"};return /*#__PURE__*/_jsx(Component,{...props,style:style});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withClickSignupCTA\":{\"type\":\"reactHoc\",\"name\":\"withClickSignupCTA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailCheckConfirmed\":{\"type\":\"reactHoc\",\"name\":\"withEmailCheckConfirmed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVerticalCentering\":{\"type\":\"reactHoc\",\"name\":\"withVerticalCentering\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailCheckDeclined\":{\"type\":\"reactHoc\",\"name\":\"withEmailCheckDeclined\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withClickSecurityReviewButton\":{\"type\":\"reactHoc\",\"name\":\"withClickSecurityReviewButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "yOAAO,SAASA,GAAyB,CAAC,IAAMC,EAAa,IAAI,gBAAgBC,EAAO,SAAS,MAAM,EAAQC,EAAeF,EAAa,IAAI,YAAY,IAAI,aAAaA,EAAa,IAAI,YAAY,IAAI,iBAAiB,OAAOA,EAAa,IAAI,YAAY,IAAI,WAAWE,GAAgB,CAAC,CAACF,EAAa,IAAI,cAAc,CAAE,CCAxP,IAAMG,EAASC,EAAY,CAAC,aAAa,GAAG,MAAM,KAAK,UAAU,GAAM,YAAY,KAAK,sCAAsC,GAAM,OAAO,IAAI,CAAC,ECG45B,SAASC,GAAmBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAKC,CAAO,EAAEC,EAAM,SAASH,EAAM,IAAI,EAAO,CAACI,EAAWC,CAAa,EAAEF,EAAM,SAASH,EAAM,UAAU,EAAEG,EAAM,UAAU,IAAI,CAAIG,EAAmB,GAAGJ,EAAQ,iBAAiB,EAAEG,EAAc,EAAI,GAAWE,EAAuB,GAAGL,EAAQ,mBAAmB,EAAEG,EAAc,EAAI,GAAWG,EAAqB,GAAGN,EAAQ,mBAAmB,EAAEG,EAAc,EAAI,GAAWI,EAAoB,IAAGP,EAAQ,kBAAkB,EAAEG,EAAc,EAAI,EAAG,EAAE,CAAC,CAAC,EAAE,SAASK,GAAU,CAAoE,OAAxDC,EAAO,SAAS,SAAS,MAAM,GAAG,EAAE,CAAC,EAAE,WAAW,IAAI,CAAc,CAAC,SAASC,GAAkB,CAAoF,OAA5DD,EAAO,SAAS,SAAS,MAAM,GAAG,EAAE,CAAC,EAAE,WAAW,QAAQ,CAA0B,CAAC,SAASE,GAAwB,CAAC,IAAMC,EAAO,IAAI,gBAAgBH,EAAO,SAAS,MAAM,EAAE,GAAGI,EAAe,EAAE,CAAC,IAAMC,EAAKL,EAAO,SAAS,SAAS,MAAM,GAAG,EAAE,CAAC,GAAG,GAAMK,GAAMF,EAAO,OAAO,gBAAgBE,CAAI,CAAG,CAAoBL,EAAO,SAAS,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,UAAyBG,EAAO,OAAO,SAAS,eAAe,EAAEA,EAAO,OAAO,aAAa,OAAO,EAAEA,EAAO,OAAO,OAAO,UAAU,IAAMJ,EAAS,GAAGE,EAAiB,IAAGE,EAAO,OAAO,aAAa,UAAU,EACp0E,IAAMG,EADs1EH,EAAO,SAAS,EAC30E,MAAM,KAAK,EAAE,CAAC,EAAEH,EAAO,SAAS,KAAKM,EAAY,WAAWA,EAAY,SAAU,CAAC,OAAoBC,EAAKnB,EAAU,CAAC,GAAGC,EAAM,KAAKC,EAAK,WAAWG,EAAW,QAAQS,CAAsB,CAAC,CAAE,CAAE",
  "names": ["isSentViaSuperhumanLink", "searchParams", "window", "expectedMedium", "useStore", "createStore", "withClickSignupCTA", "Component", "props", "text", "setText", "e", "showEmojis", "setShowEmojis", "isOneYearFreePromo", "isThreeMonthsFreePromo", "isTwoMonthsFreePromo", "isOneMonthFreePromo", "isAIPage", "window", "isNotionMailPage", "handleSignupCTAClicked", "params", "isReferralLink", "code", "cleanParams", "p"]
}
