let getKlaviyoScriptUri=e=>`https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=${e}`,getKlaviyoCode=e=>{if(!e)return"";let r="";if(e.replace(/src ?= ?"([^"]+)"/gi,t=>(r=(r=(r=(r=t).replace("src=","")).replace(/['"]+/g,"")).replace(/["']+/g,""),e)),!r)return"";let t=new URL(r);return t.searchParams.get("company_id")||""},getKlaviyoFormCode=e=>{if(!e)return"";let r="";return e.replace(/class ?= ?"([^"]+)"/gi,t=>(r=(r=(r=(r=t).replace("class=","")).replace(/['"]+/g,"")).replace(/["']+/g,""),e)),r},getYotpoFormCode=e=>{if(!e)return"";let r="";return e.replace(/data-yotpo-instance-id ?= ?"([^"]+)"/gi,t=>(r=(r=(r=(r=t).replace("data-yotpo-instance-id=","")).replace(/['"]+/g,"")).replace(/["']+/g,""),e)),r},getYotpoUri=e=>{if(!e)return"";let r="";return(e.replace(/src ?= ?"([^"]+)"/gi,t=>(r=(r=(r=(r=t).replace("src=","")).replace(/['"]+/g,"")).replace(/["']+/g,""),e)),r)?r:""};export{getKlaviyoCode,getKlaviyoFormCode,getKlaviyoScriptUri,getYotpoFormCode,getYotpoUri};
