{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/asqZRCrsghm4CpM1sukm/o3qeuv0Hotsmaa87JZea/link_click_events.js", "ssg:https://framerusercontent.com/modules/T47pd6wbrNPfgLwVvvsX/i6ITmzFC2666tJIdayk2/is_referral_link.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";import Events from\"https://framerusercontent.com/modules/Bh7OD6mPVlBw5dTkdVTZ/XambxroZuWBqDdoXE7BC/events.js\";import{IS_PRODUCTION}from\"https://framerusercontent.com/modules/qGoVzbWYhJxr4Ja3txj9/xvTdEGyf4ZECGM6stzAO/constants.js\";function handleLinkClick(e){Events.action(\"link_click\",{href:e.currentTarget.href});}// TODO: Add a way to set the `location` field for `link_click` events.\nexport function addClickListeners(Events,links){links.forEach(link=>link.addEventListener(\"click\",handleLinkClick));}export function removeClickListeners(Events,links){links.forEach(link=>link.removeEventListener(\"click\",handleLinkClick));}export function addStagingLinks(links){if(IS_PRODUCTION)return;links.forEach(link=>{if(link.href.includes(\"https://superhuman.com\")||link.href.includes(\"https://mail.superhuman.com\")){link.href=link.href.replace(\"superhuman.com\",\"staging-superhuman.com\");}});}export function withLinkClickEvents(Component){return props=>{const ref=React.useRef(null);React.useEffect(()=>{console.log(\"ref\",ref.current);if(!ref.current)return;const links=ref.current.querySelectorAll(\"a\");addClickListeners(Events,links);addStagingLinks(links);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};}export function withLinkClickEventsAndBorders(Component){return props=>{// withLinkClickEvents\nconst ref=React.useRef(null);React.useEffect(()=>{if(!ref.current)return;const links=ref.current.querySelectorAll(\"a\");addClickListeners(Events,links);addStagingLinks(links);},[]);// withSecondaryButtonBorder\nconst isDesktopLarge=props[\"aria-label\"]===\"large button\";const borderClass=isDesktopLarge?\"borderWide\":\"borderDefault\";const radiusClass=isDesktopLarge?\"radius8\":\"radius4\";return /*#__PURE__*/_jsx(Component,{...props,className:`${props.className} gradientBorder colored ${borderClass} ${radiusClass}`,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"addStagingLinks\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkClickEventsAndBorders\":{\"type\":\"reactHoc\",\"name\":\"withLinkClickEventsAndBorders\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"removeClickListeners\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkClickEvents\":{\"type\":\"reactHoc\",\"name\":\"withLinkClickEvents\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addClickListeners\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}", "export function isReferralLink(){return window.location.href.includes(\"superhuman.com/refer\");}\nexport const __FramerMetadata__ = {\"exports\":{\"isReferralLink\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./is_referral_link.map"],
  "mappings": "oIAA0S,SAASA,EAAgBC,EAAE,CAACC,EAAO,OAAO,aAAa,CAAC,KAAKD,EAAE,cAAc,IAAI,CAAC,CAAE,CACvX,SAASE,EAAkBD,EAAOE,EAAM,CAACA,EAAM,QAAQC,GAAMA,EAAK,iBAAiB,QAAQL,CAAe,CAAC,CAAE,CAAQ,SAASM,EAAqBJ,EAAOE,EAAM,CAACA,EAAM,QAAQC,GAAMA,EAAK,oBAAoB,QAAQL,CAAe,CAAC,CAAE,CAAQ,SAASO,EAAgBH,EAAM,CAAII,GAAqBJ,EAAM,QAAQC,GAAM,EAAIA,EAAK,KAAK,SAAS,wBAAwB,GAAGA,EAAK,KAAK,SAAS,6BAA6B,KAAGA,EAAK,KAAKA,EAAK,KAAK,QAAQ,iBAAiB,wBAAwB,EAAG,CAAC,CAAE,CAAQ,SAASI,EAAoBC,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAMC,EAAIX,EAAM,OAAO,IAAI,EAAE,OAAAA,EAAM,UAAU,IAAI,CAAgC,GAA/B,QAAQ,IAAI,MAAMW,EAAI,OAAO,EAAK,CAACA,EAAI,QAAQ,OAAO,IAAMR,EAAMQ,EAAI,QAAQ,iBAAiB,GAAG,EAAET,EAAkBD,EAAOE,CAAK,EAAEG,EAAgBH,CAAK,CAAE,EAAE,CAAC,CAAC,EAAsBS,EAAKH,EAAU,CAAC,GAAGC,EAAM,IAAIC,CAAG,CAAC,CAAE,CAAE,CAAQ,SAASE,EAA8BJ,EAAU,CAAC,OAAOC,GAAO,CACt4B,IAAMC,EAAIX,EAAM,OAAO,IAAI,EAAEA,EAAM,UAAU,IAAI,CAAC,GAAG,CAACW,EAAI,QAAQ,OAAO,IAAMR,EAAMQ,EAAI,QAAQ,iBAAiB,GAAG,EAAET,EAAkBD,EAAOE,CAAK,EAAEG,EAAgBH,CAAK,CAAE,EAAE,CAAC,CAAC,EAClL,IAAMW,EAAeJ,EAAM,YAAY,IAAI,eAAqBK,EAAYD,EAAe,aAAa,gBAAsBE,EAAYF,EAAe,UAAU,UAAU,OAAoBF,EAAKH,EAAU,CAAC,GAAGC,EAAM,UAAU,GAAGA,EAAM,SAAS,2BAA2BK,CAAW,IAAIC,CAAW,GAAG,IAAIL,CAAG,CAAC,CAAE,CAAE,CCHnT,SAASM,GAAgB,CAAC,OAAOC,EAAO,SAAS,KAAK,SAAS,sBAAsB,CAAE",
  "names": ["handleLinkClick", "e", "Events", "addClickListeners", "links", "link", "removeClickListeners", "addStagingLinks", "IS_PRODUCTION", "withLinkClickEvents", "Component", "props", "ref", "p", "withLinkClickEventsAndBorders", "isDesktopLarge", "borderClass", "radiusClass", "isReferralLink", "window"]
}
