// node_modules/@lit/reactive-element/css-tag.js
var t = globalThis;
var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
var s = Symbol();
var o = /* @__PURE__ */ new WeakMap();
var n = class {
  constructor(t6, e8, o11) {
    if (this._$cssResult$ = true, o11 !== s)
      throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
    this.cssText = t6, this.t = e8;
  }
  get styleSheet() {
    let t6 = this.o;
    const s8 = this.t;
    if (e && void 0 === t6) {
      const e8 = void 0 !== s8 && 1 === s8.length;
      e8 && (t6 = o.get(s8)), void 0 === t6 && ((this.o = t6 = new CSSStyleSheet()).replaceSync(this.cssText), e8 && o.set(s8, t6));
    }
    return t6;
  }
  toString() {
    return this.cssText;
  }
};
var r = (t6) => new n("string" == typeof t6 ? t6 : t6 + "", void 0, s);
var i = (t6, ...e8) => {
  const o11 = 1 === t6.length ? t6[0] : e8.reduce((e9, s8, o12) => e9 + ((t7) => {
    if (true === t7._$cssResult$)
      return t7.cssText;
    if ("number" == typeof t7)
      return t7;
    throw Error("Value passed to 'css' function must be a 'css' function result: " + t7 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
  })(s8) + t6[o12 + 1], t6[0]);
  return new n(o11, t6, s);
};
var S = (s8, o11) => {
  if (e)
    s8.adoptedStyleSheets = o11.map((t6) => t6 instanceof CSSStyleSheet ? t6 : t6.styleSheet);
  else
    for (const e8 of o11) {
      const o12 = document.createElement("style"), n8 = t.litNonce;
      void 0 !== n8 && o12.setAttribute("nonce", n8), o12.textContent = e8.cssText, s8.appendChild(o12);
    }
};
var c = e ? (t6) => t6 : (t6) => t6 instanceof CSSStyleSheet ? ((t7) => {
  let e8 = "";
  for (const s8 of t7.cssRules)
    e8 += s8.cssText;
  return r(e8);
})(t6) : t6;

// node_modules/@lit/reactive-element/reactive-element.js
var { is: i2, defineProperty: e2, getOwnPropertyDescriptor: h, getOwnPropertyNames: r2, getOwnPropertySymbols: o2, getPrototypeOf: n2 } = Object;
var a = globalThis;
var c2 = a.trustedTypes;
var l = c2 ? c2.emptyScript : "";
var p = a.reactiveElementPolyfillSupport;
var d = (t6, s8) => t6;
var u = { toAttribute(t6, s8) {
  switch (s8) {
    case Boolean:
      t6 = t6 ? l : null;
      break;
    case Object:
    case Array:
      t6 = null == t6 ? t6 : JSON.stringify(t6);
  }
  return t6;
}, fromAttribute(t6, s8) {
  let i9 = t6;
  switch (s8) {
    case Boolean:
      i9 = null !== t6;
      break;
    case Number:
      i9 = null === t6 ? null : Number(t6);
      break;
    case Object:
    case Array:
      try {
        i9 = JSON.parse(t6);
      } catch (t7) {
        i9 = null;
      }
  }
  return i9;
} };
var f = (t6, s8) => !i2(t6, s8);
var b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f };
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
var y = class extends HTMLElement {
  static addInitializer(t6) {
    this._$Ei(), (this.l ??= []).push(t6);
  }
  static get observedAttributes() {
    return this.finalize(), this._$Eh && [...this._$Eh.keys()];
  }
  static createProperty(t6, s8 = b) {
    if (s8.state && (s8.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t6) && ((s8 = Object.create(s8)).wrapped = true), this.elementProperties.set(t6, s8), !s8.noAccessor) {
      const i9 = Symbol(), h6 = this.getPropertyDescriptor(t6, i9, s8);
      void 0 !== h6 && e2(this.prototype, t6, h6);
    }
  }
  static getPropertyDescriptor(t6, s8, i9) {
    const { get: e8, set: r6 } = h(this.prototype, t6) ?? { get() {
      return this[s8];
    }, set(t7) {
      this[s8] = t7;
    } };
    return { get: e8, set(s9) {
      const h6 = e8?.call(this);
      r6?.call(this, s9), this.requestUpdate(t6, h6, i9);
    }, configurable: true, enumerable: true };
  }
  static getPropertyOptions(t6) {
    return this.elementProperties.get(t6) ?? b;
  }
  static _$Ei() {
    if (this.hasOwnProperty(d("elementProperties")))
      return;
    const t6 = n2(this);
    t6.finalize(), void 0 !== t6.l && (this.l = [...t6.l]), this.elementProperties = new Map(t6.elementProperties);
  }
  static finalize() {
    if (this.hasOwnProperty(d("finalized")))
      return;
    if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
      const t7 = this.properties, s8 = [...r2(t7), ...o2(t7)];
      for (const i9 of s8)
        this.createProperty(i9, t7[i9]);
    }
    const t6 = this[Symbol.metadata];
    if (null !== t6) {
      const s8 = litPropertyMetadata.get(t6);
      if (void 0 !== s8)
        for (const [t7, i9] of s8)
          this.elementProperties.set(t7, i9);
    }
    this._$Eh = /* @__PURE__ */ new Map();
    for (const [t7, s8] of this.elementProperties) {
      const i9 = this._$Eu(t7, s8);
      void 0 !== i9 && this._$Eh.set(i9, t7);
    }
    this.elementStyles = this.finalizeStyles(this.styles);
  }
  static finalizeStyles(s8) {
    const i9 = [];
    if (Array.isArray(s8)) {
      const e8 = new Set(s8.flat(1 / 0).reverse());
      for (const s9 of e8)
        i9.unshift(c(s9));
    } else
      void 0 !== s8 && i9.push(c(s8));
    return i9;
  }
  static _$Eu(t6, s8) {
    const i9 = s8.attribute;
    return false === i9 ? void 0 : "string" == typeof i9 ? i9 : "string" == typeof t6 ? t6.toLowerCase() : void 0;
  }
  constructor() {
    super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
  }
  _$Ev() {
    this._$ES = new Promise((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t6) => t6(this));
  }
  addController(t6) {
    (this._$EO ??= /* @__PURE__ */ new Set()).add(t6), void 0 !== this.renderRoot && this.isConnected && t6.hostConnected?.();
  }
  removeController(t6) {
    this._$EO?.delete(t6);
  }
  _$E_() {
    const t6 = /* @__PURE__ */ new Map(), s8 = this.constructor.elementProperties;
    for (const i9 of s8.keys())
      this.hasOwnProperty(i9) && (t6.set(i9, this[i9]), delete this[i9]);
    t6.size > 0 && (this._$Ep = t6);
  }
  createRenderRoot() {
    const t6 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
    return S(t6, this.constructor.elementStyles), t6;
  }
  connectedCallback() {
    this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t6) => t6.hostConnected?.());
  }
  enableUpdating(t6) {
  }
  disconnectedCallback() {
    this._$EO?.forEach((t6) => t6.hostDisconnected?.());
  }
  attributeChangedCallback(t6, s8, i9) {
    this._$AK(t6, i9);
  }
  _$ET(t6, s8) {
    const i9 = this.constructor.elementProperties.get(t6), e8 = this.constructor._$Eu(t6, i9);
    if (void 0 !== e8 && true === i9.reflect) {
      const h6 = (void 0 !== i9.converter?.toAttribute ? i9.converter : u).toAttribute(s8, i9.type);
      this._$Em = t6, null == h6 ? this.removeAttribute(e8) : this.setAttribute(e8, h6), this._$Em = null;
    }
  }
  _$AK(t6, s8) {
    const i9 = this.constructor, e8 = i9._$Eh.get(t6);
    if (void 0 !== e8 && this._$Em !== e8) {
      const t7 = i9.getPropertyOptions(e8), h6 = "function" == typeof t7.converter ? { fromAttribute: t7.converter } : void 0 !== t7.converter?.fromAttribute ? t7.converter : u;
      this._$Em = e8;
      const r6 = h6.fromAttribute(s8, t7.type);
      this[e8] = r6 ?? this._$Ej?.get(e8) ?? r6, this._$Em = null;
    }
  }
  requestUpdate(t6, s8, i9) {
    if (void 0 !== t6) {
      const e8 = this.constructor, h6 = this[t6];
      if (i9 ??= e8.getPropertyOptions(t6), !((i9.hasChanged ?? f)(h6, s8) || i9.useDefault && i9.reflect && h6 === this._$Ej?.get(t6) && !this.hasAttribute(e8._$Eu(t6, i9))))
        return;
      this.C(t6, s8, i9);
    }
    false === this.isUpdatePending && (this._$ES = this._$EP());
  }
  C(t6, s8, { useDefault: i9, reflect: e8, wrapped: h6 }, r6) {
    i9 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t6) && (this._$Ej.set(t6, r6 ?? s8 ?? this[t6]), true !== h6 || void 0 !== r6) || (this._$AL.has(t6) || (this.hasUpdated || i9 || (s8 = void 0), this._$AL.set(t6, s8)), true === e8 && this._$Em !== t6 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t6));
  }
  async _$EP() {
    this.isUpdatePending = true;
    try {
      await this._$ES;
    } catch (t7) {
      Promise.reject(t7);
    }
    const t6 = this.scheduleUpdate();
    return null != t6 && await t6, !this.isUpdatePending;
  }
  scheduleUpdate() {
    return this.performUpdate();
  }
  performUpdate() {
    if (!this.isUpdatePending)
      return;
    if (!this.hasUpdated) {
      if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
        for (const [t8, s9] of this._$Ep)
          this[t8] = s9;
        this._$Ep = void 0;
      }
      const t7 = this.constructor.elementProperties;
      if (t7.size > 0)
        for (const [s9, i9] of t7) {
          const { wrapped: t8 } = i9, e8 = this[s9];
          true !== t8 || this._$AL.has(s9) || void 0 === e8 || this.C(s9, void 0, i9, e8);
        }
    }
    let t6 = false;
    const s8 = this._$AL;
    try {
      t6 = this.shouldUpdate(s8), t6 ? (this.willUpdate(s8), this._$EO?.forEach((t7) => t7.hostUpdate?.()), this.update(s8)) : this._$EM();
    } catch (s9) {
      throw t6 = false, this._$EM(), s9;
    }
    t6 && this._$AE(s8);
  }
  willUpdate(t6) {
  }
  _$AE(t6) {
    this._$EO?.forEach((t7) => t7.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t6)), this.updated(t6);
  }
  _$EM() {
    this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
  }
  get updateComplete() {
    return this.getUpdateComplete();
  }
  getUpdateComplete() {
    return this._$ES;
  }
  shouldUpdate(t6) {
    return true;
  }
  update(t6) {
    this._$Eq &&= this._$Eq.forEach((t7) => this._$ET(t7, this[t7])), this._$EM();
  }
  updated(t6) {
  }
  firstUpdated(t6) {
  }
};
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProperties")] = /* @__PURE__ */ new Map(), y[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: y }), (a.reactiveElementVersions ??= []).push("2.1.1");

