import { e as $ } from "./directive-helpers-DS-VuBZD.mjs";
import { i as _, t as c } from "./directive-oAbCiebi.mjs";
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const l = (s, t) => {
  var e, i;
  const o = s._$AN;
  if (o === void 0) return !1;
  for (const n of o) (i = (e = n)._$AO) === null || i === void 0 || i.call(e, t, !1), l(n, t);
  return !0;
}, r = (s) => {
  let t, e;
  do {
    if ((t = s._$AM) === void 0) break;
    e = t._$AN, e.delete(s), s = t;
  } while ((e == null ? void 0 : e.size) === 0);
}, h = (s) => {
  for (let t; t = s._$AM; s = t) {
    let e = t._$AN;
    if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
    else if (e.has(s)) break;
    e.add(s), f(t);
  }
};
function d(s) {
  this._$AN !== void 0 ? (r(this), this._$AM = s, h(this)) : this._$AM = s;
}
function A(s, t = !1, e = 0) {
  const i = this._$AH, o = this._$AN;
  if (o !== void 0 && o.size !== 0) if (t) if (Array.isArray(i)) for (let n = e; n < i.length; n++) l(i[n], !1), r(i[n]);
  else i != null && (l(i, !1), r(i));
  else l(this, s);
}
const f = (s) => {
  var t, e, i, o;
  s.type == c.CHILD && ((t = (i = s)._$AP) !== null && t !== void 0 || (i._$AP = A), (e = (o = s)._$AQ) !== null && e !== void 0 || (o._$AQ = d));
};
class v extends _ {
  constructor() {
    super(...arguments), this._$AN = void 0;
  }
  _$AT(t, e, i) {
    super._$AT(t, e, i), h(this), this.isConnected = t._$AU;
  }
  _$AO(t, e = !0) {
    var i, o;
    t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) === null || i === void 0 || i.call(this) : (o = this.disconnected) === null || o === void 0 || o.call(this)), e && (l(this, t), r(this));
  }
  setValue(t) {
    if ($(this._$Ct)) this._$Ct._$AI(t, this);
    else {
      const e = [...this._$Ct._$AH];
      e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
    }
  }
  disconnected() {
  }
  reconnected() {
  }
}
export {
  v as c
};
