// @bun
var c=Object.defineProperty;var i=(t)=>t;function p(t,o){this[t]=i.bind(null,o)}var l=(t,o)=>{for(var e in o)c(t,e,{get:o[e],enumerable:!0,configurable:!0,set:p.bind(o,e)})};var d=(t,o)=>()=>(t&&(o=t(t=0)),o);import s from"posthog-js";var T={CTA_INSTALL_CLICK:"cta_install_click",CTA_STUDIO_CLICK:"cta_studio_click",DOCS_QUICKSTART_VIEW:"docs_quickstart_view",COPY_COMMAND_CLICK:"copy_command_click",EXAMPLE_REPO_OPEN:"example_repo_open"},n=process.env.NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY,_=process.env.NEXT_PUBLIC_POSTHOG_HOST||"https://eu.posthog.com",r=()=>{if(typeof window>"u")return!1;let t=window.navigator,o=window,e=t.doNotTrack??t.msDoNotTrack??o.doNotTrack;return e!=="1"&&e!=="yes"},a=()=>!1;function C(){if(typeof window>"u")return;if(a())return;if(!n){console.warn("[PostHog] NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY is missing");return}if(!r())return;s.init(n,{api_host:_,autocapture:!0,capture_dead_clicks:!0,capture_performance:!0,capture_pageview:!0,capture_heatmaps:!0,capture_exceptions:!0,debug:!1})}function N(t,o){if(!n)return;if(a())return;if(!r())return;try{(globalThis.posthog??s)?.capture?.(t,o)}catch{return}}var y=s;export{n as posthogKey,_ as posthogHost,s as posthog,C as initPosthog,y as default,N as captureAnalyticsEvent,T as analyticsEventNames};