// node_modules/lit-html/lit-html.js
var t2 = globalThis;
var i3 = t2.trustedTypes;
var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t6) => t6 }) : void 0;
var e3 = "$lit$";
var h2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
var o3 = "?" + h2;
var n3 = `<${o3}>`;
var r3 = document;
var l2 = () => r3.createComment("");
var c3 = (t6) => null === t6 || "object" != typeof t6 && "function" != typeof t6;
var a2 = Array.isArray;
var u2 = (t6) => a2(t6) || "function" == typeof t6?.[Symbol.iterator];
var d2 = "[ 	\n\f\r]";
var f2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
var v = /-->/g;
var _ = />/g;
var m = RegExp(`>|${d2}(?:([^\\s"'>=/]+)(${d2}*=${d2}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`, "g");
var p2 = /'/g;
var g = /"/g;
var $ = /^(?:script|style|textarea|title)$/i;
var y2 = (t6) => (i9, ...s8) => ({ _$litType$: t6, strings: i9, values: s8 });
var x = y2(1);
var b2 = y2(2);
var w = y2(3);
var T = Symbol.for("lit-noChange");
var E = Symbol.for("lit-nothing");
var A = /* @__PURE__ */ new WeakMap();
var C = r3.createTreeWalker(r3, 129);
function P(t6, i9) {
  if (!a2(t6) || !t6.hasOwnProperty("raw"))
    throw Error("invalid template strings array");
  return void 0 !== s2 ? s2.createHTML(i9) : i9;
}
var V = (t6, i9) => {
  const s8 = t6.length - 1, o11 = [];
  let r6, l4 = 2 === i9 ? "<svg>" : 3 === i9 ? "<math>" : "", c8 = f2;
  for (let i10 = 0; i10 < s8; i10++) {
    const s9 = t6[i10];
    let a4, u6, d3 = -1, y3 = 0;
    for (; y3 < s9.length && (c8.lastIndex = y3, u6 = c8.exec(s9), null !== u6); )
      y3 = c8.lastIndex, c8 === f2 ? "!--" === u6[1] ? c8 = v : void 0 !== u6[1] ? c8 = _ : void 0 !== u6[2] ? ($.test(u6[2]) && (r6 = RegExp("</" + u6[2], "g")), c8 = m) : void 0 !== u6[3] && (c8 = m) : c8 === m ? ">" === u6[0] ? (c8 = r6 ?? f2, d3 = -1) : void 0 === u6[1] ? d3 = -2 : (d3 = c8.lastIndex - u6[2].length, a4 = u6[1], c8 = void 0 === u6[3] ? m : '"' === u6[3] ? g : p2) : c8 === g || c8 === p2 ? c8 = m : c8 === v || c8 === _ ? c8 = f2 : (c8 = m, r6 = void 0);
    const x2 = c8 === m && t6[i10 + 1].startsWith("/>") ? " " : "";
    l4 += c8 === f2 ? s9 + n3 : d3 >= 0 ? (o11.push(a4), s9.slice(0, d3) + e3 + s9.slice(d3) + h2 + x2) : s9 + h2 + (-2 === d3 ? i10 : x2);
  }
  return [P(t6, l4 + (t6[s8] || "<?>") + (2 === i9 ? "</svg>" : 3 === i9 ? "</math>" : "")), o11];
};
var N = class _N {
  constructor({ strings: t6, _$litType$: s8 }, n8) {
    let r6;
    this.parts = [];
    let c8 = 0, a4 = 0;
    const u6 = t6.length - 1, d3 = this.parts, [f5, v3] = V(t6, s8);
    if (this.el = _N.createElement(f5, n8), C.currentNode = this.el.content, 2 === s8 || 3 === s8) {
      const t7 = this.el.content.firstChild;
      t7.replaceWith(...t7.childNodes);
    }
    for (; null !== (r6 = C.nextNode()) && d3.length < u6; ) {
      if (1 === r6.nodeType) {
        if (r6.hasAttributes())
          for (const t7 of r6.getAttributeNames())
            if (t7.endsWith(e3)) {
              const i9 = v3[a4++], s9 = r6.getAttribute(t7).split(h2), e8 = /([.?@])?(.*)/.exec(i9);
              d3.push({ type: 1, index: c8, name: e8[2], strings: s9, ctor: "." === e8[1] ? H : "?" === e8[1] ? I : "@" === e8[1] ? L : k }), r6.removeAttribute(t7);
            } else
              t7.startsWith(h2) && (d3.push({ type: 6, index: c8 }), r6.removeAttribute(t7));
        if ($.test(r6.tagName)) {
          const t7 = r6.textContent.split(h2), s9 = t7.length - 1;
          if (s9 > 0) {
            r6.textContent = i3 ? i3.emptyScript : "";
            for (let i9 = 0; i9 < s9; i9++)
              r6.append(t7[i9], l2()), C.nextNode(), d3.push({ type: 2, index: ++c8 });
            r6.append(t7[s9], l2());
          }
        }
      } else if (8 === r6.nodeType)
        if (r6.data === o3)
          d3.push({ type: 2, index: c8 });
        else {
          let t7 = -1;
          for (; -1 !== (t7 = r6.data.indexOf(h2, t7 + 1)); )
            d3.push({ type: 7, index: c8 }), t7 += h2.length - 1;
        }
      c8++;
    }
  }
  static createElement(t6, i9) {
    const s8 = r3.createElement("template");
    return s8.innerHTML = t6, s8;
  }
};
function S2(t6, i9, s8 = t6, e8) {
  if (i9 === T)
    return i9;
  let h6 = void 0 !== e8 ? s8._$Co?.[e8] : s8._$Cl;
  const o11 = c3(i9) ? void 0 : i9._$litDirective$;
  return h6?.constructor !== o11 && (h6?._$AO?.(false), void 0 === o11 ? h6 = void 0 : (h6 = new o11(t6), h6._$AT(t6, s8, e8)), void 0 !== e8 ? (s8._$Co ??= [])[e8] = h6 : s8._$Cl = h6), void 0 !== h6 && (i9 = S2(t6, h6._$AS(t6, i9.values), h6, e8)), i9;
}
var M = class {
  constructor(t6, i9) {
    this._$AV = [], this._$AN = void 0, this._$AD = t6, this._$AM = i9;
  }
  get parentNode() {
    return this._$AM.parentNode;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  u(t6) {
    const { el: { content: i9 }, parts: s8 } = this._$AD, e8 = (t6?.creationScope ?? r3).importNode(i9, true);
    C.currentNode = e8;
    let h6 = C.nextNode(), o11 = 0, n8 = 0, l4 = s8[0];
    for (; void 0 !== l4; ) {
      if (o11 === l4.index) {
        let i10;
        2 === l4.type ? i10 = new R(h6, h6.nextSibling, this, t6) : 1 === l4.type ? i10 = new l4.ctor(h6, l4.name, l4.strings, this, t6) : 6 === l4.type && (i10 = new z(h6, this, t6)), this._$AV.push(i10), l4 = s8[++n8];
      }
      o11 !== l4?.index && (h6 = C.nextNode(), o11++);
    }
    return C.currentNode = r3, e8;
  }
  p(t6) {
    let i9 = 0;
    for (const s8 of this._$AV)
      void 0 !== s8 && (void 0 !== s8.strings ? (s8._$AI(t6, s8, i9), i9 += s8.strings.length - 2) : s8._$AI(t6[i9])), i9++;
  }
};
var R = class _R {
  get _$AU() {
    return this._$AM?._$AU ?? this._$Cv;
  }
  constructor(t6, i9, s8, e8) {
    this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t6, this._$AB = i9, this._$AM = s8, this.options = e8, this._$Cv = e8?.isConnected ?? true;
  }
  get parentNode() {
    let t6 = this._$AA.parentNode;
    const i9 = this._$AM;
    return void 0 !== i9 && 11 === t6?.nodeType && (t6 = i9.parentNode), t6;
  }
  get startNode() {
    return this._$AA;
  }
  get endNode() {
    return this._$AB;
  }
  _$AI(t6, i9 = this) {
    t6 = S2(this, t6, i9), c3(t6) ? t6 === E || null == t6 || "" === t6 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t6 !== this._$AH && t6 !== T && this._(t6) : void 0 !== t6._$litType$ ? this.$(t6) : void 0 !== t6.nodeType ? this.T(t6) : u2(t6) ? this.k(t6) : this._(t6);
  }
  O(t6) {
    return this._$AA.parentNode.insertBefore(t6, this._$AB);
  }
  T(t6) {
    this._$AH !== t6 && (this._$AR(), this._$AH = this.O(t6));
  }
  _(t6) {
    this._$AH !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t6 : this.T(r3.createTextNode(t6)), this._$AH = t6;
  }
  $(t6) {
    const { values: i9, _$litType$: s8 } = t6, e8 = "number" == typeof s8 ? this._$AC(t6) : (void 0 === s8.el && (s8.el = N.createElement(P(s8.h, s8.h[0]), this.options)), s8);
    if (this._$AH?._$AD === e8)
      this._$AH.p(i9);
    else {
      const t7 = new M(e8, this), s9 = t7.u(this.options);
      t7.p(i9), this.T(s9), this._$AH = t7;
    }
  }
  _$AC(t6) {
    let i9 = A.get(t6.strings);
    return void 0 === i9 && A.set(t6.strings, i9 = new N(t6)), i9;
  }
  k(t6) {
    a2(this._$AH) || (this._$AH = [], this._$AR());
    const i9 = this._$AH;
    let s8, e8 = 0;
    for (const h6 of t6)
      e8 === i9.length ? i9.push(s8 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s8 = i9[e8], s8._$AI(h6), e8++;
    e8 < i9.length && (this._$AR(s8 && s8._$AB.nextSibling, e8), i9.length = e8);
  }
  _$AR(t6 = this._$AA.nextSibling, i9) {
    for (this._$AP?.(false, true, i9); t6 !== this._$AB; ) {
      const i10 = t6.nextSibling;
      t6.remove(), t6 = i10;
    }
  }
  setConnected(t6) {
    void 0 === this._$AM && (this._$Cv = t6, this._$AP?.(t6));
  }
};
var k = class {
  get tagName() {
    return this.element.tagName;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  constructor(t6, i9, s8, e8, h6) {
    this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t6, this.name = i9, this._$AM = e8, this.options = h6, s8.length > 2 || "" !== s8[0] || "" !== s8[1] ? (this._$AH = Array(s8.length - 1).fill(new String()), this.strings = s8) : this._$AH = E;
  }
  _$AI(t6, i9 = this, s8, e8) {
    const h6 = this.strings;
    let o11 = false;
    if (void 0 === h6)
      t6 = S2(this, t6, i9, 0), o11 = !c3(t6) || t6 !== this._$AH && t6 !== T, o11 && (this._$AH = t6);
    else {
      const e9 = t6;
      let n8, r6;
      for (t6 = h6[0], n8 = 0; n8 < h6.length - 1; n8++)
        r6 = S2(this, e9[s8 + n8], i9, n8), r6 === T && (r6 = this._$AH[n8]), o11 ||= !c3(r6) || r6 !== this._$AH[n8], r6 === E ? t6 = E : t6 !== E && (t6 += (r6 ?? "") + h6[n8 + 1]), this._$AH[n8] = r6;
    }
    o11 && !e8 && this.j(t6);
  }
  j(t6) {
    t6 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t6 ?? "");
  }
};
var H = class extends k {
  constructor() {
    super(...arguments), this.type = 3;
  }
  j(t6) {
    this.element[this.name] = t6 === E ? void 0 : t6;
  }
};
var I = class extends k {
  constructor() {
    super(...arguments), this.type = 4;
  }
  j(t6) {
    this.element.toggleAttribute(this.name, !!t6 && t6 !== E);
  }
};
var L = class extends k {
  constructor(t6, i9, s8, e8, h6) {
    super(t6, i9, s8, e8, h6), this.type = 5;
  }
  _$AI(t6, i9 = this) {
    if ((t6 = S2(this, t6, i9, 0) ?? E) === T)
      return;
    const s8 = this._$AH, e8 = t6 === E && s8 !== E || t6.capture !== s8.capture || t6.once !== s8.once || t6.passive !== s8.passive, h6 = t6 !== E && (s8 === E || e8);
    e8 && this.element.removeEventListener(this.name, this, s8), h6 && this.element.addEventListener(this.name, this, t6), this._$AH = t6;
  }
  handleEvent(t6) {
    "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t6) : this._$AH.handleEvent(t6);
  }
};
var z = class {
  constructor(t6, i9, s8) {
    this.element = t6, this.type = 6, this._$AN = void 0, this._$AM = i9, this.options = s8;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  _$AI(t6) {
    S2(this, t6);
  }
};
var Z = { M: e3, P: h2, A: o3, C: 1, L: V, R: M, D: u2, V: S2, I: R, H: k, N: I, U: L, B: H, F: z };
var j = t2.litHtmlPolyfillSupport;
j?.(N, R), (t2.litHtmlVersions ??= []).push("3.3.1");
var B = (t6, i9, s8) => {
  const e8 = s8?.renderBefore ?? i9;
  let h6 = e8._$litPart$;
  if (void 0 === h6) {
    const t7 = s8?.renderBefore ?? null;
    e8._$litPart$ = h6 = new R(i9.insertBefore(l2(), t7), t7, void 0, s8 ?? {});
  }
  return h6._$AI(t6), h6;
};

// node_modules/lit-element/lit-element.js
var s3 = globalThis;
var i4 = class extends y {
  constructor() {
    super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
  }
  createRenderRoot() {
    const t6 = super.createRenderRoot();
    return this.renderOptions.renderBefore ??= t6.firstChild, t6;
  }
  update(t6) {
    const r6 = this.render();
    this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t6), this._$Do = B(r6, this.renderRoot, this.renderOptions);
  }
  connectedCallback() {
    super.connectedCallback(), this._$Do?.setConnected(true);
  }
  disconnectedCallback() {
    super.disconnectedCallback(), this._$Do?.setConnected(false);
  }
  render() {
    return T;
  }
};
i4._$litElement$ = true, i4["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i4 });
var o4 = s3.litElementPolyfillSupport;
o4?.({ LitElement: i4 });
(s3.litElementVersions ??= []).push("4.2.1");

// node_modules/lit-html/directive.js
var t3 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
var e4 = (t6) => (...e8) => ({ _$litDirective$: t6, values: e8 });
var i5 = class {
  constructor(t6) {
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  _$AT(t6, e8, i9) {
    this._$Ct = t6, this._$AM = e8, this._$Ci = i9;
  }
  _$AS(t6, e8) {
    return this.update(t6, e8);
  }
  update(t6, e8) {
    return this.render(...e8);
  }
};

// node_modules/lit-html/directive-helpers.js
var { I: t4 } = Z;
var i6 = (o11) => null === o11 || "object" != typeof o11 && "function" != typeof o11;
var f3 = (o11) => void 0 === o11.strings;
var r4 = () => document.createComment("");
var s4 = (o11, i9, n8) => {
  const e8 = o11._$AA.parentNode, l4 = void 0 === i9 ? o11._$AB : i9._$AA;
  if (void 0 === n8) {
    const i10 = e8.insertBefore(r4(), l4), d3 = e8.insertBefore(r4(), l4);
    n8 = new t4(i10, d3, o11, o11.options);
  } else {
    const t6 = n8._$AB.nextSibling, i10 = n8._$AM, d3 = i10 !== o11;
    if (d3) {
      let t7;
      n8._$AQ?.(o11), n8._$AM = o11, void 0 !== n8._$AP && (t7 = o11._$AU) !== i10._$AU && n8._$AP(t7);
    }
    if (t6 !== l4 || d3) {
      let o12 = n8._$AA;
      for (; o12 !== t6; ) {
        const t7 = o12.nextSibling;
        e8.insertBefore(o12, l4), o12 = t7;
      }
    }
  }
  return n8;
};
var v2 = (o11, t6, i9 = o11) => (o11._$AI(t6, i9), o11);
var u3 = {};
var m2 = (o11, t6 = u3) => o11._$AH = t6;
var p3 = (o11) => o11._$AH;
var M2 = (o11) => {
  o11._$AR(), o11._$AA.remove();
};

// node_modules/lit-html/directives/repeat.js
var u4 = (e8, s8, t6) => {
  const r6 = /* @__PURE__ */ new Map();
  for (let l4 = s8; l4 <= t6; l4++)
    r6.set(e8[l4], l4);
  return r6;
};
var c4 = e4(class extends i5 {
  constructor(e8) {
    if (super(e8), e8.type !== t3.CHILD)
      throw Error("repeat() can only be used in text expressions");
  }
  dt(e8, s8, t6) {
    let r6;
    void 0 === t6 ? t6 = s8 : void 0 !== s8 && (r6 = s8);
    const l4 = [], o11 = [];
    let i9 = 0;
    for (const s9 of e8)
      l4[i9] = r6 ? r6(s9, i9) : i9, o11[i9] = t6(s9, i9), i9++;
    return { values: o11, keys: l4 };
  }
  render(e8, s8, t6) {
    return this.dt(e8, s8, t6).values;
  }
  update(s8, [t6, r6, c8]) {
    const d3 = p3(s8), { values: p4, keys: a4 } = this.dt(t6, r6, c8);
    if (!Array.isArray(d3))
      return this.ut = a4, p4;
    const h6 = this.ut ??= [], v3 = [];
    let m4, y3, x2 = 0, j2 = d3.length - 1, k2 = 0, w2 = p4.length - 1;
    for (; x2 <= j2 && k2 <= w2; )
      if (null === d3[x2])
        x2++;
      else if (null === d3[j2])
        j2--;
      else if (h6[x2] === a4[k2])
        v3[k2] = v2(d3[x2], p4[k2]), x2++, k2++;
      else if (h6[j2] === a4[w2])
        v3[w2] = v2(d3[j2], p4[w2]), j2--, w2--;
      else if (h6[x2] === a4[w2])
        v3[w2] = v2(d3[x2], p4[w2]), s4(s8, v3[w2 + 1], d3[x2]), x2++, w2--;
      else if (h6[j2] === a4[k2])
        v3[k2] = v2(d3[j2], p4[k2]), s4(s8, d3[x2], d3[j2]), j2--, k2++;
      else if (void 0 === m4 && (m4 = u4(a4, k2, w2), y3 = u4(h6, x2, j2)), m4.has(h6[x2]))
        if (m4.has(h6[j2])) {
          const e8 = y3.get(a4[k2]), t7 = void 0 !== e8 ? d3[e8] : null;
          if (null === t7) {
            const e9 = s4(s8, d3[x2]);
            v2(e9, p4[k2]), v3[k2] = e9;
          } else
            v3[k2] = v2(t7, p4[k2]), s4(s8, d3[x2], t7), d3[e8] = null;
          k2++;
        } else
          M2(d3[j2]), j2--;
      else
        M2(d3[x2]), x2++;
    for (; k2 <= w2; ) {
      const e8 = s4(s8, v3[w2 + 1]);
      v2(e8, p4[k2]), v3[k2++] = e8;
    }
    for (; x2 <= j2; ) {
      const e8 = d3[x2++];
      null !== e8 && M2(e8);
    }
    return this.ut = a4, m2(s8, v3), T;
  }
});

// node_modules/lit-html/directives/keyed.js
var i7 = e4(class extends i5 {
  constructor() {
    super(...arguments), this.key = E;
  }
  render(r6, t6) {
    return this.key = r6, t6;
  }
  update(r6, [t6, e8]) {
    return t6 !== this.key && (m2(r6), this.key = t6), e8;
  }
});

// node_modules/lit-html/directives/class-map.js
var e5 = e4(class extends i5 {
  constructor(t6) {
    if (super(t6), t6.type !== t3.ATTRIBUTE || "class" !== t6.name || t6.strings?.length > 2)
      throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
  }
  render(t6) {
    return " " + Object.keys(t6).filter((s8) => t6[s8]).join(" ") + " ";
  }
  update(s8, [i9]) {
    if (void 0 === this.st) {
      this.st = /* @__PURE__ */ new Set(), void 0 !== s8.strings && (this.nt = new Set(s8.strings.join(" ").split(/\s/).filter((t6) => "" !== t6)));
      for (const t6 in i9)
        i9[t6] && !this.nt?.has(t6) && this.st.add(t6);
      return this.render(i9);
    }
    const r6 = s8.element.classList;
    for (const t6 of this.st)
      t6 in i9 || (r6.remove(t6), this.st.delete(t6));
    for (const t6 in i9) {
      const s9 = !!i9[t6];
      s9 === this.st.has(t6) || this.nt?.has(t6) || (s9 ? (r6.add(t6), this.st.add(t6)) : (r6.remove(t6), this.st.delete(t6)));
    }
    return T;
  }
});

// node_modules/lit-html/async-directive.js
var s5 = (i9, t6) => {
  const e8 = i9._$AN;
  if (void 0 === e8)
    return false;
  for (const i10 of e8)
    i10._$AO?.(t6, false), s5(i10, t6);
  return true;
};
var o5 = (i9) => {
  let t6, e8;
  do {
    if (void 0 === (t6 = i9._$AM))
      break;
    e8 = t6._$AN, e8.delete(i9), i9 = t6;
  } while (0 === e8?.size);
};
var r5 = (i9) => {
  for (let t6; t6 = i9._$AM; i9 = t6) {
    let e8 = t6._$AN;
    if (void 0 === e8)
      t6._$AN = e8 = /* @__PURE__ */ new Set();
    else if (e8.has(i9))
      break;
    e8.add(i9), c5(t6);
  }
};
function h3(i9) {
  void 0 !== this._$AN ? (o5(this), this._$AM = i9, r5(this)) : this._$AM = i9;
}
function n4(i9, t6 = false, e8 = 0) {
  const r6 = this._$AH, h6 = this._$AN;
  if (void 0 !== h6 && 0 !== h6.size)
    if (t6)
      if (Array.isArray(r6))
        for (let i10 = e8; i10 < r6.length; i10++)
          s5(r6[i10], false), o5(r6[i10]);
      else
        null != r6 && (s5(r6, false), o5(r6));
    else
      s5(this, i9);
}
var c5 = (i9) => {
  i9.type == t3.CHILD && (i9._$AP ??= n4, i9._$AQ ??= h3);
};
var f4 = class extends i5 {
  constructor() {
    super(...arguments), this._$AN = void 0;
  }
  _$AT(i9, t6, e8) {
    super._$AT(i9, t6, e8), r5(this), this.isConnected = i9._$AU;
  }
  _$AO(i9, t6 = true) {
    i9 !== this.isConnected && (this.isConnected = i9, i9 ? this.reconnected?.() : this.disconnected?.()), t6 && (s5(this, i9), o5(this));
  }
  setValue(t6) {
    if (f3(this._$Ct))
      this._$Ct._$AI(t6, this);
    else {
      const i9 = [...this._$Ct._$AH];
      i9[this._$Ci] = t6, this._$Ct._$AI(i9, this, 0);
    }
  }
  disconnected() {
  }
  reconnected() {
  }
};

// node_modules/lit-html/directives/ref.js
var e6 = () => new h4();
var h4 = class {
};
var o6 = /* @__PURE__ */ new WeakMap();
var n5 = e4(class extends f4 {
  render(i9) {
    return E;
  }
  update(i9, [s8]) {
    const e8 = s8 !== this.G;
    return e8 && void 0 !== this.G && this.rt(void 0), (e8 || this.lt !== this.ct) && (this.G = s8, this.ht = i9.options?.host, this.rt(this.ct = i9.element)), E;
  }
  rt(t6) {
    if (this.isConnected || (t6 = void 0), "function" == typeof this.G) {
      const i9 = this.ht ?? globalThis;
      let s8 = o6.get(i9);
      void 0 === s8 && (s8 = /* @__PURE__ */ new WeakMap(), o6.set(i9, s8)), void 0 !== s8.get(this.G) && this.G.call(this.ht, void 0), s8.set(this.G, t6), void 0 !== t6 && this.G.call(this.ht, t6);
    } else
      this.G.value = t6;
  }
  get lt() {
    return "function" == typeof this.G ? o6.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
  }
  disconnected() {
    this.lt === this.ct && this.rt(void 0);
  }
  reconnected() {
    this.rt(this.ct);
  }
});

// node_modules/lit-html/directives/if-defined.js
var o7 = (o11) => o11 ?? E;

// node_modules/lit-html/directives/private-async-helpers.js
var s6 = class {
  constructor(t6) {
    this.G = t6;
  }
  disconnect() {
    this.G = void 0;
  }
  reconnect(t6) {
    this.G = t6;
  }
  deref() {
    return this.G;
  }
};
var i8 = class {
  constructor() {
    this.Y = void 0, this.Z = void 0;
  }
  get() {
    return this.Y;
  }
  pause() {
    this.Y ??= new Promise((t6) => this.Z = t6);
  }
  resume() {
    this.Z?.(), this.Y = this.Z = void 0;
  }
};

// node_modules/lit-html/directives/until.js
var n6 = (t6) => !i6(t6) && "function" == typeof t6.then;
var h5 = 1073741823;
var c6 = class extends f4 {
  constructor() {
    super(...arguments), this._$Cwt = h5, this._$Cbt = [], this._$CK = new s6(this), this._$CX = new i8();
  }
  render(...s8) {
    return s8.find((t6) => !n6(t6)) ?? T;
  }
  update(s8, i9) {
    const e8 = this._$Cbt;
    let r6 = e8.length;
    this._$Cbt = i9;
    const o11 = this._$CK, c8 = this._$CX;
    this.isConnected || this.disconnected();
    for (let t6 = 0; t6 < i9.length && !(t6 > this._$Cwt); t6++) {
      const s9 = i9[t6];
      if (!n6(s9))
        return this._$Cwt = t6, s9;
      t6 < r6 && s9 === e8[t6] || (this._$Cwt = h5, r6 = 0, Promise.resolve(s9).then(async (t7) => {
        for (; c8.get(); )
          await c8.get();
        const i10 = o11.deref();
        if (void 0 !== i10) {
          const e9 = i10._$Cbt.indexOf(s9);
          e9 > -1 && e9 < i10._$Cwt && (i10._$Cwt = e9, i10.setValue(t7));
        }
      }));
    }
    return T;
  }
  disconnected() {
    this._$CK.disconnect(), this._$CX.pause();
  }
  reconnected() {
    this._$CK.reconnect(this), this._$CX.resume();
  }
};
var m3 = e4(c6);

// node_modules/lit-html/directives/unsafe-html.js
var e7 = class extends i5 {
  constructor(i9) {
    if (super(i9), this.it = E, i9.type !== t3.CHILD)
      throw Error(this.constructor.directiveName + "() can only be used in child bindings");
  }
  render(r6) {
    if (r6 === E || null == r6)
      return this._t = void 0, this.it = r6;
    if (r6 === T)
      return r6;
    if ("string" != typeof r6)
      throw Error(this.constructor.directiveName + "() called with a non-string value");
    if (r6 === this.it)
      return this._t;
    this.it = r6;
    const s8 = [r6];
    return s8.raw = s8, this._t = { _$litType$: this.constructor.resultType, strings: s8, values: [] };
  }
};
e7.directiveName = "unsafeHTML", e7.resultType = 1;
var o8 = e4(e7);

// node_modules/lit-html/directives/unsafe-svg.js
var t5 = class extends e7 {
};
t5.directiveName = "unsafeSVG", t5.resultType = 2;
var o9 = e4(t5);

// src/js/common/msg.js
var isLocal = ["127.0.0.1", "localhost"].includes(window.location.hostname);
var isStrTagged = (val) => typeof val !== "string" && "strTag" in val;
function collateStrings(strings) {
  let s8 = "";
  for (let i9 = 0; i9 <= strings.length - 1; i9++) {
    s8 += strings[i9];
    if (i9 < strings.length - 1)
      s8 += `{${i9}}`;
  }
  return s8;
}
function replacePlaceholders(str, callback) {
  return str.replace(/\{(\d+)\}/g, (match, index) => callback(index));
}
var joinStringsAndValues = (strings, values, options) => {
  const matchString = collateStrings(strings);
  const tra = getTrans(matchString, options);
  return replacePlaceholders(tra, (index) => {
    return values[index];
  });
};
function getTrans(t6, options = {}) {
  window.__strings = window.__strings ?? {};
  const tra = window.__strings[t6]?.content;
  if (!tra && isLocal) {
    console.log("\u{1F310}", t6, options.desc ? `(${options.desc})` : ``);
  }
  if (window.env?.DEBUG_TRANSLATIONS)
    return `__${tra ?? t6}`;
  return tra ?? t6;
}
var msg = (template, options = {}) => {
  if (!template)
    return "";
  return isStrTagged(template) ? joinStringsAndValues(template.strings, template.values, options) : getTrans(template, options);
};

// node_modules/lit-html/static.js
var a3 = Symbol.for("");
var o10 = (t6) => {
  if (t6?.r === a3)
    return t6?._$litStatic$;
};
var s7 = (t6) => ({ _$litStatic$: t6, r: a3 });
var l3 = /* @__PURE__ */ new Map();
var n7 = (t6) => (r6, ...e8) => {
  const a4 = e8.length;
  let s8, i9;
  const n8 = [], u6 = [];
  let c8, $3 = 0, f5 = false;
  for (; $3 < a4; ) {
    for (c8 = r6[$3]; $3 < a4 && void 0 !== (i9 = e8[$3], s8 = o10(i9)); )
      c8 += s8 + r6[++$3], f5 = true;
    $3 !== a4 && u6.push(i9), n8.push(c8), $3++;
  }
  if ($3 === a4 && n8.push(r6[a4]), f5) {
    const t7 = n8.join("$$lit$$");
    void 0 === (r6 = l3.get(t7)) && (n8.raw = n8, l3.set(t7, r6 = n8)), e8 = u6;
  }
  return t6(r6, ...e8);
};
var u5 = n7(x);
var c7 = n7(b2);
var $2 = n7(w);

// src/js/lit.js
var html = x;
var css = i;
var LazyPropsDirective = class extends i5 {
  #pendingProps = null;
  #element = null;
  render(_props) {
    return E;
  }
  update(part, [props]) {
    const element = part.element;
    if (this.#element !== element) {
      this.#element = element;
      this.#pendingProps = props;
      this.#applyProps();
    } else if (JSON.stringify(this.#pendingProps) !== JSON.stringify(props)) {
      this.#pendingProps = props;
      this.#applyProps();
    }
    return E;
  }
  async #applyProps() {
    if (!this.#element || !this.#pendingProps)
      return;
    const tagName = this.#element.tagName.toLowerCase();
    await customElements.whenDefined(tagName);
    for (const [key, value] of Object.entries(this.#pendingProps)) {
      this.#element[key] = value;
    }
  }
};
var lazyProps = e4(LazyPropsDirective);
async function loadLocale(locale) {
  try {
    window.__strings = await fetch(`/assets/locales/${locale}.json`).then((r6) => r6.json());
  } catch {
    window.__strings = {};
  }
}
export {
  i4 as LitElement,
  e5 as classMap,
  e6 as createRef,
  css,
  html,
  o7 as ifDefined,
  i7 as keyed,
  lazyProps,
  loadLocale,
  msg,
  E as nothing,
  n5 as ref,
  B as render,
  c4 as repeat,
  u5 as staticHtml,
  b2 as svg,
  o8 as unsafeHTML,
  o9 as unsafeSVG,
  s7 as unsafeStatic,
  m3 as until
};
/*! Bundled license information:

@lit/reactive-element/css-tag.js:
  (**
   * @license
   * Copyright 2019 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

@lit/reactive-element/reactive-element.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/lit-html.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-element/lit-element.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/is-server.js:
  (**
   * @license
   * Copyright 2022 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directive.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directive-helpers.js:
  (**
   * @license
   * Copyright 2020 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/repeat.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/keyed.js:
  (**
   * @license
   * Copyright 2021 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/class-map.js:
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/async-directive.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/ref.js:
  (**
   * @license
   * Copyright 2020 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/if-defined.js:
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/private-async-helpers.js:
  (**
   * @license
   * Copyright 2021 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/until.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/unsafe-html.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/directives/unsafe-svg.js:
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)

lit-html/static.js:
  (**
   * @license
   * Copyright 2020 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *)
*/
//# sourceMappingURL=lit.js.map
