function Y(e) {
  "@babel/helpers - typeof";
  return Y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Y(e);
}
function Nr(e, t) {
  if (Y(e) != "object" || !e) return e;
  var r = e[Symbol.toPrimitive];
  if (r !== void 0) {
    var n = r.call(e, t || "default");
    if (Y(n) != "object") return n;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function nr(e) {
  var t = Nr(e, "string");
  return Y(t) == "symbol" ? t : t + "";
}
function K(e, t, r) {
  return (t = nr(t)) in e ? Object.defineProperty(e, t, {
    value: r,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = r, e;
}
function wt(e, t, r, n, o, i, a) {
  try {
    var l = e[i](a), c = l.value;
  } catch (u) {
    return void r(u);
  }
  l.done ? t(c) : Promise.resolve(c).then(n, o);
}
function ae(e) {
  return function() {
    var t = this, r = arguments;
    return new Promise(function(n, o) {
      var i = e.apply(t, r);
      function a(c) {
        wt(i, n, o, a, l, "next", c);
      }
      function l(c) {
        wt(i, n, o, a, l, "throw", c);
      }
      a(void 0);
    });
  };
}
function Wr(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var or = { exports: {} }, ir = { exports: {} };
(function(e) {
  function t(r) {
    "@babel/helpers - typeof";
    return e.exports = t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
      return typeof n;
    } : function(n) {
      return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
    }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
  }
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
})(ir);
var kr = ir.exports;
(function(e) {
  var t = kr.default;
  function r() {
    e.exports = r = function() {
      return o;
    }, e.exports.__esModule = !0, e.exports.default = e.exports;
    var n, o = {}, i = Object.prototype, a = i.hasOwnProperty, l = Object.defineProperty || function(E, v, y) {
      E[v] = y.value;
    }, c = typeof Symbol == "function" ? Symbol : {}, u = c.iterator || "@@iterator", s = c.asyncIterator || "@@asyncIterator", m = c.toStringTag || "@@toStringTag";
    function d(E, v, y) {
      return Object.defineProperty(E, v, {
        value: y,
        enumerable: !0,
        configurable: !0,
        writable: !0
      }), E[v];
    }
    try {
      d({}, "");
    } catch {
      d = function(y, P, L) {
        return y[P] = L;
      };
    }
    function f(E, v, y, P) {
      var L = v && v.prototype instanceof S ? v : S, I = Object.create(L.prototype), D = new B(P || []);
      return l(I, "_invoke", {
        value: ee(E, y, D)
      }), I;
    }
    function p(E, v, y) {
      try {
        return {
          type: "normal",
          arg: E.call(v, y)
        };
      } catch (P) {
        return {
          type: "throw",
          arg: P
        };
      }
    }
    o.wrap = f;
    var g = "suspendedStart", b = "suspendedYield", h = "executing", w = "completed", _ = {};
    function S() {
    }
    function T() {
    }
    function U() {
    }
    var O = {};
    d(O, u, function() {
      return this;
    });
    var A = Object.getPrototypeOf, x = A && A(A(X([])));
    x && x !== i && a.call(x, u) && (O = x);
    var j = U.prototype = S.prototype = Object.create(O);
    function M(E) {
      ["next", "throw", "return"].forEach(function(v) {
        d(E, v, function(y) {
          return this._invoke(v, y);
        });
      });
    }
    function R(E, v) {
      function y(L, I, D, C) {
        var N = p(E[L], E, I);
        if (N.type !== "throw") {
          var F = N.arg, k = F.value;
          return k && t(k) == "object" && a.call(k, "__await") ? v.resolve(k.__await).then(function(G) {
            y("next", G, D, C);
          }, function(G) {
            y("throw", G, D, C);
          }) : v.resolve(k).then(function(G) {
            F.value = G, D(F);
          }, function(G) {
            return y("throw", G, D, C);
          });
        }
        C(N.arg);
      }
      var P;
      l(this, "_invoke", {
        value: function(I, D) {
          function C() {
            return new v(function(N, F) {
              y(I, D, N, F);
            });
          }
          return P = P ? P.then(C, C) : C();
        }
      });
    }
    function ee(E, v, y) {
      var P = g;
      return function(L, I) {
        if (P === h) throw Error("Generator is already running");
        if (P === w) {
          if (L === "throw") throw I;
          return {
            value: n,
            done: !0
          };
        }
        for (y.method = L, y.arg = I; ; ) {
          var D = y.delegate;
          if (D) {
            var C = te(D, y);
            if (C) {
              if (C === _) continue;
              return C;
            }
          }
          if (y.method === "next") y.sent = y._sent = y.arg;
          else if (y.method === "throw") {
            if (P === g) throw P = w, y.arg;
            y.dispatchException(y.arg);
          } else y.method === "return" && y.abrupt("return", y.arg);
          P = h;
          var N = p(E, v, y);
          if (N.type === "normal") {
            if (P = y.done ? w : b, N.arg === _) continue;
            return {
              value: N.arg,
              done: y.done
            };
          }
          N.type === "throw" && (P = w, y.method = "throw", y.arg = N.arg);
        }
      };
    }
    function te(E, v) {
      var y = v.method, P = E.iterator[y];
      if (P === n) return v.delegate = null, y === "throw" && E.iterator.return && (v.method = "return", v.arg = n, te(E, v), v.method === "throw") || y !== "return" && (v.method = "throw", v.arg = new TypeError("The iterator does not provide a '" + y + "' method")), _;
      var L = p(P, E.iterator, v.arg);
      if (L.type === "throw") return v.method = "throw", v.arg = L.arg, v.delegate = null, _;
      var I = L.arg;
      return I ? I.done ? (v[E.resultName] = I.value, v.next = E.nextLoc, v.method !== "return" && (v.method = "next", v.arg = n), v.delegate = null, _) : I : (v.method = "throw", v.arg = new TypeError("iterator result is not an object"), v.delegate = null, _);
    }
    function re(E) {
      var v = {
        tryLoc: E[0]
      };
      1 in E && (v.catchLoc = E[1]), 2 in E && (v.finallyLoc = E[2], v.afterLoc = E[3]), this.tryEntries.push(v);
    }
    function q(E) {
      var v = E.completion || {};
      v.type = "normal", delete v.arg, E.completion = v;
    }
    function B(E) {
      this.tryEntries = [{
        tryLoc: "root"
      }], E.forEach(re, this), this.reset(!0);
    }
    function X(E) {
      if (E || E === "") {
        var v = E[u];
        if (v) return v.call(E);
        if (typeof E.next == "function") return E;
        if (!isNaN(E.length)) {
          var y = -1, P = function L() {
            for (; ++y < E.length; ) if (a.call(E, y)) return L.value = E[y], L.done = !1, L;
            return L.value = n, L.done = !0, L;
          };
          return P.next = P;
        }
      }
      throw new TypeError(t(E) + " is not iterable");
    }
    return T.prototype = U, l(j, "constructor", {
      value: U,
      configurable: !0
    }), l(U, "constructor", {
      value: T,
      configurable: !0
    }), T.displayName = d(U, m, "GeneratorFunction"), o.isGeneratorFunction = function(E) {
      var v = typeof E == "function" && E.constructor;
      return !!v && (v === T || (v.displayName || v.name) === "GeneratorFunction");
    }, o.mark = function(E) {
      return Object.setPrototypeOf ? Object.setPrototypeOf(E, U) : (E.__proto__ = U, d(E, m, "GeneratorFunction")), E.prototype = Object.create(j), E;
    }, o.awrap = function(E) {
      return {
        __await: E
      };
    }, M(R.prototype), d(R.prototype, s, function() {
      return this;
    }), o.AsyncIterator = R, o.async = function(E, v, y, P, L) {
      L === void 0 && (L = Promise);
      var I = new R(f(E, v, y, P), L);
      return o.isGeneratorFunction(v) ? I : I.next().then(function(D) {
        return D.done ? D.value : I.next();
      });
    }, M(j), d(j, m, "Generator"), d(j, u, function() {
      return this;
    }), d(j, "toString", function() {
      return "[object Generator]";
    }), o.keys = function(E) {
      var v = Object(E), y = [];
      for (var P in v) y.push(P);
      return y.reverse(), function L() {
        for (; y.length; ) {
          var I = y.pop();
          if (I in v) return L.value = I, L.done = !1, L;
        }
        return L.done = !0, L;
      };
    }, o.values = X, B.prototype = {
      constructor: B,
      reset: function(v) {
        if (this.prev = 0, this.next = 0, this.sent = this._sent = n, this.done = !1, this.delegate = null, this.method = "next", this.arg = n, this.tryEntries.forEach(q), !v) for (var y in this) y.charAt(0) === "t" && a.call(this, y) && !isNaN(+y.slice(1)) && (this[y] = n);
      },
      stop: function() {
        this.done = !0;
        var v = this.tryEntries[0].completion;
        if (v.type === "throw") throw v.arg;
        return this.rval;
      },
      dispatchException: function(v) {
        if (this.done) throw v;
        var y = this;
        function P(F, k) {
          return D.type = "throw", D.arg = v, y.next = F, k && (y.method = "next", y.arg = n), !!k;
        }
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var I = this.tryEntries[L], D = I.completion;
          if (I.tryLoc === "root") return P("end");
          if (I.tryLoc <= this.prev) {
            var C = a.call(I, "catchLoc"), N = a.call(I, "finallyLoc");
            if (C && N) {
              if (this.prev < I.catchLoc) return P(I.catchLoc, !0);
              if (this.prev < I.finallyLoc) return P(I.finallyLoc);
            } else if (C) {
              if (this.prev < I.catchLoc) return P(I.catchLoc, !0);
            } else {
              if (!N) throw Error("try statement without catch or finally");
              if (this.prev < I.finallyLoc) return P(I.finallyLoc);
            }
          }
        }
      },
      abrupt: function(v, y) {
        for (var P = this.tryEntries.length - 1; P >= 0; --P) {
          var L = this.tryEntries[P];
          if (L.tryLoc <= this.prev && a.call(L, "finallyLoc") && this.prev < L.finallyLoc) {
            var I = L;
            break;
          }
        }
        I && (v === "break" || v === "continue") && I.tryLoc <= y && y <= I.finallyLoc && (I = null);
        var D = I ? I.completion : {};
        return D.type = v, D.arg = y, I ? (this.method = "next", this.next = I.finallyLoc, _) : this.complete(D);
      },
      complete: function(v, y) {
        if (v.type === "throw") throw v.arg;
        return v.type === "break" || v.type === "continue" ? this.next = v.arg : v.type === "return" ? (this.rval = this.arg = v.arg, this.method = "return", this.next = "end") : v.type === "normal" && y && (this.next = y), _;
      },
      finish: function(v) {
        for (var y = this.tryEntries.length - 1; y >= 0; --y) {
          var P = this.tryEntries[y];
          if (P.finallyLoc === v) return this.complete(P.completion, P.afterLoc), q(P), _;
        }
      },
      catch: function(v) {
        for (var y = this.tryEntries.length - 1; y >= 0; --y) {
          var P = this.tryEntries[y];
          if (P.tryLoc === v) {
            var L = P.completion;
            if (L.type === "throw") {
              var I = L.arg;
              q(P);
            }
            return I;
          }
        }
        throw Error("illegal catch attempt");
      },
      delegateYield: function(v, y, P) {
        return this.delegate = {
          iterator: X(v),
          resultName: y,
          nextLoc: P
        }, this.method === "next" && (this.arg = n), _;
      }
    }, o;
  }
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
})(or);
var Jr = or.exports, Ne = Jr(), Fr = Ne;
try {
  regeneratorRuntime = Ne;
} catch {
  typeof globalThis == "object" ? globalThis.regeneratorRuntime = Ne : Function("r", "regeneratorRuntime = r")(Ne);
}
const J = /* @__PURE__ */ Wr(Fr);
function Hr(e) {
  if (Array.isArray(e)) return e;
}
function Br(e, t) {
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (r != null) {
    var n, o, i, a, l = [], c = !0, u = !1;
    try {
      if (i = (r = r.call(e)).next, t === 0) {
        if (Object(r) !== r) return;
        c = !1;
      } else for (; !(c = (n = i.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) ;
    } catch (s) {
      u = !0, o = s;
    } finally {
      try {
        if (!c && r.return != null && (a = r.return(), Object(a) !== a)) return;
      } finally {
        if (u) throw o;
      }
    }
    return l;
  }
}
function rt(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
  return n;
}
function ar(e, t) {
  if (e) {
    if (typeof e == "string") return rt(e, t);
    var r = {}.toString.call(e).slice(8, -1);
    return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? rt(e, t) : void 0;
  }
}
function qr() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function je(e, t) {
  return Hr(e) || Br(e, t) || ar(e, t) || qr();
}
var Te = "data-wujie-id", ke = "data-wujie-script-id", ur = "data-wujie-Flag", nt = "data-container-position-flag", Je = "data-container-overflow-flag", pt = "data-loading-flag", _t = "data-wujie-attach-css-flag", Gr = "wujie_iframe", Re = "_wujie_all_event", Qr = "position: fixed; z-index: 2147483647; visibility: hidden; inset: 0px; backface-visibility: hidden;", $r = "position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index:1;", Yr = `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="30px" viewBox="0 0 24 30">
<rect x="0" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
<rect x="10" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
<rect x="20" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
</svg>`, Xr = "url参数为空", cr = "子应用调用reload无法生效", lr = "此报错可以忽略，iframe主动中断主应用代码在子应用运行", Vr = lr + "，详见：https://github.com/Tencent/wujie/issues/54", St = "事件订阅数量为空", zr = "window上不存在fetch属性，需要自行polyfill", Zr = "当前浏览器不支持无界，子应用将采用iframe方式渲染", Ie = "脚本请求出现错误", ze = "样式请求出现错误", Pt = "html请求出现错误", It = "无界组件短时间重复渲染了两次，可能存在性能问题请检查代码", Kr = "目标Script尚未准备好或已经被移除", en = "不支持document.getElementById()传入特殊字符，请参考document.querySelector文档";
function fe(e) {
  return typeof e == "function";
}
function tn(e) {
  return (e == null ? void 0 : e.toUpperCase()) === "LINK" || (e == null ? void 0 : e.toUpperCase()) === "STYLE" || (e == null ? void 0 : e.toUpperCase()) === "SCRIPT" || (e == null ? void 0 : e.toUpperCase()) === "IFRAME";
}
var sr = window.Proxy && window.CustomElementRegistry, rn = typeof document.all == "function" && typeof document.all > "u", Lt = /* @__PURE__ */ new WeakMap(), Fe = function(t) {
  if (Lt.has(t))
    return !0;
  var r = rn ? typeof t == "function" && typeof t < "u" : typeof t == "function";
  return r && Lt.set(t, r), r;
}, Ze = /* @__PURE__ */ new WeakMap();
function fr(e) {
  if (Ze.has(e))
    return Ze.get(e);
  var t = e.name.indexOf("bound ") === 0 && !e.hasOwnProperty("prototype");
  return Ze.set(e, t), t;
}
var Ke = /* @__PURE__ */ new WeakMap();
function ht(e) {
  var t = e.prototype && e.prototype.constructor === e && Object.getOwnPropertyNames(e.prototype).length > 1;
  if (t) return !0;
  if (Ke.has(e))
    return Ke.get(e);
  var r = t;
  if (!r) {
    var n = e.toString(), o = /^function\b\s[A-Z].*/, i = /^class\b/;
    r = o.test(n) || i.test(n);
  }
  return Ke.set(e, r), r;
}
var Le = /* @__PURE__ */ new WeakMap();
function nn(e) {
  Fe(e) && !fr(e) && !ht(e) && (Le.has(e) || Le.set(e, e));
}
function Pe(e, t) {
  var r = e[t];
  if (Le.has(r))
    return Le.get(r);
  if (Fe(r) && !fr(r) && !ht(r)) {
    var n = Function.prototype.bind.call(r, e);
    Le.set(r, n);
    for (var o in r)
      n[o] = r[o];
    return r.hasOwnProperty("prototype") && !n.hasOwnProperty("prototype") && Object.defineProperty(n, "prototype", {
      value: r.prototype,
      enumerable: !1,
      writable: !0
    }), n;
  }
  return r;
}
function dr(e) {
  return window.document.querySelector("iframe[".concat(Te, '="').concat(e, '"]'));
}
function Qe(e, t) {
  Object.keys(t).forEach(function(r) {
    e.setAttribute(r, t[r]);
  });
}
function vr(e) {
  if (!e)
    throw V(Xr), new Error();
  var t = z(e), r = t.protocol + "//" + t.host, n = t.pathname + t.search + t.hash;
  return n.startsWith("/") || (n = "/" + n), {
    urlElement: t,
    appHostPath: r,
    appRoutePath: n
  };
}
function z(e) {
  var t = window.document.createElement("a");
  return t.href = e, t.href = t.href, t;
}
function _e(e) {
  var t = e.search.replace("?", "").split("&"), r = {};
  return t.forEach(function(n) {
    var o = n.split("="), i = je(o, 2), a = i[0], l = i[1];
    a && l && (r[a] = l);
  }), r;
}
function on(e) {
  var t = _e(z(window.location.href));
  return Object.keys(t).includes(e);
}
function me(e, t, r) {
  var n = e.Element.prototype.setAttribute;
  t.prototype.setAttribute = function(u, s) {
    var m = s;
    u === r && (m = ue(s, this.baseURI || "", !0)), n.call(this, u, m);
  };
  var o = Object.getOwnPropertyDescriptor(t.prototype, r), i = o.enumerable, a = o.configurable, l = o.get, c = o.set;
  Object.defineProperty(t.prototype, r, {
    enumerable: i,
    configurable: a,
    get: function() {
      return l.call(this);
    },
    set: function(s) {
      c.call(this, ue(s, this.baseURI, !0));
    }
  });
}
function $e(e) {
  var t = e;
  return t.protocol + "//" + t.host + t.pathname;
}
function ue(e, t, r) {
  try {
    return e && (r && e.startsWith("#") ? e : new URL(e, t).href);
  } catch {
    return e;
  }
}
function an(e, t) {
  var r, n = z(window.location.href), o = _e(n);
  n = null;
  var i = window.decodeURIComponent(o[e] || ""), a = (r = i.match(/^{([^}]*)}/)) === null || r === void 0 ? void 0 : r[1];
  return t && a ? i.replace("{".concat(a, "}"), t[a]) : i;
}
var pr = window.requestIdleCallback || function(e) {
  return setTimeout(e, 1);
};
function hr(e) {
  return typeof e == "string" ? document.querySelector(e) : e;
}
function H(e, t) {
  var r;
  (r = console) === null || r === void 0 || r.warn("[wujie warn]: ".concat(e), t);
}
function V(e, t) {
  var r;
  (r = console) === null || r === void 0 || r.error("[wujie error]: ".concat(e), t);
}
function ot(e) {
  var t = e.indexOf(">") + 1, r = e.lastIndexOf("<");
  return e.substring(t, r);
}
function un(e) {
  if (Y(e) === "object")
    return "/";
  try {
    var t = new URL(e, location.href), r = t.origin, n = t.pathname, o = n.split("/");
    return o.pop(), "".concat(r).concat(o.join("/"), "/");
  } catch (i) {
    return console.warn(i), "";
  }
}
function Ye(e) {
  return function(t) {
    for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
      n[o - 1] = arguments[o];
    return e.reduce(function(i, a) {
      return fe(a) ? a.apply(void 0, [i].concat(n)) : i;
    }, t || "");
  };
}
function xe(e) {
  Promise.resolve().then(e);
}
function Q(e, t) {
  for (var r = arguments.length, n = new Array(r > 2 ? r - 2 : 0), o = 2; o < r; o++)
    n[o - 2] = arguments[o];
  try {
    e && e.length > 0 && e.map(function(i) {
      return i[t];
    }).filter(function(i) {
      return fe(i);
    }).forEach(function(i) {
      return i.apply(void 0, n);
    });
  } catch (i) {
    V(i);
  }
}
function Xe(e) {
  var t;
  return ((t = e.tagName) === null || t === void 0 ? void 0 : t.toUpperCase()) === "SCRIPT";
}
var cn = 1;
function mr(e, t) {
  if (Xe(e)) {
    var r = t || String(cn++);
    e.setAttribute(ke, r);
  }
}
function gr(e) {
  return Xe(e) ? e.getAttribute(ke) : null;
}
function ln(e, t) {
  return {
    name: e.name,
    el: e.el || (t == null ? void 0 : t.el),
    url: e.url || (t == null ? void 0 : t.url),
    html: e.html || (t == null ? void 0 : t.html),
    exec: e.exec !== void 0 ? e.exec : t == null ? void 0 : t.exec,
    replace: e.replace || (t == null ? void 0 : t.replace),
    fetch: e.fetch || (t == null ? void 0 : t.fetch),
    props: e.props || (t == null ? void 0 : t.props),
    sync: e.sync !== void 0 ? e.sync : t == null ? void 0 : t.sync,
    prefix: e.prefix || (t == null ? void 0 : t.prefix),
    loading: e.loading || (t == null ? void 0 : t.loading),
    // 默认 {}
    attrs: e.attrs !== void 0 ? e.attrs : (t == null ? void 0 : t.attrs) || {},
    degradeAttrs: e.degradeAttrs !== void 0 ? e.degradeAttrs : (t == null ? void 0 : t.degradeAttrs) || {},
    // 默认 true
    fiber: e.fiber !== void 0 ? e.fiber : (t == null ? void 0 : t.fiber) !== void 0 ? t == null ? void 0 : t.fiber : !0,
    alive: e.alive !== void 0 ? e.alive : t == null ? void 0 : t.alive,
    degrade: e.degrade !== void 0 ? e.degrade : t == null ? void 0 : t.degrade,
    plugins: e.plugins || (t == null ? void 0 : t.plugins),
    lifecycles: {
      beforeLoad: e.beforeLoad || (t == null ? void 0 : t.beforeLoad),
      beforeMount: e.beforeMount || (t == null ? void 0 : t.beforeMount),
      afterMount: e.afterMount || (t == null ? void 0 : t.afterMount),
      beforeUnmount: e.beforeUnmount || (t == null ? void 0 : t.beforeUnmount),
      afterUnmount: e.afterUnmount || (t == null ? void 0 : t.afterUnmount),
      activated: e.activated || (t == null ? void 0 : t.activated),
      deactivated: e.deactivated || (t == null ? void 0 : t.deactivated),
      loadError: e.loadError || (t == null ? void 0 : t.loadError)
    }
  };
}
function Ue(e, t, r) {
  var n;
  typeof window.CustomEvent == "function" ? n = new CustomEvent(t, {
    detail: r
  }) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(t, !0, !1, r)), e.dispatchEvent(n);
}
function yr() {
  throw H(Vr), new Error(lr);
}
var sn = /(<script[\s\S]*?>)[\s\S]*?<\/script>/gi, fn = /<(script)\s+((?!type=('|")text\/ng\x2Dtemplate\3)[\s\S])*?>[\s\S]*?<\/\1>/i, Tt = /.*\ssrc=('|")?([^>'"\s]+)/, dn = /.*\stype=('|")?([^>'"\s]+)/, vn = /.*\sentry\s*.*/, pn = /.*\sasync\s*.*/, hn = /.*\sdefer\s*.*/, mn = /.*\snomodule\s*.*/, gn = /.*\stype=('|")?module('|")?\s*.*/, yn = /<(link)\s+[\s\S]*?>/gi, En = /\srel=('|")?(preload|prefetch|modulepreload)\1/, Ot = /.*\shref=('|")?([^>'"\s]+)/, bn = /.*\sas=('|")?font\1.*/, wn = /<style[^>]*>[\s\S]*?<\/style>/gi, _n = /\s+rel=('|")?stylesheet\1.*/, Sn = /.*\shref=('|")?([^>'"\s]+)/, Pn = /<!--([\s\S]*?)-->/g, In = /<link(\s+|\s+[\s\S]+\s+)ignore(\s*|\s+[\s\S]*|=[\s\S]*)>/i, Ln = /<style(\s+|\s+[\s\S]+\s+)ignore(\s*|\s+[\s\S]*|=[\s\S]*)>/i, Tn = /<script(\s+|\s+[\s\S]+\s+)ignore(\s*|\s+[\s\S]*|=[\s\S]*)>/i, On = /.*\scrossorigin=?('|")?(use-credentials|anonymous)?('|")?/i;
function Ct(e) {
  return e.startsWith("//") || e.startsWith("http://") || e.startsWith("https://");
}
function jt(e, t) {
  return new URL(e, t).toString();
}
function Cn(e) {
  var t = ["text/javascript", "module", "application/javascript", "text/ecmascript", "application/ecmascript"];
  return !e || t.indexOf(e) !== -1;
}
function se(e) {
  var t = /<[-\w]+\s+([^>]*)>/i, r = t.exec(e);
  if (!r)
    return {};
  for (var n = r[1], o = /([^\s=]+)\s*=\s*(['"])(.*?)\2/g, i = {}, a; (a = o.exec(n)) !== null; ) {
    var l = a[1], c = a[3];
    i[l] = c;
  }
  return i;
}
function jn() {
  var e = window.document.createElement("script");
  return "noModule" in e;
}
var it = function(t) {
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return "<!-- ".concat(r ? "prefetch/preload/modulepreload" : "", " link ").concat(t, " replaced by wujie -->");
}, Er = function(t) {
  return "<!-- inline-style-".concat(t, " replaced by wujie -->");
}, Rn = function(t) {
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return "<!-- ".concat(r, " script ").concat(t, " replaced by wujie -->");
}, xn = "<!-- inline scripts replaced by wujie -->", Ae = function(t) {
  return "<!-- ignore asset ".concat(t || "file", " replaced by wujie -->");
}, Rt = function(t, r) {
  return "<!-- ".concat(r ? "nomodule" : "module", " script ").concat(t, " ignored by wujie -->");
};
function Un(e, t, r) {
  var n = [], o = [], i = null, a = jn(), l = e.replace(Pn, "").replace(yn, function(u) {
    var s = !!u.match(_n);
    if (s) {
      var m = u.match(Sn), d = u.match(In);
      if (m) {
        var f = m && m[2], p = f;
        return f && !Ct(f) && (p = jt(f, t)), d ? Ae(p) : (o.push({
          src: p
        }), it(p));
      }
    }
    var g = u.match(En) && u.match(Ot) && !u.match(bn);
    if (g) {
      var b = u.match(Ot), h = je(b, 3), w = h[2];
      return it(w, !0);
    }
    return u;
  }).replace(wn, function(u) {
    if (Ln.test(u))
      return Ae("style file");
    var s = ot(u);
    return o.push({
      src: "",
      content: s
    }), Er(o.length - 1);
  }).replace(sn, function(u, s) {
    var m = s.match(Tn), d = !!s.match(gn), f = s.match(On), p = (f == null ? void 0 : f[2]) || "", g = a && !!s.match(mn) || !a && d, b = s.match(dn), h = b && b[2];
    if (!Cn(h))
      return u;
    if (fn.test(u) && s.match(Tt)) {
      var w = s.match(vn), _ = s.match(Tt), S = _ && _[2];
      if (i && w)
        throw new SyntaxError("You should not set multiply entry script!");
      if (S && !Ct(S) && (S = jt(S, t)), i = i || w && S, m)
        return Ae(S || "js file");
      if (g)
        return Rt(S || "js file", a);
      if (S) {
        var T = !!s.match(pn), U = !!s.match(hn);
        return n.push(T || U ? {
          async: T,
          defer: U,
          src: S,
          module: d,
          crossorigin: !!f,
          crossoriginType: p,
          attrs: se(u)
        } : {
          src: S,
          module: d,
          crossorigin: !!f,
          crossoriginType: p,
          attrs: se(u)
        }), Rn(S, T && "async" || U && "defer" || "");
      }
      return u;
    } else {
      if (m)
        return Ae("js file");
      if (g)
        return Rt("js file", a);
      var O = ot(u), A = O.split(/[\r\n]+/).every(function(x) {
        return !x.trim() || x.trim().startsWith("//");
      });
      return !A && O && n.push({
        src: "",
        content: O,
        module: d,
        crossorigin: !!f,
        crossoriginType: p,
        attrs: se(u)
      }), xn;
    }
  }), c = {
    template: l,
    scripts: n,
    styles: o,
    // set the last script as entry if have not set
    entry: i || n[n.length - 1]
  };
  return c;
}
function An(e) {
  if (Array.isArray(e)) return rt(e);
}
function Mn(e) {
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
function Dn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function mt(e) {
  return An(e) || Mn(e) || ar(e) || Dn();
}
function at(e) {
  var t = e.plugins, r = e.replace;
  return function(n) {
    var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", i = arguments.length > 2 ? arguments[2] : void 0;
    return Ye(t.map(function(a) {
      return a.cssLoader;
    }))(r ? r(n) : n, o, i);
  };
}
function Nn(e) {
  var t = e.plugins, r = e.replace;
  return function(n) {
    var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", i = arguments.length > 2 ? arguments[2] : void 0;
    return Ye(t.map(function(a) {
      return a.jsLoader;
    }))(r ? r(n) : n, o, i);
  };
}
function He(e, t) {
  var r = t.map(function(o) {
    return o[e];
  }).filter(function(o) {
    return o == null ? void 0 : o.length;
  }), n = r.reduce(function(o, i) {
    return o.concat(i);
  }, []);
  return e === "cssBeforeLoaders" ? n.reverse() : n;
}
function oe(e, t) {
  return t.map(function(r) {
    return r[e];
  }).filter(function(r) {
    return r == null ? void 0 : r.length;
  }).reduce(function(r, n) {
    return r.concat(n);
  }, []);
}
function ie(e, t) {
  return t.some(function(r) {
    return typeof r == "string" ? e === r : r.test(e);
  });
}
function Wn(e, t, r) {
  var n = t ? ue(t, r) : r, o = /(url\((?!['"]?(?:data):)['"]?)([^'")]*)(['"]?\))/g;
  return e.replace(o, function(i, a, l, c) {
    var u = ue(l, n);
    return a + u + c;
  });
}
var xt = {
  cssLoader: Wn,
  // fix https://github.com/Tencent/wujie/issues/455
  cssBeforeLoaders: [{
    content: "html {view-transition-name: none;}"
  }]
};
function br(e) {
  return Array.isArray(e) ? [xt].concat(mt(e)) : [xt];
}
function Ut(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function Ee(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Ut(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ut(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
var kn = {}, et = {}, tt = {};
if (!window.fetch)
  throw V(zr), new Error();
var gt = window.fetch.bind(window);
function Jn(e) {
  return e;
}
function Fn(e, t, r) {
  return ut.apply(this, arguments);
}
function ut() {
  return ut = ae(/* @__PURE__ */ J.mark(function e(t, r, n) {
    var o, i, a, l;
    return J.wrap(function(u) {
      for (; ; ) switch (u.prev = u.next) {
        case 0:
          return o = $e(t.proxyLocation), i = Ye(t.plugins.map(function(s) {
            return s.cssLoader;
          })), a = n().map(function(s) {
            var m = s.src, d = s.ignore, f = s.contentPromise;
            return {
              src: m,
              ignore: d,
              contentPromise: f.then(function(p) {
                return i(p, m, o);
              })
            };
          }), u.next = 5, Hn(r, a);
        case 5:
          return l = u.sent, u.abrupt("return", t.replace ? t.replace(l) : l);
        case 7:
        case "end":
          return u.stop();
      }
    }, e);
  })), ut.apply(this, arguments);
}
function Hn(e, t) {
  return ct.apply(this, arguments);
}
function ct() {
  return ct = ae(/* @__PURE__ */ J.mark(function e(t, r) {
    var n;
    return J.wrap(function(i) {
      for (; ; ) switch (i.prev = i.next) {
        case 0:
          return n = t, i.abrupt("return", Promise.all(r.map(function(a, l) {
            return a.contentPromise.then(function(c) {
              a.src ? n = n.replace(it(a.src), a.ignore ? '<link href="'.concat(a.src, '" rel="stylesheet" type="text/css">') : "<style>/* ".concat(a.src, " */").concat(c, "</style>")) : c && (n = n.replace(Er(l), "<style>/* inline-style-".concat(l, " */").concat(c, "</style>")));
            });
          })).then(function() {
            return n;
          }));
        case 2:
        case "end":
          return i.stop();
      }
    }, e);
  })), ct.apply(this, arguments);
}
var Bn = function(t) {
  return t.startsWith("<");
}, We = function(t, r, n, o, i) {
  return r[t] || (r[t] = n(t).then(function(a) {
    if (a.status >= 400) {
      if (r[t] = null, o)
        return V(ze, {
          src: t,
          response: a
        }), i == null || i(t, new Error(ze)), "";
      throw V(Ie, {
        src: t,
        response: a
      }), i == null || i(t, new Error(Ie)), new Error(Ie);
    }
    return a.text();
  }).catch(function(a) {
    return r[t] = null, o ? (V(ze, t), i == null || i(t, a), "") : (V(Ie, t), i == null || i(t, a), "");
  }));
};
function Be(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : gt, r = arguments.length > 2 ? arguments[2] : void 0;
  return e.map(function(n) {
    var o = n.src, i = n.content, a = n.ignore;
    return i ? {
      src: "",
      contentPromise: Promise.resolve(i)
    } : Bn(o) ? {
      src: "",
      contentPromise: Promise.resolve(ot(o))
    } : {
      src: o,
      ignore: a,
      contentPromise: a ? Promise.resolve("") : We(o, kn, t, !0, r)
    };
  });
}
function wr(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : gt, r = arguments.length > 2 ? arguments[2] : void 0, n = arguments.length > 3 ? arguments[3] : void 0;
  return e.map(function(o) {
    var i = o.src, a = o.async, l = o.defer, c = o.module, u = o.ignore, s = null;
    return (a || l) && i && !c ? s = new Promise(function(m, d) {
      return n ? pr(function() {
        return We(i, et, t, !1, r).then(m, d);
      }) : We(i, et, t, !1, r).then(m, d);
    }) : c && i || u ? s = Promise.resolve("") : i ? s = We(i, et, t, !1, r) : s = Promise.resolve(o.content), c && !a && (o.defer = !0), Ee(Ee({}, o), {}, {
      contentPromise: s
    });
  });
}
function At(e) {
  var t, r, n = e.url, o = e.opts, i = e.html, a = (t = o.fetch) !== null && t !== void 0 ? t : gt, l = (r = o.fiber) !== null && r !== void 0 ? r : !0, c = o.plugins, u = o.loadError, s = c ? Ye(c.map(function(h) {
    return h.htmlLoader;
  })) : Jn, m = oe("jsExcludes", c), d = oe("cssExcludes", c), f = oe("jsIgnores", c), p = oe("cssIgnores", c), g = un, b = function(w, _, S) {
    return (_ ? Promise.resolve(_) : a(w).then(function(T) {
      return T.status >= 400 ? (V(Pt, {
        url: w,
        response: T
      }), u == null || u(w, new Error(Pt)), "") : T.text();
    }).catch(function(T) {
      return tt[w] = null, u == null || u(w, T), Promise.reject(T);
    })).then(function(T) {
      var U = g(w), O = Un(S(T), U), A = O.template, x = O.scripts, j = O.styles;
      return {
        template: A,
        assetPublicPath: U,
        getExternalScripts: function() {
          return wr(x.filter(function(R) {
            return !R.src || !ie(R.src, m);
          }).map(function(R) {
            return Ee(Ee({}, R), {}, {
              ignore: R.src && ie(R.src, f)
            });
          }), a, u, l);
        },
        getExternalStyleSheets: function() {
          return Be(j.filter(function(R) {
            return !R.src || !ie(R.src, d);
          }).map(function(R) {
            return Ee(Ee({}, R), {}, {
              ignore: R.src && ie(R.src, p)
            });
          }), a, u);
        }
      };
    });
  };
  return o != null && o.plugins.some(function(h) {
    return h.htmlLoader;
  }) ? b(n, i, s) : tt[n] || (tt[n] = b(n, i, s));
}
function yt(e, t) {
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}
function qn(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, nr(n.key), n);
  }
}
function Et(e, t, r) {
  return t && qn(e.prototype, t), Object.defineProperty(e, "prototype", {
    writable: !1
  }), e;
}
function Oe(e, t) {
  return Oe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
    return r.__proto__ = n, r;
  }, Oe(e, t);
}
function Gn(e, t) {
  if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
  e.prototype = Object.create(t && t.prototype, {
    constructor: {
      value: e,
      writable: !0,
      configurable: !0
    }
  }), Object.defineProperty(e, "prototype", {
    writable: !1
  }), t && Oe(e, t);
}
function Qn(e) {
  if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e;
}
function $n(e, t) {
  if (t && (Y(t) == "object" || typeof t == "function")) return t;
  if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
  return Qn(e);
}
function Ce(e) {
  return Ce = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
    return t.__proto__ || Object.getPrototypeOf(t);
  }, Ce(e);
}
function Yn(e) {
  try {
    return Function.toString.call(e).indexOf("[native code]") !== -1;
  } catch {
    return typeof e == "function";
  }
}
function _r() {
  try {
    var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    }));
  } catch {
  }
  return (_r = function() {
    return !!e;
  })();
}
function Xn(e, t, r) {
  if (_r()) return Reflect.construct.apply(null, arguments);
  var n = [null];
  n.push.apply(n, t);
  var o = new (e.bind.apply(e, n))();
  return r && Oe(o, r.prototype), o;
}
function lt(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return lt = function(n) {
    if (n === null || !Yn(n)) return n;
    if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
    if (t !== void 0) {
      if (t.has(n)) return t.get(n);
      t.set(n, o);
    }
    function o() {
      return Xn(n, arguments, Ce(this).constructor);
    }
    return o.prototype = Object.create(n.prototype, {
      constructor: {
        value: o,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), Oe(o, n);
  }, lt(e);
}
function Mt(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function Dt(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Mt(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Mt(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
var Z = window.__POWERED_BY_WUJIE__ ? window.__WUJIE.inject.idToSandboxMap : /* @__PURE__ */ new Map();
function de(e) {
  var t;
  return ((t = Z.get(e)) === null || t === void 0 ? void 0 : t.wujie) || null;
}
function Vn(e) {
  var t;
  return ((t = Z.get(e)) === null || t === void 0 ? void 0 : t.options) || null;
}
function zn(e, t) {
  var r = Z.get(e);
  r ? Z.set(e, Dt(Dt({}, r), {}, {
    wujie: t
  })) : Z.set(e, {
    wujie: t
  });
}
function Zn(e) {
  var t = Z.get(e);
  t != null && t.options && Z.set(e, {
    options: t.options
  }), Z.delete(e);
}
var W = {
  // 降级场景下需要本地特殊处理的属性
  modifyLocalProperties: ["createElement", "createTextNode", "documentURI", "URL", "getElementsByTagName"],
  // 子应用需要手动修正的属性方法
  modifyProperties: ["createElement", "createTextNode", "documentURI", "URL", "getElementsByTagName", "getElementsByClassName", "getElementsByName", "getElementById", "querySelector", "querySelectorAll", "documentElement", "scrollingElement", "forms", "images", "links"],
  // 需要从shadowRoot中获取的属性
  shadowProperties: ["activeElement", "childElementCount", "children", "firstElementChild", "firstChild", "fullscreenElement", "lastElementChild", "pictureInPictureElement", "pointerLockElement", "styleSheets"],
  // 需要从shadowRoot中获取的方法
  shadowMethods: ["append", "contains", "getSelection", "elementFromPoint", "elementsFromPoint", "getAnimations", "replaceChildren"],
  // 需要从主应用document中获取的属性
  documentProperties: ["characterSet", "compatMode", "contentType", "designMode", "dir", "doctype", "embeds", "fullscreenEnabled", "hidden", "implementation", "lastModified", "pictureInPictureEnabled", "plugins", "readyState", "referrer", "visibilityState", "fonts"],
  // 需要从主应用document中获取的方法
  documentMethods: ["execCommand", "caretPositionFromPoint", "createRange", "exitFullscreen", "exitPictureInPicture", "getElementsByTagNameNS", "hasFocus", "prepend"],
  // 需要从主应用document中获取的事件
  documentEvents: ["onpointerlockchange", "onpointerlockerror", "onbeforecopy", "onbeforecut", "onbeforepaste", "onfreeze", "onresume", "onsearch", "onfullscreenchange", "onfullscreenerror", "onsecuritypolicyviolation", "onvisibilitychange"],
  // 无需修改原型的属性
  ownerProperties: ["head", "body"]
}, Nt = ["DOMContentLoaded", "readystatechange"], Kn = ["onreadystatechange"], Wt = ["fullscreenchange", "fullscreenerror", "selectionchange", "visibilitychange", "wheel", "keydown", "keypress", "keyup"], kt = ["gotpointercapture", "lostpointercapture"], Jt = ["hashchange", "popstate", "DOMContentLoaded", "load", "beforeunload", "unload", "message", "error", "unhandledrejection"], eo = ["onload", "onbeforeunload", "onunload"], to = {
  IMG: "src",
  A: "href",
  SOURCE: "src"
}, ro = ["getComputedStyle", "visualViewport", "matchMedia", "DOMParser"], no = [/animationFrame$/i, /resizeObserver$|mutationObserver$|intersectionObserver$/i, /height$|width$|left$/i, /^screen/i, /X$|Y$/], Sr = HTMLElement.prototype.appendChild, Pr = HTMLElement.prototype.removeChild, Ft = HTMLElement.prototype.contains, oo = HTMLHeadElement.prototype.insertBefore, io = HTMLBodyElement.prototype.insertBefore, bt = Node.prototype.addEventListener, Ve = Node.prototype.removeEventListener, Ht = window.addEventListener, Bt = window.removeEventListener, ve = Node.prototype.appendChild, pe = window.__POWERED_BY_WUJIE__ ? window.__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__ : Document.prototype.querySelector;
function qt(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function ge(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? qt(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : qt(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
function ao(e, t) {
  return Object.defineProperties(e, {
    srcElement: {
      get: t
    },
    target: {
      get: t
    }
  }), e;
}
function Me(e, t) {
  var r = new CustomEvent(t), n = ao(r, function() {
    return e;
  });
  fe(e["on".concat(t)]) ? e["on".concat(t)](n) : e.dispatchEvent(n);
}
function be(e, t) {
  if (!(!e.innerHTML || t.degrade)) {
    var r = function() {
      var o = jr([e.sheet]), i = je(o, 2), a = i[0], l = i[1];
      a && t.shadowRoot.head.appendChild(a), l && t.shadowRoot.host.appendChild(l), e._patcher = void 0;
    };
    e._patcher && clearTimeout(e._patcher), e._patcher = setTimeout(r, 50);
  }
}
function uo(e, t, r, n) {
  var o;
  if (e._hasPatchStyle) return;
  var i = Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML"), a = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "innerText"), l = Object.getOwnPropertyDescriptor(Node.prototype, "textContent"), c = (o = e.sheet) === null || o === void 0 ? void 0 : o.insertRule;
  function u() {
    c && (e.sheet.insertRule = function(s, m) {
      return i ? e.innerHTML += s : e.innerText += s, c.call(e.sheet, s, m);
    });
  }
  u(), i && Object.defineProperties(e, {
    innerHTML: {
      get: function() {
        return i.get.call(e);
      },
      set: function(m) {
        var d = this;
        i.set.call(e, t(m, "", n)), xe(function() {
          return be(d, r);
        });
      }
    }
  }), Object.defineProperties(e, {
    innerText: {
      get: function() {
        return a.get.call(e);
      },
      set: function(m) {
        var d = this;
        a.set.call(e, t(m, "", n)), xe(function() {
          return be(d, r);
        });
      }
    },
    textContent: {
      get: function() {
        return l.get.call(e);
      },
      set: function(m) {
        var d = this;
        l.set.call(e, t(m, "", n)), xe(function() {
          return be(d, r);
        });
      }
    },
    appendChild: {
      value: function(m) {
        var d = this;
        if (xe(function() {
          return be(d, r);
        }), m.nodeType === Node.TEXT_NODE) {
          var f = ve.call(e, e.ownerDocument.createTextNode(t(m.textContent, "", n)));
          return u(), f;
        } else return ve(m);
      }
    },
    _hasPatchStyle: {
      get: function() {
        return !0;
      }
    }
  });
}
var Gt = Promise.resolve();
function De(e) {
  return function(r, n) {
    var o = this, i = r, a = e.rawDOMAppendOrInsertBefore, l = e.wujieId, c = de(l), u = c.styleSheetElements, s = c.replace, m = c.fetch, d = c.plugins, f = c.iframe, p = c.lifecycles, g = c.proxyLocation, b = c.fiber;
    if (!tn(i.tagName) || !l) {
      var h = a.call(this, i, n);
      return ce(i, f.contentWindow), Q(d, "appendOrInsertElementHook", i, f.contentWindow), h;
    }
    var w = f.contentDocument, _ = $e(g);
    if (i.tagName) {
      var S;
      switch ((S = i.tagName) === null || S === void 0 ? void 0 : S.toUpperCase()) {
        case "LINK": {
          var T = i, U = T.href, O = T.rel, A = T.type, x = O === "stylesheet" || A === "text/css" || U.endsWith(".css");
          if (!x) {
            var j = a.call(this, i, n);
            return Q(d, "appendOrInsertElementHook", i, f.contentWindow), j;
          }
          U && !ie(U, oe("cssExcludes", d)) && Be([{
            src: U,
            ignore: ie(U, oe("cssIgnores", d))
          }], m, p.loadError).forEach(function(N) {
            var F = N.src, k = N.ignore, G = N.contentPromise;
            return G.then(function(Ar) {
              var Mr = se(i.outerHTML);
              if (k && F)
                a.call(o, i, n);
              else {
                var Se = w.createElement("style"), Dr = at({
                  plugins: d,
                  replace: s
                });
                Se.innerHTML = Dr(Ar, F, _), u.push(Se), Qe(Se, Mr), a.call(o, Se, n), be(Se, c), Me(i, "load");
              }
              i = null;
            }, function() {
              Me(i, "error"), i = null;
            });
          });
          var M = w.createComment("dynamic link ".concat(U, " replaced by wujie"));
          return a.call(this, M, n);
        }
        case "STYLE": {
          var R = r;
          u.push(R);
          var ee = R.innerHTML, te = at({
            plugins: d,
            replace: s
          });
          ee && (R.innerHTML = te(ee, "", _));
          var re = a.call(this, i, n);
          return uo(R, te, c, _), be(R, c), Q(d, "appendOrInsertElementHook", i, f.contentWindow), re;
        }
        case "SCRIPT": {
          mr(i);
          var q = i, B = q.src, X = q.text, E = q.type, v = q.crossOrigin;
          if (B && !ie(B, oe("jsExcludes", d))) {
            var y = function(F) {
              if (c.iframe === null) return H(It);
              var k = function() {
                Me(i, "load"), i = null;
              };
              $(ge(ge({}, F), {}, {
                onload: k
              }), c.iframe.contentWindow, i);
            }, P = {
              src: B,
              module: E === "module",
              crossorigin: v !== null,
              crossoriginType: v || "",
              ignore: ie(B, oe("jsIgnores", d)),
              attrs: se(i.outerHTML)
            };
            wr([P], m, p.loadError, b).forEach(function(N) {
              Gt = Gt.then(function() {
                return N.contentPromise.then(function(F) {
                  var k;
                  if (c.execQueue === null) return H(It);
                  var G = (k = c.execQueue) === null || k === void 0 ? void 0 : k.length;
                  c.execQueue.push(function() {
                    return b ? c.requestIdleCallback(function() {
                      y(ge(ge({}, N), {}, {
                        content: F
                      }));
                    }) : y(ge(ge({}, N), {}, {
                      content: F
                    }));
                  }), G || c.execQueue.shift()();
                }, function() {
                  Me(i, "error"), i = null;
                });
              });
            });
          } else {
            var L, I = (L = c.execQueue) === null || L === void 0 ? void 0 : L.length;
            c.execQueue.push(function() {
              return b ? c.requestIdleCallback(function() {
                $({
                  src: null,
                  content: X,
                  attrs: se(i.outerHTML)
                }, c.iframe.contentWindow, i);
              }) : $({
                src: null,
                content: X,
                attrs: se(i.outerHTML)
              }, c.iframe.contentWindow, i);
            }), I || c.execQueue.shift()();
          }
          var D = w.createComment("dynamic script ".concat(B, " replaced by wujie"));
          return a.call(this, D, n);
        }
        case "IFRAME": {
          if (i.getAttribute(ur) === "")
            return ve.call(pe.call(this.ownerDocument, "html"), i);
          var C = a.call(this, i, n);
          return Q(d, "appendOrInsertElementHook", i, f.contentWindow), C;
        }
      }
    }
  };
}
function Ir(e, t) {
  var r = gr(e), n = de(t), o = n.iframe, i = o.contentWindow.__WUJIE_RAW_DOCUMENT_HEAD__.querySelector("script[".concat(ke, "='").concat(r, "']"));
  return i === null && H(Kr, "<script ".concat(ke, "='").concat(r, "'/>")), {
    targetScript: i,
    iframe: o
  };
}
function Qt(e) {
  return function(r) {
    var n = r, o = e.rawElementContains, i = e.wujieId;
    if (n && Xe(n)) {
      var a = Ir(n, i), l = a.targetScript;
      return l !== null;
    }
    return o(n);
  };
}
function co(e) {
  return function(r) {
    var n = r, o = e.rawElementRemoveChild, i = e.wujieId;
    if (n && Xe(n)) {
      var a = Ir(n, i), l = a.targetScript, c = a.iframe;
      return l !== null ? c.contentWindow.__WUJIE_RAW_DOCUMENT_HEAD__.removeChild(l) : null;
    }
    return o(n);
  };
}
function $t(e) {
  var t = /* @__PURE__ */ new Map();
  e._cacheListeners = t, e.addEventListener = function(r, n, o) {
    var i = t.get(r) || [];
    return t.set(r, [].concat(mt(i), [n])), bt.call(e, r, n, o);
  }, e.removeEventListener = function(r, n, o) {
    var i = t.get(r), a = i == null ? void 0 : i.indexOf(n);
    return i != null && i.length && a !== -1 && i.splice(a, 1), Ve.call(e, r, n, o);
  };
}
function Yt(e) {
  var t = e._cacheListeners;
  mt(t.entries()).forEach(function(r) {
    var n = je(r, 2), o = n[0], i = n[1];
    i.forEach(function(a) {
      return Ve.call(e, o, a);
    });
  });
}
function Lr(e, t, r) {
  r || ($t(e.head), $t(e.body)), e.head.appendChild = De({
    rawDOMAppendOrInsertBefore: ve,
    wujieId: t
  }), e.head.insertBefore = De({
    rawDOMAppendOrInsertBefore: oo,
    wujieId: t
  }), e.head.removeChild = co({
    rawElementRemoveChild: Pr.bind(e.head),
    wujieId: t
  }), e.head.contains = Qt({
    rawElementContains: Ft.bind(e.head),
    wujieId: t
  }), e.contains = Qt({
    rawElementContains: Ft.bind(e),
    wujieId: t
  }), e.body.appendChild = De({
    rawDOMAppendOrInsertBefore: ve,
    wujieId: t
  }), e.body.insertBefore = De({
    rawDOMAppendOrInsertBefore: io,
    wujieId: t
  });
}
function Xt(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function Vt(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Xt(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Xt(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
function lo(e) {
  var t = so();
  return function() {
    var n = Ce(e), o;
    if (t) {
      var i = Ce(this).constructor;
      o = Reflect.construct(n, arguments, i);
    } else
      o = n.apply(this, arguments);
    return $n(this, o);
  };
}
function so() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
var fo = {
  ":root": ":host"
};
function vo() {
  var e = window.customElements;
  if (e && !(e != null && e.get("wujie-app"))) {
    var t = /* @__PURE__ */ function(r) {
      Gn(o, r);
      var n = lo(o);
      function o() {
        return yt(this, o), n.apply(this, arguments);
      }
      return Et(o, [{
        key: "connectedCallback",
        value: function() {
          if (!this.shadowRoot) {
            var a = this.attachShadow({
              mode: "open"
            }), l = de(this.getAttribute(Te));
            ce(a, l.iframe.contentWindow), l.shadowRoot = a;
          }
        }
      }, {
        key: "disconnectedCallback",
        value: function() {
          var a = de(this.getAttribute(Te));
          a == null || a.unmount();
        }
      }]), o;
    }(/* @__PURE__ */ lt(HTMLElement));
    e == null || e.define("wujie-app", t);
  }
}
function po(e) {
  var t = window.document.createElement("wujie-app");
  return t.setAttribute(Te, e), t.classList.add(Gr), t;
}
function he(e, t) {
  var r = hr(t);
  return r && !r.contains(e) && (r.querySelector("div[".concat(pt, "]")) || le(r), e && Sr.call(r, e)), r;
}
function Tr(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = go(e, r), o = he(n, t), i = n.contentWindow.document;
  return i.open(), i.write("<!DOCTYPE html><html><head></head><body></body></html>"), i.close(), {
    iframe: n,
    container: o
  };
}
function Or(e, t) {
  return st.apply(this, arguments);
}
function st() {
  return st = ae(/* @__PURE__ */ J.mark(function e(t, r) {
    var n, o, i, a, l, c, u, s;
    return J.wrap(function(d) {
      for (; ; ) switch (d.prev = d.next) {
        case 0:
          return n = t.iframe.contentDocument, o = t.plugins, i = t.replace, a = t.proxyLocation, l = at({
            plugins: o,
            replace: i
          }), c = He("cssBeforeLoaders", o), u = He("cssAfterLoaders", o), s = $e(a), d.next = 8, Promise.all([Promise.all(Be(c, t.fetch, t.lifecycles.loadError).map(function(f) {
            var p = f.src, g = f.contentPromise;
            return g.then(function(b) {
              return {
                src: p,
                content: b
              };
            });
          })).then(function(f) {
            f.forEach(function(p) {
              var g = p.src, b = p.content;
              if (b) {
                var h = n.createElement("style");
                h.setAttribute("type", "text/css"), h.appendChild(n.createTextNode(b && l(b, g, s)));
                var w = r.querySelector("head"), _ = r.querySelector("body");
                r.insertBefore(h, w || _ || r.firstChild);
              }
            });
          }), Promise.all(Be(u, t.fetch, t.lifecycles.loadError).map(function(f) {
            var p = f.src, g = f.contentPromise;
            return g.then(function(b) {
              return {
                src: p,
                content: b
              };
            });
          })).then(function(f) {
            f.forEach(function(p) {
              var g = p.src, b = p.content;
              if (b) {
                var h = n.createElement("style");
                h.setAttribute("type", "text/css"), h.appendChild(n.createTextNode(b && l(b, g, s))), r.appendChild(h);
              }
            });
          })]).then(function() {
            return r;
          }, function() {
            return r;
          });
        case 8:
          return d.abrupt("return", d.sent);
        case 9:
        case "end":
          return d.stop();
      }
    }, e);
  })), st.apply(this, arguments);
}
function ho(e, t, r) {
  var n = e.querySelector("head"), o = e.querySelector("body");
  if (n) {
    for (; n.firstChild; )
      ve.call(t, n.firstChild.cloneNode(!0)), n.removeChild(n.firstChild);
    n.parentNode.replaceChild(t, n);
  }
  if (o) {
    for (; o.firstChild; )
      ve.call(r, o.firstChild.cloneNode(!0)), o.removeChild(o.firstChild);
    o.parentNode.replaceChild(r, o);
  }
  return e;
}
function Cr(e, t) {
  var r = e.__WUJIE, n = r.head, o = r.body, i = r.alive, a = r.execFlag, l = e.document, c = l.createElement("html");
  c.innerHTML = t, !i && a ? c = ho(c, n, o) : (r.head = c.querySelector("head"), r.body = c.querySelector("body"));
  for (var u = l.createTreeWalker(c, NodeFilter.SHOW_ELEMENT, null, !1), s = u.currentNode; s; ) {
    ce(s, e);
    var m = to[s.tagName], d = s[m];
    m && s.setAttribute(m, ue(d, s.baseURI || "")), s = u.nextNode();
  }
  if (!c.querySelector("head")) {
    var f = l.createElement("head");
    c.appendChild(f);
  }
  if (!c.querySelector("body")) {
    var p = l.createElement("body");
    c.appendChild(p);
  }
  return c;
}
function mo(e, t, r) {
  return ft.apply(this, arguments);
}
function ft() {
  return ft = ae(/* @__PURE__ */ J.mark(function e(t, r, n) {
    var o, i, a;
    return J.wrap(function(c) {
      for (; ; ) switch (c.prev = c.next) {
        case 0:
          return o = Cr(r, n), c.next = 3, Or(r.__WUJIE, o);
        case 3:
          i = c.sent, t.appendChild(i), a = document.createElement("div"), a.setAttribute("style", Qr), i.insertBefore(a, i.firstChild), t.head = t.querySelector("head"), t.body = t.querySelector("body"), Object.defineProperty(t.firstChild, "parentNode", {
            enumerable: !0,
            configurable: !0,
            get: function() {
              return r.document;
            }
          }), Lr(t, r.__WUJIE.id, !1);
        case 12:
        case "end":
          return c.stop();
      }
    }, e);
  })), ft.apply(this, arguments);
}
function go(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = document.createElement("iframe"), n = "height:100%;width:100%";
  return Qe(r, Vt(Vt({}, t), {}, K({
    style: [n, t.style].join(";")
  }, Te, e))), r;
}
function zt(e, t, r) {
  return dt.apply(this, arguments);
}
function dt() {
  return dt = ae(/* @__PURE__ */ J.mark(function e(t, r, n) {
    var o, i;
    return J.wrap(function(l) {
      for (; ; ) switch (l.prev = l.next) {
        case 0:
          return o = Cr(r, n), l.next = 3, Or(r.__WUJIE, o);
        case 3:
          i = l.sent, t.replaceChild(i, t.documentElement), Object.defineProperty(t.documentElement, "parentNode", {
            enumerable: !0,
            configurable: !0,
            get: function() {
              return r.document;
            }
          }), Lr(t, r.__WUJIE.id, !0);
        case 7:
        case "end":
          return l.stop();
      }
    }, e);
  })), dt.apply(this, arguments);
}
function le(e) {
  for (; e != null && e.firstChild; )
    Pr.call(e, e.firstChild);
}
function yo(e, t) {
  var r = hr(e);
  le(r);
  var n = null;
  try {
    n = window.getComputedStyle(r);
  } catch {
    return;
  }
  n.position === "static" ? (r.setAttribute(nt, n.position), r.setAttribute(Je, n.overflow === "visible" ? "" : n.overflow), r.style.setProperty("position", "relative"), r.style.setProperty("overflow", "hidden")) : ["relative", "sticky"].includes(n.position) && (r.setAttribute(Je, n.overflow === "visible" ? "" : n.overflow), r.style.setProperty("overflow", "hidden"));
  var o = document.createElement("div");
  o.setAttribute(pt, ""), o.setAttribute("style", $r), t ? o.appendChild(t) : o.innerHTML = Yr, r.appendChild(o);
}
function Zt(e) {
  var t = e.getAttribute(nt), r = e.getAttribute(Je);
  t && e.style.removeProperty("position"), r !== null && (r ? e.style.setProperty("overflow", r) : e.style.removeProperty("overflow")), e.removeAttribute(nt), e.removeAttribute(Je);
  var n = e.querySelector("div[".concat(pt, "]"));
  n && e.removeChild(n);
}
function jr(e) {
  for (var t = [], r = [], n = /:root/g, o = 0; o < e.length; o++)
    for (var i, a, l = (i = (a = e[o]) === null || a === void 0 ? void 0 : a.cssRules) !== null && i !== void 0 ? i : [], c = 0; c < l.length; c++) {
      var u = l[c].cssText;
      n.test(u) && t.push(u.replace(n, function(d) {
        return fo[d];
      })), l[c].type === CSSRule.FONT_FACE_RULE && r.push(u);
    }
  var s = null, m = null;
  return t.length && (s = window.document.createElement("style"), s.innerHTML = t.join("")), r.length && (m = window.document.createElement("style"), m.innerHTML = r.join("")), [s, m];
}
function we(e) {
  var t = e.__WUJIE, r = t.sync, n = t.id, o = t.prefix, i = z(window.location.href), a = _e(i);
  if (!r && !a[n]) return i = null;
  var l = e.location.pathname + e.location.search + e.location.hash, c = "";
  o && Object.keys(o).forEach(function(s) {
    var m = o[s];
    l.startsWith(m) && (!c || m.length > o[c].length) && (c = s);
  }), r ? a[n] = window.encodeURIComponent(c ? l.replace(o[c], "{".concat(c, "}")) : l) : delete a[n];
  var u = "?" + Object.keys(a).map(function(s) {
    return s + "=" + a[s];
  }).join("&");
  i.search = u, i.href !== window.location.href && window.history.replaceState(null, "", i.href), i = null;
}
function Eo(e) {
  var t = e.location, r = t.pathname, n = t.search, o = t.hash, i = e.__WUJIE, a = i.id, l = i.url, c = i.sync, u = i.execFlag, s = i.prefix, m = i.inject, d = c && !u ? an(a, s) : l, f = (/^http/.test(d) ? null : d) || l, p = vr(f), g = p.appRoutePath, b = r + n + o;
  b !== g && e.history.replaceState(null, "", m.mainHostPath + g);
}
function bo() {
  var e = z(window.location.href), t = _e(e);
  Object.keys(t).forEach(function(n) {
    var o = de(n);
    o && o.execFlag && o.sync && !o.hrefFlag && !o.activeFlag && delete t[n];
  });
  var r = "?" + Object.keys(t).map(function(n) {
    return n + "=" + t[n];
  }).join("&");
  e.search = r, e.href !== window.location.href && window.history.replaceState(null, "", e.href), e = null;
}
function wo(e, t) {
  var r = z(window.location.href), n = _e(r);
  n[e] = window.encodeURIComponent(t);
  var o = "?" + Object.keys(n).map(function(i) {
    return i + "=" + n[i];
  }).join("&");
  r.search = o, window.history.pushState(null, "", r.href), r = null;
}
function _o() {
  window.addEventListener("popstate", function() {
    var e = z(window.location.href), t = _e(e);
    e = null, Object.keys(t).map(function(r) {
      return de(r);
    }).filter(function(r) {
      return r;
    }).forEach(function(r) {
      var n = t[r.id], o = pe.call(r.iframe.contentDocument, "body");
      if (/http/.test(n))
        r.degrade ? (he(r.document.documentElement, o), Ge(window.decodeURIComponent(n), dr(r.id).parentElement, r.degradeAttrs)) : Ge(window.decodeURIComponent(n), r.shadowRoot.host.parentElement, r.degradeAttrs), r.hrefFlag = !0;
      else if (r.hrefFlag) {
        if (r.degrade) {
          var i = Tr(r.id, r.el, r.degradeAttrs), a = i.iframe;
          Rr(a.contentWindow, r.iframe.contentWindow), a.contentWindow.onunload = function() {
            r.unmount();
          }, a.contentDocument.appendChild(o.firstElementChild), r.document = a.contentDocument;
        } else he(r.shadowRoot.host, r.el);
        r.hrefFlag = !1;
      }
    });
  });
}
function Kt(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function qe(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Kt(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Kt(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
function So(e) {
  e.__WUJIE_EVENTLISTENER__ = e.__WUJIE_EVENTLISTENER__ || /* @__PURE__ */ new Set(), e.addEventListener = function(r, n, o) {
    if (Q(e.__WUJIE.plugins, "windowAddEventListenerHook", e, r, n, o), e.__WUJIE_EVENTLISTENER__.add({
      type: r,
      listener: n,
      options: o
    }), Jt.includes(r) || Y(o) === "object" && o.targetWindow) {
      var i = Y(o) === "object" && o.targetWindow ? o == null ? void 0 : o.targetWindow : e;
      return Ht.call(i, r, n, o);
    }
    Ht.call(window.__WUJIE_RAW_WINDOW__ || window, r, n, o);
  }, e.removeEventListener = function(r, n, o) {
    if (Q(e.__WUJIE.plugins, "windowRemoveEventListenerHook", e, r, n, o), e.__WUJIE_EVENTLISTENER__.forEach(function(a) {
      a.listener === n && a.type === r && o == a.options && e.__WUJIE_EVENTLISTENER__.delete(a);
    }), Jt.includes(r) || Y(o) === "object" && o.targetWindow) {
      var i = Y(o) === "object" && o.targetWindow ? o == null ? void 0 : o.targetWindow : e;
      return Bt.call(i, r, n, o);
    }
    Bt.call(window.__WUJIE_RAW_WINDOW__ || window, r, n, o);
  };
}
function er(e, t, r) {
  e.__WUJIE = t, e.__WUJIE_PUBLIC_PATH__ = r + "/", e.$wujie = t.provide, e.__WUJIE_RAW_WINDOW__ = e;
}
function Po(e, t, r) {
  var n = e.history, o = n.pushState, i = n.replaceState;
  n.pushState = function(a, l, c) {
    var u = r + e.location.pathname + e.location.search + e.location.hash, s = ue(c == null ? void 0 : c.replace(t, ""), u), m = c === void 0;
    o.call(n, a, l, m ? void 0 : s), !m && (tr(e, t, r), we(e));
  }, n.replaceState = function(a, l, c) {
    var u = r + e.location.pathname + e.location.search + e.location.hash, s = ue(c == null ? void 0 : c.replace(t, ""), u), m = c === void 0;
    i.call(n, a, l, m ? void 0 : s), !m && (tr(e, t, r), we(e));
  };
}
function tr(e, t, r) {
  var n, o = new URL((n = e.location.href) === null || n === void 0 ? void 0 : n.replace(r, ""), t), i = pe.call(e.document, "base");
  i && i.setAttribute("href", t + o.pathname);
}
function Io(e) {
  function t(n) {
    var o = e[n];
    try {
      return typeof o == "function" && !ht(o) ? e[n] = window[n].bind(window) : e[n] = window[n], !0;
    } catch (i) {
      return H(i.message), !1;
    }
  }
  Object.getOwnPropertyNames(e).forEach(function(n) {
    if (n === "getSelection") {
      Object.defineProperty(e, n, {
        get: function() {
          return e.document[n];
        }
      });
      return;
    }
    if (ro.includes(n)) {
      t(n);
      return;
    }
    no.some(function(o) {
      return o.test(n) && n in e.parent ? t(n) : !1;
    });
  });
  var r = Object.getOwnPropertyNames(window).filter(function(n) {
    return /^on/.test(n);
  }).filter(function(n) {
    return !eo.includes(n);
  });
  r.forEach(function(n) {
    var o = Object.getOwnPropertyDescriptor(e, n) || {
      enumerable: !0,
      writable: !0
    };
    try {
      Object.defineProperty(e, n, {
        enumerable: o.enumerable,
        configurable: !0,
        get: function() {
          return window[n];
        },
        set: o.writable || o.set ? function(i) {
          window[n] = typeof i == "function" ? i.bind(e) : i;
        } : void 0
      });
    } catch (i) {
      H(i.message);
    }
  }), Q(e.__WUJIE.plugins, "windowPropertyOverride", e);
}
function Lo(e) {
  var t = e.__WUJIE;
  e.Node.prototype.addEventListener = function(r, n, o) {
    var i = t.elementEventCacheMap.get(this);
    return i ? i.find(function(a) {
      return a.type === r && a.handler === n;
    }) || i.push({
      type: r,
      handler: n,
      options: o
    }) : t.elementEventCacheMap.set(this, [{
      type: r,
      handler: n,
      options: o
    }]), bt.call(this, r, n, o);
  }, e.Node.prototype.removeEventListener = function(r, n, o) {
    var i = t.elementEventCacheMap.get(this);
    if (i) {
      var a = i == null ? void 0 : i.findIndex(function(l) {
        return l.type === r && l.handler === n;
      });
      i.splice(a, 1);
    }
    return i != null && i.length || t.elementEventCacheMap.delete(this), Ve.call(this, r, n, o);
  };
}
function To(e, t) {
  for (var r = t.__WUJIE, n = /* @__PURE__ */ new WeakMap(), o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, null, !1), i = o.currentNode; i; ) {
    var a = r.elementEventCacheMap.get(i);
    a != null && a.length && (n.set(i, a), a.forEach(function(l) {
      i.addEventListener(l.type, l.handler, l.options);
    })), i = o.nextNode();
  }
  r.elementEventCacheMap = n;
}
function Oo(e, t, r) {
  var n = r.__WUJIE, o = /* @__PURE__ */ new WeakMap(), i = n.elementEventCacheMap.get(e);
  i != null && i.length && (o.set(t, i), i.forEach(function(a) {
    t.addEventListener(a.type, a.handler, a.options);
  })), n.elementEventCacheMap = o;
}
function Rr(e, t) {
  Object.defineProperty(e.Event.prototype, "timeStamp", {
    get: function() {
      return t.document.createEvent("Event").timeStamp;
    }
  });
}
function Co(e) {
  var t = e.__WUJIE, r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
  e.Document.prototype.addEventListener = function(f, p, g) {
    if (p) {
      var b = r.get(p), h = n.get(p);
      if (b || (b = typeof p == "function" ? p.bind(this) : p, r.set(p, b)), h ? h.includes(f) || h.push(f) : n.set(p, [f]), Q(e.__WUJIE.plugins, "documentAddEventListenerHook", e, f, b, g), Nt.includes(f))
        return bt.call(this, f, b, g);
      if (t.degrade) return t.document.addEventListener(f, b, g);
      if (Wt.includes(f)) return window.document.addEventListener(f, b, g);
      if (kt.includes(f)) {
        window.document.addEventListener(f, b, g), t.shadowRoot.addEventListener(f, b, g);
        return;
      }
      t.shadowRoot.addEventListener(f, b, g);
    }
  }, e.Document.prototype.removeEventListener = function(f, p, g) {
    var b = r.get(p), h = n.get(p);
    if (b) {
      if (h != null && h.includes(f) && (h.splice(h.indexOf(f), 1), h.length || (r.delete(p), n.delete(p))), Q(e.__WUJIE.plugins, "documentRemoveEventListenerHook", e, f, b, g), Nt.includes(f))
        return Ve.call(this, f, b, g);
      if (t.degrade) return t.document.removeEventListener(f, b, g);
      if (Wt.includes(f))
        return window.document.removeEventListener(f, b, g);
      if (kt.includes(f)) {
        window.document.removeEventListener(f, b, g), t.shadowRoot.removeEventListener(f, b, g);
        return;
      }
      t.shadowRoot.removeEventListener(f, b, g);
    }
  };
  var o = Object.keys(e.HTMLElement.prototype).filter(function(f) {
    return /^on/.test(f);
  }), i = Object.keys(e.Document.prototype).filter(function(f) {
    return /^on/.test(f);
  }).filter(function(f) {
    return !Kn.includes(f);
  });
  o.filter(function(f) {
    return i.includes(f);
  }).forEach(function(f) {
    var p = Object.getOwnPropertyDescriptor(e.Document.prototype, f) || {
      enumerable: !0,
      writable: !0
    };
    try {
      Object.defineProperty(e.Document.prototype, f, {
        enumerable: p.enumerable,
        configurable: !0,
        get: function() {
          return t.degrade ? t.document[f] : t.shadowRoot.firstElementChild[f];
        },
        set: p.writable || p.set ? function(g) {
          var b = typeof g == "function" ? g.bind(e.document) : g;
          t.degrade ? t.document[f] = b : t.shadowRoot.firstElementChild[f] = b;
        } : void 0
      });
    } catch (g) {
      H(g.message);
    }
  });
  var a = W.ownerProperties, l = W.modifyProperties, c = W.shadowProperties, u = W.shadowMethods, s = W.documentProperties, m = W.documentMethods, d = W.documentEvents;
  l.concat(c, u, s, m).forEach(function(f) {
    var p = Object.getOwnPropertyDescriptor(e.Document.prototype, f) || {
      enumerable: !0,
      writable: !0
    };
    try {
      Object.defineProperty(e.Document.prototype, f, {
        enumerable: p.enumerable,
        configurable: !0,
        get: function() {
          return t.proxyDocument[f];
        },
        set: void 0
      });
    } catch (g) {
      H(g.message);
    }
  }), d.forEach(function(f) {
    var p = Object.getOwnPropertyDescriptor(e.Document.prototype, f) || {
      enumerable: !0,
      writable: !0
    };
    try {
      Object.defineProperty(e.Document.prototype, f, {
        enumerable: p.enumerable,
        configurable: !0,
        get: function() {
          return (t.degrade ? t : window).document[f];
        },
        set: p.writable || p.set ? function(g) {
          (t.degrade ? t : window).document[f] = typeof g == "function" ? g.bind(e.document) : g;
        } : void 0
      });
    } catch (g) {
      H(g.message);
    }
  }), a.forEach(function(f) {
    Object.defineProperty(e.document, f, {
      enumerable: !0,
      configurable: !0,
      get: function() {
        return t.proxyDocument[f];
      },
      set: void 0
    });
  }), Q(e.__WUJIE.plugins, "documentPropertyOverride", e);
}
function jo(e) {
  var t = e.Node.prototype.getRootNode, r = e.Node.prototype.appendChild, n = e.Node.prototype.insertBefore;
  e.Node.prototype.getRootNode = function(o) {
    var i = t.call(this, o);
    return i === e.__WUJIE.shadowRoot ? e.document : i;
  }, e.Node.prototype.appendChild = function(o) {
    var i = r.call(this, o);
    return ce(o, e), i;
  }, e.Node.prototype.insertBefore = function(o, i) {
    var a = n.call(this, o, i);
    return ce(o, e), a;
  };
}
function Ro(e) {
  me(e, e.HTMLImageElement, "src"), me(e, e.HTMLAnchorElement, "href"), me(e, e.HTMLSourceElement, "src"), me(e, e.HTMLLinkElement, "href"), me(e, e.HTMLScriptElement, "src"), me(e, e.HTMLMediaElement, "src");
}
function xo(e, t) {
  var r = e.document, n = r.createElement("base"), o = z(e.location.href), i = z(t);
  n.setAttribute("href", i.protocol + "//" + i.host + o.pathname), r.head.appendChild(n);
}
function Uo(e, t, r, n) {
  var o = e.document, i = window.document.implementation.createHTMLDocument(""), a = o.importNode(i.documentElement, !0);
  o.documentElement ? o.replaceChild(a, o.documentElement) : o.appendChild(a), e.__WUJIE_RAW_DOCUMENT_HEAD__ = o.head, e.__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__ = e.Document.prototype.querySelector, e.__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__ = e.Document.prototype.querySelectorAll, e.__WUJIE_RAW_DOCUMENT_CREATE_ELEMENT__ = e.Document.prototype.createElement, e.__WUJIE_RAW_DOCUMENT_CREATE_TEXT_NODE__ = e.Document.prototype.createTextNode, xo(e, t.url), Po(e, n, r), So(e), t.degrade && Lo(e), Mo(e), Io(e), Co(e), jo(e), Ro(e);
}
function Ao(e) {
  var t = e.document;
  return new Promise(function(r) {
    function n() {
      setTimeout(function() {
        var o;
        try {
          o = e.document;
        } catch {
          o = null;
        }
        !o || o == t ? n() : (e.stop ? e.stop() : e.document.execCommand("Stop"), r());
      }, 1);
    }
    n();
  });
}
function ce(e, t) {
  var r = t.__WUJIE.proxyLocation;
  if (!e._hasPatch) {
    try {
      Object.defineProperties(e, {
        baseURI: {
          configurable: !0,
          get: function() {
            return r.protocol + "//" + r.host + r.pathname;
          },
          set: void 0
        },
        ownerDocument: {
          configurable: !0,
          get: function() {
            return t.document;
          }
        },
        _hasPatch: {
          get: function() {
            return !0;
          }
        }
      });
    } catch (n) {
      console.warn(n);
    }
    Q(t.__WUJIE.plugins, "patchElementHook", e, t);
  }
}
function Mo(e) {
  e.addEventListener("hashchange", function() {
    return we(e);
  }), e.addEventListener("popstate", function() {
    we(e);
  });
}
function $(e, t, r) {
  var n = e, o = n.src, i = n.module, a = n.content, l = n.crossorigin, c = n.crossoriginType, u = n.async, s = n.attrs, m = n.callback, d = n.onload, f = t.document.createElement("script"), p = t.document.createElement("script"), g = t.__WUJIE, b = g.replace, h = g.plugins, w = g.proxyLocation, _ = Nn({
    plugins: h,
    replace: b
  }), S = _(a, o, $e(w));
  if (s && Object.keys(s).filter(function(j) {
    return !Object.keys(e).includes(j);
  }).forEach(function(j) {
    return f.setAttribute(j, String(s[j]));
  }), a) {
    !t.__WUJIE.degrade && !i && (S = `(function(window, self, global, location) {
      `.concat(S, `
}).bind(window.__WUJIE.proxy)(
  window.__WUJIE.proxy,
  window.__WUJIE.proxy,
  window.__WUJIE.proxy,
  window.__WUJIE.proxyLocation,
);`));
    var T = Object.getOwnPropertyDescriptor(f, "src");
    if (T != null && T.configurable || !T)
      try {
        Object.defineProperty(f, "src", {
          get: function() {
            return o || "";
          }
        });
      } catch (j) {
        console.warn(j);
      }
  } else
    o && f.setAttribute("src", o), l && f.setAttribute("crossorigin", c);
  i && f.setAttribute("type", "module"), f.textContent = S || "", p.textContent = "if(window.__WUJIE.execQueue && window.__WUJIE.execQueue.length){ window.__WUJIE.execQueue.shift()()}";
  var U = pe.call(t.document, "head"), O = function() {
    return !u && U.appendChild(p);
  }, A = function() {
    d == null || d(), O();
  };
  if (/^<!DOCTYPE html/i.test(S))
    return V(Ie, e), O();
  r && mr(f, gr(r));
  var x = !a && o;
  x && (f.onload = A, f.onerror = A), U.appendChild(f), m == null || m(t), Q(h, "appendOrInsertElementHook", f, t, r), !x && A();
}
function Ge(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = window.document.createElement("iframe"), o = "height:100%;width:100%";
  Qe(n, qe(qe({}, r), {}, {
    src: e,
    style: [o, r.style].join(";")
  })), he(n, t);
}
function Do(e, t, r, n, o) {
  var i = window.document.createElement("iframe"), a = qe(qe({
    src: r,
    style: "display: none"
  }, t), {}, K({
    name: e.id
  }, ur, ""));
  Qe(i, a), window.document.body.appendChild(i);
  var l = i.contentWindow;
  return er(l, e, n), e.iframeReady = Ao(l).then(function() {
    l.__WUJIE || er(l, e, n), Uo(l, e, r, n), on(l.__WUJIE.id) || l.history.replaceState(null, "", r + o);
  }), i;
}
function xr(e, t, r) {
  var n = e.contentWindow.__WUJIE, o = n.shadowRoot, i = n.id, a = n.degrade, l = n.document, c = n.degradeAttrs, u = t;
  if (!/^http/.test(u)) {
    var s = z(u);
    u = r + s.pathname + s.search + s.hash, s = null;
  }
  if (e.contentWindow.__WUJIE.hrefFlag = !0, a) {
    var m = pe.call(e.contentDocument, "body");
    he(l.documentElement, m), Ge(window.decodeURIComponent(u), dr(i).parentElement, c);
  } else Ge(u, o.host.parentElement, c);
  return wo(i, u), !0;
}
function No(e, t, r, n) {
  var o = new Proxy(e.contentWindow, {
    get: function(c, u) {
      if (u === "location")
        return c.__WUJIE.proxyLocation;
      if (u === "self" || u === "window" && Object.getOwnPropertyDescriptor(window, "window").get)
        return c.__WUJIE.proxy;
      if (u === "__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__" || u === "__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__")
        return c[u];
      var s = Object.getOwnPropertyDescriptor(c, u);
      return (s == null ? void 0 : s.configurable) === !1 && (s == null ? void 0 : s.writable) === !1 ? c[u] : Pe(c, u);
    },
    set: function(c, u, s) {
      return nn(s), c[u] = s, !0;
    },
    has: function(c, u) {
      return u in c;
    }
  }), i = new Proxy({}, {
    get: function(c, u) {
      var s = window.document, m = e.contentWindow.__WUJIE, d = m.shadowRoot, f = m.proxyLocation;
      d || yr();
      var p = e.contentWindow.__WUJIE_RAW_DOCUMENT_CREATE_ELEMENT__, g = e.contentWindow.__WUJIE_RAW_DOCUMENT_CREATE_TEXT_NODE__;
      if (u === "createElement" || u === "createTextNode")
        return new Proxy(s[u], {
          apply: function(A, x, j) {
            var M = u === "createElement" ? p : g, R = M.apply(e.contentDocument, j);
            return ce(R, e.contentWindow), R;
          }
        });
      if (u === "documentURI" || u === "URL")
        return f.href;
      if (u === "getElementsByTagName" || u === "getElementsByClassName" || u === "getElementsByName")
        return new Proxy(d.querySelectorAll, {
          apply: function(A, x, j) {
            var M = j[0];
            if (x !== e.contentDocument)
              return x[u].apply(x, j);
            if (u === "getElementsByTagName" && M === "script")
              return e.contentDocument.scripts;
            u === "getElementsByClassName" && (M = "." + M), u === "getElementsByName" && (M = '[name="'.concat(M, '"]'));
            var R;
            try {
              R = A.call(d, M);
            } catch {
              R = [];
            }
            return R;
          }
        });
      if (u === "getElementById")
        return new Proxy(d.querySelector, {
          // case document.querySelector.call
          apply: function(A, x, j) {
            if (x !== e.contentDocument) {
              var M;
              return (M = x[u]) === null || M === void 0 ? void 0 : M.apply(x, j);
            }
            try {
              return A.call(d, '[id="'.concat(j[0], '"]')) || e.contentWindow.__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__.call(e.contentWindow.document, "#".concat(j[0]));
            } catch {
              return H(en), null;
            }
          }
        });
      if (u === "querySelector" || u === "querySelectorAll") {
        var b = {
          querySelector: "__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__",
          querySelectorAll: "__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__"
        };
        return new Proxy(d[u], {
          apply: function(A, x, j) {
            if (x !== e.contentDocument) {
              var M;
              return (M = x[u]) === null || M === void 0 ? void 0 : M.apply(x, j);
            }
            return A.apply(d, j) || (j[0] === "base" ? null : e.contentWindow[b[u]].call(e.contentWindow.document, j[0]));
          }
        });
      }
      if (u === "documentElement" || u === "scrollingElement") return d.firstElementChild;
      if (u === "forms") return d.querySelectorAll("form");
      if (u === "images") return d.querySelectorAll("img");
      if (u === "links") return d.querySelectorAll("a");
      var h = W.ownerProperties, w = W.shadowProperties, _ = W.shadowMethods, S = W.documentProperties, T = W.documentMethods;
      if (h.concat(w).includes(u.toString()))
        return u === "activeElement" && d.activeElement === null ? d.body : d[u];
      if (_.includes(u.toString())) {
        var U;
        return (U = Pe(d, u)) !== null && U !== void 0 ? U : Pe(s, u);
      }
      if (S.includes(u.toString()))
        return s[u];
      if (T.includes(u.toString()))
        return Pe(s, u);
    }
  }), a = new Proxy({}, {
    get: function(c, u) {
      var s = e.contentWindow.location;
      return u === "host" || u === "hostname" || u === "protocol" || u === "port" || u === "origin" ? t[u] : u === "href" ? s[u].replace(r, n) : u === "reload" ? (H(cr), function() {
        return null;
      }) : u === "replace" ? new Proxy(s[u], {
        apply: function(d, f, p) {
          var g;
          return d.call(s, (g = p[0]) === null || g === void 0 ? void 0 : g.replace(n, r));
        }
      }) : Pe(s, u);
    },
    set: function(c, u, s) {
      return u === "href" ? xr(e, s, n) : (e.contentWindow.location[u] = s, !0);
    },
    ownKeys: function() {
      return Object.keys(e.contentWindow.location).filter(function(c) {
        return c !== "reload";
      });
    },
    getOwnPropertyDescriptor: function(c, u) {
      return {
        enumerable: !0,
        configurable: !0,
        value: this[u]
      };
    }
  });
  return {
    proxyWindow: o,
    proxyDocument: i,
    proxyLocation: a
  };
}
function Wo(e, t, r, n) {
  var o = {}, i = e.contentWindow.__WUJIE;
  Object.defineProperties(o, {
    createElement: {
      get: function() {
        return function() {
          for (var w = arguments.length, _ = new Array(w), S = 0; S < w; S++)
            _[S] = arguments[S];
          var T = e.contentWindow.__WUJIE_RAW_DOCUMENT_CREATE_ELEMENT__.apply(e.contentDocument, _);
          return ce(T, e.contentWindow), T;
        };
      }
    },
    createTextNode: {
      get: function() {
        return function() {
          for (var w = arguments.length, _ = new Array(w), S = 0; S < w; S++)
            _[S] = arguments[S];
          var T = e.contentWindow.__WUJIE_RAW_DOCUMENT_CREATE_TEXT_NODE__.apply(e.contentDocument, _);
          return ce(T, e.contentWindow), T;
        };
      }
    },
    documentURI: {
      get: function() {
        return i.proxyLocation.href;
      }
    },
    URL: {
      get: function() {
        return i.proxyLocation.href;
      }
    },
    getElementsByTagName: {
      get: function() {
        return function() {
          var w = arguments.length <= 0 ? void 0 : arguments[0];
          return w === "script" ? e.contentDocument.scripts : i.document.getElementsByTagName(w);
        };
      }
    }
  });
  var a = W.modifyLocalProperties, l = W.modifyProperties, c = W.ownerProperties, u = W.shadowProperties, s = W.shadowMethods, m = W.documentProperties, d = W.documentMethods;
  l.filter(function(h) {
    return !a.includes(h);
  }).concat(c, u, s, m, d).forEach(function(h) {
    Object.defineProperty(o, h, {
      get: function() {
        var _, S = (_ = i.document) === null || _ === void 0 ? void 0 : _[h];
        return Fe(S) ? S.bind(i.document) : S;
      }
    });
  });
  var f = {}, p = e.contentWindow.location, g = Object.keys(p), b = ["host", "hostname", "port", "protocol", "port"];
  return b.forEach(function(h) {
    f[h] = t[h];
  }), Object.defineProperties(f, {
    href: {
      get: function() {
        return p.href.replace(r, n);
      },
      set: function(w) {
        xr(e, w, n);
      }
    },
    reload: {
      get: function() {
        return H(cr), function() {
          return null;
        };
      }
    }
  }), g.filter(function(h) {
    return !b.concat(["href", "reload"]).includes(h);
  }).forEach(function(h) {
    Object.defineProperty(f, h, {
      get: function() {
        return Fe(p[h]) ? p[h].bind(p) : p[h];
      }
    });
  }), {
    proxyDocument: o,
    proxyLocation: f
  };
}
var ye = window.__POWERED_BY_WUJIE__ ? window.__WUJIE.inject.appEventObjMap : /* @__PURE__ */ new Map(), Ur = /* @__PURE__ */ function() {
  function e(t) {
    yt(this, e), this.id = t, this.$clear(), ye.get(this.id) || ye.set(this.id, {}), this.eventObj = ye.get(this.id);
  }
  return Et(e, [{
    key: "$on",
    value: function(r, n) {
      var o = this.eventObj[r];
      return o ? (o.includes(n) || o.push(n), this) : (this.eventObj[r] = [n], this);
    }
    /** 任何$emit都会导致监听函数触发，第一个参数为事件名，后续的参数为$emit的参数 */
  }, {
    key: "$onAll",
    value: function(r) {
      return this.$on(Re, r);
    }
    // 一次性监听事件
  }, {
    key: "$once",
    value: function(r, n) {
      var o = (function() {
        this.$off(r, o), n.apply(void 0, arguments);
      }).bind(this);
      this.$on(r, o);
    }
    // 取消监听
  }, {
    key: "$off",
    value: function(r, n) {
      var o = this.eventObj[r];
      if (!r || !o || !o.length)
        return H("".concat(r, " ").concat(St)), this;
      for (var i, a = o.length; a--; )
        if (i = o[a], i === n) {
          o.splice(a, 1);
          break;
        }
      return this;
    }
    // 取消监听$onAll
  }, {
    key: "$offAll",
    value: function(r) {
      return this.$off(Re, r);
    }
    // 发送事件
  }, {
    key: "$emit",
    value: function(r) {
      var n = [], o = [];
      if (ye.forEach(function(p) {
        p[r] && (n = n.concat(p[r])), p[Re] && (o = o.concat(p[Re]));
      }), !r || n.length === 0 && o.length === 0)
        H("".concat(r, " ").concat(St));
      else
        try {
          for (var i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++)
            a[l - 1] = arguments[l];
          for (var c = 0, u = n.length; c < u; c++) {
            var s;
            (s = n)[c].apply(s, a);
          }
          for (var m = 0, d = o.length; m < d; m++) {
            var f;
            (f = o)[m].apply(f, [r].concat(a));
          }
        } catch (p) {
          V(p);
        }
      return this;
    }
    // 清空当前所有的监听事件
  }, {
    key: "$clear",
    value: function() {
      var r, n = (r = ye.get(this.id)) !== null && r !== void 0 ? r : {}, o = Object.keys(n);
      return o.forEach(function(i) {
        return delete n[i];
      }), this;
    }
  }]), e;
}();
function rr(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function ne(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? rr(Object(r), !0).forEach(function(n) {
      K(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : rr(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
var ko = /* @__PURE__ */ function() {
  function e(t) {
    yt(this, e), K(this, "elementEventCacheMap", /* @__PURE__ */ new WeakMap()), window.__POWERED_BY_WUJIE__ ? this.inject = window.__WUJIE.inject : this.inject = {
      idToSandboxMap: Z,
      appEventObjMap: ye,
      mainHostPath: window.location.protocol + "//" + window.location.host
    };
    var r = t.name, n = t.url, o = t.attrs, i = t.fiber, a = t.degradeAttrs, l = t.degrade, c = t.lifecycles, u = t.plugins;
    this.id = r, this.fiber = i, this.degrade = l || !sr, this.bus = new Ur(this.id), this.url = n, this.degradeAttrs = a, this.provide = {
      bus: this.bus
    }, this.styleSheetElements = [], this.execQueue = [], this.lifecycles = c, this.plugins = br(u);
    var s = vr(n), m = s.urlElement, d = s.appHostPath, f = s.appRoutePath, p = this.inject.mainHostPath;
    if (this.iframe = Do(this, o, p, d, f), this.degrade) {
      var g = Wo(this.iframe, m, p, d), b = g.proxyDocument, h = g.proxyLocation;
      this.proxyDocument = b, this.proxyLocation = h;
    } else {
      var w = No(this.iframe, m, p, d), _ = w.proxyWindow, S = w.proxyDocument, T = w.proxyLocation;
      this.proxy = _, this.proxyDocument = S, this.proxyLocation = T;
    }
    this.provide.location = this.proxyLocation, zn(this.id, this);
  }
  return Et(e, [{
    key: "active",
    value: (
      /** $wujie对象，提供给子应用的接口 */
      /** 子应用嵌套场景，父应用传递给子应用的数据 */
      /** 激活子应用
       * 1、同步路由
       * 2、动态修改iframe的fetch
       * 3、准备shadow
       * 4、准备子应用注入
       */
      function() {
        var t = ae(/* @__PURE__ */ J.mark(function n(o) {
          var i = this, a, l, c, u, s, m, d, f, p, g, b, h, w, _, S, T;
          return J.wrap(function(O) {
            for (; ; ) switch (O.prev = O.next) {
              case 0:
                return a = o.sync, l = o.url, c = o.el, u = o.template, s = o.props, m = o.alive, d = o.prefix, f = o.fetch, p = o.replace, this.url = l, this.sync = a, this.alive = m, this.hrefFlag = !1, this.prefix = d ?? this.prefix, this.replace = p ?? this.replace, this.provide.props = s ?? this.provide.props, this.activeFlag = !0, O.next = 11, this.iframeReady;
              case 11:
                if (g = this.iframe.contentWindow, b = f ? function(A, x) {
                  return f(typeof A == "string" ? ue(A, i.proxyLocation.href) : A, x);
                } : this.fetch, b && (g.fetch = b, this.fetch = b), this.execFlag && this.alive || Eo(g), we(g), this.template = u ?? this.template, !this.degrade) {
                  O.next = 38;
                  break;
                }
                if (h = pe.call(g.document, "body"), w = Tr(this.id, c ?? h, this.degradeAttrs), _ = w.iframe, S = w.container, this.el = S, c && le(h), Rr(_.contentWindow, g), _.contentWindow.onunload = function() {
                  i.unmount();
                }, !this.document) {
                  O.next = 34;
                  break;
                }
                if (!this.alive) {
                  O.next = 29;
                  break;
                }
                _.contentDocument.replaceChild(this.document.documentElement, _.contentDocument.documentElement), To(_.contentDocument.documentElement, g), O.next = 32;
                break;
              case 29:
                return O.next = 31, zt(_.contentDocument, this.iframe.contentWindow, this.template);
              case 31:
                Oo(this.document.documentElement, _.contentDocument.documentElement, g);
              case 32:
                O.next = 36;
                break;
              case 34:
                return O.next = 36, zt(_.contentDocument, this.iframe.contentWindow, this.template);
              case 36:
                return this.document = _.contentDocument, O.abrupt("return");
              case 38:
                if (!this.shadowRoot) {
                  O.next = 44;
                  break;
                }
                if (this.el = he(this.shadowRoot.host, c), !this.alive) {
                  O.next = 42;
                  break;
                }
                return O.abrupt("return");
              case 42:
                O.next = 46;
                break;
              case 44:
                T = pe.call(g.document, "body"), this.el = he(po(this.id), c ?? T);
              case 46:
                return O.next = 48, mo(this.shadowRoot, g, this.template);
              case 48:
                this.patchCssRules(), this.provide.shadowRoot = this.shadowRoot;
              case 50:
              case "end":
                return O.stop();
            }
          }, n, this);
        }));
        function r(n) {
          return t.apply(this, arguments);
        }
        return r;
      }()
    )
  }, {
    key: "requestIdleCallback",
    value: function(r) {
      var n = this;
      return pr(function() {
        n.iframe && r.apply(n);
      });
    }
    /** 启动子应用
     * 1、运行js
     * 2、处理兼容样式
     */
  }, {
    key: "start",
    value: function() {
      var t = ae(/* @__PURE__ */ J.mark(function n(o) {
        var i = this, a, l, c, u, s, m, d, f, p;
        return J.wrap(function(b) {
          for (; ; ) switch (b.prev = b.next) {
            case 0:
              return this.execFlag = !0, b.next = 3, o();
            case 3:
              if (a = b.sent, this.iframe) {
                b.next = 6;
                break;
              }
              return b.abrupt("return");
            case 6:
              return l = this.iframe.contentWindow, l.__POWERED_BY_WUJIE__ = !0, c = He("jsBeforeLoaders", this.plugins), u = He("jsAfterLoaders", this.plugins), s = [], m = [], d = [], a.forEach(function(h) {
                h.defer ? d.push(h) : h.async ? m.push(h) : s.push(h);
              }), c.forEach(function(h) {
                i.execQueue.push(function() {
                  return i.fiber ? i.requestIdleCallback(function() {
                    return $(h, l);
                  }) : $(h, l);
                });
              }), s.concat(d).forEach(function(h) {
                i.execQueue.push(function() {
                  return h.contentPromise.then(function(w) {
                    return i.fiber ? i.requestIdleCallback(function() {
                      return $(ne(ne({}, h), {}, {
                        content: w
                      }), l);
                    }) : $(ne(ne({}, h), {}, {
                      content: w
                    }), l);
                  });
                });
              }), m.forEach(function(h) {
                h.contentPromise.then(function(w) {
                  i.fiber ? i.requestIdleCallback(function() {
                    return $(ne(ne({}, h), {}, {
                      content: w
                    }), l);
                  }) : $(ne(ne({}, h), {}, {
                    content: w
                  }), l);
                });
              }), this.execQueue.push(this.fiber ? function() {
                return i.requestIdleCallback(function() {
                  return i.mount();
                });
              } : function() {
                return i.mount();
              }), f = function() {
                var w;
                Ue(l.document, "DOMContentLoaded"), Ue(l, "DOMContentLoaded"), (w = i.execQueue.shift()) === null || w === void 0 || w();
              }, this.execQueue.push(this.fiber ? function() {
                return i.requestIdleCallback(f);
              } : f), u.forEach(function(h) {
                i.execQueue.push(function() {
                  return i.fiber ? i.requestIdleCallback(function() {
                    return $(h, l);
                  }) : $(h, l);
                });
              }), p = function() {
                var w;
                Ue(l.document, "readystatechange"), Ue(l, "load"), (w = i.execQueue.shift()) === null || w === void 0 || w();
              }, this.execQueue.push(this.fiber ? function() {
                return i.requestIdleCallback(p);
              } : p), (this.alive || !fe(this.iframe.contentWindow.__WUJIE_UNMOUNT)) && Zt(this.el), this.execQueue.shift()(), b.abrupt("return", new Promise(function(h) {
                i.execQueue.push(function() {
                  var w;
                  h(), (w = i.execQueue.shift()) === null || w === void 0 || w();
                });
              }));
            case 26:
            case "end":
              return b.stop();
          }
        }, n, this);
      }));
      function r(n) {
        return t.apply(this, arguments);
      }
      return r;
    }()
  }, {
    key: "mount",
    value: function() {
      var r;
      if (!this.mountFlag) {
        if (fe(this.iframe.contentWindow.__WUJIE_MOUNT)) {
          var n, o, i, a;
          Zt(this.el), (n = this.lifecycles) === null || n === void 0 || (o = n.beforeMount) === null || o === void 0 || o.call(n, this.iframe.contentWindow), this.iframe.contentWindow.__WUJIE_MOUNT(), (i = this.lifecycles) === null || i === void 0 || (a = i.afterMount) === null || a === void 0 || a.call(i, this.iframe.contentWindow), this.mountFlag = !0;
        }
        if (this.alive) {
          var l, c;
          (l = this.lifecycles) === null || l === void 0 || (c = l.activated) === null || c === void 0 || c.call(l, this.iframe.contentWindow);
        }
        (r = this.execQueue.shift()) === null || r === void 0 || r();
      }
    }
    /** 保活模式和使用proxyLocation.href跳转链接都不应该销毁shadow */
  }, {
    key: "unmount",
    value: function() {
      if (this.activeFlag = !1, bo(), this.alive) {
        var r, n;
        (r = this.lifecycles) === null || r === void 0 || (n = r.deactivated) === null || n === void 0 || n.call(r, this.iframe.contentWindow);
      }
      if (this.mountFlag && fe(this.iframe.contentWindow.__WUJIE_UNMOUNT) && !this.alive && !this.hrefFlag) {
        var o, i, a, l;
        (o = this.lifecycles) === null || o === void 0 || (i = o.beforeUnmount) === null || i === void 0 || i.call(o, this.iframe.contentWindow), this.iframe.contentWindow.__WUJIE_UNMOUNT(), (a = this.lifecycles) === null || a === void 0 || (l = a.afterUnmount) === null || l === void 0 || l.call(a, this.iframe.contentWindow), this.mountFlag = !1, this.bus.$clear(), this.degrade || (le(this.shadowRoot), Yt(this.head), Yt(this.body)), le(this.head), le(this.body);
      }
    }
    /** 销毁子应用 */
  }, {
    key: "destroy",
    value: function() {
      if (this.unmount(), this.bus.$clear(), this.shadowRoot = null, this.proxy = null, this.proxyDocument = null, this.proxyLocation = null, this.execQueue = null, this.provide = null, this.degradeAttrs = null, this.styleSheetElements = null, this.bus = null, this.replace = null, this.fetch = null, this.execFlag = null, this.mountFlag = null, this.hrefFlag = null, this.document = null, this.head = null, this.body = null, this.elementEventCacheMap = null, this.lifecycles = null, this.plugins = null, this.provide = null, this.inject = null, this.execQueue = null, this.prefix = null, this.el && (le(this.el), this.el = null), this.iframe) {
        var r, n = this.iframe.contentWindow;
        n != null && n.__WUJIE_EVENTLISTENER__ && n.__WUJIE_EVENTLISTENER__.forEach(function(o) {
          n.removeEventListener(o.type, o.listener, o.options);
        }), (r = this.iframe.parentNode) === null || r === void 0 || r.removeChild(this.iframe), this.iframe = null;
      }
      Zn(this.id);
    }
    /** 当子应用再次激活后，只运行mount函数，样式需要重新恢复 */
  }, {
    key: "rebuildStyleSheets",
    value: function() {
      var r = this;
      this.styleSheetElements && this.styleSheetElements.length && this.styleSheetElements.forEach(function(n) {
        Sr.call(r.degrade ? r.document.head : r.shadowRoot.head, n);
      }), this.patchCssRules();
    }
    /**
     * 子应用样式打补丁
     * 1、兼容:root选择器样式到:host选择器上
     * 2、将@font-face定义到shadowRoot外部
     */
  }, {
    key: "patchCssRules",
    value: function() {
      if (!this.degrade && !this.shadowRoot.host.hasAttribute(_t)) {
        var r = jr(Array.from(this.iframe.contentDocument.querySelectorAll("style")).map(function(a) {
          return a.sheet;
        })), n = je(r, 2), o = n[0], i = n[1];
        o && (this.shadowRoot.head.appendChild(o), this.styleSheetElements.push(o)), i && this.shadowRoot.host.appendChild(i), (o || i) && this.shadowRoot.host.setAttribute(_t, "");
      }
    }
  }]), e;
}();
new Ur(Date.now().toString());
window.__WUJIE && !window.__POWERED_BY_WUJIE__ && yr();
_o();
vo();
sr || H(Zr);
function Jo(e) {
  return vt.apply(this, arguments);
}
function vt() {
  return vt = ae(/* @__PURE__ */ J.mark(function e(t) {
    var r, n, o, i, a, l, c, u, s, m, d, f, p, g, b, h, w, _, S, T, U, O, A, x, j, M, R, ee, te, re, q, B, X, E, v, y, P, L, I;
    return J.wrap(function(C) {
      for (; ; ) switch (C.prev = C.next) {
        case 0:
          if (o = de(t.name), i = Vn(t.name), a = ln(t, i), l = a.name, c = a.url, u = a.html, s = a.replace, m = a.fetch, d = a.props, f = a.attrs, p = a.degradeAttrs, g = a.fiber, b = a.alive, h = a.degrade, w = a.sync, _ = a.prefix, S = a.el, T = a.loading, U = a.plugins, O = a.lifecycles, !o) {
            C.next = 39;
            break;
          }
          if (o.plugins = br(U), o.lifecycles = O, A = o.iframe.contentWindow, !o.preload) {
            C.next = 11;
            break;
          }
          return C.next = 11, o.preload;
        case 11:
          if (!b) {
            C.next = 26;
            break;
          }
          return C.next = 14, o.active({
            url: c,
            sync: w,
            prefix: _,
            el: S,
            props: d,
            alive: b,
            fetch: m,
            replace: s
          });
        case 14:
          if (o.execFlag) {
            C.next = 22;
            break;
          }
          return (M = o.lifecycles) === null || M === void 0 || (R = M.beforeLoad) === null || R === void 0 || R.call(M, o.iframe.contentWindow), C.next = 18, At({
            url: c,
            html: u,
            opts: {
              fetch: m || window.fetch,
              plugins: o.plugins,
              loadError: o.lifecycles.loadError,
              fiber: g
            }
          });
        case 18:
          return ee = C.sent, te = ee.getExternalScripts, C.next = 22, o.start(te);
        case 22:
          return (x = o.lifecycles) === null || x === void 0 || (j = x.activated) === null || j === void 0 || j.call(x, o.iframe.contentWindow), C.abrupt("return", o.destroy);
        case 26:
          if (!fe(A.__WUJIE_MOUNT)) {
            C.next = 38;
            break;
          }
          return o.unmount(), C.next = 30, o.active({
            url: c,
            sync: w,
            prefix: _,
            el: S,
            props: d,
            alive: b,
            fetch: m,
            replace: s
          });
        case 30:
          return o.rebuildStyleSheets(), (re = o.lifecycles) === null || re === void 0 || (q = re.beforeMount) === null || q === void 0 || q.call(re, o.iframe.contentWindow), A.__WUJIE_MOUNT(), (B = o.lifecycles) === null || B === void 0 || (X = B.afterMount) === null || X === void 0 || X.call(B, o.iframe.contentWindow), o.mountFlag = !0, C.abrupt("return", o.destroy);
        case 38:
          o.destroy();
        case 39:
          return yo(S, T), E = new ko({
            name: l,
            url: c,
            attrs: f,
            degradeAttrs: p,
            fiber: g,
            degrade: h,
            plugins: U,
            lifecycles: O
          }), (r = E.lifecycles) === null || r === void 0 || (n = r.beforeLoad) === null || n === void 0 || n.call(r, E.iframe.contentWindow), C.next = 44, At({
            url: c,
            html: u,
            opts: {
              fetch: m || window.fetch,
              plugins: E.plugins,
              loadError: E.lifecycles.loadError,
              fiber: g
            }
          });
        case 44:
          return v = C.sent, y = v.template, P = v.getExternalScripts, L = v.getExternalStyleSheets, C.next = 50, Fn(E, y, L);
        case 50:
          return I = C.sent, C.next = 53, E.active({
            url: c,
            sync: w,
            prefix: _,
            template: I,
            el: S,
            props: d,
            alive: b,
            fetch: m,
            replace: s
          });
        case 53:
          return C.next = 55, E.start(P);
        case 55:
          return C.abrupt("return", E.destroy);
        case 56:
        case "end":
          return C.stop();
      }
    }, e);
  })), vt.apply(this, arguments);
}
(function() {
  const e = document.createElement("div");
  e.id = "cqt-im-chat", e.style.width = "fit-content", e.style.height = "fit-content", e.style.position = "fixed", e.style.bottom = "0px", e.style.right = "0px", e.style.zIndex = "99999", document.body.append(e);
  const { imGuestUrl: t, companyCode: r, sign: n } = window.__cqtc, o = `${t}?companyCode=${r}&sign=${n}`;
  Jo({ name: "imGuest", url: o, alive: !0, el: "#cqt-im-chat", sync: !1 });
})();
