import { c } from './de470d67.js';

function getPathname() {
  // eslint-disable-next-line no-restricted-globals
  return location.pathname;
}
function getComponentOrDefine(name, comp) {
  if (!customElements.get(name)) {
    customElements.define(name, c(comp));
  } // customElement(name, comp as Component); }


  return customElements.get(name);
}
function redirect(pathname) {
  if (!pathname.startsWith("http")) {
    if (pathname === getPathname()) return; // eslint-disable-next-line no-restricted-globals

    history.pushState({}, "history", pathname);
    window.dispatchEvent(new PopStateEvent("popstate"));
    window.location.reload();
  } else {
    window.open(pathname);
  }
}

export { getComponentOrDefine as g, redirect as r };
//# sourceMappingURL=642a44cd.js.map
