import { y as u, h as d, a as _, a7 as y, bz as g, a6 as h, a8 as p, aH as O, aO as b, aI as w, s as R, ay as t } from "./index-CoRcfuX4.js";
import { y as m, z as E } from "./AssetItem-DSqy7mUZ.js";
function C(c, v, i = !1, o = !1, N = !1) {
  var l = c, s = "";
  u(() => {
    var f = (
      /** @type {Effect} */
      y
    );
    if (s === (s = v() ?? "")) {
      d && _();
      return;
    }
    if (f.nodes !== null && (g(
      f.nodes.start,
      /** @type {TemplateNode} */
      f.nodes.end
    ), f.nodes = null), s !== "") {
      if (d) {
        h.data;
        for (var a = _(), n = a; a !== null && (a.nodeType !== p || /** @type {Comment} */
        a.data !== ""); )
          n = a, a = O(a);
        if (a === null)
          throw b(), w;
        m(h, n), l = R(a);
        return;
      }
      var r = s + "";
      i ? r = `<svg>${r}</svg>` : o && (r = `<math>${r}</math>`);
      var e = E(r);
      if ((i || o) && (e = /** @type {Element} */
      t(e)), m(
        /** @type {TemplateNode} */
        t(e),
        /** @type {TemplateNode} */
        e.lastChild
      ), i || o)
        for (; t(e); )
          l.before(
            /** @type {TemplateNode} */
            t(e)
          );
      else
        l.before(e);
    }
  });
}
export {
  C as h
};
//# sourceMappingURL=html-CLv01M-_.js.map
