1import{g}from"./utm.client-jKpNdgOi.js";import{m as l,e as d,b as p}from"./utils-VlcFB_3c.js";var m={};const w=()=>typeof globalThis.window>"u"?m.CONTENT_API_URL:globalThis.window?.process?.env.CONTENT_API_URL,h=()=>globalThis.window===void 0?m.PREQIN_CMS_API_URL:globalThis.window?.process?.env.PREQIN_CMS_API_URL,i=w(),_=h(),u={"Access-Control-Allow-Origin":"*",method:"post",headers:{"Content-Type":"application/json"}},A=async(t,e)=>{const n={...e};delete n[t];const o=await fetch(`${i}/api/v1/benchmarks/pc/aggregate`,{...u,body:JSON.stringify({field:t,aggregatorFilters:n})});return{field:t,values:await o.json()}},T=async t=>(await fetch(`${i}/api/v1/benchmarks/pc/search`,{...u,body:JSON.stringify(t)})).json(),P=async()=>(await fetch(`${i}/api/v1/freeaccount/countries_and_states`,{headers:{"Access-Control-Allow-Origin":"*","Content-Type":"application/json"}})).json(),f=()=>{const t=g(),e=new URLSearchParams(window.location.search),n=e.get("utm_source")??t?.utm_source,o=e.get("utm_medium")??t?.utm_medium,s=e.get("utm_campaign")??t?.utm_campaign,a=e.get("utm_content")??t?.utm_content,r=e.get("utm_term")??t?.utm_term,c=e.get("gclid")??t?.gclid;return!n&&!o&&!s&&!a&&!r?null:{utmParams:{utm_source:n,utm_medium:o,utm_campaign:s,utm_content:a,utm_term:r,gclid:c}}},b=async(t,e)=>{const n=globalThis.window.location.href,o=globalThis.window.location.origin,{langCode:s}=d(n),a=p(o,"/registerinterest/account-verification",s),r=await fetch(`${i}/api/v1/freeaccount/create_account`,{...u,body:JSON.stringify({...t,pageURL:n,validationLink:a,...f(),turnstileToken:e})}),c=await r.json();if(r.status!==200)throw c.detail?.error_code===1?new Error("This Email already exists."):new Error("Sorry something went wrong. Please try again later.");return c},S=async t=>{const e=await fetch(`${i}/api/v1/public-profiles/quicksearch?term=${encodeURIComponent(t)}`,{headers:{"Access-Control-Allow-Origin":"*","Content-Type":"application/json"}});if(!e.ok)throw new Error("Request for quick search results failed. Please try again later.");return await e.json()},U=async t=>{const{timestamp:e,signature:n,fingerprint:o}=await l(t),s=await fetch(`${_}/freemium/grant`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,timestamp:e,signature:n,fingerprint:o})}),a=await s.json();if(!s.ok)throw new Error(a.message||"Failed to grant freemium access");return a};export{P as a,T as b,A as c,S as f,U as g,b as p};
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.