import{E as t}from"./index-DCX9_fmV.js";function r(e){try{const{hostname:n}=new URL(e);return n==="localhost"||n==="127.0.0.1"||n==="[::1]"}catch{return!1}}async function o(e,n){if(r(e))return window.open(e,"_blank"),!0;try{return await t.confirm(n("chat.external_link.confirm.message",{url:e}),n("chat.external_link.confirm.title"),{confirmButtonText:n("yes"),cancelButtonText:n("no"),type:"warning"}),window.open(e,"_blank"),!0}catch{return!1}}export{o as c};
