let i;
const e = { triggerProxySso: "triggerProxySso" }, n = () => {
  i = (o) => {
    var r;
    const { origin: t } = new URL(location.href);
    (r = window.top) == null || r.postMessage(
      { type: e.triggerProxySso, data: { ...o || {}, redirect_uri: `${t}/` } },
      t
    );
  };
}, d = (o) => {
  window.top === window.self && window.addEventListener("message", (t) => {
    const { type: r, data: s } = t.data;
    r === e.triggerProxySso && (o == null || o(s));
  });
};
window.top !== window.self && n();
export {
  d as addMicroAppProxySsoEvent,
  i as proxySso
};
