import{a as u,q as c}from"./index-4caf8ca8-1783403522942v=1.0.0.js";function f(o){return/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/.test(o)}const d=""+new URL("../png/homepage-logo-3f054d5e-1783403522942v=1.0.0.png",import.meta.url).href,_=async(o,t)=>{var i,s;const r=u();if(t.front_rout&&(((i=t.front_rout)==null?void 0:i.indexOf("http://"))!==-1||((s=t.front_rout)==null?void 0:s.indexOf("https://"))!==-1)){window.open(t.front_rout,"_blank");return}if(t.rout_name==="sportsSumBase"){r.push({name:t.rout_name});return}const e=await c({mp_id:o.mp_id});let n=window.open();if(e.code===200){const a=`${p(o.mp_home)}${t.redirect||t.front_rout}?token=${e.data.auth_code}`;n.location.href=a,n=null}},p=o=>{if(!o)return;let t=f(o)?"http":"https";if(o.indexOf("/")!==-1){let r=o.split("/")[1];return`${location.origin}/${r}/#`}return`${t}://${o}/#`};export{d as _,_ as h};
