const n = (t, i) => {
  if (!t) return 0;
  const e = document.createElement("div");
  e.style.visibility = "hidden", e.style.whiteSpace = "pre", e.style.display = "inline-block", e.style.fontSize = i + "px", e.textContent = t, document.body.appendChild(e);
  const d = e.offsetWidth;
  return document.body.removeChild(e), d;
};
export {
  n as calcTextWidth
};
