const vt = (e) => typeof e == "string", $r = () => {
  let e, n;
  const c = new Promise((E, Y) => {
    e = E, n = Y;
  });
  return c.resolve = e, c.reject = n, c;
}, vo = (e) => e == null ? "" : "" + e, q0 = (e, n, c) => {
  e.forEach((E) => {
    n[E] && (c[E] = n[E]);
  });
}, _0 = /###/g, bo = (e) => e && e.indexOf("###") > -1 ? e.replace(_0, ".") : e, zo = (e) => !e || vt(e), As = (e, n, c) => {
  const E = vt(n) ? n.split(".") : n;
  let Y = 0;
  for (; Y < E.length - 1; ) {
    if (zo(e)) return {};
    const X = bo(E[Y]);
    !e[X] && c && (e[X] = new c()), Object.prototype.hasOwnProperty.call(e, X) ? e = e[X] : e = {}, ++Y;
  }
  return zo(e) ? {} : {
    obj: e,
    k: bo(E[Y])
  };
}, To = (e, n, c) => {
  const {
    obj: E,
    k: Y
  } = As(e, n, Object);
  if (E !== void 0 || n.length === 1) {
    E[Y] = c;
    return;
  }
  let X = n[n.length - 1], Q = n.slice(0, n.length - 1), B = As(e, Q, Object);
  for (; B.obj === void 0 && Q.length; )
    X = `${Q[Q.length - 1]}.${X}`, Q = Q.slice(0, Q.length - 1), B = As(e, Q, Object), B?.obj && typeof B.obj[`${B.k}.${X}`] < "u" && (B.obj = void 0);
  B.obj[`${B.k}.${X}`] = c;
}, $0 = (e, n, c, E) => {
  const {
    obj: Y,
    k: X
  } = As(e, n, Object);
  Y[X] = Y[X] || [], Y[X].push(c);
}, Ss = (e, n) => {
  const {
    obj: c,
    k: E
  } = As(e, n);
  if (c && Object.prototype.hasOwnProperty.call(c, E))
    return c[E];
}, Al = (e, n, c) => {
  const E = Ss(e, c);
  return E !== void 0 ? E : Ss(n, c);
}, FB = (e, n, c) => {
  for (const E in n)
    E !== "__proto__" && E !== "constructor" && (E in e ? vt(e[E]) || e[E] instanceof String || vt(n[E]) || n[E] instanceof String ? c && (e[E] = n[E]) : FB(e[E], n[E], c) : e[E] = n[E]);
  return e;
}, Ir = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
var el = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;",
  "/": "&#x2F;"
};
const tl = (e) => vt(e) ? e.replace(/[&<>"'\/]/g, (n) => el[n]) : e;
class il {
  constructor(n) {
    this.capacity = n, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
  }
  getRegExp(n) {
    const c = this.regExpMap.get(n);
    if (c !== void 0)
      return c;
    const E = new RegExp(n);
    return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(n, E), this.regExpQueue.push(n), E;
  }
}
const nl = [" ", ",", "?", "!", ";"], rl = new il(20), sl = (e, n, c) => {
  n = n || "", c = c || "";
  const E = nl.filter((Q) => n.indexOf(Q) < 0 && c.indexOf(Q) < 0);
  if (E.length === 0) return !0;
  const Y = rl.getRegExp(`(${E.map((Q) => Q === "?" ? "\\?" : Q).join("|")})`);
  let X = !Y.test(e);
  if (!X) {
    const Q = e.indexOf(c);
    Q > 0 && !Y.test(e.substring(0, Q)) && (X = !0);
  }
  return X;
}, Fa = (e, n, c = ".") => {
  if (!e) return;
  if (e[n])
    return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : void 0;
  const E = n.split(c);
  let Y = e;
  for (let X = 0; X < E.length; ) {
    if (!Y || typeof Y != "object")
      return;
    let Q, B = "";
    for (let r = X; r < E.length; ++r)
      if (r !== X && (B += c), B += E[r], Q = Y[B], Q !== void 0) {
        if (["string", "number", "boolean"].indexOf(typeof Q) > -1 && r < E.length - 1)
          continue;
        X += r - X + 1;
        break;
      }
    Y = Q;
  }
  return Y;
}, ns = (e) => e?.replace("_", "-"), al = {
  type: "logger",
  log(e) {
    this.output("log", e);
  },
  warn(e) {
    this.output("warn", e);
  },
  error(e) {
    this.output("error", e);
  },
  output(e, n) {
    console?.[e]?.apply?.(console, n);
  }
};
class Gs {
  constructor(n, c = {}) {
    this.init(n, c);
  }
  init(n, c = {}) {
    this.prefix = c.prefix || "i18next:", this.logger = n || al, this.options = c, this.debug = c.debug;
  }
  log(...n) {
    return this.forward(n, "log", "", !0);
  }
  warn(...n) {
    return this.forward(n, "warn", "", !0);
  }
  error(...n) {
    return this.forward(n, "error", "");
  }
  deprecate(...n) {
    return this.forward(n, "warn", "WARNING DEPRECATED: ", !0);
  }
  forward(n, c, E, Y) {
    return Y && !this.debug ? null : (vt(n[0]) && (n[0] = `${E}${this.prefix} ${n[0]}`), this.logger[c](n));
  }
  create(n) {
    return new Gs(this.logger, {
      prefix: `${this.prefix}:${n}:`,
      ...this.options
    });
  }
  clone(n) {
    return n = n || this.options, n.prefix = n.prefix || this.prefix, new Gs(this.logger, n);
  }
}
var Qn = new Gs();
class js {
  constructor() {
    this.observers = {};
  }
  on(n, c) {
    return n.split(" ").forEach((E) => {
      this.observers[E] || (this.observers[E] = /* @__PURE__ */ new Map());
      const Y = this.observers[E].get(c) || 0;
      this.observers[E].set(c, Y + 1);
    }), this;
  }
  off(n, c) {
    if (this.observers[n]) {
      if (!c) {
        delete this.observers[n];
        return;
      }
      this.observers[n].delete(c);
    }
  }
  emit(n, ...c) {
    this.observers[n] && Array.from(this.observers[n].entries()).forEach(([Y, X]) => {
      for (let Q = 0; Q < X; Q++)
        Y(...c);
    }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([Y, X]) => {
      for (let Q = 0; Q < X; Q++)
        Y.apply(Y, [n, ...c]);
    });
  }
}
class Uo extends js {
  constructor(n, c = {
    ns: ["translation"],
    defaultNS: "translation"
  }) {
    super(), this.data = n || {}, this.options = c, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
  }
  addNamespaces(n) {
    this.options.ns.indexOf(n) < 0 && this.options.ns.push(n);
  }
  removeNamespaces(n) {
    const c = this.options.ns.indexOf(n);
    c > -1 && this.options.ns.splice(c, 1);
  }
  getResource(n, c, E, Y = {}) {
    const X = Y.keySeparator !== void 0 ? Y.keySeparator : this.options.keySeparator, Q = Y.ignoreJSONStructure !== void 0 ? Y.ignoreJSONStructure : this.options.ignoreJSONStructure;
    let B;
    n.indexOf(".") > -1 ? B = n.split(".") : (B = [n, c], E && (Array.isArray(E) ? B.push(...E) : vt(E) && X ? B.push(...E.split(X)) : B.push(E)));
    const r = Ss(this.data, B);
    return !r && !c && !E && n.indexOf(".") > -1 && (n = B[0], c = B[1], E = B.slice(2).join(".")), r || !Q || !vt(E) ? r : Fa(this.data?.[n]?.[c], E, X);
  }
  addResource(n, c, E, Y, X = {
    silent: !1
  }) {
    const Q = X.keySeparator !== void 0 ? X.keySeparator : this.options.keySeparator;
    let B = [n, c];
    E && (B = B.concat(Q ? E.split(Q) : E)), n.indexOf(".") > -1 && (B = n.split("."), Y = c, c = B[1]), this.addNamespaces(c), To(this.data, B, Y), X.silent || this.emit("added", n, c, E, Y);
  }
  addResources(n, c, E, Y = {
    silent: !1
  }) {
    for (const X in E)
      (vt(E[X]) || Array.isArray(E[X])) && this.addResource(n, c, X, E[X], {
        silent: !0
      });
    Y.silent || this.emit("added", n, c, E);
  }
  addResourceBundle(n, c, E, Y, X, Q = {
    silent: !1,
    skipCopy: !1
  }) {
    let B = [n, c];
    n.indexOf(".") > -1 && (B = n.split("."), Y = E, E = c, c = B[1]), this.addNamespaces(c);
    let r = Ss(this.data, B) || {};
    Q.skipCopy || (E = JSON.parse(JSON.stringify(E))), Y ? FB(r, E, X) : r = {
      ...r,
      ...E
    }, To(this.data, B, r), Q.silent || this.emit("added", n, c, E);
  }
  removeResourceBundle(n, c) {
    this.hasResourceBundle(n, c) && delete this.data[n][c], this.removeNamespaces(c), this.emit("removed", n, c);
  }
  hasResourceBundle(n, c) {
    return this.getResource(n, c) !== void 0;
  }
  getResourceBundle(n, c) {
    return c || (c = this.options.defaultNS), this.getResource(n, c);
  }
  getDataByLanguage(n) {
    return this.data[n];
  }
  hasLanguageSomeTranslations(n) {
    const c = this.getDataByLanguage(n);
    return !!(c && Object.keys(c) || []).find((Y) => c[Y] && Object.keys(c[Y]).length > 0);
  }
  toJSON() {
    return this.data;
  }
}
var xB = {
  processors: {},
  addPostProcessor(e) {
    this.processors[e.name] = e;
  },
  handle(e, n, c, E, Y) {
    return e.forEach((X) => {
      n = this.processors[X]?.process(n, c, E, Y) ?? n;
    }), n;
  }
};
const pB = Symbol("i18next/PATH_KEY");
function ol() {
  const e = [], n = /* @__PURE__ */ Object.create(null);
  let c;
  return n.get = (E, Y) => (c?.revoke?.(), Y === pB ? e : (e.push(Y), c = Proxy.revocable(E, n), c.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), n).proxy;
}
function xa(e, n) {
  const {
    [pB]: c
  } = e(ol());
  return c.join(n?.keySeparator ?? ".");
}
const No = {}, ca = (e) => !vt(e) && typeof e != "boolean" && typeof e != "number";
class Hs extends js {
  constructor(n, c = {}) {
    super(), q0(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], n, this), this.options = c, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Qn.create("translator");
  }
  changeLanguage(n) {
    n && (this.language = n);
  }
  exists(n, c = {
    interpolation: {}
  }) {
    const E = {
      ...c
    };
    if (n == null) return !1;
    const Y = this.resolve(n, E);
    if (Y?.res === void 0) return !1;
    const X = ca(Y.res);
    return !(E.returnObjects === !1 && X);
  }
  extractFromKey(n, c) {
    let E = c.nsSeparator !== void 0 ? c.nsSeparator : this.options.nsSeparator;
    E === void 0 && (E = ":");
    const Y = c.keySeparator !== void 0 ? c.keySeparator : this.options.keySeparator;
    let X = c.ns || this.options.defaultNS || [];
    const Q = E && n.indexOf(E) > -1, B = !this.options.userDefinedKeySeparator && !c.keySeparator && !this.options.userDefinedNsSeparator && !c.nsSeparator && !sl(n, E, Y);
    if (Q && !B) {
      const r = n.match(this.interpolator.nestingRegexp);
      if (r && r.length > 0)
        return {
          key: n,
          namespaces: vt(X) ? [X] : X
        };
      const A = n.split(E);
      (E !== Y || E === Y && this.options.ns.indexOf(A[0]) > -1) && (X = A.shift()), n = A.join(Y);
    }
    return {
      key: n,
      namespaces: vt(X) ? [X] : X
    };
  }
  translate(n, c, E) {
    let Y = typeof c == "object" ? {
      ...c
    } : c;
    if (typeof Y != "object" && this.options.overloadTranslationOptionHandler && (Y = this.options.overloadTranslationOptionHandler(arguments)), typeof Y == "object" && (Y = {
      ...Y
    }), Y || (Y = {}), n == null) return "";
    typeof n == "function" && (n = xa(n, {
      ...this.options,
      ...Y
    })), Array.isArray(n) || (n = [String(n)]);
    const X = Y.returnDetails !== void 0 ? Y.returnDetails : this.options.returnDetails, Q = Y.keySeparator !== void 0 ? Y.keySeparator : this.options.keySeparator, {
      key: B,
      namespaces: r
    } = this.extractFromKey(n[n.length - 1], Y), A = r[r.length - 1];
    let a = Y.nsSeparator !== void 0 ? Y.nsSeparator : this.options.nsSeparator;
    a === void 0 && (a = ":");
    const D = Y.lng || this.language, x = Y.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
    if (D?.toLowerCase() === "cimode")
      return x ? X ? {
        res: `${A}${a}${B}`,
        usedKey: B,
        exactUsedKey: B,
        usedLng: D,
        usedNS: A,
        usedParams: this.getUsedParamsDetails(Y)
      } : `${A}${a}${B}` : X ? {
        res: B,
        usedKey: B,
        exactUsedKey: B,
        usedLng: D,
        usedNS: A,
        usedParams: this.getUsedParamsDetails(Y)
      } : B;
    const N = this.resolve(n, Y);
    let P = N?.res;
    const d = N?.usedKey || B, J = N?.exactUsedKey || B, q = ["[object Number]", "[object Function]", "[object RegExp]"], AA = Y.joinArrays !== void 0 ? Y.joinArrays : this.options.joinArrays, K = !this.i18nFormat || this.i18nFormat.handleAsObject, z = Y.count !== void 0 && !vt(Y.count), T = Hs.hasDefaultValue(Y), H = z ? this.pluralResolver.getSuffix(D, Y.count, Y) : "", eA = Y.ordinal && z ? this.pluralResolver.getSuffix(D, Y.count, {
      ordinal: !1
    }) : "", CA = z && !Y.ordinal && Y.count === 0, IA = CA && Y[`defaultValue${this.options.pluralSeparator}zero`] || Y[`defaultValue${H}`] || Y[`defaultValue${eA}`] || Y.defaultValue;
    let k = P;
    K && !P && T && (k = IA);
    const tA = ca(k), lA = Object.prototype.toString.apply(k);
    if (K && k && tA && q.indexOf(lA) < 0 && !(vt(AA) && Array.isArray(k))) {
      if (!Y.returnObjects && !this.options.returnObjects) {
        this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
        const uA = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(d, k, {
          ...Y,
          ns: r
        }) : `key '${B} (${this.language})' returned an object instead of string.`;
        return X ? (N.res = uA, N.usedParams = this.getUsedParamsDetails(Y), N) : uA;
      }
      if (Q) {
        const uA = Array.isArray(k), w = uA ? [] : {}, v = uA ? J : d;
        for (const RA in k)
          if (Object.prototype.hasOwnProperty.call(k, RA)) {
            const DA = `${v}${Q}${RA}`;
            T && !P ? w[RA] = this.translate(DA, {
              ...Y,
              defaultValue: ca(IA) ? IA[RA] : void 0,
              joinArrays: !1,
              ns: r
            }) : w[RA] = this.translate(DA, {
              ...Y,
              joinArrays: !1,
              ns: r
            }), w[RA] === DA && (w[RA] = k[RA]);
          }
        P = w;
      }
    } else if (K && vt(AA) && Array.isArray(P))
      P = P.join(AA), P && (P = this.extendTranslation(P, n, Y, E));
    else {
      let uA = !1, w = !1;
      !this.isValidLookup(P) && T && (uA = !0, P = IA), this.isValidLookup(P) || (w = !0, P = B);
      const RA = (Y.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && w ? void 0 : P, DA = T && IA !== P && this.options.updateMissing;
      if (w || uA || DA) {
        if (this.logger.log(DA ? "updateKey" : "missingKey", D, A, B, DA ? IA : P), Q) {
          const kA = this.resolve(B, {
            ...Y,
            keySeparator: !1
          });
          kA && kA.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
        }
        let $ = [];
        const cA = this.languageUtils.getFallbackCodes(this.options.fallbackLng, Y.lng || this.language);
        if (this.options.saveMissingTo === "fallback" && cA && cA[0])
          for (let kA = 0; kA < cA.length; kA++)
            $.push(cA[kA]);
        else this.options.saveMissingTo === "all" ? $ = this.languageUtils.toResolveHierarchy(Y.lng || this.language) : $.push(Y.lng || this.language);
        const Ae = (kA, VA, EA) => {
          const zA = T && EA !== P ? EA : RA;
          this.options.missingKeyHandler ? this.options.missingKeyHandler(kA, A, VA, zA, DA, Y) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(kA, A, VA, zA, DA, Y), this.emit("missingKey", kA, A, VA, P);
        };
        this.options.saveMissing && (this.options.saveMissingPlurals && z ? $.forEach((kA) => {
          const VA = this.pluralResolver.getSuffixes(kA, Y);
          CA && Y[`defaultValue${this.options.pluralSeparator}zero`] && VA.indexOf(`${this.options.pluralSeparator}zero`) < 0 && VA.push(`${this.options.pluralSeparator}zero`), VA.forEach((EA) => {
            Ae([kA], B + EA, Y[`defaultValue${EA}`] || IA);
          });
        }) : Ae($, B, IA));
      }
      P = this.extendTranslation(P, n, Y, N, E), w && P === B && this.options.appendNamespaceToMissingKey && (P = `${A}${a}${B}`), (w || uA) && this.options.parseMissingKeyHandler && (P = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${A}${a}${B}` : B, uA ? P : void 0, Y));
    }
    return X ? (N.res = P, N.usedParams = this.getUsedParamsDetails(Y), N) : P;
  }
  extendTranslation(n, c, E, Y, X) {
    if (this.i18nFormat?.parse)
      n = this.i18nFormat.parse(n, {
        ...this.options.interpolation.defaultVariables,
        ...E
      }, E.lng || this.language || Y.usedLng, Y.usedNS, Y.usedKey, {
        resolved: Y
      });
    else if (!E.skipInterpolation) {
      E.interpolation && this.interpolator.init({
        ...E,
        interpolation: {
          ...this.options.interpolation,
          ...E.interpolation
        }
      });
      const r = vt(n) && (E?.interpolation?.skipOnVariables !== void 0 ? E.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
      let A;
      if (r) {
        const D = n.match(this.interpolator.nestingRegexp);
        A = D && D.length;
      }
      let a = E.replace && !vt(E.replace) ? E.replace : E;
      if (this.options.interpolation.defaultVariables && (a = {
        ...this.options.interpolation.defaultVariables,
        ...a
      }), n = this.interpolator.interpolate(n, a, E.lng || this.language || Y.usedLng, E), r) {
        const D = n.match(this.interpolator.nestingRegexp), x = D && D.length;
        A < x && (E.nest = !1);
      }
      !E.lng && Y && Y.res && (E.lng = this.language || Y.usedLng), E.nest !== !1 && (n = this.interpolator.nest(n, (...D) => X?.[0] === D[0] && !E.context ? (this.logger.warn(`It seems you are nesting recursively key: ${D[0]} in key: ${c[0]}`), null) : this.translate(...D, c), E)), E.interpolation && this.interpolator.reset();
    }
    const Q = E.postProcess || this.options.postProcess, B = vt(Q) ? [Q] : Q;
    return n != null && B?.length && E.applyPostProcessor !== !1 && (n = xB.handle(B, n, c, this.options && this.options.postProcessPassResolved ? {
      i18nResolved: {
        ...Y,
        usedParams: this.getUsedParamsDetails(E)
      },
      ...E
    } : E, this)), n;
  }
  resolve(n, c = {}) {
    let E, Y, X, Q, B;
    return vt(n) && (n = [n]), n.forEach((r) => {
      if (this.isValidLookup(E)) return;
      const A = this.extractFromKey(r, c), a = A.key;
      Y = a;
      let D = A.namespaces;
      this.options.fallbackNS && (D = D.concat(this.options.fallbackNS));
      const x = c.count !== void 0 && !vt(c.count), N = x && !c.ordinal && c.count === 0, P = c.context !== void 0 && (vt(c.context) || typeof c.context == "number") && c.context !== "", d = c.lngs ? c.lngs : this.languageUtils.toResolveHierarchy(c.lng || this.language, c.fallbackLng);
      D.forEach((J) => {
        this.isValidLookup(E) || (B = J, !No[`${d[0]}-${J}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(B) && (No[`${d[0]}-${J}`] = !0, this.logger.warn(`key "${Y}" for languages "${d.join(", ")}" won't get resolved as namespace "${B}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), d.forEach((q) => {
          if (this.isValidLookup(E)) return;
          Q = q;
          const AA = [a];
          if (this.i18nFormat?.addLookupKeys)
            this.i18nFormat.addLookupKeys(AA, a, q, J, c);
          else {
            let z;
            x && (z = this.pluralResolver.getSuffix(q, c.count, c));
            const T = `${this.options.pluralSeparator}zero`, H = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
            if (x && (c.ordinal && z.indexOf(H) === 0 && AA.push(a + z.replace(H, this.options.pluralSeparator)), AA.push(a + z), N && AA.push(a + T)), P) {
              const eA = `${a}${this.options.contextSeparator || "_"}${c.context}`;
              AA.push(eA), x && (c.ordinal && z.indexOf(H) === 0 && AA.push(eA + z.replace(H, this.options.pluralSeparator)), AA.push(eA + z), N && AA.push(eA + T));
            }
          }
          let K;
          for (; K = AA.pop(); )
            this.isValidLookup(E) || (X = K, E = this.getResource(q, J, K, c));
        }));
      });
    }), {
      res: E,
      usedKey: Y,
      exactUsedKey: X,
      usedLng: Q,
      usedNS: B
    };
  }
  isValidLookup(n) {
    return n !== void 0 && !(!this.options.returnNull && n === null) && !(!this.options.returnEmptyString && n === "");
  }
  getResource(n, c, E, Y = {}) {
    return this.i18nFormat?.getResource ? this.i18nFormat.getResource(n, c, E, Y) : this.resourceStore.getResource(n, c, E, Y);
  }
  getUsedParamsDetails(n = {}) {
    const c = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], E = n.replace && !vt(n.replace);
    let Y = E ? n.replace : n;
    if (E && typeof n.count < "u" && (Y.count = n.count), this.options.interpolation.defaultVariables && (Y = {
      ...this.options.interpolation.defaultVariables,
      ...Y
    }), !E) {
      Y = {
        ...Y
      };
      for (const X of c)
        delete Y[X];
    }
    return Y;
  }
  static hasDefaultValue(n) {
    const c = "defaultValue";
    for (const E in n)
      if (Object.prototype.hasOwnProperty.call(n, E) && c === E.substring(0, c.length) && n[E] !== void 0)
        return !0;
    return !1;
  }
}
class Ro {
  constructor(n) {
    this.options = n, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Qn.create("languageUtils");
  }
  getScriptPartFromCode(n) {
    if (n = ns(n), !n || n.indexOf("-") < 0) return null;
    const c = n.split("-");
    return c.length === 2 || (c.pop(), c[c.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(c.join("-"));
  }
  getLanguagePartFromCode(n) {
    if (n = ns(n), !n || n.indexOf("-") < 0) return n;
    const c = n.split("-");
    return this.formatLanguageCode(c[0]);
  }
  formatLanguageCode(n) {
    if (vt(n) && n.indexOf("-") > -1) {
      let c;
      try {
        c = Intl.getCanonicalLocales(n)[0];
      } catch {
      }
      return c && this.options.lowerCaseLng && (c = c.toLowerCase()), c || (this.options.lowerCaseLng ? n.toLowerCase() : n);
    }
    return this.options.cleanCode || this.options.lowerCaseLng ? n.toLowerCase() : n;
  }
  isSupportedCode(n) {
    return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (n = this.getLanguagePartFromCode(n)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(n) > -1;
  }
  getBestMatchFromCodes(n) {
    if (!n) return null;
    let c;
    return n.forEach((E) => {
      if (c) return;
      const Y = this.formatLanguageCode(E);
      (!this.options.supportedLngs || this.isSupportedCode(Y)) && (c = Y);
    }), !c && this.options.supportedLngs && n.forEach((E) => {
      if (c) return;
      const Y = this.getScriptPartFromCode(E);
      if (this.isSupportedCode(Y)) return c = Y;
      const X = this.getLanguagePartFromCode(E);
      if (this.isSupportedCode(X)) return c = X;
      c = this.options.supportedLngs.find((Q) => {
        if (Q === X) return Q;
        if (!(Q.indexOf("-") < 0 && X.indexOf("-") < 0) && (Q.indexOf("-") > 0 && X.indexOf("-") < 0 && Q.substring(0, Q.indexOf("-")) === X || Q.indexOf(X) === 0 && X.length > 1))
          return Q;
      });
    }), c || (c = this.getFallbackCodes(this.options.fallbackLng)[0]), c;
  }
  getFallbackCodes(n, c) {
    if (!n) return [];
    if (typeof n == "function" && (n = n(c)), vt(n) && (n = [n]), Array.isArray(n)) return n;
    if (!c) return n.default || [];
    let E = n[c];
    return E || (E = n[this.getScriptPartFromCode(c)]), E || (E = n[this.formatLanguageCode(c)]), E || (E = n[this.getLanguagePartFromCode(c)]), E || (E = n.default), E || [];
  }
  toResolveHierarchy(n, c) {
    const E = this.getFallbackCodes((c === !1 ? [] : c) || this.options.fallbackLng || [], n), Y = [], X = (Q) => {
      Q && (this.isSupportedCode(Q) ? Y.push(Q) : this.logger.warn(`rejecting language code not found in supportedLngs: ${Q}`));
    };
    return vt(n) && (n.indexOf("-") > -1 || n.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && X(this.formatLanguageCode(n)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && X(this.getScriptPartFromCode(n)), this.options.load !== "currentOnly" && X(this.getLanguagePartFromCode(n))) : vt(n) && X(this.formatLanguageCode(n)), E.forEach((Q) => {
      Y.indexOf(Q) < 0 && X(this.formatLanguageCode(Q));
    }), Y;
  }
}
const So = {
  zero: 0,
  one: 1,
  two: 2,
  few: 3,
  many: 4,
  other: 5
}, Go = {
  select: (e) => e === 1 ? "one" : "other",
  resolvedOptions: () => ({
    pluralCategories: ["one", "other"]
  })
};
class Bl {
  constructor(n, c = {}) {
    this.languageUtils = n, this.options = c, this.logger = Qn.create("pluralResolver"), this.pluralRulesCache = {};
  }
  clearCache() {
    this.pluralRulesCache = {};
  }
  getRule(n, c = {}) {
    const E = ns(n === "dev" ? "en" : n), Y = c.ordinal ? "ordinal" : "cardinal", X = JSON.stringify({
      cleanedCode: E,
      type: Y
    });
    if (X in this.pluralRulesCache)
      return this.pluralRulesCache[X];
    let Q;
    try {
      Q = new Intl.PluralRules(E, {
        type: Y
      });
    } catch {
      if (!Intl)
        return this.logger.error("No Intl support, please use an Intl polyfill!"), Go;
      if (!n.match(/-|_/)) return Go;
      const r = this.languageUtils.getLanguagePartFromCode(n);
      Q = this.getRule(r, c);
    }
    return this.pluralRulesCache[X] = Q, Q;
  }
  needsPlural(n, c = {}) {
    let E = this.getRule(n, c);
    return E || (E = this.getRule("dev", c)), E?.resolvedOptions().pluralCategories.length > 1;
  }
  getPluralFormsOfKey(n, c, E = {}) {
    return this.getSuffixes(n, E).map((Y) => `${c}${Y}`);
  }
  getSuffixes(n, c = {}) {
    let E = this.getRule(n, c);
    return E || (E = this.getRule("dev", c)), E ? E.resolvedOptions().pluralCategories.sort((Y, X) => So[Y] - So[X]).map((Y) => `${this.options.prepend}${c.ordinal ? `ordinal${this.options.prepend}` : ""}${Y}`) : [];
  }
  getSuffix(n, c, E = {}) {
    const Y = this.getRule(n, E);
    return Y ? `${this.options.prepend}${E.ordinal ? `ordinal${this.options.prepend}` : ""}${Y.select(c)}` : (this.logger.warn(`no plural rule found for: ${n}`), this.getSuffix("dev", c, E));
  }
}
const Ho = (e, n, c, E = ".", Y = !0) => {
  let X = Al(e, n, c);
  return !X && Y && vt(c) && (X = Fa(e, c, E), X === void 0 && (X = Fa(n, c, E))), X;
}, la = (e) => e.replace(/\$/g, "$$$$");
class Lo {
  constructor(n = {}) {
    this.logger = Qn.create("interpolator"), this.options = n, this.format = n?.interpolation?.format || ((c) => c), this.init(n);
  }
  init(n = {}) {
    n.interpolation || (n.interpolation = {
      escapeValue: !0
    });
    const {
      escape: c,
      escapeValue: E,
      useRawValueToEscape: Y,
      prefix: X,
      prefixEscaped: Q,
      suffix: B,
      suffixEscaped: r,
      formatSeparator: A,
      unescapeSuffix: a,
      unescapePrefix: D,
      nestingPrefix: x,
      nestingPrefixEscaped: N,
      nestingSuffix: P,
      nestingSuffixEscaped: d,
      nestingOptionsSeparator: J,
      maxReplaces: q,
      alwaysFormat: AA
    } = n.interpolation;
    this.escape = c !== void 0 ? c : tl, this.escapeValue = E !== void 0 ? E : !0, this.useRawValueToEscape = Y !== void 0 ? Y : !1, this.prefix = X ? Ir(X) : Q || "{{", this.suffix = B ? Ir(B) : r || "}}", this.formatSeparator = A || ",", this.unescapePrefix = a ? "" : D || "-", this.unescapeSuffix = this.unescapePrefix ? "" : a || "", this.nestingPrefix = x ? Ir(x) : N || Ir("$t("), this.nestingSuffix = P ? Ir(P) : d || Ir(")"), this.nestingOptionsSeparator = J || ",", this.maxReplaces = q || 1e3, this.alwaysFormat = AA !== void 0 ? AA : !1, this.resetRegExp();
  }
  reset() {
    this.options && this.init(this.options);
  }
  resetRegExp() {
    const n = (c, E) => c?.source === E ? (c.lastIndex = 0, c) : new RegExp(E, "g");
    this.regexp = n(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = n(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = n(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
  }
  interpolate(n, c, E, Y) {
    let X, Q, B;
    const r = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, A = (N) => {
      if (N.indexOf(this.formatSeparator) < 0) {
        const q = Ho(c, r, N, this.options.keySeparator, this.options.ignoreJSONStructure);
        return this.alwaysFormat ? this.format(q, void 0, E, {
          ...Y,
          ...c,
          interpolationkey: N
        }) : q;
      }
      const P = N.split(this.formatSeparator), d = P.shift().trim(), J = P.join(this.formatSeparator).trim();
      return this.format(Ho(c, r, d, this.options.keySeparator, this.options.ignoreJSONStructure), J, E, {
        ...Y,
        ...c,
        interpolationkey: d
      });
    };
    this.resetRegExp();
    const a = Y?.missingInterpolationHandler || this.options.missingInterpolationHandler, D = Y?.interpolation?.skipOnVariables !== void 0 ? Y.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
    return [{
      regex: this.regexpUnescape,
      safeValue: (N) => la(N)
    }, {
      regex: this.regexp,
      safeValue: (N) => this.escapeValue ? la(this.escape(N)) : la(N)
    }].forEach((N) => {
      for (B = 0; X = N.regex.exec(n); ) {
        const P = X[1].trim();
        if (Q = A(P), Q === void 0)
          if (typeof a == "function") {
            const J = a(n, X, Y);
            Q = vt(J) ? J : "";
          } else if (Y && Object.prototype.hasOwnProperty.call(Y, P))
            Q = "";
          else if (D) {
            Q = X[0];
            continue;
          } else
            this.logger.warn(`missed to pass in variable ${P} for interpolating ${n}`), Q = "";
        else !vt(Q) && !this.useRawValueToEscape && (Q = vo(Q));
        const d = N.safeValue(Q);
        if (n = n.replace(X[0], d), D ? (N.regex.lastIndex += Q.length, N.regex.lastIndex -= X[0].length) : N.regex.lastIndex = 0, B++, B >= this.maxReplaces)
          break;
      }
    }), n;
  }
  nest(n, c, E = {}) {
    let Y, X, Q;
    const B = (r, A) => {
      const a = this.nestingOptionsSeparator;
      if (r.indexOf(a) < 0) return r;
      const D = r.split(new RegExp(`${a}[ ]*{`));
      let x = `{${D[1]}`;
      r = D[0], x = this.interpolate(x, Q);
      const N = x.match(/'/g), P = x.match(/"/g);
      ((N?.length ?? 0) % 2 === 0 && !P || P.length % 2 !== 0) && (x = x.replace(/'/g, '"'));
      try {
        Q = JSON.parse(x), A && (Q = {
          ...A,
          ...Q
        });
      } catch (d) {
        return this.logger.warn(`failed parsing options string in nesting for key ${r}`, d), `${r}${a}${x}`;
      }
      return Q.defaultValue && Q.defaultValue.indexOf(this.prefix) > -1 && delete Q.defaultValue, r;
    };
    for (; Y = this.nestingRegexp.exec(n); ) {
      let r = [];
      Q = {
        ...E
      }, Q = Q.replace && !vt(Q.replace) ? Q.replace : Q, Q.applyPostProcessor = !1, delete Q.defaultValue;
      const A = /{.*}/.test(Y[1]) ? Y[1].lastIndexOf("}") + 1 : Y[1].indexOf(this.formatSeparator);
      if (A !== -1 && (r = Y[1].slice(A).split(this.formatSeparator).map((a) => a.trim()).filter(Boolean), Y[1] = Y[1].slice(0, A)), X = c(B.call(this, Y[1].trim(), Q), Q), X && Y[0] === n && !vt(X)) return X;
      vt(X) || (X = vo(X)), X || (this.logger.warn(`missed to resolve ${Y[1]} for nesting ${n}`), X = ""), r.length && (X = r.reduce((a, D) => this.format(a, D, E.lng, {
        ...E,
        interpolationkey: Y[1].trim()
      }), X.trim())), n = n.replace(Y[0], X), this.regexp.lastIndex = 0;
    }
    return n;
  }
}
const gl = (e) => {
  let n = e.toLowerCase().trim();
  const c = {};
  if (e.indexOf("(") > -1) {
    const E = e.split("(");
    n = E[0].toLowerCase().trim();
    const Y = E[1].substring(0, E[1].length - 1);
    n === "currency" && Y.indexOf(":") < 0 ? c.currency || (c.currency = Y.trim()) : n === "relativetime" && Y.indexOf(":") < 0 ? c.range || (c.range = Y.trim()) : Y.split(";").forEach((Q) => {
      if (Q) {
        const [B, ...r] = Q.split(":"), A = r.join(":").trim().replace(/^'+|'+$/g, ""), a = B.trim();
        c[a] || (c[a] = A), A === "false" && (c[a] = !1), A === "true" && (c[a] = !0), isNaN(A) || (c[a] = parseInt(A, 10));
      }
    });
  }
  return {
    formatName: n,
    formatOptions: c
  };
}, ko = (e) => {
  const n = {};
  return (c, E, Y) => {
    let X = Y;
    Y && Y.interpolationkey && Y.formatParams && Y.formatParams[Y.interpolationkey] && Y[Y.interpolationkey] && (X = {
      ...X,
      [Y.interpolationkey]: void 0
    });
    const Q = E + JSON.stringify(X);
    let B = n[Q];
    return B || (B = e(ns(E), Y), n[Q] = B), B(c);
  };
}, cl = (e) => (n, c, E) => e(ns(c), E)(n);
class ll {
  constructor(n = {}) {
    this.logger = Qn.create("formatter"), this.options = n, this.init(n);
  }
  init(n, c = {
    interpolation: {}
  }) {
    this.formatSeparator = c.interpolation.formatSeparator || ",";
    const E = c.cacheInBuiltFormats ? ko : cl;
    this.formats = {
      number: E((Y, X) => {
        const Q = new Intl.NumberFormat(Y, {
          ...X
        });
        return (B) => Q.format(B);
      }),
      currency: E((Y, X) => {
        const Q = new Intl.NumberFormat(Y, {
          ...X,
          style: "currency"
        });
        return (B) => Q.format(B);
      }),
      datetime: E((Y, X) => {
        const Q = new Intl.DateTimeFormat(Y, {
          ...X
        });
        return (B) => Q.format(B);
      }),
      relativetime: E((Y, X) => {
        const Q = new Intl.RelativeTimeFormat(Y, {
          ...X
        });
        return (B) => Q.format(B, X.range || "day");
      }),
      list: E((Y, X) => {
        const Q = new Intl.ListFormat(Y, {
          ...X
        });
        return (B) => Q.format(B);
      })
    };
  }
  add(n, c) {
    this.formats[n.toLowerCase().trim()] = c;
  }
  addCached(n, c) {
    this.formats[n.toLowerCase().trim()] = ko(c);
  }
  format(n, c, E, Y = {}) {
    const X = c.split(this.formatSeparator);
    if (X.length > 1 && X[0].indexOf("(") > 1 && X[0].indexOf(")") < 0 && X.find((B) => B.indexOf(")") > -1)) {
      const B = X.findIndex((r) => r.indexOf(")") > -1);
      X[0] = [X[0], ...X.splice(1, B)].join(this.formatSeparator);
    }
    return X.reduce((B, r) => {
      const {
        formatName: A,
        formatOptions: a
      } = gl(r);
      if (this.formats[A]) {
        let D = B;
        try {
          const x = Y?.formatParams?.[Y.interpolationkey] || {}, N = x.locale || x.lng || Y.locale || Y.lng || E;
          D = this.formats[A](B, N, {
            ...a,
            ...Y,
            ...x
          });
        } catch (x) {
          this.logger.warn(x);
        }
        return D;
      } else
        this.logger.warn(`there was no format function for ${A}`);
      return B;
    }, n);
  }
}
const El = (e, n) => {
  e.pending[n] !== void 0 && (delete e.pending[n], e.pendingCount--);
};
class wl extends js {
  constructor(n, c, E, Y = {}) {
    super(), this.backend = n, this.store = c, this.services = E, this.languageUtils = E.languageUtils, this.options = Y, this.logger = Qn.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = Y.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = Y.maxRetries >= 0 ? Y.maxRetries : 5, this.retryTimeout = Y.retryTimeout >= 1 ? Y.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(E, Y.backend, Y);
  }
  queueLoad(n, c, E, Y) {
    const X = {}, Q = {}, B = {}, r = {};
    return n.forEach((A) => {
      let a = !0;
      c.forEach((D) => {
        const x = `${A}|${D}`;
        !E.reload && this.store.hasResourceBundle(A, D) ? this.state[x] = 2 : this.state[x] < 0 || (this.state[x] === 1 ? Q[x] === void 0 && (Q[x] = !0) : (this.state[x] = 1, a = !1, Q[x] === void 0 && (Q[x] = !0), X[x] === void 0 && (X[x] = !0), r[D] === void 0 && (r[D] = !0)));
      }), a || (B[A] = !0);
    }), (Object.keys(X).length || Object.keys(Q).length) && this.queue.push({
      pending: Q,
      pendingCount: Object.keys(Q).length,
      loaded: {},
      errors: [],
      callback: Y
    }), {
      toLoad: Object.keys(X),
      pending: Object.keys(Q),
      toLoadLanguages: Object.keys(B),
      toLoadNamespaces: Object.keys(r)
    };
  }
  loaded(n, c, E) {
    const Y = n.split("|"), X = Y[0], Q = Y[1];
    c && this.emit("failedLoading", X, Q, c), !c && E && this.store.addResourceBundle(X, Q, E, void 0, void 0, {
      skipCopy: !0
    }), this.state[n] = c ? -1 : 2, c && E && (this.state[n] = 0);
    const B = {};
    this.queue.forEach((r) => {
      $0(r.loaded, [X], Q), El(r, n), c && r.errors.push(c), r.pendingCount === 0 && !r.done && (Object.keys(r.loaded).forEach((A) => {
        B[A] || (B[A] = {});
        const a = r.loaded[A];
        a.length && a.forEach((D) => {
          B[A][D] === void 0 && (B[A][D] = !0);
        });
      }), r.done = !0, r.errors.length ? r.callback(r.errors) : r.callback());
    }), this.emit("loaded", B), this.queue = this.queue.filter((r) => !r.done);
  }
  read(n, c, E, Y = 0, X = this.retryTimeout, Q) {
    if (!n.length) return Q(null, {});
    if (this.readingCalls >= this.maxParallelReads) {
      this.waitingReads.push({
        lng: n,
        ns: c,
        fcName: E,
        tried: Y,
        wait: X,
        callback: Q
      });
      return;
    }
    this.readingCalls++;
    const B = (A, a) => {
      if (this.readingCalls--, this.waitingReads.length > 0) {
        const D = this.waitingReads.shift();
        this.read(D.lng, D.ns, D.fcName, D.tried, D.wait, D.callback);
      }
      if (A && a && Y < this.maxRetries) {
        setTimeout(() => {
          this.read.call(this, n, c, E, Y + 1, X * 2, Q);
        }, X);
        return;
      }
      Q(A, a);
    }, r = this.backend[E].bind(this.backend);
    if (r.length === 2) {
      try {
        const A = r(n, c);
        A && typeof A.then == "function" ? A.then((a) => B(null, a)).catch(B) : B(null, A);
      } catch (A) {
        B(A);
      }
      return;
    }
    return r(n, c, B);
  }
  prepareLoading(n, c, E = {}, Y) {
    if (!this.backend)
      return this.logger.warn("No backend was added via i18next.use. Will not load resources."), Y && Y();
    vt(n) && (n = this.languageUtils.toResolveHierarchy(n)), vt(c) && (c = [c]);
    const X = this.queueLoad(n, c, E, Y);
    if (!X.toLoad.length)
      return X.pending.length || Y(), null;
    X.toLoad.forEach((Q) => {
      this.loadOne(Q);
    });
  }
  load(n, c, E) {
    this.prepareLoading(n, c, {}, E);
  }
  reload(n, c, E) {
    this.prepareLoading(n, c, {
      reload: !0
    }, E);
  }
  loadOne(n, c = "") {
    const E = n.split("|"), Y = E[0], X = E[1];
    this.read(Y, X, "read", void 0, void 0, (Q, B) => {
      Q && this.logger.warn(`${c}loading namespace ${X} for language ${Y} failed`, Q), !Q && B && this.logger.log(`${c}loaded namespace ${X} for language ${Y}`, B), this.loaded(n, Q, B);
    });
  }
  saveMissing(n, c, E, Y, X, Q = {}, B = () => {
  }) {
    if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(c)) {
      this.logger.warn(`did not save key "${E}" as the namespace "${c}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
      return;
    }
    if (!(E == null || E === "")) {
      if (this.backend?.create) {
        const r = {
          ...Q,
          isUpdate: X
        }, A = this.backend.create.bind(this.backend);
        if (A.length < 6)
          try {
            let a;
            A.length === 5 ? a = A(n, c, E, Y, r) : a = A(n, c, E, Y), a && typeof a.then == "function" ? a.then((D) => B(null, D)).catch(B) : B(null, a);
          } catch (a) {
            B(a);
          }
        else
          A(n, c, E, Y, B, r);
      }
      !n || !n[0] || this.store.addResource(n[0], c, E, Y);
    }
  }
}
const Ea = () => ({
  debug: !1,
  initAsync: !0,
  ns: ["translation"],
  defaultNS: ["translation"],
  fallbackLng: ["dev"],
  fallbackNS: !1,
  supportedLngs: !1,
  nonExplicitSupportedLngs: !1,
  load: "all",
  preload: !1,
  simplifyPluralSuffix: !0,
  keySeparator: ".",
  nsSeparator: ":",
  pluralSeparator: "_",
  contextSeparator: "_",
  partialBundledLanguages: !1,
  saveMissing: !1,
  updateMissing: !1,
  saveMissingTo: "fallback",
  saveMissingPlurals: !0,
  missingKeyHandler: !1,
  missingInterpolationHandler: !1,
  postProcess: !1,
  postProcessPassResolved: !1,
  returnNull: !1,
  returnEmptyString: !0,
  returnObjects: !1,
  joinArrays: !1,
  returnedObjectHandler: !1,
  parseMissingKeyHandler: !1,
  appendNamespaceToMissingKey: !1,
  appendNamespaceToCIMode: !1,
  overloadTranslationOptionHandler: (e) => {
    let n = {};
    if (typeof e[1] == "object" && (n = e[1]), vt(e[1]) && (n.defaultValue = e[1]), vt(e[2]) && (n.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
      const c = e[3] || e[2];
      Object.keys(c).forEach((E) => {
        n[E] = c[E];
      });
    }
    return n;
  },
  interpolation: {
    escapeValue: !0,
    format: (e) => e,
    prefix: "{{",
    suffix: "}}",
    formatSeparator: ",",
    unescapePrefix: "-",
    nestingPrefix: "$t(",
    nestingSuffix: ")",
    nestingOptionsSeparator: ",",
    maxReplaces: 1e3,
    skipOnVariables: !0
  },
  cacheInBuiltFormats: !0
}), jo = (e) => (vt(e.ns) && (e.ns = [e.ns]), vt(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), vt(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Ts = () => {
}, ul = (e) => {
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((c) => {
    typeof e[c] == "function" && (e[c] = e[c].bind(e));
  });
}, fl = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((n) => n?.name?.indexOf("Locize") > 0 || n?.constructor?.name?.indexOf("Locize") > 0));
class es extends js {
  constructor(n = {}, c) {
    if (super(), this.options = jo(n), this.services = {}, this.logger = Qn, this.modules = {
      external: []
    }, ul(this), c && !this.isInitialized && !n.isClone) {
      if (!this.options.initAsync)
        return this.init(n, c), this;
      setTimeout(() => {
        this.init(n, c);
      }, 0);
    }
  }
  init(n = {}, c) {
    this.isInitializing = !0, typeof n == "function" && (c = n, n = {}), n.defaultNS == null && n.ns && (vt(n.ns) ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0]));
    const E = Ea();
    this.options = {
      ...E,
      ...this.options,
      ...jo(n)
    }, this.options.interpolation = {
      ...E.interpolation,
      ...this.options.interpolation
    }, n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = E.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !fl(this) && typeof console < "u" && typeof console.info < "u" && console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");
    const Y = (A) => A ? typeof A == "function" ? new A() : A : null;
    if (!this.options.isClone) {
      this.modules.logger ? Qn.init(Y(this.modules.logger), this.options) : Qn.init(null, this.options);
      let A;
      this.modules.formatter ? A = this.modules.formatter : A = ll;
      const a = new Ro(this.options);
      this.store = new Uo(this.options.resources, this.options);
      const D = this.services;
      D.logger = Qn, D.resourceStore = this.store, D.languageUtils = a, D.pluralResolver = new Bl(a, {
        prepend: this.options.pluralSeparator,
        simplifyPluralSuffix: this.options.simplifyPluralSuffix
      }), this.options.interpolation.format && this.options.interpolation.format !== E.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), A && (!this.options.interpolation.format || this.options.interpolation.format === E.interpolation.format) && (D.formatter = Y(A), D.formatter.init && D.formatter.init(D, this.options), this.options.interpolation.format = D.formatter.format.bind(D.formatter)), D.interpolator = new Lo(this.options), D.utils = {
        hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
      }, D.backendConnector = new wl(Y(this.modules.backend), D.resourceStore, D, this.options), D.backendConnector.on("*", (N, ...P) => {
        this.emit(N, ...P);
      }), this.modules.languageDetector && (D.languageDetector = Y(this.modules.languageDetector), D.languageDetector.init && D.languageDetector.init(D, this.options.detection, this.options)), this.modules.i18nFormat && (D.i18nFormat = Y(this.modules.i18nFormat), D.i18nFormat.init && D.i18nFormat.init(this)), this.translator = new Hs(this.services, this.options), this.translator.on("*", (N, ...P) => {
        this.emit(N, ...P);
      }), this.modules.external.forEach((N) => {
        N.init && N.init(this);
      });
    }
    if (this.format = this.options.interpolation.format, c || (c = Ts), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
      const A = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
      A.length > 0 && A[0] !== "dev" && (this.options.lng = A[0]);
    }
    !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((A) => {
      this[A] = (...a) => this.store[A](...a);
    }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((A) => {
      this[A] = (...a) => (this.store[A](...a), this);
    });
    const B = $r(), r = () => {
      const A = (a, D) => {
        this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), B.resolve(D), c(a, D);
      };
      if (this.languages && !this.isInitialized) return A(null, this.t.bind(this));
      this.changeLanguage(this.options.lng, A);
    };
    return this.options.resources || !this.options.initAsync ? r() : setTimeout(r, 0), B;
  }
  loadResources(n, c = Ts) {
    let E = c;
    const Y = vt(n) ? n : this.language;
    if (typeof n == "function" && (E = n), !this.options.resources || this.options.partialBundledLanguages) {
      if (Y?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return E();
      const X = [], Q = (B) => {
        if (!B || B === "cimode") return;
        this.services.languageUtils.toResolveHierarchy(B).forEach((A) => {
          A !== "cimode" && X.indexOf(A) < 0 && X.push(A);
        });
      };
      Y ? Q(Y) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((r) => Q(r)), this.options.preload?.forEach?.((B) => Q(B)), this.services.backendConnector.load(X, this.options.ns, (B) => {
        !B && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), E(B);
      });
    } else
      E(null);
  }
  reloadResources(n, c, E) {
    const Y = $r();
    return typeof n == "function" && (E = n, n = void 0), typeof c == "function" && (E = c, c = void 0), n || (n = this.languages), c || (c = this.options.ns), E || (E = Ts), this.services.backendConnector.reload(n, c, (X) => {
      Y.resolve(), E(X);
    }), Y;
  }
  use(n) {
    if (!n) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
    if (!n.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
    return n.type === "backend" && (this.modules.backend = n), (n.type === "logger" || n.log && n.warn && n.error) && (this.modules.logger = n), n.type === "languageDetector" && (this.modules.languageDetector = n), n.type === "i18nFormat" && (this.modules.i18nFormat = n), n.type === "postProcessor" && xB.addPostProcessor(n), n.type === "formatter" && (this.modules.formatter = n), n.type === "3rdParty" && this.modules.external.push(n), this;
  }
  setResolvedLanguage(n) {
    if (!(!n || !this.languages) && !(["cimode", "dev"].indexOf(n) > -1)) {
      for (let c = 0; c < this.languages.length; c++) {
        const E = this.languages[c];
        if (!(["cimode", "dev"].indexOf(E) > -1) && this.store.hasLanguageSomeTranslations(E)) {
          this.resolvedLanguage = E;
          break;
        }
      }
      !this.resolvedLanguage && this.languages.indexOf(n) < 0 && this.store.hasLanguageSomeTranslations(n) && (this.resolvedLanguage = n, this.languages.unshift(n));
    }
  }
  changeLanguage(n, c) {
    this.isLanguageChangingTo = n;
    const E = $r();
    this.emit("languageChanging", n);
    const Y = (B) => {
      this.language = B, this.languages = this.services.languageUtils.toResolveHierarchy(B), this.resolvedLanguage = void 0, this.setResolvedLanguage(B);
    }, X = (B, r) => {
      r ? this.isLanguageChangingTo === n && (Y(r), this.translator.changeLanguage(r), this.isLanguageChangingTo = void 0, this.emit("languageChanged", r), this.logger.log("languageChanged", r)) : this.isLanguageChangingTo = void 0, E.resolve((...A) => this.t(...A)), c && c(B, (...A) => this.t(...A));
    }, Q = (B) => {
      !n && !B && this.services.languageDetector && (B = []);
      const r = vt(B) ? B : B && B[0], A = this.store.hasLanguageSomeTranslations(r) ? r : this.services.languageUtils.getBestMatchFromCodes(vt(B) ? [B] : B);
      A && (this.language || Y(A), this.translator.language || this.translator.changeLanguage(A), this.services.languageDetector?.cacheUserLanguage?.(A)), this.loadResources(A, (a) => {
        X(a, A);
      });
    };
    return !n && this.services.languageDetector && !this.services.languageDetector.async ? Q(this.services.languageDetector.detect()) : !n && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(Q) : this.services.languageDetector.detect(Q) : Q(n), E;
  }
  getFixedT(n, c, E) {
    const Y = (X, Q, ...B) => {
      let r;
      typeof Q != "object" ? r = this.options.overloadTranslationOptionHandler([X, Q].concat(B)) : r = {
        ...Q
      }, r.lng = r.lng || Y.lng, r.lngs = r.lngs || Y.lngs, r.ns = r.ns || Y.ns, r.keyPrefix !== "" && (r.keyPrefix = r.keyPrefix || E || Y.keyPrefix);
      const A = this.options.keySeparator || ".";
      let a;
      return r.keyPrefix && Array.isArray(X) ? a = X.map((D) => (typeof D == "function" && (D = xa(D, {
        ...this.options,
        ...Q
      })), `${r.keyPrefix}${A}${D}`)) : (typeof X == "function" && (X = xa(X, {
        ...this.options,
        ...Q
      })), a = r.keyPrefix ? `${r.keyPrefix}${A}${X}` : X), this.t(a, r);
    };
    return vt(n) ? Y.lng = n : Y.lngs = n, Y.ns = c, Y.keyPrefix = E, Y;
  }
  t(...n) {
    return this.translator?.translate(...n);
  }
  exists(...n) {
    return this.translator?.exists(...n);
  }
  setDefaultNamespace(n) {
    this.options.defaultNS = n;
  }
  hasLoadedNamespace(n, c = {}) {
    if (!this.isInitialized)
      return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
    if (!this.languages || !this.languages.length)
      return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
    const E = c.lng || this.resolvedLanguage || this.languages[0], Y = this.options ? this.options.fallbackLng : !1, X = this.languages[this.languages.length - 1];
    if (E.toLowerCase() === "cimode") return !0;
    const Q = (B, r) => {
      const A = this.services.backendConnector.state[`${B}|${r}`];
      return A === -1 || A === 0 || A === 2;
    };
    if (c.precheck) {
      const B = c.precheck(this, Q);
      if (B !== void 0) return B;
    }
    return !!(this.hasResourceBundle(E, n) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || Q(E, n) && (!Y || Q(X, n)));
  }
  loadNamespaces(n, c) {
    const E = $r();
    return this.options.ns ? (vt(n) && (n = [n]), n.forEach((Y) => {
      this.options.ns.indexOf(Y) < 0 && this.options.ns.push(Y);
    }), this.loadResources((Y) => {
      E.resolve(), c && c(Y);
    }), E) : (c && c(), Promise.resolve());
  }
  loadLanguages(n, c) {
    const E = $r();
    vt(n) && (n = [n]);
    const Y = this.options.preload || [], X = n.filter((Q) => Y.indexOf(Q) < 0 && this.services.languageUtils.isSupportedCode(Q));
    return X.length ? (this.options.preload = Y.concat(X), this.loadResources((Q) => {
      E.resolve(), c && c(Q);
    }), E) : (c && c(), Promise.resolve());
  }
  dir(n) {
    if (n || (n = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language)), !n) return "rtl";
    try {
      const Y = new Intl.Locale(n);
      if (Y && Y.getTextInfo) {
        const X = Y.getTextInfo();
        if (X && X.direction) return X.direction;
      }
    } catch {
    }
    const c = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], E = this.services?.languageUtils || new Ro(Ea());
    return n.toLowerCase().indexOf("-latn") > 1 ? "ltr" : c.indexOf(E.getLanguagePartFromCode(n)) > -1 || n.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
  }
  static createInstance(n = {}, c) {
    const E = new es(n, c);
    return E.createInstance = es.createInstance, E;
  }
  cloneInstance(n = {}, c = Ts) {
    const E = n.forkResourceStore;
    E && delete n.forkResourceStore;
    const Y = {
      ...this.options,
      ...n,
      isClone: !0
    }, X = new es(Y);
    if ((n.debug !== void 0 || n.prefix !== void 0) && (X.logger = X.logger.clone(n)), ["store", "services", "language"].forEach((B) => {
      X[B] = this[B];
    }), X.services = {
      ...this.services
    }, X.services.utils = {
      hasLoadedNamespace: X.hasLoadedNamespace.bind(X)
    }, E) {
      const B = Object.keys(this.store.data).reduce((r, A) => (r[A] = {
        ...this.store.data[A]
      }, r[A] = Object.keys(r[A]).reduce((a, D) => (a[D] = {
        ...r[A][D]
      }, a), r[A]), r), {});
      X.store = new Uo(B, Y), X.services.resourceStore = X.store;
    }
    if (n.interpolation) {
      const r = {
        ...Ea().interpolation,
        ...this.options.interpolation,
        ...n.interpolation
      }, A = {
        ...Y,
        interpolation: r
      };
      X.services.interpolator = new Lo(A);
    }
    return X.translator = new Hs(X.services, Y), X.translator.on("*", (B, ...r) => {
      X.emit(B, ...r);
    }), X.init(Y, c), X.translator.options = Y, X.translator.backendConnector.services.utils = {
      hasLoadedNamespace: X.hasLoadedNamespace.bind(X)
    }, X;
  }
  toJSON() {
    return {
      options: this.options,
      store: this.store,
      language: this.language,
      languages: this.languages,
      resolvedLanguage: this.resolvedLanguage
    };
  }
}
const l = es.createInstance();
l.createInstance;
l.dir;
l.init;
l.loadResources;
l.reloadResources;
l.use;
l.changeLanguage;
l.getFixedT;
l.t;
l.exists;
l.setDefaultNamespace;
l.hasLoadedNamespace;
l.loadNamespaces;
l.loadLanguages;
var Oo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function mB(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Ql(e) {
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
  var n = e.default;
  if (typeof n == "function") {
    var c = function E() {
      var Y = !1;
      try {
        Y = this instanceof E;
      } catch {
      }
      return Y ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
    };
    c.prototype = n.prototype;
  } else c = {};
  return Object.defineProperty(c, "__esModule", { value: !0 }), Object.keys(e).forEach(function(E) {
    var Y = Object.getOwnPropertyDescriptor(e, E);
    Object.defineProperty(c, E, Y.get ? Y : {
      enumerable: !0,
      get: function() {
        return e[E];
      }
    });
  }), c;
}
var Us = { exports: {} };
/*! pdfmake v0.3.7, @license MIT, @link http://pdfmake.org */
var hl = Us.exports, Jo;
function Cl() {
  return Jo || (Jo = 1, (function(e, n) {
    (function(E, Y) {
      e.exports = Y();
    })(Object(typeof self < "u" ? self : hl), () => (
      /******/
      (() => {
        var c = {
          /***/
          7133(Q, B, r) {
            r.d(B, {
              default: () => (
                /* binding */
                Or
              )
            }), r(187);
            var A = r(5167), a = r(783).Buffer;
            const D = (NA, t) => {
              let C = "normal";
              return NA && t ? C = "bolditalics" : NA ? C = "bold" : t && (C = "italics"), C;
            };
            class x extends A.A {
              constructor(t, C, b, nA, gA, hA) {
                t === void 0 && (t = {}), C === void 0 && (C = {}), b === void 0 && (b = {}), nA === void 0 && (nA = {}), gA === void 0 && (gA = {}), hA === void 0 && (hA = null), super(gA), this.fonts = {}, this.fontCache = {};
                for (let HA in t)
                  if (t.hasOwnProperty(HA)) {
                    let GA = t[HA];
                    this.fonts[HA] = {
                      normal: GA.normal,
                      bold: GA.bold,
                      italics: GA.italics,
                      bolditalics: GA.bolditalics
                    };
                  }
                this.patterns = {};
                for (let HA in b)
                  if (b.hasOwnProperty(HA)) {
                    let GA = b[HA];
                    this.patterns[HA] = this.pattern(GA.boundingBox, GA.xStep, GA.yStep, GA.pattern, GA.colored);
                  }
                this.images = C, this.attachments = nA, this.virtualfs = hA;
              }
              getFontType(t, C) {
                return D(t, C);
              }
              getFontFile(t, C, b) {
                let nA = this.getFontType(C, b);
                return !this.fonts[t] || !this.fonts[t][nA] ? null : this.fonts[t][nA];
              }
              provideFont(t, C, b) {
                let nA = this.getFontType(C, b);
                if (this.getFontFile(t, C, b) === null)
                  throw new Error(`Font '${t}' in style '${nA}' is not defined in the font section of the document definition.`);
                if (this.fontCache[t] = this.fontCache[t] || {}, !this.fontCache[t][nA]) {
                  let gA = this.fonts[t][nA];
                  Array.isArray(gA) || (gA = [gA]), this.virtualfs && this.virtualfs.existsSync(gA[0]) && (gA[0] = this.virtualfs.readFileSync(gA[0])), this.fontCache[t][nA] = this.font(...gA)._font;
                }
                return this.fontCache[t][nA];
              }
              provideImage(t) {
                const C = (nA) => {
                  let gA = this.images[nA];
                  if (!gA)
                    return nA;
                  if (this.virtualfs && this.virtualfs.existsSync(gA))
                    return this.virtualfs.readFileSync(gA);
                  let hA = gA.indexOf("base64,");
                  return hA < 0 ? this.images[nA] : a.from(gA.substring(hA + 7), "base64");
                };
                if (this._imageRegistry[t])
                  return this._imageRegistry[t];
                let b;
                try {
                  if (b = this.openImage(C(t)), !b)
                    throw new Error("No image");
                } catch (nA) {
                  throw new Error(`Invalid image: ${nA.toString()}
Images dictionary should contain dataURL entries (or local file paths in node.js)`, {
                    cause: nA
                  });
                }
                return b.embed(this), this._imageRegistry[t] = b, b;
              }
              /**
               * @param {Array} color pdfmake format: [<pattern name>, <color>]
               * @returns {Array} pdfkit format: [<pattern object>, <color>]
               */
              providePattern(t) {
                return Array.isArray(t) && t.length === 2 ? [this.patterns[t[0]], t[1]] : null;
              }
              provideAttachment(t) {
                const C = (nA) => {
                  if (!nA)
                    throw new Error("No attachment");
                  if (!nA.src)
                    throw new Error('The "src" key is required for attachments');
                  return nA;
                };
                if (typeof t == "object")
                  return C(t);
                let b = C(this.attachments[t]);
                return this.virtualfs && this.virtualfs.existsSync(b.src) ? this.virtualfs.readFileSync(b.src) : b;
              }
              setOpenActionAsPrint() {
                let t = this.ref({
                  Type: "Action",
                  S: "Named",
                  N: "Print"
                });
                this._root.data.OpenAction = t, t.end();
              }
            }
            const N = x;
            function P(NA) {
              return typeof NA == "string" || NA instanceof String;
            }
            function d(NA) {
              return (typeof NA == "number" || NA instanceof Number) && !Number.isNaN(NA);
            }
            function J(NA) {
              return !(!d(NA) || !Number.isInteger(NA) || NA <= 0);
            }
            function q(NA) {
              return NA !== null && !Array.isArray(NA) && !P(NA) && !d(NA) && typeof NA == "object";
            }
            function AA(NA) {
              return q(NA) && Object.keys(NA).length === 0;
            }
            function K(NA) {
              return NA != null;
            }
            function z(NA, t) {
              return NA === "font" ? "font" : t;
            }
            function T(NA) {
              return JSON.stringify(NA, z);
            }
            function H(NA) {
              if (NA.id)
                return NA.id;
              if (Array.isArray(NA.text))
                for (let t of NA.text) {
                  let C = H(t);
                  if (C)
                    return C;
                }
              return null;
            }
            function eA(NA, t) {
              function C(hA, HA, GA) {
                return GA === void 0 && (GA = 0), hA.marginLeft !== void 0 || hA.marginTop !== void 0 || hA.marginRight !== void 0 || hA.marginBottom !== void 0 ? [hA.marginLeft ?? HA[0] ?? GA, hA.marginTop ?? HA[1] ?? GA, hA.marginRight ?? HA[2] ?? GA, hA.marginBottom ?? HA[3] ?? GA] : HA;
              }
              function b(hA, HA, GA) {
                if (GA === void 0 && (GA = /* @__PURE__ */ new Set()), hA = Array.isArray(hA) ? hA : [hA], !hA.every((we) => P(we)))
                  return {};
                let fe = {};
                for (let we = 0; we < hA.length; we++) {
                  let ye = hA[we], De = HA.styleDictionary[ye];
                  if (De !== void 0 && !GA.has(ye)) {
                    if (De.extends !== void 0 && (fe = {
                      ...fe,
                      ...b(De.extends, HA, /* @__PURE__ */ new Set([...GA, ye]))
                    }), De.margin !== void 0) {
                      fe = {
                        margin: nA(De.margin)
                      };
                      continue;
                    }
                    fe = {
                      margin: C(De, fe.margin ?? {}, void 0)
                    };
                  }
                }
                return fe;
              }
              function nA(hA) {
                return d(hA) ? hA = [hA, hA, hA, hA] : Array.isArray(hA) && hA.length === 2 && (hA = [hA[0], hA[1], hA[0], hA[1]]), hA;
              }
              let gA = [void 0, void 0, void 0, void 0];
              if (NA.style) {
                let hA = Array.isArray(NA.style) ? NA.style : [NA.style], HA = b(hA, t);
                HA && (gA = C(HA, gA)), HA.margin && (gA = nA(HA.margin));
              }
              return gA = C(NA, gA), NA.margin !== void 0 && (gA = nA(NA.margin)), gA[0] === void 0 && gA[1] === void 0 && gA[2] === void 0 && gA[3] === void 0 ? null : gA;
            }
            var CA = r(783).Buffer;
            const IA = (NA) => P(NA) ? NA.replace(/\t/g, "    ") : d(NA) || typeof NA == "boolean" ? NA.toString() : !K(NA) || AA(NA) ? "" : NA;
            class k {
              preprocessDocument(t) {
                return this.parentNode = null, this.tocs = [], this.nodeReferences = [], this.preprocessNode(t, !0);
              }
              preprocessBlock(t) {
                return this.parentNode = null, this.tocs = [], this.nodeReferences = [], this.preprocessNode(t);
              }
              preprocessNode(t, C) {
                if (C === void 0 && (C = !1), Array.isArray(t) ? t = {
                  stack: t
                } : P(t) || d(t) || typeof t == "boolean" || !K(t) || AA(t) ? t = {
                  text: IA(t)
                } : "text" in t && (t.text = IA(t.text)), t.section) {
                  if (!C)
                    throw new Error(`Incorrect document structure, section node is only allowed at the root level of document structure: ${T(t)}`);
                  return this.preprocessSection(t);
                } else {
                  if (t.columns)
                    return this.preprocessColumns(t);
                  if (t.stack)
                    return this.preprocessVerticalContainer(t, C);
                  if (t.ul)
                    return this.preprocessList(t);
                  if (t.ol)
                    return this.preprocessList(t);
                  if (t.table)
                    return this.preprocessTable(t);
                  if (t.text !== void 0)
                    return this.preprocessText(t);
                  if (t.toc)
                    return this.preprocessToc(t);
                  if (t.image)
                    return this.preprocessImage(t);
                  if (t.svg)
                    return this.preprocessSVG(t);
                  if (t.canvas)
                    return this.preprocessCanvas(t);
                  if (t.qr)
                    return this.preprocessQr(t);
                  if (t.attachment)
                    return this.preprocessAttachment(t);
                  if (t.pageReference || t.textReference)
                    return this.preprocessText(t);
                  throw new Error(`Unrecognized document structure: ${T(t)}`);
                }
              }
              preprocessSection(t) {
                return t.section = this.preprocessNode(t.section), t;
              }
              preprocessColumns(t) {
                let C = t.columns;
                for (let b = 0, nA = C.length; b < nA; b++)
                  C[b] = this.preprocessNode(C[b]);
                return t;
              }
              preprocessVerticalContainer(t, C) {
                let b = t.stack;
                for (let nA = 0, gA = b.length; nA < gA; nA++)
                  b[nA] = this.preprocessNode(b[nA], C);
                return t;
              }
              preprocessList(t) {
                let C = t.ul || t.ol;
                for (let b = 0, nA = C.length; b < nA; b++)
                  C[b] = this.preprocessNode(C[b]);
                return t;
              }
              preprocessTable(t) {
                let C, b, nA, gA;
                for (C = 0, nA = t.table.body[0].length; C < nA; C++)
                  for (b = 0, gA = t.table.body.length; b < gA; b++) {
                    let hA = t.table.body[b], HA = hA[C];
                    HA !== void 0 && (HA === null && (HA = ""), HA._span || (hA[C] = this.preprocessNode(HA)));
                  }
                return t;
              }
              preprocessText(t) {
                if (t.tocItem) {
                  Array.isArray(t.tocItem) || (t.tocItem = [t.tocItem]);
                  for (let C = 0, b = t.tocItem.length; C < b; C++) {
                    P(t.tocItem[C]) || (t.tocItem[C] = "_default_");
                    let nA = t.tocItem[C];
                    this.tocs[nA] || (this.tocs[nA] = {
                      toc: {
                        _items: [],
                        _pseudo: !0
                      }
                    }), t.id || (t.id = `toc-${nA}-${this.tocs[nA].toc._items.length}`);
                    let gA = {
                      _nodeRef: this._getNodeForNodeRef(t),
                      _textNodeRef: t
                    };
                    this.tocs[nA].toc._items.push(gA);
                  }
                }
                if (t.id)
                  if (this.nodeReferences[t.id]) {
                    if (!this.nodeReferences[t.id]._pseudo)
                      throw new Error(`Node id '${t.id}' already exists`);
                    this.nodeReferences[t.id]._nodeRef = this._getNodeForNodeRef(t), this.nodeReferences[t.id]._textNodeRef = t, this.nodeReferences[t.id]._pseudo = !1;
                  } else
                    this.nodeReferences[t.id] = {
                      _nodeRef: this._getNodeForNodeRef(t),
                      _textNodeRef: t
                    };
                if (t.pageReference && (this.nodeReferences[t.pageReference] || (this.nodeReferences[t.pageReference] = {
                  _nodeRef: {},
                  _textNodeRef: {},
                  _pseudo: !0
                }), t.text = "00000", t.linkToDestination = t.pageReference, t._pageRef = this.nodeReferences[t.pageReference]), t.textReference && (this.nodeReferences[t.textReference] || (this.nodeReferences[t.textReference] = {
                  _nodeRef: {},
                  _pseudo: !0
                }), t.text = "", t.linkToDestination = t.textReference, t._textRef = this.nodeReferences[t.textReference]), t.text && t.text.text)
                  t.text = [this.preprocessNode(t.text)];
                else if (Array.isArray(t.text)) {
                  let C = !1;
                  this.parentNode === null && (this.parentNode = t, C = !0);
                  for (let b = 0, nA = t.text.length; b < nA; b++)
                    t.text[b] = this.preprocessNode(t.text[b]);
                  C && (this.parentNode = null);
                }
                return t;
              }
              preprocessToc(t) {
                if (t.toc.id || (t.toc.id = "_default_"), t.toc.title = t.toc.title ? this.preprocessNode(t.toc.title) : null, t.toc._items = [], this.tocs[t.toc.id]) {
                  if (!this.tocs[t.toc.id].toc._pseudo)
                    throw new Error(`TOC '${t.toc.id}' already exists`);
                  t.toc._items = this.tocs[t.toc.id].toc._items;
                }
                return this.tocs[t.toc.id] = t, t;
              }
              preprocessImage(t) {
                return t.image.type !== void 0 && t.image.data !== void 0 && t.image.type === "Buffer" && Array.isArray(t.image.data) && (t.image = CA.from(t.image.data)), t;
              }
              preprocessCanvas(t) {
                return t;
              }
              preprocessSVG(t) {
                return t;
              }
              preprocessQr(t) {
                return t;
              }
              preprocessAttachment(t) {
                return t;
              }
              _getNodeForNodeRef(t) {
                return this.parentNode ? this.parentNode : t;
              }
            }
            const tA = k;
            var lA = r(7571), uA = r(3915), w = {};
            const v = 5, RA = 12, DA = 13, $ = 16, cA = 17, Ae = 22, kA = 28, VA = 31, EA = 33, zA = 34, OA = 35, xA = 36, LA = 37, yA = 38, TA = 39, fA = 40, sA = 41, F = 42, o = 0, h = 1, _ = 2, oA = 3, p = 4, rA = [
              //OP   , CL    , CP    , QU    , GL    , NS    , EX    , SY    , IS    , PR    , PO    , NU    , AL    , HL    , ID    , IN    , HY    , BA    , BB    , B2    , ZW    , CM    , WJ    , H2    , H3    , JL    , JV    , JT    , RI    , EB    , EM    , ZWJ   , CB
              [
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                oA,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p,
                p
              ],
              [
                o,
                p,
                p,
                h,
                h,
                p,
                p,
                p,
                p,
                h,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                p,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                p,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                h,
                o,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                o,
                h,
                p,
                p,
                p,
                o,
                o,
                h,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                o,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                p,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h,
                h
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                h,
                h,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                h,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                h,
                h,
                h,
                h,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                h,
                h,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                h,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                h,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                o,
                h,
                o,
                o,
                o,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                h,
                p,
                p,
                h,
                h,
                h,
                p,
                p,
                p,
                h,
                h,
                h,
                h,
                h,
                o,
                h,
                h,
                h,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ],
              [
                o,
                p,
                p,
                h,
                h,
                o,
                p,
                p,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                p,
                _,
                p,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                o,
                h,
                o
              ]
              // CB
            ], QA = uA.toByteArray(" "), bA = new lA(QA), y = function(NA) {
              switch (NA) {
                case EA:
                  return RA;
                case TA:
                case fA:
                case F:
                  return RA;
                case OA:
                  return v;
                default:
                  return NA;
              }
            }, M = function(NA) {
              switch (NA) {
                case LA:
                case yA:
                  return zA;
                case sA:
                  return Ae;
                default:
                  return NA;
              }
            };
            class FA {
              constructor(t, C = !1) {
                this.position = t, this.required = C;
              }
            }
            class dA {
              nextCodePoint() {
                const t = this.string.charCodeAt(this.pos++), C = this.string.charCodeAt(this.pos);
                return 55296 <= t && t <= 56319 && 56320 <= C && C <= 57343 ? (this.pos++, (t - 55296) * 1024 + (C - 56320) + 65536) : t;
              }
              nextCharClass() {
                return y(bA.get(this.nextCodePoint()));
              }
              getSimpleBreak() {
                switch (this.nextClass) {
                  case sA:
                    return !1;
                  case zA:
                  case LA:
                  case yA:
                    return this.curClass = zA, !1;
                  case xA:
                    return this.curClass = xA, !1;
                }
                return null;
              }
              getPairTableBreak(t) {
                let C = !1;
                switch (rA[this.curClass][this.nextClass]) {
                  case o:
                    C = !0;
                    break;
                  case h:
                    C = t === sA;
                    break;
                  case _:
                    if (C = t === sA, !C)
                      return C = !1, C;
                    break;
                  case oA:
                    if (t !== sA) return C;
                    break;
                }
                return this.LB8a && (C = !1), this.LB21a && (this.curClass === $ || this.curClass === cA) ? (C = !1, this.LB21a = !1) : this.LB21a = this.curClass === DA, this.curClass === kA ? (this.LB30a++, this.LB30a == 2 && this.nextClass === kA && (C = !0, this.LB30a = 0)) : this.LB30a = 0, this.curClass = this.nextClass, C;
              }
              nextBreak() {
                if (this.curClass == null) {
                  let t = this.nextCharClass();
                  this.curClass = M(t), this.nextClass = t, this.LB8a = t === VA, this.LB30a = 0;
                }
                for (; this.pos < this.string.length; ) {
                  this.lastPos = this.pos;
                  const t = this.nextClass;
                  if (this.nextClass = this.nextCharClass(), this.curClass === zA || this.curClass === xA && this.nextClass !== LA)
                    return this.curClass = M(y(this.nextClass)), new FA(this.lastPos, !0);
                  let C = this.getSimpleBreak();
                  if (C === null && (C = this.getPairTableBreak(t)), this.LB8a = this.nextClass === VA, C) return new FA(this.lastPos);
                }
                return this.lastPos < this.string.length ? (this.lastPos = this.string.length, new FA(this.string.length)) : null;
              }
              constructor(t) {
                this.string = t, this.pos = 0, this.lastPos = 0, this.curClass = null, this.nextClass = null, this.LB8a = !1, this.LB21a = !1, this.LB30a = 0;
              }
            }
            w = dA;
            class he {
              /**
               * @param {object} styleDictionary named styles dictionary
               * @param {object} defaultStyle optional default style definition
               */
              constructor(t, C) {
                C === void 0 && (C = {}), this.styleDictionary = t, this.defaultStyle = C, this.styleOverrides = [];
              }
              /**
               * Creates cloned version of current stack
               *
               * @returns {StyleContextStack} current stack snapshot
               */
              clone() {
                let t = new he(this.styleDictionary, this.defaultStyle);
                return this.styleOverrides.forEach((C) => {
                  t.styleOverrides.push(C);
                }), t;
              }
              /**
               * Pushes style-name or style-overrides-object onto the stack for future evaluation
               *
               * @param {string|object} styleNameOrOverride style-name (referring to styleDictionary) or
               *                                            a new dictionary defining overriding properties
               */
              push(t) {
                this.styleOverrides.push(t);
              }
              /**
               * Removes last style-name or style-overrides-object from the stack
               *
               * @param {number} howMany optional number of elements to be popped (if not specified,
               *                         one element will be removed from the stack)
               */
              pop(t) {
                for (t === void 0 && (t = 1); t-- > 0; )
                  this.styleOverrides.pop();
              }
              /**
               * Creates a set of named styles or/and a style-overrides-object based on the item,
               * pushes those elements onto the stack for future evaluation and returns the number
               * of elements pushed, so they can be easily popped then.
               *
               * @param {object} item - an object with optional style property and/or style overrides
               * @returns {number} the number of items pushed onto the stack
               */
              autopush(t) {
                if (P(t) || typeof t.section < "u")
                  return 0;
                let C = [];
                t.style && (Array.isArray(t.style) ? C = t.style : C = [t.style]);
                for (let b = 0, nA = C.length; b < nA; b++)
                  this.push(C[b]);
                return this.push(t), C.length + 1;
              }
              /**
               * Automatically pushes elements onto the stack, using autopush based on item,
               * executes callback and then pops elements back. Returns value returned by callback
               *
               * @param {object} item - an object with optional style property and/or style overrides
               * @param {Function} callback to be called between autopush and pop
               * @returns {object} value returned by callback
               */
              auto(t, C) {
                let b = this.autopush(t), nA = C();
                return b > 0 && this.pop(b), nA;
              }
              /**
               * Evaluates stack and returns value of a named property
               *
               * @param {string} property - property name
               * @returns {?any} property value or null if not found
               */
              getProperty(t) {
                var C = this;
                const b = function(nA, gA, hA) {
                  if (hA === void 0 && (hA = /* @__PURE__ */ new Set()), hA.has(nA))
                    return;
                  hA.add(nA);
                  const HA = C.styleDictionary[nA];
                  if (HA) {
                    if (K(HA[gA]))
                      return HA[gA];
                    if (HA.extends) {
                      let GA = Array.isArray(HA.extends) ? HA.extends : [HA.extends];
                      for (let fe = GA.length - 1; fe >= 0; fe--) {
                        let we = b(GA[fe], gA, hA);
                        if (K(we))
                          return we;
                      }
                    }
                  }
                };
                if (this.styleOverrides)
                  for (let nA = this.styleOverrides.length - 1; nA >= 0; nA--) {
                    let gA = this.styleOverrides[nA];
                    if (P(gA)) {
                      let hA = b(gA, t);
                      if (K(hA))
                        return hA;
                    } else if (K(gA[t]))
                      return gA[t];
                  }
                return this.defaultStyle && this.defaultStyle[t];
              }
              /**
               * @param {object} item
               * @param {StyleContextStack} styleContextStack
               * @param {string} property
               * @param {any} defaultValue
               * @returns {any}
               */
              static getStyleProperty(t, C, b, nA) {
                let gA;
                return K(t[b]) ? t[b] : C ? (C.auto(t, () => {
                  gA = C.getProperty(b);
                }), K(gA) ? gA : nA) : nA;
              }
              /**
               * @param {object} source
               * @param {object} destination
               * @returns {object}
               */
              static copyStyle(t, C) {
                t === void 0 && (t = {}), C === void 0 && (C = {});
                for (let b in t)
                  b != "text" && t.hasOwnProperty(b) && (C[b] = t[b]);
                return C;
              }
            }
            const ie = he, KA = function(NA, t, C) {
              C === void 0 && (C = !1);
              let b = [];
              if (NA == null ? NA = "" : NA = String(NA), t)
                return b.push({
                  text: NA
                }), b;
              if (C)
                return NA.split("").map((HA) => HA.match(/^\n$|^\r$/) ? {
                  text: "",
                  lineEnd: !0
                } : {
                  text: HA
                });
              if (NA.length === 0)
                return b.push({
                  text: ""
                }), b;
              let nA = new w(NA), gA = 0, hA;
              for (; hA = nA.nextBreak(); ) {
                let HA = NA.slice(gA, hA.position);
                hA.required || HA.match(/\r?\n$|\r$/) ? (HA = HA.replace(/\r?\n$|\r$/, ""), b.push({
                  text: HA,
                  lineEnd: !0
                })) : b.push({
                  text: HA
                }), gA = hA.position;
              }
              return b;
            }, Pe = (NA, t) => {
              let C = NA[0];
              if (C === void 0)
                return null;
              if (t) {
                let b = KA(C.text, !1);
                if (b[0] === void 0)
                  return null;
                C = b[0];
              }
              return C.text;
            }, Je = (NA, t) => {
              let C = NA[NA.length - 1];
              if (C === void 0 || C.lineEnd)
                return null;
              if (t) {
                let b = KA(C.text, !1);
                if (b[b.length - 1] === void 0)
                  return null;
                C = b[b.length - 1];
              }
              return C.text;
            };
            class Le {
              /**
               * @param {string|Array} texts
               * @param {StyleContextStack} styleContextStack
               * @returns {Array}
               */
              getBreaks(t, C) {
                let b = [];
                Array.isArray(t) || (t = [t]);
                let nA = null;
                for (let gA = 0, hA = t.length; gA < hA; gA++) {
                  let HA = t[gA], GA = null, fe, we = ie.getStyleProperty(HA || {}, C, "wordBreak", "normal") === "break-all", ye = ie.getStyleProperty(HA || {}, C, "noWrap", !1);
                  if (q(HA) ? (HA._textRef && HA._textRef._textNodeRef.text && (HA.text = HA._textRef._textNodeRef.text), fe = KA(HA.text, ye, we), GA = ie.copyStyle(HA)) : fe = KA(HA, ye, we), nA && fe.length) {
                    let De = Pe(fe, ye);
                    KA(nA + De, !1).length === 1 && (b[b.length - 1].noNewLine = !0);
                  }
                  for (let De = 0, g = fe.length; De < g; De++) {
                    let s = {
                      text: fe[De].text
                    };
                    fe[De].lineEnd && (s.lineEnd = !0), ie.copyStyle(GA, s), b.push(s);
                  }
                  nA = null, gA + 1 < hA && (nA = Je(fe, ye));
                }
                return b;
              }
            }
            const Re = Le, _e = /^(\s)+/g, se = /(\s)+$/g, Ee = (NA) => {
              function t(C) {
                return C.reduce((b, nA) => {
                  let gA = Array.isArray(nA.text) ? t(nA.text) : nA, hA = [].concat(gA).some(Array.isArray);
                  return b.concat(hA ? t(gA) : gA);
                }, []);
              }
              return Array.isArray(NA) || (NA = [NA]), NA = t(NA), NA;
            };
            class wA {
              /**
               * @param {object} pdfDocument object is instance of PDFDocument
               */
              constructor(t) {
                this.pdfDocument = t;
              }
              /**
               * Converts an array of strings (or inline-definition-objects) into a collection
               * of inlines and calculated minWidth/maxWidth and their min/max widths
               *
               * @param {Array|object} textArray an array of inline-definition-objects (or strings)
               * @param {StyleContextStack} styleContextStack current style stack
               * @returns {object} collection of inlines, minWidth, maxWidth
               */
              buildInlines(t, C) {
                const b = (ye) => Math.max(0, ye.width - ye.leadingCut - ye.trailingCut);
                let nA = 0, gA = 0, hA, HA = Ee(t), fe = new Re().getBreaks(HA, C), we = this.measure(fe, C);
                return we.forEach((ye) => {
                  nA = Math.max(nA, b(ye)), hA || (hA = {
                    width: 0,
                    leadingCut: ye.leadingCut,
                    trailingCut: 0
                  }), hA.width += ye.width, hA.trailingCut = ye.trailingCut, gA = Math.max(gA, b(hA)), ye.lineEnd && (hA = null);
                }), ie.getStyleProperty({}, C, "noWrap", !1) && (nA = gA), {
                  items: we,
                  minWidth: nA,
                  maxWidth: gA
                };
              }
              measure(t, C) {
                if (t.length) {
                  let b = ie.getStyleProperty(t[0], C, "leadingIndent", 0);
                  b && (t[0].leadingCut = -b, t[0].leadingIndent = b);
                }
                return t.forEach((b) => {
                  let nA = ie.getStyleProperty(b, C, "font", "Roboto"), gA = ie.getStyleProperty(b, C, "bold", !1), hA = ie.getStyleProperty(b, C, "italics", !1);
                  b.font = this.pdfDocument.provideFont(nA, gA, hA), b.alignment = ie.getStyleProperty(b, C, "alignment", "left"), b.fontSize = ie.getStyleProperty(b, C, "fontSize", 12), b.fontFeatures = ie.getStyleProperty(b, C, "fontFeatures", null), b.characterSpacing = ie.getStyleProperty(b, C, "characterSpacing", 0), b.color = ie.getStyleProperty(b, C, "color", "black"), b.decoration = ie.getStyleProperty(b, C, "decoration", null), b.decorationColor = ie.getStyleProperty(b, C, "decorationColor", null), b.decorationStyle = ie.getStyleProperty(b, C, "decorationStyle", null), b.decorationThickness = ie.getStyleProperty(b, C, "decorationThickness", null), b.background = ie.getStyleProperty(b, C, "background", null), b.link = ie.getStyleProperty(b, C, "link", null), b.linkToPage = ie.getStyleProperty(b, C, "linkToPage", null), b.linkToDestination = ie.getStyleProperty(b, C, "linkToDestination", null), b.noWrap = ie.getStyleProperty(b, C, "noWrap", null), b.opacity = ie.getStyleProperty(b, C, "opacity", 1), b.sup = ie.getStyleProperty(b, C, "sup", !1), b.sub = ie.getStyleProperty(b, C, "sub", !1), (b.sup || b.sub) && (b.fontSize *= 0.58);
                  let HA = ie.getStyleProperty(b, C, "lineHeight", 1);
                  if (b.width = this.widthOfText(b.text, b), b.height = b.font.lineHeight(b.fontSize) * HA, b.leadingCut || (b.leadingCut = 0), !ie.getStyleProperty(b, C, "preserveLeadingSpaces", !1)) {
                    let we = b.text.match(_e);
                    we && (b.leadingCut += this.widthOfText(we[0], b));
                  }
                  if (b.trailingCut = 0, !ie.getStyleProperty(b, C, "preserveTrailingSpaces", !1)) {
                    let we = b.text.match(se);
                    we && (b.trailingCut = this.widthOfText(we[0], b));
                  }
                }, this), t;
              }
              /**
               * Width of text
               *
               * @param {string} text
               * @param {object} inline
               * @returns {number}
               */
              widthOfText(t, C) {
                return C.font.widthOfString(t, C.fontSize, C.fontFeatures) + (C.characterSpacing || 0) * (t.length - 1);
              }
              /**
               * Returns size of the specified string (without breaking it) using the current style
               *
               * @param {string} text text to be measured
               * @param {object} styleContextStack current style stack
               * @returns {object} size of the specified string
               */
              sizeOfText(t, C) {
                let b = ie.getStyleProperty({}, C, "font", "Roboto"), nA = ie.getStyleProperty({}, C, "fontSize", 12), gA = ie.getStyleProperty({}, C, "fontFeatures", null), hA = ie.getStyleProperty({}, C, "bold", !1), HA = ie.getStyleProperty({}, C, "italics", !1), GA = ie.getStyleProperty({}, C, "lineHeight", 1), fe = ie.getStyleProperty({}, C, "characterSpacing", 0), we = this.pdfDocument.provideFont(b, hA, HA);
                return {
                  width: this.widthOfText(t, {
                    font: we,
                    fontSize: nA,
                    characterSpacing: fe,
                    fontFeatures: gA
                  }),
                  height: we.lineHeight(nA) * GA,
                  fontSize: nA,
                  lineHeight: GA,
                  ascender: we.ascender / 1e3 * nA,
                  descender: we.descender / 1e3 * nA
                };
              }
              /**
               * Returns size of the specified rotated string (without breaking it) using the current style
               *
               * @param {string} text text to be measured
               * @param {number} angle
               * @param {object} styleContextStack current style stack
               * @returns {object} size of the specified string
               */
              sizeOfRotatedText(t, C, b) {
                let nA = C * Math.PI / -180, gA = this.sizeOfText(t, b);
                return {
                  width: Math.abs(gA.height * Math.sin(nA)) + Math.abs(gA.width * Math.cos(nA)),
                  height: Math.abs(gA.width * Math.sin(nA)) + Math.abs(gA.height * Math.cos(nA))
                };
              }
            }
            const R = wA;
            function G(NA, t, C, b) {
              C === void 0 && (C = 0);
              let nA = [], gA = 0, hA = 0, HA = [], GA = 0, fe = 0, we = [], ye = t;
              NA.forEach((s) => {
                W(s) ? (nA.push(s), gA += s._minWidth, hA += s._maxWidth) : aA(s) ? (HA.push(s), GA = Math.max(GA, s._minWidth), fe = Math.max(fe, s._maxWidth)) : we.push(s);
              }), we.forEach((s, I) => {
                if (P(s.width) && /\d+%/.test(s.width)) {
                  let f = 0;
                  if (b) {
                    const iA = b._layout.paddingLeft(I, b), YA = b._layout.paddingRight(I, b), ZA = b._layout.vLineWidth(I, b), oe = b._layout.vLineWidth(I + 1, b);
                    I === 0 ? f = iA + YA + ZA + oe / 2 : I === we.length - 1 ? f = iA + YA + ZA / 2 + oe : f = iA + YA + ZA / 2 + oe / 2;
                  }
                  const S = ye + C;
                  s.width = parseFloat(s.width) * S / 100 - f;
                }
                s.width < s._minWidth && s.elasticWidth ? s._calcWidth = s._minWidth : s._calcWidth = s.width, t -= s._calcWidth;
              });
              let De = gA + GA * HA.length, g = hA + fe * HA.length;
              if (De >= t)
                nA.forEach((s) => {
                  s._calcWidth = s._minWidth;
                }), HA.forEach((s) => {
                  s._calcWidth = GA;
                });
              else {
                if (g < t)
                  nA.forEach((s) => {
                    s._calcWidth = s._maxWidth, t -= s._calcWidth;
                  });
                else {
                  let s = t - De, I = g - De;
                  nA.forEach((f) => {
                    let S = f._maxWidth - f._minWidth;
                    f._calcWidth = f._minWidth + S * s / I, t -= f._calcWidth;
                  });
                }
                if (HA.length > 0) {
                  let s = t / HA.length;
                  HA.forEach((I) => {
                    I._calcWidth = s;
                  });
                }
              }
            }
            function W(NA) {
              return NA.width === "auto";
            }
            function aA(NA) {
              return NA.width === null || NA.width === void 0 || NA.width === "*" || NA.width === "star";
            }
            function j(NA) {
              let t = {
                min: 0,
                max: 0
              }, C = {
                min: 0,
                max: 0
              }, b = 0;
              for (let nA = 0, gA = NA.length; nA < gA; nA++) {
                let hA = NA[nA];
                aA(hA) ? (C.min = Math.max(C.min, hA._minWidth), C.max = Math.max(C.max, hA._maxWidth), b++) : W(hA) ? (t.min += hA._minWidth, t.max += hA._maxWidth) : (t.min += hA.width !== void 0 && hA.width || hA._minWidth, t.max += hA.width !== void 0 && hA.width || hA._maxWidth);
              }
              return b && (t.min += b * C.min, t.max += b * C.max), t;
            }
            const pA = {
              buildColumnWidths: G,
              measureMinMax: j,
              isAutoColumn: W,
              isStarColumn: aA
            }, Be = {
              noBorders: {
                hLineWidth(NA) {
                  return 0;
                },
                vLineWidth(NA) {
                  return 0;
                },
                paddingLeft(NA) {
                  return NA && 4 || 0;
                },
                paddingRight(NA, t) {
                  return NA < t.table.widths.length - 1 ? 4 : 0;
                }
              },
              headerLineOnly: {
                hLineWidth(NA, t) {
                  return NA === 0 || NA === t.table.body.length ? 0 : NA === t.table.headerRows ? 2 : 0;
                },
                vLineWidth(NA) {
                  return 0;
                },
                paddingLeft(NA) {
                  return NA === 0 ? 0 : 8;
                },
                paddingRight(NA, t) {
                  return NA === t.table.widths.length - 1 ? 0 : 8;
                }
              },
              lightHorizontalLines: {
                hLineWidth(NA, t) {
                  return NA === 0 || NA === t.table.body.length ? 0 : NA === t.table.headerRows ? 2 : 1;
                },
                vLineWidth(NA) {
                  return 0;
                },
                hLineColor(NA) {
                  return NA === 1 ? "black" : "#aaa";
                },
                paddingLeft(NA) {
                  return NA === 0 ? 0 : 8;
                },
                paddingRight(NA, t) {
                  return NA === t.table.widths.length - 1 ? 0 : 8;
                }
              }
            }, Ie = {
              hLineWidth(NA, t) {
                return 1;
              },
              vLineWidth(NA, t) {
                return 1;
              },
              hLineColor(NA, t) {
                return "black";
              },
              vLineColor(NA, t) {
                return "black";
              },
              hLineStyle(NA, t) {
                return null;
              },
              vLineStyle(NA, t) {
                return null;
              },
              paddingLeft(NA, t) {
                return 4;
              },
              paddingRight(NA, t) {
                return 4;
              },
              paddingTop(NA, t) {
                return 2;
              },
              paddingBottom(NA, t) {
                return 2;
              },
              fillColor(NA, t) {
                return null;
              },
              fillOpacity(NA, t) {
                return 1;
              },
              defaultBorder: !0
            };
            function ee() {
              let NA = {};
              for (let t = 0, C = arguments.length; t < C; t++) {
                let b = t < 0 || arguments.length <= t ? void 0 : arguments[t];
                if (b)
                  for (let nA in b)
                    b.hasOwnProperty(nA) && (NA[nA] = b[nA]);
              }
              return NA;
            }
            function Me(NA, t, C) {
              switch (NA.type) {
                case "ellipse":
                case "rect":
                  NA.x += t, NA.y += C;
                  break;
                case "line":
                  NA.x1 += t, NA.x2 += t, NA.y1 += C, NA.y2 += C;
                  break;
                case "polyline":
                  for (let b = 0, nA = NA.points.length; b < nA; b++)
                    NA.points[b].x += t, NA.points[b].y += C;
                  break;
              }
            }
            function MA(NA) {
              return () => (
                // copy to new object
                JSON.parse(JSON.stringify(NA))
              );
            }
            for (var be = [null, [[10, 7, 17, 13], [1, 1, 1, 1], []], [[16, 10, 28, 22], [1, 1, 1, 1], [4, 16]], [[26, 15, 22, 18], [1, 1, 2, 2], [4, 20]], [[18, 20, 16, 26], [2, 1, 4, 2], [4, 24]], [[24, 26, 22, 18], [2, 1, 4, 4], [4, 28]], [[16, 18, 28, 24], [4, 2, 4, 4], [4, 32]], [[18, 20, 26, 18], [4, 2, 5, 6], [4, 20, 36]], [[22, 24, 26, 22], [4, 2, 6, 6], [4, 22, 40]], [[22, 30, 24, 20], [5, 2, 8, 8], [4, 24, 44]], [[26, 18, 28, 24], [5, 4, 8, 8], [4, 26, 48]], [[30, 20, 24, 28], [5, 4, 11, 8], [4, 28, 52]], [[22, 24, 28, 26], [8, 4, 11, 10], [4, 30, 56]], [[22, 26, 22, 24], [9, 4, 16, 12], [4, 32, 60]], [[24, 30, 24, 20], [9, 4, 16, 16], [4, 24, 44, 64]], [[24, 22, 24, 30], [10, 6, 18, 12], [4, 24, 46, 68]], [[28, 24, 30, 24], [10, 6, 16, 17], [4, 24, 48, 72]], [[28, 28, 28, 28], [11, 6, 19, 16], [4, 28, 52, 76]], [[26, 30, 28, 28], [13, 6, 21, 18], [4, 28, 54, 80]], [[26, 28, 26, 26], [14, 7, 25, 21], [4, 28, 56, 84]], [[26, 28, 28, 30], [16, 8, 25, 20], [4, 32, 60, 88]], [[26, 28, 30, 28], [17, 8, 25, 23], [4, 26, 48, 70, 92]], [[28, 28, 24, 30], [17, 9, 34, 23], [4, 24, 48, 72, 96]], [[28, 30, 30, 30], [18, 9, 30, 25], [4, 28, 52, 76, 100]], [[28, 30, 30, 30], [20, 10, 32, 27], [4, 26, 52, 78, 104]], [[28, 26, 30, 30], [21, 12, 35, 29], [4, 30, 56, 82, 108]], [[28, 28, 30, 28], [23, 12, 37, 34], [4, 28, 56, 84, 112]], [[28, 30, 30, 30], [25, 12, 40, 34], [4, 32, 60, 88, 116]], [[28, 30, 30, 30], [26, 13, 42, 35], [4, 24, 48, 72, 96, 120]], [[28, 30, 30, 30], [28, 14, 45, 38], [4, 28, 52, 76, 100, 124]], [[28, 30, 30, 30], [29, 15, 48, 40], [4, 24, 50, 76, 102, 128]], [[28, 30, 30, 30], [31, 16, 51, 43], [4, 28, 54, 80, 106, 132]], [[28, 30, 30, 30], [33, 17, 54, 45], [4, 32, 58, 84, 110, 136]], [[28, 30, 30, 30], [35, 18, 57, 48], [4, 28, 56, 84, 112, 140]], [[28, 30, 30, 30], [37, 19, 60, 51], [4, 32, 60, 88, 116, 144]], [[28, 30, 30, 30], [38, 19, 63, 53], [4, 28, 52, 76, 100, 124, 148]], [[28, 30, 30, 30], [40, 20, 66, 56], [4, 22, 48, 74, 100, 126, 152]], [[28, 30, 30, 30], [43, 21, 70, 59], [4, 26, 52, 78, 104, 130, 156]], [[28, 30, 30, 30], [45, 22, 74, 62], [4, 30, 56, 82, 108, 134, 160]], [[28, 30, 30, 30], [47, 24, 77, 65], [4, 24, 52, 80, 108, 136, 164]], [[28, 30, 30, 30], [49, 25, 81, 68], [4, 28, 56, 84, 112, 140, 168]]], at = 0, V = 1, me = 2, Ye = 4, SA = 8, ue = /^\d*$/, Fe = /^[A-Za-z0-9 $%*+\-./:]*$/, tt = /^[A-Z0-9 $%*+\-./:]*$/, We = 1, Ze = 0, Ct = 3, fi = 2, st = [], pt = [-1], Mt = 0, Tt = 1; Mt < 255; ++Mt)
              st.push(Tt), pt[Tt] = Mt, Tt = Tt * 2 ^ (Tt >= 128 ? 285 : 0);
            for (var Zt = [[]], Mt = 0; Mt < 30; ++Mt) {
              for (var yi = Zt[Mt], xi = [], Ot = 0; Ot <= Mt; ++Ot) {
                var bt = Ot < Mt ? st[yi[Ot]] : 0, qt = st[(Mt + (yi[Ot - 1] || 0)) % 255];
                xi.push(pt[bt ^ qt]);
              }
              Zt.push(xi);
            }
            for (var ti = {}, Mt = 0; Mt < 45; ++Mt)
              ti["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(Mt)] = Mt;
            var Ke = [function(NA, t) {
              return (NA + t) % 2 === 0;
            }, function(NA, t) {
              return NA % 2 === 0;
            }, function(NA, t) {
              return t % 3 === 0;
            }, function(NA, t) {
              return (NA + t) % 3 === 0;
            }, function(NA, t) {
              return ((NA / 2 | 0) + (t / 3 | 0)) % 2 === 0;
            }, function(NA, t) {
              return NA * t % 2 + NA * t % 3 === 0;
            }, function(NA, t) {
              return (NA * t % 2 + NA * t % 3) % 2 === 0;
            }, function(NA, t) {
              return ((NA + t) % 2 + NA * t % 3) % 2 === 0;
            }], qe = function(NA) {
              return NA > 6;
            }, Dt = function(NA) {
              return 4 * NA + 17;
            }, ut = function(NA) {
              var t = be[NA], C = 16 * NA * NA + 128 * NA + 64;
              return qe(NA) && (C -= 36), t[2].length && (C -= 25 * t[2].length * t[2].length - 10 * t[2].length - 55), C;
            }, ni = function(NA, t) {
              var C = ut(NA) & -8, b = be[NA];
              return C -= 8 * b[0][t] * b[1][t], C;
            }, wi = function(NA, t) {
              switch (t) {
                case V:
                  return NA < 10 ? 10 : NA < 27 ? 12 : 14;
                case me:
                  return NA < 10 ? 9 : NA < 27 ? 11 : 13;
                case Ye:
                  return NA < 10 ? 8 : 16;
                case SA:
                  return NA < 10 ? 8 : NA < 27 ? 10 : 12;
              }
            }, pi = function(NA, t, C) {
              var b = ni(NA, C) - 4 - wi(NA, t);
              switch (t) {
                case V:
                  return (b / 10 | 0) * 3 + (b % 10 < 4 ? 0 : b % 10 < 7 ? 1 : 2);
                case me:
                  return (b / 11 | 0) * 2 + (b % 11 < 6 ? 0 : 1);
                case Ye:
                  return b / 8 | 0;
                case SA:
                  return b / 13 | 0;
              }
            }, vA = function(NA, t) {
              switch (NA) {
                case V:
                  return t.match(ue) ? t : null;
                case me:
                  return t.match(Fe) ? t.toUpperCase() : null;
                case Ye:
                  if (typeof t == "string") {
                    for (var C = [], b = 0; b < t.length; ++b) {
                      var nA = t.charCodeAt(b);
                      nA < 128 ? C.push(nA) : nA < 2048 ? C.push(192 | nA >> 6, 128 | nA & 63) : nA < 65536 ? C.push(224 | nA >> 12, 128 | nA >> 6 & 63, 128 | nA & 63) : C.push(240 | nA >> 18, 128 | nA >> 12 & 63, 128 | nA >> 6 & 63, 128 | nA & 63);
                    }
                    return C;
                  } else
                    return t;
              }
            }, UA = function(NA, t, C, b) {
              var nA = [], gA = 0, hA = 8, HA = C.length, GA = function(ye, De) {
                if (De >= hA) {
                  for (nA.push(gA | ye >> (De -= hA)); De >= 8; ) nA.push(ye >> (De -= 8) & 255);
                  gA = 0, hA = 8;
                }
                De > 0 && (gA |= (ye & (1 << De) - 1) << (hA -= De));
              }, fe = wi(NA, t);
              switch (GA(t, 4), GA(HA, fe), t) {
                case V:
                  for (var we = 2; we < HA; we += 3)
                    GA(parseInt(C.substring(we - 2, we + 1), 10), 10);
                  GA(parseInt(C.substring(we - 2), 10), [0, 4, 7][HA % 3]);
                  break;
                case me:
                  for (var we = 1; we < HA; we += 2)
                    GA(ti[C.charAt(we - 1)] * 45 + ti[C.charAt(we)], 11);
                  HA % 2 == 1 && GA(ti[C.charAt(we - 1)], 6);
                  break;
                case Ye:
                  for (var we = 0; we < HA; ++we)
                    GA(C[we], 8);
                  break;
              }
              for (GA(at, 4), hA < 8 && nA.push(gA); nA.length + 1 < b; ) nA.push(236, 17);
              return nA.length < b && nA.push(236), nA;
            }, mA = function(NA, t) {
              for (var C = NA.slice(0), b = NA.length, nA = t.length, gA = 0; gA < nA; ++gA) C.push(0);
              for (var gA = 0; gA < b; ) {
                var hA = pt[C[gA++]];
                if (hA >= 0)
                  for (var HA = 0; HA < nA; ++HA)
                    C[gA + HA] ^= st[(hA + t[HA]) % 255];
              }
              return C.slice(b);
            }, _A = function(NA, t, C) {
              for (var b = [], nA = NA.length / t | 0, gA = 0, hA = t - NA.length % t, HA = 0; HA < hA; ++HA)
                b.push(gA), gA += nA;
              for (var HA = hA; HA < t; ++HA)
                b.push(gA), gA += nA + 1;
              b.push(gA);
              for (var GA = [], HA = 0; HA < t; ++HA)
                GA.push(mA(NA.slice(b[HA], b[HA + 1]), C));
              for (var fe = [], we = NA.length / t | 0, HA = 0; HA < we; ++HA)
                for (var ye = 0; ye < t; ++ye)
                  fe.push(NA[b[ye] + HA]);
              for (var ye = hA; ye < t; ++ye)
                fe.push(NA[b[ye + 1] - 1]);
              for (var HA = 0; HA < C.length; ++HA)
                for (var ye = 0; ye < t; ++ye)
                  fe.push(GA[ye][HA]);
              return fe;
            }, $A = function(NA, t, C, b) {
              for (var nA = NA << b, gA = t - 1; gA >= 0; --gA)
                nA >> b + gA & 1 && (nA ^= C << gA);
              return NA << b | nA;
            }, jA = function(NA) {
              for (var t = be[NA], C = Dt(NA), b = [], nA = [], gA = 0; gA < C; ++gA)
                b.push([]), nA.push([]);
              var hA = function(s, I, f, S, iA) {
                for (var YA = 0; YA < f; ++YA)
                  for (var ZA = 0; ZA < S; ++ZA)
                    b[s + YA][I + ZA] = iA[YA] >> ZA & 1, nA[s + YA][I + ZA] = 1;
              };
              hA(0, 0, 9, 9, [127, 65, 93, 93, 93, 65, 383, 0, 64]), hA(C - 8, 0, 8, 9, [256, 127, 65, 93, 93, 93, 65, 127]), hA(0, C - 8, 9, 8, [254, 130, 186, 186, 186, 130, 254, 0, 0]);
              for (var gA = 9; gA < C - 8; ++gA)
                b[6][gA] = b[gA][6] = ~gA & 1, nA[6][gA] = nA[gA][6] = 1;
              for (var HA = t[2], GA = HA.length, gA = 0; gA < GA; ++gA)
                for (var fe = gA === 0 || gA === GA - 1 ? 1 : 0, we = gA === 0 ? GA - 1 : GA, ye = fe; ye < we; ++ye)
                  hA(HA[gA], HA[ye], 5, 5, [31, 17, 21, 17, 31]);
              if (qe(NA))
                for (var De = $A(NA, 6, 7973, 12), g = 0, gA = 0; gA < 6; ++gA)
                  for (var ye = 0; ye < 3; ++ye)
                    b[gA][C - 11 + ye] = b[C - 11 + ye][gA] = De >> g++ & 1, nA[gA][C - 11 + ye] = nA[C - 11 + ye][gA] = 1;
              return {
                matrix: b,
                reserved: nA
              };
            }, le = function(NA, t, C) {
              for (var b = NA.length, nA = 0, gA = -1, hA = b - 1; hA >= 0; hA -= 2) {
                hA == 6 && --hA;
                for (var HA = gA < 0 ? b - 1 : 0, GA = 0; GA < b; ++GA) {
                  for (var fe = hA; fe > hA - 2; --fe)
                    t[HA][fe] || (NA[HA][fe] = C[nA >> 3] >> (~nA & 7) & 1, ++nA);
                  HA += gA;
                }
                gA = -gA;
              }
              return NA;
            }, JA = function(NA, t, C) {
              for (var b = Ke[C], nA = NA.length, gA = 0; gA < nA; ++gA)
                for (var hA = 0; hA < nA; ++hA)
                  t[gA][hA] || (NA[gA][hA] ^= b(gA, hA));
              return NA;
            }, ne = function(NA, t, C, b) {
              for (var nA = NA.length, gA = $A(C << 3 | b, 5, 1335, 10) ^ 21522, hA = 0; hA < 15; ++hA) {
                var HA = [0, 1, 2, 3, 4, 5, 7, 8, nA - 7, nA - 6, nA - 5, nA - 4, nA - 3, nA - 2, nA - 1][hA], GA = [nA - 1, nA - 2, nA - 3, nA - 4, nA - 5, nA - 6, nA - 7, nA - 8, 7, 5, 4, 3, 2, 1, 0][hA];
                NA[HA][8] = NA[8][GA] = gA >> hA & 1;
              }
              return NA;
            }, ae = function(NA) {
              for (var t = 3, C = 3, b = 40, nA = 10, gA = function(f) {
                for (var S = 0, iA = 0; iA < f.length; ++iA)
                  f[iA] >= 5 && (S += t + (f[iA] - 5));
                for (var iA = 5; iA < f.length; iA += 2) {
                  var YA = f[iA];
                  f[iA - 1] == YA && f[iA - 2] == 3 * YA && f[iA - 3] == YA && f[iA - 4] == YA && (f[iA - 5] >= 4 * YA || f[iA + 1] >= 4 * YA) && (S += b);
                }
                return S;
              }, hA = NA.length, HA = 0, GA = 0, fe = 0; fe < hA; ++fe) {
                var we = NA[fe], ye;
                ye = [0];
                for (var De = 0; De < hA; ) {
                  var g;
                  for (g = 0; De < hA && we[De]; ++g) ++De;
                  for (ye.push(g), g = 0; De < hA && !we[De]; ++g) ++De;
                  ye.push(g);
                }
                HA += gA(ye), ye = [0];
                for (var De = 0; De < hA; ) {
                  var g;
                  for (g = 0; De < hA && NA[De][fe]; ++g) ++De;
                  for (ye.push(g), g = 0; De < hA && !NA[De][fe]; ++g) ++De;
                  ye.push(g);
                }
                HA += gA(ye);
                var s = NA[fe + 1] || [];
                GA += we[0];
                for (var De = 1; De < hA; ++De) {
                  var I = we[De];
                  GA += I, we[De - 1] == I && s[De] === I && s[De - 1] === I && (HA += C);
                }
              }
              return HA += nA * (Math.abs(GA / hA / hA - 0.5) / 0.05 | 0), HA;
            }, ve = function(NA, t, C, b, nA) {
              var gA = be[t], hA = UA(t, C, NA, ni(t, b) >> 3);
              hA = _A(hA, gA[1][b], Zt[gA[0][b]]);
              var HA = jA(t), GA = HA.matrix, fe = HA.reserved;
              if (le(GA, fe, hA), nA < 0) {
                JA(GA, fe, 0), ne(GA, fe, b, 0);
                var we = 0, ye = ae(GA);
                for (JA(GA, fe, 0), nA = 1; nA < 8; ++nA) {
                  JA(GA, fe, nA), ne(GA, fe, b, nA);
                  var De = ae(GA);
                  ye > De && (ye = De, we = nA), JA(GA, fe, nA);
                }
                nA = we;
              }
              return JA(GA, fe, nA), ne(GA, fe, b, nA), GA;
            };
            function ze(NA, t) {
              var C = {
                numeric: V,
                alphanumeric: me,
                octet: Ye
              }, b = {
                L: We,
                M: Ze,
                Q: Ct,
                H: fi
              };
              t = t || {};
              var nA = t.version || -1, gA = b[(t.eccLevel || "L").toUpperCase()], hA = t.mode ? C[t.mode.toLowerCase()] : -1, HA = "mask" in t ? t.mask : -1;
              if (hA < 0)
                typeof NA == "string" ? NA.match(ue) ? hA = V : NA.match(tt) ? hA = me : hA = Ye : hA = Ye;
              else if (!(hA == V || hA == me || hA == Ye))
                throw "invalid or unsupported mode";
              if (NA = vA(hA, NA), NA === null) throw "invalid data format";
              if (gA < 0 || gA > 3) throw "invalid ECC level";
              if (nA < 0) {
                for (nA = 1; nA <= 40 && !(NA.length <= pi(nA, hA, gA)); ++nA)
                  ;
                if (nA > 40) throw "too large data for the Qr format";
              } else if (nA < 1 || nA > 40)
                throw "invalid Qr version! should be between 1 and 40";
              if (HA != -1 && (HA < 0 || HA > 8)) throw "invalid mask";
              return ve(NA, nA, hA, gA, HA);
            }
            function At(NA, t) {
              var C = [], b = t.background || "#fff", nA = t.foreground || "#000", gA = t.padding || 0, hA = ze(NA, t), HA = hA.length, GA = Math.floor(t.fit ? t.fit / HA : 5), fe = HA * GA + GA * gA * 2, we = GA * gA;
              C.push({
                type: "rect",
                x: 0,
                y: 0,
                w: fe,
                h: fe,
                lineWidth: 0,
                color: b
              });
              for (var ye = 0; ye < HA; ++ye)
                for (var De = 0; De < HA; ++De)
                  hA[ye][De] && C.push({
                    type: "rect",
                    x: GA * De + we,
                    y: GA * ye + we,
                    w: GA,
                    h: GA,
                    lineWidth: 0,
                    color: nA
                  });
              return {
                canvas: C,
                size: fe
              };
            }
            function Bt(NA) {
              var t = At(NA.qr, NA);
              return NA._canvas = t.canvas, NA._width = NA._height = NA._minWidth = NA._maxWidth = NA._minHeight = NA._maxHeight = t.size, NA;
            }
            const He = {
              measure: Bt
            };
            class Ce {
              constructor(t, C, b, nA, gA) {
                this.pdfDocument = t, this.textInlines = new R(t), this.styleStack = new ie(C, b), this.svgMeasure = nA, this.tableLayouts = gA, this.autoImageIndex = 1;
              }
              /**
               * Measures all nodes and sets min/max-width properties required for the second
               * layout-pass.
               *
               * @param {object} docStructure document-definition-object
               * @returns {object} document-measurement-object
               */
              measureDocument(t) {
                return this.measureNode(t);
              }
              measureBlock(t) {
                return this.measureNode(t);
              }
              measureNode(t) {
                return this.styleStack.auto(t, () => {
                  if (t._margin = eA(t, this.styleStack), t.section)
                    return C(this.measureSection(t));
                  if (t.columns)
                    return C(this.measureColumns(t));
                  if (t.stack)
                    return C(this.measureVerticalContainer(t));
                  if (t.ul)
                    return C(this.measureUnorderedList(t));
                  if (t.ol)
                    return C(this.measureOrderedList(t));
                  if (t.table)
                    return C(this.measureTable(t));
                  if (t.text !== void 0)
                    return C(this.measureLeaf(t));
                  if (t.toc)
                    return C(this.measureToc(t));
                  if (t.image)
                    return C(this.measureImage(t));
                  if (t.svg)
                    return C(this.measureSVG(t));
                  if (t.canvas)
                    return C(this.measureCanvas(t));
                  if (t.qr)
                    return C(this.measureQr(t));
                  if (t.attachment)
                    return C(this.measureAttachment(t));
                  throw new Error(`Unrecognized document structure: ${T(t)}`);
                });
                function C(b) {
                  let nA = b._margin;
                  return nA && (b._minWidth += nA[0] + nA[2], b._maxWidth += nA[0] + nA[2]), b;
                }
              }
              measureImageWithDimensions(t, C) {
                if (t.fit) {
                  let b = C.width / C.height > t.fit[0] / t.fit[1] ? t.fit[0] / C.width : t.fit[1] / C.height;
                  t._width = t._minWidth = t._maxWidth = C.width * b, t._height = C.height * b;
                } else if (t.cover)
                  t._width = t._minWidth = t._maxWidth = t.cover.width, t._height = t._minHeight = t._maxHeight = t.cover.height;
                else {
                  let b = d(t.width) ? t.width : void 0, nA = d(t.height) ? t.height : void 0, gA = C.width / C.height;
                  t._width = t._minWidth = t._maxWidth = b || (nA ? nA * gA : C.width), t._height = nA || (b ? b / gA : C.height), d(t.maxWidth) && t.maxWidth < t._width && (t._width = t._minWidth = t._maxWidth = t.maxWidth, t._height = t._width * C.height / C.width), d(t.maxHeight) && t.maxHeight < t._height && (t._height = t.maxHeight, t._width = t._minWidth = t._maxWidth = t._height * C.width / C.height), d(t.minWidth) && t.minWidth > t._width && (t._width = t._minWidth = t._maxWidth = t.minWidth, t._height = t._width * C.height / C.width), d(t.minHeight) && t.minHeight > t._height && (t._height = t.minHeight, t._width = t._minWidth = t._maxWidth = t._height * C.width / C.height);
                }
                t._alignment = this.styleStack.getProperty("alignment");
              }
              convertIfBase64Image(t) {
                if (/^data:image\/(jpeg|jpg|png);base64,/.test(t.image)) {
                  let C = `$$pdfmake$$${this.autoImageIndex++}`;
                  this.pdfDocument.images[C] = t.image, t.image = C;
                }
              }
              measureImage(t) {
                this.convertIfBase64Image(t);
                let C = this.pdfDocument.provideImage(t.image), b = {
                  width: C.width,
                  height: C.height
                };
                return C.orientation > 4 && (b = {
                  width: C.height,
                  height: C.width
                }), this.measureImageWithDimensions(t, b), t;
              }
              measureSVG(t) {
                let C = this.svgMeasure.measureSVG(t.svg);
                if (this.measureImageWithDimensions(t, C), t.font = this.styleStack.getProperty("font"), !d(t._width) && !d(t._height))
                  throw new Error("SVG is missing defined width and height.");
                if (d(t._width)) {
                  if (!d(t._height))
                    throw new Error("SVG is missing defined height.");
                } else throw new Error("SVG is missing defined width.");
                return t.svg = this.svgMeasure.writeDimensions(t.svg, {
                  width: t._width,
                  height: t._height
                }), t;
              }
              measureLeaf(t) {
                t._textRef && t._textRef._textNodeRef.text && (t.text = t._textRef._textNodeRef.text);
                let C = this.styleStack.clone();
                C.push(t);
                let b = this.textInlines.buildInlines(t.text, C);
                return t._inlines = b.items, t._minWidth = b.minWidth, t._maxWidth = b.maxWidth, t;
              }
              measureToc(t) {
                if (t.toc.title && (t.toc.title = this.measureNode(t.toc.title)), t.toc._items.length > 0) {
                  let C = [], b = t.toc.textStyle || {}, nA = t.toc.numberStyle || b, gA = t.toc.textMargin || [0, 0, 0, 0];
                  t.toc.sortBy === "title" && t.toc._items.sort((hA, HA) => hA._textNodeRef.text.localeCompare(HA._textNodeRef.text, t.toc.sortLocale));
                  for (let hA = 0, HA = t.toc._items.length; hA < HA; hA++) {
                    let GA = t.toc._items[hA], fe = GA._textNodeRef.tocStyle || b, we = GA._textNodeRef.tocMargin || gA, ye = GA._textNodeRef.tocNumberStyle || nA, De = H(GA._nodeRef);
                    C.push([{
                      text: GA._textNodeRef.text,
                      linkToDestination: De,
                      alignment: "left",
                      style: fe,
                      margin: we
                    }, {
                      text: "00000",
                      linkToDestination: De,
                      alignment: "right",
                      _tocItemRef: GA._nodeRef,
                      style: ye,
                      margin: [0, we[1], 0, we[3]]
                    }]), t.toc.outlines && (GA._textNodeRef.outline = GA._textNodeRef.outline || !0);
                  }
                  t.toc._table = {
                    table: {
                      dontBreakRows: !0,
                      widths: ["*", "auto"],
                      body: C
                    },
                    layout: "noBorders"
                  }, t.toc._table = this.measureNode(t.toc._table);
                }
                return t;
              }
              measureVerticalContainer(t) {
                let C = t.stack;
                t._minWidth = 0, t._maxWidth = 0;
                for (let b = 0, nA = C.length; b < nA; b++)
                  C[b] = this.measureNode(C[b]), t._minWidth = Math.max(t._minWidth, C[b]._minWidth), t._maxWidth = Math.max(t._maxWidth, C[b]._maxWidth);
                return t;
              }
              gapSizeForList() {
                return this.textInlines.sizeOfText("9. ", this.styleStack);
              }
              buildUnorderedMarker(t, C, b, nA) {
                function gA(we, ye) {
                  let De = we.fontSize / 6;
                  return {
                    canvas: [{
                      x: De,
                      y: we.height / we.lineHeight + we.descender - we.fontSize / 3,
                      r1: De,
                      r2: De,
                      type: "ellipse",
                      color: ye
                    }]
                  };
                }
                function hA(we, ye) {
                  let De = we.fontSize / 3;
                  return {
                    canvas: [{
                      x: 0,
                      y: we.height / we.lineHeight + we.descender - we.fontSize / 3 - De / 2,
                      h: De,
                      w: De,
                      type: "rect",
                      color: ye
                    }]
                  };
                }
                function HA(we, ye) {
                  let De = we.fontSize / 6;
                  return {
                    canvas: [{
                      x: De,
                      y: we.height / we.lineHeight + we.descender - we.fontSize / 3,
                      r1: De,
                      r2: De,
                      type: "ellipse",
                      lineColor: ye
                    }]
                  };
                }
                let GA, fe = ie.getStyleProperty(t, C, "markerColor", void 0) || C.getProperty("color") || "black";
                switch (nA) {
                  case "circle":
                    GA = HA(b, fe);
                    break;
                  case "square":
                    GA = hA(b, fe);
                    break;
                  case "none":
                    GA = {};
                    break;
                  case "disc":
                  default:
                    GA = gA(b, fe);
                    break;
                }
                return GA._minWidth = GA._maxWidth = b.width, GA._minHeight = GA._maxHeight = b.height, GA;
              }
              buildOrderedMarker(t, C, b, nA, gA) {
                function hA(De) {
                  function g(s) {
                    return (s >= 26 ? g((s / 26 >> 0) - 1) : "") + "abcdefghijklmnopqrstuvwxyz"[s % 26 >> 0];
                  }
                  return De < 1 ? De.toString() : g(De - 1);
                }
                function HA(De) {
                  if (De < 1 || De > 4999)
                    return De.toString();
                  let g = De, s = {
                    M: 1e3,
                    CM: 900,
                    D: 500,
                    CD: 400,
                    C: 100,
                    XC: 90,
                    L: 50,
                    XL: 40,
                    X: 10,
                    IX: 9,
                    V: 5,
                    IV: 4,
                    I: 1
                  }, I = "";
                  for (let f in s)
                    for (; g >= s[f]; )
                      I += f, g -= s[f];
                  return I;
                }
                function GA(De) {
                  return De.toString();
                }
                let fe;
                switch (nA) {
                  case "none":
                    fe = null;
                    break;
                  case "upper-alpha":
                    fe = hA(C).toUpperCase();
                    break;
                  case "lower-alpha":
                    fe = hA(C);
                    break;
                  case "upper-roman":
                    fe = HA(C);
                    break;
                  case "lower-roman":
                    fe = HA(C).toLowerCase();
                    break;
                  case "decimal":
                  default:
                    fe = GA(C);
                    break;
                }
                if (fe === null)
                  return {};
                gA && (Array.isArray(gA) ? (gA[0] && (fe = gA[0] + fe), gA[1] && (fe += gA[1]), fe += " ") : fe += `${gA} `);
                let we = ie.getStyleProperty(t, b, "markerColor", void 0) || b.getProperty("color") || "black", ye = {
                  text: fe,
                  color: we
                };
                return {
                  _inlines: this.textInlines.buildInlines(ye, b).items
                };
              }
              measureUnorderedList(t) {
                let C = this.styleStack.clone(), b = t.ul;
                t.type = t.type || "disc", t._gapSize = this.gapSizeForList(), t._minWidth = 0, t._maxWidth = 0;
                for (let nA = 0, gA = b.length; nA < gA; nA++) {
                  let hA = b[nA] = this.measureNode(b[nA]);
                  !hA.ol && !hA.ul && (hA.listMarker = this.buildUnorderedMarker(hA, C, t._gapSize, hA.listType || t.type)), t._minWidth = Math.max(t._minWidth, b[nA]._minWidth + t._gapSize.width), t._maxWidth = Math.max(t._maxWidth, b[nA]._maxWidth + t._gapSize.width);
                }
                return t;
              }
              measureOrderedList(t) {
                let C = this.styleStack.clone(), b = t.ol;
                t.type = t.type || "decimal", t.separator = t.separator || ".", t.reversed = t.reversed || !1, d(t.start) || (t.start = t.reversed ? b.length : 1), t._gapSize = this.gapSizeForList(), t._minWidth = 0, t._maxWidth = 0;
                let nA = t.start;
                for (let gA = 0, hA = b.length; gA < hA; gA++) {
                  let HA = b[gA] = this.measureNode(b[gA]);
                  if (!HA.ol && !HA.ul) {
                    let GA = d(HA.counter) ? HA.counter : nA;
                    HA.listMarker = this.buildOrderedMarker(HA, GA, C, HA.listType || t.type, t.separator), HA.listMarker._inlines && (t._gapSize.width = Math.max(t._gapSize.width, HA.listMarker._inlines[0].width)), t.reversed ? nA-- : nA++;
                  }
                  t._minWidth = Math.max(t._minWidth, b[gA]._minWidth), t._maxWidth = Math.max(t._maxWidth, b[gA]._maxWidth);
                }
                t._minWidth += t._gapSize.width, t._maxWidth += t._gapSize.width;
                for (let gA = 0, hA = b.length; gA < hA; gA++) {
                  let HA = b[gA];
                  !HA.ol && !HA.ul && (HA.listMarker._minWidth = HA.listMarker._maxWidth = t._gapSize.width);
                }
                return t;
              }
              measureSection(t) {
                return t.section = this.measureNode(t.section), t;
              }
              measureColumns(t) {
                let C = t.columns;
                t._gap = this.styleStack.getProperty("columnGap") || 0;
                for (let gA = 0, hA = C.length; gA < hA; gA++)
                  C[gA] = this.measureNode(C[gA]);
                let b = pA.measureMinMax(C), nA = C.length > 0 ? C.length - 1 : 0;
                return t._minWidth = b.min + t._gap * nA, t._maxWidth = b.max + t._gap * nA, t;
              }
              measureTable(t) {
                I(t), t._layout = fe(this.tableLayouts), t._offsets = we(t._layout);
                let C = [], b, nA, gA, hA;
                for (b = 0, gA = t.table.body[0].length; b < gA; b++) {
                  let f = t.table.widths[b];
                  for (f._minWidth = 0, f._maxWidth = 0, nA = 0, hA = t.table.body.length; nA < hA; nA++) {
                    let S = t.table.body[nA], iA = S[b];
                    if (iA === void 0)
                      throw new Error(`Malformed table row, a cell is undefined.
Row index: ${nA}
Column index: ${b}
Row data: ${T(S)}`);
                    iA === null && (iA = ""), iA._span || (iA = S[b] = this.styleStack.auto(iA, GA(this, iA)), iA.colSpan && iA.colSpan > 1 ? (g(S, b, iA.colSpan), C.push({
                      col: b,
                      span: iA.colSpan,
                      minWidth: iA._minWidth,
                      maxWidth: iA._maxWidth
                    })) : (f._minWidth = Math.max(f._minWidth, iA._minWidth), f._maxWidth = Math.max(f._maxWidth, iA._maxWidth))), iA.rowSpan && iA.rowSpan > 1 && s(t.table, nA, b, iA.rowSpan);
                  }
                }
                ye();
                let HA = pA.measureMinMax(t.table.widths);
                return t._minWidth = HA.min + t._offsets.total, t._maxWidth = HA.max + t._offsets.total, t;
                function GA(f, S) {
                  return () => (q(S) && (S.fillColor = f.styleStack.getProperty("fillColor"), S.fillOpacity = f.styleStack.getProperty("fillOpacity")), f.measureNode(S));
                }
                function fe(f) {
                  let S = t.layout;
                  return P(S) && (S = f[S]), ee(Ie, S);
                }
                function we(f) {
                  let S = [], iA = 0, YA = 0;
                  for (let ZA = 0, oe = t.table.widths.length; ZA < oe; ZA++) {
                    let pe = YA + f.vLineWidth(ZA, t) + f.paddingLeft(ZA, t);
                    S.push(pe), iA += pe, YA = f.paddingRight(ZA, t);
                  }
                  return iA += YA + f.vLineWidth(t.table.widths.length, t), {
                    total: iA,
                    offsets: S
                  };
                }
                function ye() {
                  let f, S;
                  for (let iA = 0, YA = C.length; iA < YA; iA++) {
                    let ZA = C[iA], oe = De(ZA.col, ZA.span, t._offsets), pe = ZA.minWidth - oe.minWidth, xe = ZA.maxWidth - oe.maxWidth;
                    if (pe > 0)
                      for (f = pe / ZA.span, S = 0; S < ZA.span; S++)
                        t.table.widths[ZA.col + S]._minWidth += f;
                    if (xe > 0)
                      for (f = xe / ZA.span, S = 0; S < ZA.span; S++)
                        t.table.widths[ZA.col + S]._maxWidth += f;
                  }
                }
                function De(f, S, iA) {
                  let YA = {
                    minWidth: 0,
                    maxWidth: 0
                  };
                  for (let ZA = 0; ZA < S; ZA++)
                    YA.minWidth += t.table.widths[f + ZA]._minWidth + (ZA ? iA.offsets[f + ZA] : 0), YA.maxWidth += t.table.widths[f + ZA]._maxWidth + (ZA ? iA.offsets[f + ZA] : 0);
                  return YA;
                }
                function g(f, S, iA) {
                  for (let YA = 1; YA < iA; YA++)
                    f[S + YA] = {
                      _span: !0,
                      _minWidth: 0,
                      _maxWidth: 0,
                      rowSpan: f[S].rowSpan
                    };
                }
                function s(f, S, iA, YA) {
                  for (let ZA = 1; ZA < YA; ZA++)
                    f.body[S + ZA][iA] = {
                      _span: !0,
                      _minWidth: 0,
                      _maxWidth: 0,
                      fillColor: f.body[S][iA].fillColor,
                      fillOpacity: f.body[S][iA].fillOpacity
                    };
                }
                function I(f) {
                  if (f.table.widths || (f.table.widths = "auto"), P(f.table.widths))
                    for (f.table.widths = [f.table.widths]; f.table.widths.length < f.table.body[0].length; )
                      f.table.widths.push(f.table.widths[f.table.widths.length - 1]);
                  for (let S = 0, iA = f.table.widths.length; S < iA; S++) {
                    let YA = f.table.widths[S];
                    (d(YA) || P(YA)) && (f.table.widths[S] = {
                      width: YA
                    });
                  }
                }
              }
              measureCanvas(t) {
                let C = 0, b = 0;
                for (let nA = 0, gA = t.canvas.length; nA < gA; nA++) {
                  let hA = t.canvas[nA];
                  switch (hA.type) {
                    case "ellipse":
                      C = Math.max(C, hA.x + hA.r1), b = Math.max(b, hA.y + hA.r2);
                      break;
                    case "rect":
                      C = Math.max(C, hA.x + hA.w), b = Math.max(b, hA.y + hA.h);
                      break;
                    case "line":
                      C = Math.max(C, hA.x1, hA.x2), b = Math.max(b, hA.y1, hA.y2);
                      break;
                    case "polyline":
                      for (let HA = 0, GA = hA.points.length; HA < GA; HA++)
                        C = Math.max(C, hA.points[HA].x), b = Math.max(b, hA.points[HA].y);
                      break;
                  }
                }
                return t._minWidth = t._maxWidth = C, t._minHeight = t._maxHeight = b, t._alignment = this.styleStack.getProperty("alignment"), t;
              }
              measureQr(t) {
                return t = He.measure(t), t._alignment = this.styleStack.getProperty("alignment"), t;
              }
              measureAttachment(t) {
                return t._width = t.width || 7, t._height = t.height || 18, t;
              }
            }
            const je = Ce;
            var it = r(4785);
            class Et extends it.EventEmitter {
              constructor() {
                super(), this.pages = [], this.pageMargins = void 0, this.x = void 0, this.availableWidth = void 0, this.availableHeight = void 0, this.page = -1, this.snapshots = [], this.backgroundLength = [];
              }
              beginColumnGroup(t, C, b, nA, gA) {
                C === void 0 && (C = {}), b === void 0 && (b = !1), nA === void 0 && (nA = 0), gA === void 0 && (gA = null), this.snapshots.push({
                  x: this.x,
                  y: this.y,
                  availableHeight: this.availableHeight,
                  availableWidth: this.availableWidth,
                  page: this.page,
                  bottomByPage: C || {},
                  bottomMost: {
                    x: this.x,
                    y: this.y,
                    availableHeight: this.availableHeight,
                    availableWidth: this.availableWidth,
                    page: this.page
                  },
                  lastColumnWidth: this.lastColumnWidth,
                  snakingColumns: b,
                  gap: nA,
                  columnWidths: gA
                }), this.lastColumnWidth = 0, t && (this.marginXTopParent = t);
              }
              updateBottomByPage() {
                const t = this.snapshots[this.snapshots.length - 1];
                if (!t)
                  return;
                const C = this.page;
                let b = -Number.MIN_VALUE;
                t.bottomByPage && t.bottomByPage[C] && (b = t.bottomByPage[C]), t.bottomByPage && (t.bottomByPage[C] = Math.max(b, this.y));
              }
              resetMarginXTopParent() {
                this.marginXTopParent = null;
              }
              /**
               * Find the most recent (deepest) snaking column group snapshot.
               * @returns {object|null}
               */
              getSnakingSnapshot() {
                for (let t = this.snapshots.length - 1; t >= 0; t--)
                  if (this.snapshots[t].snakingColumns)
                    return this.snapshots[t];
                return null;
              }
              inSnakingColumns() {
                return !!this.getSnakingSnapshot();
              }
              /**
               * Check if we're inside a nested non-snaking column group (e.g., a table row)
               * within an outer snaking column group. This is used to prevent snaking-specific
               * breaks inside table cells — the table's own page break mechanism should handle
               * row breaks, and column breaks should happen between rows.
               * @returns {boolean}
               */
              isInNestedNonSnakingGroup() {
                for (let t = this.snapshots.length - 1; t >= 0; t--) {
                  let C = this.snapshots[t];
                  if (C.snakingColumns)
                    return !1;
                  if (!C.overflowed)
                    return !0;
                }
                return !1;
              }
              beginColumn(t, C, b) {
                let nA = this.snapshots[this.snapshots.length - 1];
                if (nA && nA.overflowed) {
                  for (let gA = this.snapshots.length - 1; gA >= 0; gA--)
                    if (!this.snapshots[gA].overflowed) {
                      nA = this.snapshots[gA];
                      break;
                    }
                }
                this.calculateBottomMost(nA, b), this.page = nA.page, this.x = this.x + this.lastColumnWidth + (C || 0), this.y = nA.y, this.availableWidth = t, this.availableHeight = nA.availableHeight, this.lastColumnWidth = t;
              }
              calculateBottomMost(t, C) {
                C ? this.saveContextInEndingCell(C) : t.bottomMost = Rt(this, t.bottomMost);
              }
              markEnding(t, C, b) {
                this.page = t._columnEndingContext.page, this.x = t._columnEndingContext.x + C, this.y = t._columnEndingContext.y - b, this.availableWidth = t._columnEndingContext.availableWidth, this.availableHeight = t._columnEndingContext.availableHeight, this.lastColumnWidth = t._columnEndingContext.lastColumnWidth;
              }
              saveContextInEndingCell(t) {
                t._columnEndingContext = {
                  page: this.page,
                  x: this.x,
                  y: this.y,
                  availableHeight: this.availableHeight,
                  availableWidth: this.availableWidth,
                  lastColumnWidth: this.lastColumnWidth
                };
              }
              completeColumnGroup(t, C) {
                let b = this.snapshots.pop(), nA = this.y, gA = this.page, hA = this.availableHeight;
                for (; b && b.overflowed; ) {
                  let GA = Rt({
                    page: gA,
                    y: nA,
                    availableHeight: hA
                  }, b.bottomMost || {});
                  gA = GA.page, nA = GA.y, hA = GA.availableHeight, b = this.snapshots.pop();
                }
                if (!b)
                  return {};
                (gA > b.bottomMost.page || gA === b.bottomMost.page && nA > b.bottomMost.y) && (b.bottomMost = {
                  x: b.x,
                  y: nA,
                  page: gA,
                  availableHeight: hA,
                  availableWidth: b.availableWidth
                }), this.calculateBottomMost(b, C), this.x = b.x;
                let HA = b.bottomMost.y;
                return t && (b.page === b.bottomMost.page ? b.y + t > HA && (HA = b.y + t) : HA += t), this.y = HA, this.page = b.bottomMost.page, this.availableWidth = b.availableWidth, this.availableHeight = b.bottomMost.availableHeight, t && (this.availableHeight -= HA - b.bottomMost.y), t && b.bottomMost.y - b.y < t ? this.height = t : this.height = b.bottomMost.y - b.y, this.lastColumnWidth = b.lastColumnWidth, b.bottomByPage;
              }
              /**
               * Move to the next column in a column group (snaking columns).
               * Creates an overflowed snapshot to track that we've moved to the next column.
               * @returns {object} Position info for the new column
               */
              moveToNextColumn() {
                let t = this.y, C = this.getSnakingSnapshot();
                if (!C)
                  return {
                    prevY: t,
                    y: this.y
                  };
                this.calculateBottomMost(C, null);
                let b = 0;
                for (let GA = this.snapshots.length - 1; GA >= 0 && this.snapshots[GA].overflowed; GA--)
                  b++;
                let nA = C.columnWidths && C.columnWidths[b] || this.lastColumnWidth || this.availableWidth, gA = C.columnWidths && C.columnWidths[b + 1] || nA;
                this.lastColumnWidth = gA;
                let hA = this.x + (nA || 0) + (C.gap || 0), HA = C.y;
                this.snapshots.push({
                  x: hA,
                  y: HA,
                  availableHeight: C.availableHeight,
                  availableWidth: gA,
                  page: this.page,
                  overflowed: !0,
                  bottomMost: {
                    x: hA,
                    y: HA,
                    availableHeight: C.availableHeight,
                    availableWidth: gA,
                    page: this.page
                  },
                  lastColumnWidth: gA,
                  snakingColumns: !0,
                  gap: C.gap,
                  columnWidths: C.columnWidths
                }), this.x = hA, this.y = HA, this.availableHeight = C.availableHeight, this.availableWidth = gA;
                for (let GA = this.snapshots.length - 2; GA >= 0; GA--) {
                  let fe = this.snapshots[GA];
                  if (fe.overflowed || fe.snakingColumns)
                    break;
                  fe.x = hA, fe.y = HA, fe.page = this.page, fe.availableHeight = C.availableHeight, fe.bottomMost && (fe.bottomMost.x = hA, fe.bottomMost.y = HA, fe.bottomMost.page = this.page, fe.bottomMost.availableHeight = C.availableHeight);
                }
                return {
                  prevY: t,
                  y: this.y
                };
              }
              /**
               * Reset snaking column state when moving to a new page.
               * Clears overflowed snapshots, resets X to left margin, sets width to first column,
               * and syncs all snapshots to new page coordinates.
               */
              resetSnakingColumnsForNewPage() {
                let t = this.getSnakingSnapshot();
                if (!t)
                  return;
                let C = this.pageMargins.top, b = this.getCurrentPage().pageSize.height - this.pageMargins.top - this.pageMargins.bottom, nA = t.columnWidths ? t.columnWidths[0] : this.lastColumnWidth || this.availableWidth;
                for (; this.snapshots.length > 1 && this.snapshots[this.snapshots.length - 1].overflowed; )
                  this.snapshots.pop();
                this.marginXTopParent ? this.x = this.pageMargins.left + this.marginXTopParent[0] : this.x = this.pageMargins.left, this.availableWidth = nA, this.lastColumnWidth = nA;
                for (let gA = 0; gA < this.snapshots.length; gA++) {
                  let hA = this.snapshots[gA], HA = !!hA.snakingColumns;
                  hA.x = this.x, hA.y = HA ? C : this.y, hA.availableHeight = HA ? b : this.availableHeight, hA.page = this.page, hA.bottomMost && (hA.bottomMost.x = this.x, hA.bottomMost.y = HA ? C : this.y, hA.bottomMost.availableHeight = HA ? b : this.availableHeight, hA.bottomMost.page = this.page);
                }
              }
              addMargin(t, C) {
                this.x += t, this.availableWidth -= t + (C || 0);
              }
              moveDown(t) {
                return this.y += t, this.availableHeight -= t, this.availableHeight > 0;
              }
              initializePage() {
                this.y = this.pageMargins.top, this.availableHeight = this.getCurrentPage().pageSize.height - this.pageMargins.top - this.pageMargins.bottom;
                const {
                  pageCtx: t,
                  isSnapshot: C
                } = this.pageSnapshot();
                t.availableWidth = this.getCurrentPage().pageSize.width - this.pageMargins.left - this.pageMargins.right, C && this.marginXTopParent && (t.availableWidth -= this.marginXTopParent[0], t.availableWidth -= this.marginXTopParent[1]);
              }
              pageSnapshot() {
                return this.snapshots[0] ? {
                  pageCtx: this.snapshots[0],
                  isSnapshot: !0
                } : {
                  pageCtx: this,
                  isSnapshot: !1
                };
              }
              moveTo(t, C) {
                t != null && (this.x = t, this.availableWidth = this.getCurrentPage().pageSize.width - this.x - this.pageMargins.right), C != null && (this.y = C, this.availableHeight = this.getCurrentPage().pageSize.height - this.y - this.pageMargins.bottom);
              }
              moveToRelative(t, C) {
                t != null && (this.x = this.x + t), C != null && (this.y = this.y + C);
              }
              beginDetachedBlock() {
                this.snapshots.push({
                  x: this.x,
                  y: this.y,
                  availableHeight: this.availableHeight,
                  availableWidth: this.availableWidth,
                  page: this.page,
                  lastColumnWidth: this.lastColumnWidth
                });
              }
              endDetachedBlock() {
                let t = this.snapshots.pop();
                this.x = t.x, this.y = t.y, this.availableWidth = t.availableWidth, this.availableHeight = t.availableHeight, this.page = t.page, this.lastColumnWidth = t.lastColumnWidth;
              }
              moveToNextPage(t) {
                let C = this.page + 1, b = this.page, nA = this.y;
                if (this.snapshots.length > 0) {
                  let hA = this.snapshots[this.snapshots.length - 1];
                  hA.bottomMost && hA.bottomMost.y && (nA = Math.max(this.y, hA.bottomMost.y));
                }
                let gA = C >= this.pages.length;
                if (gA) {
                  let hA = this.availableWidth, HA = this.getCurrentPage().pageSize.orientation, GA = Qt(this.getCurrentPage(), t);
                  this.addPage(GA, null, this.getCurrentPage().customProperties), HA === GA.orientation && (this.availableWidth = hA);
                } else
                  this.page = C, this.initializePage();
                return {
                  newPageCreated: gA,
                  prevPage: b,
                  prevY: nA,
                  y: this.y
                };
              }
              addPage(t, C, b) {
                C === void 0 && (C = null), b === void 0 && (b = {}), C !== null && (this.pageMargins = C, this.x = C.left, this.availableWidth = t.width - C.left - C.right);
                let nA = {
                  items: [],
                  pageSize: t,
                  pageMargins: this.pageMargins,
                  customProperties: b
                };
                return this.pages.push(nA), this.backgroundLength.push(0), this.page = this.pages.length - 1, this.initializePage(), this.emit("pageAdded", nA), nA;
              }
              getCurrentPage() {
                return this.page < 0 || this.page >= this.pages.length ? null : this.pages[this.page];
              }
              getCurrentPosition() {
                let t = this.getCurrentPage().pageSize, C = t.height - this.pageMargins.top - this.pageMargins.bottom, b = t.width - this.pageMargins.left - this.pageMargins.right;
                return {
                  pageNumber: this.page + 1,
                  pageOrientation: t.orientation,
                  pageInnerHeight: C,
                  pageInnerWidth: b,
                  left: this.x,
                  top: this.y,
                  verticalRatio: (this.y - this.pageMargins.top) / C,
                  horizontalRatio: (this.x - this.pageMargins.left) / b
                };
              }
            }
            function Ft(NA, t) {
              return NA === void 0 ? t : P(NA) && NA.toLowerCase() === "landscape" ? "landscape" : "portrait";
            }
            const Qt = (NA, t) => (t = Ft(t, NA.pageSize.orientation), t !== NA.pageSize.orientation ? {
              orientation: t,
              width: NA.pageSize.height,
              height: NA.pageSize.width
            } : {
              orientation: NA.pageSize.orientation,
              width: NA.pageSize.width,
              height: NA.pageSize.height
            });
            function Rt(NA, t) {
              let C;
              return NA.page > t.page ? C = NA : t.page > NA.page ? C = t : C = NA.y > t.y ? NA : t, {
                page: C.page,
                x: C.x,
                y: C.y,
                availableHeight: C.availableHeight,
                availableWidth: C.availableWidth
              };
            }
            const gt = Et;
            class yt extends it.EventEmitter {
              /**
               * @param {DocumentContext} context
               */
              constructor(t) {
                super(), this._context = t, this.contextStack = [];
              }
              /**
               * @returns {DocumentContext}
               */
              context() {
                return this._context;
              }
              addLine(t, C, b) {
                let nA = t.getHeight(), gA = this.context(), hA = gA.getCurrentPage(), HA = this.getCurrentPositionOnPage();
                return gA.availableHeight < nA || !hA ? !1 : (t.x = gA.x + (t.x || 0), t.y = gA.y + (t.y || 0), this.alignLine(t), oi(hA, {
                  type: "line",
                  item: t
                }, b), this.emit("lineAdded", t), C || gA.moveDown(nA), HA);
              }
              alignLine(t) {
                let C = this.context().availableWidth, b = t.getWidth(), nA = t.inlines && t.inlines.length > 0 && t.inlines[0].alignment, gA = 0;
                switch (nA) {
                  case "right":
                    gA = C - b;
                    break;
                  case "center":
                    gA = (C - b) / 2;
                    break;
                }
                if (gA && (t.x = (t.x || 0) + gA), nA === "justify" && !t.newLineForced && !t.lastLineInParagraph && t.inlines.length > 1) {
                  let hA = (C - b) / (t.inlines.length - 1);
                  for (let HA = 1, GA = t.inlines.length; HA < GA; HA++)
                    gA = HA * hA, t.inlines[HA].x += gA, t.inlines[HA].justifyShift = hA;
                }
              }
              addImage(t, C) {
                let b = this.context(), nA = b.getCurrentPage(), gA = this.getCurrentPositionOnPage();
                return !nA || t.absolutePosition === void 0 && b.availableHeight < t._height && nA.items.length > 0 ? !1 : (t._x === void 0 && (t._x = t.x || 0), t.x = b.x + t._x, t.y = b.y, this.alignImage(t), oi(nA, {
                  type: "image",
                  item: t
                }, C), b.moveDown(t._height), gA);
              }
              addCanvas(t, C) {
                let b = this.context(), nA = b.getCurrentPage(), gA = [], hA = t._minHeight;
                return !nA || t.absolutePosition === void 0 && b.availableHeight < hA ? !1 : (this.alignCanvas(t), t.canvas.forEach(function(HA) {
                  let GA = this.addVector(HA, !1, !1, C);
                  gA.push(GA), C !== void 0 && C++;
                }, this), b.moveDown(hA), gA);
              }
              addSVG(t, C) {
                let b = this.context(), nA = b.getCurrentPage(), gA = this.getCurrentPositionOnPage();
                return !nA || t.absolutePosition === void 0 && b.availableHeight < t._height && nA.items.length > 0 ? !1 : (t._x === void 0 && (t._x = t.x || 0), t.x = b.x + t._x, t.y = b.y, this.alignImage(t), oi(nA, {
                  type: "svg",
                  item: t
                }, C), b.moveDown(t._height), gA);
              }
              addQr(t, C) {
                let b = this.context(), nA = b.getCurrentPage(), gA = this.getCurrentPositionOnPage();
                if (!nA || t.absolutePosition === void 0 && b.availableHeight < t._height)
                  return !1;
                t._x === void 0 && (t._x = t.x || 0), t.x = b.x + t._x, t.y = b.y, this.alignImage(t);
                for (let hA = 0, HA = t._canvas.length; hA < HA; hA++) {
                  let GA = t._canvas[hA];
                  GA.x += t.x, GA.y += t.y, this.addVector(GA, !0, !0, C);
                }
                return b.moveDown(t._height), gA;
              }
              addAttachment(t, C) {
                let b = this.context(), nA = b.getCurrentPage(), gA = this.getCurrentPositionOnPage();
                return !nA || t.absolutePosition === void 0 && b.availableHeight < t._height && nA.items.length > 0 ? !1 : (t._x === void 0 && (t._x = t.x || 0), t.x = b.x + t._x, t.y = b.y, oi(nA, {
                  type: "attachment",
                  item: t
                }, C), b.moveDown(t._height), gA);
              }
              alignImage(t) {
                let C = this.context().availableWidth, b = t._minWidth, nA = 0;
                switch (t._alignment) {
                  case "right":
                    nA = C - b;
                    break;
                  case "center":
                    nA = (C - b) / 2;
                    break;
                }
                nA && (t.x = (t.x || 0) + nA);
              }
              alignCanvas(t) {
                let C = this.context().availableWidth, b = t._minWidth, nA = 0;
                switch (t._alignment) {
                  case "right":
                    nA = C - b;
                    break;
                  case "center":
                    nA = (C - b) / 2;
                    break;
                }
                nA && t.canvas.forEach((gA) => {
                  Me(gA, nA, 0);
                });
              }
              addVector(t, C, b, nA, gA) {
                let hA = this.context(), HA = hA.getCurrentPage();
                d(gA) && (HA = hA.pages[gA]);
                let GA = this.getCurrentPositionOnPage();
                if (HA)
                  return Me(t, C ? 0 : hA.x, b ? 0 : hA.y), oi(HA, {
                    type: "vector",
                    item: t
                  }, nA), GA;
              }
              beginClip(t, C) {
                let b = this.context();
                return b.getCurrentPage().items.push({
                  type: "beginClip",
                  item: {
                    x: b.x,
                    y: b.y,
                    width: t,
                    height: C
                  }
                }), !0;
              }
              endClip() {
                return this.context().getCurrentPage().items.push({
                  type: "endClip"
                }), !0;
              }
              beginVerticalAlignment(t) {
                let C = this.context().getCurrentPage(), b = {
                  type: "beginVerticalAlignment",
                  item: {
                    verticalAlignment: t
                  }
                };
                return C.items.push(b), b;
              }
              endVerticalAlignment(t) {
                let C = this.context().getCurrentPage(), b = {
                  type: "endVerticalAlignment",
                  item: {
                    verticalAlignment: t
                  }
                };
                return C.items.push(b), b;
              }
              addFragment(t, C, b, nA) {
                let gA = this.context(), hA = gA.getCurrentPage();
                return !C && t.height > gA.availableHeight ? !1 : (t.items.forEach((HA) => {
                  switch (HA.type) {
                    case "line":
                      var GA = HA.item.clone();
                      GA._node && (GA._node.positions[0].pageNumber = gA.page + 1), GA.x = (GA.x || 0) + (C ? t.xOffset || 0 : gA.x), GA.y = (GA.y || 0) + (b ? t.yOffset || 0 : gA.y), hA.items.push({
                        type: "line",
                        item: GA
                      });
                      break;
                    case "vector":
                      var fe = ee(HA.item);
                      if (Me(fe, C ? t.xOffset || 0 : gA.x, b ? t.yOffset || 0 : gA.y), fe._isFillColorFromUnbreakable) {
                        delete fe._isFillColorFromUnbreakable;
                        const ye = gA.backgroundLength[gA.page];
                        hA.items.splice(ye, 0, {
                          type: "vector",
                          item: fe
                        });
                      } else
                        hA.items.push({
                          type: "vector",
                          item: fe
                        });
                      break;
                    case "image":
                    case "svg":
                    case "beginClip":
                    case "endClip":
                    case "beginVerticalAlignment":
                    case "endVerticalAlignment":
                      var we = ee(HA.item);
                      we.x = (we.x || 0) + (C ? t.xOffset || 0 : gA.x), we.y = (we.y || 0) + (b ? t.yOffset || 0 : gA.y), hA.items.push({
                        type: HA.type,
                        item: we
                      });
                      break;
                  }
                }), nA || gA.moveDown(t.height), !0);
              }
              /**
               * Pushes the provided context onto the stack or creates a new one
               *
               * pushContext(context) - pushes the provided context and makes it current
               * pushContext(width, height) - creates and pushes a new context with the specified width and height
               * pushContext() - creates a new context for unbreakable blocks (with current availableWidth and full-page-height)
               *
               * @param {DocumentContext|number} contextOrWidth
               * @param {number} height
               */
              pushContext(t, C) {
                if (t === void 0 && (C = this.context().getCurrentPage().height - this.context().pageMargins.top - this.context().pageMargins.bottom, t = this.context().availableWidth), d(t)) {
                  let b = t;
                  t = new gt(), t.addPage({
                    width: b,
                    height: C
                  }, {
                    left: 0,
                    right: 0,
                    top: 0,
                    bottom: 0
                  });
                }
                this.contextStack.push(this.context()), this._context = t;
              }
              popContext() {
                this._context = this.contextStack.pop();
              }
              getCurrentPositionOnPage() {
                return (this.contextStack[0] || this.context()).getCurrentPosition();
              }
            }
            function oi(NA, t, C) {
              C == null || C < 0 || C > NA.items.length ? NA.items.push(t) : NA.items.splice(C, 0, t);
            }
            const ei = yt, $t = {
              "4A0": [4767.87, 6740.79],
              "2A0": [3370.39, 4767.87],
              A0: [2383.94, 3370.39],
              A1: [1683.78, 2383.94],
              A2: [1190.55, 1683.78],
              A3: [841.89, 1190.55],
              A4: [595.28, 841.89],
              A5: [419.53, 595.28],
              A6: [297.64, 419.53],
              A7: [209.76, 297.64],
              A8: [147.4, 209.76],
              A9: [104.88, 147.4],
              A10: [73.7, 104.88],
              B0: [2834.65, 4008.19],
              B1: [2004.09, 2834.65],
              B2: [1417.32, 2004.09],
              B3: [1000.63, 1417.32],
              B4: [708.66, 1000.63],
              B5: [498.9, 708.66],
              B6: [354.33, 498.9],
              B7: [249.45, 354.33],
              B8: [175.75, 249.45],
              B9: [124.72, 175.75],
              B10: [87.87, 124.72],
              C0: [2599.37, 3676.54],
              C1: [1836.85, 2599.37],
              C2: [1298.27, 1836.85],
              C3: [918.43, 1298.27],
              C4: [649.13, 918.43],
              C5: [459.21, 649.13],
              C6: [323.15, 459.21],
              C7: [229.61, 323.15],
              C8: [161.57, 229.61],
              C9: [113.39, 161.57],
              C10: [79.37, 113.39],
              RA0: [2437.8, 3458.27],
              RA1: [1729.13, 2437.8],
              RA2: [1218.9, 1729.13],
              RA3: [864.57, 1218.9],
              RA4: [609.45, 864.57],
              SRA0: [2551.18, 3628.35],
              SRA1: [1814.17, 2551.18],
              SRA2: [1275.59, 1814.17],
              SRA3: [907.09, 1275.59],
              SRA4: [637.8, 907.09],
              EXECUTIVE: [521.86, 756],
              FOLIO: [612, 936],
              LEGAL: [612, 1008],
              LETTER: [612, 792],
              TABLOID: [792, 1224]
            };
            function St(NA, t) {
              function C(gA) {
                return P(gA) ? (gA = gA.toLowerCase(), gA === "portrait" && nA.width > nA.height || gA === "landscape" && nA.width < nA.height) : !1;
              }
              function b(gA) {
                if (P(gA)) {
                  let hA = $t[gA.toUpperCase()];
                  if (!hA)
                    throw new Error(`Page size ${gA} not recognized`);
                  return {
                    width: hA[0],
                    height: hA[1]
                  };
                }
                return gA;
              }
              NA && NA.height === "auto" && (NA.height = 1 / 0);
              let nA = b(NA || "A4");
              return C(t) && (nA = {
                width: nA.height,
                height: nA.width
              }), nA.orientation = nA.width > nA.height ? "landscape" : "portrait", nA;
            }
            function ri(NA) {
              if (d(NA))
                NA = {
                  left: NA,
                  right: NA,
                  top: NA,
                  bottom: NA
                };
              else if (Array.isArray(NA))
                if (NA.length === 2)
                  NA = {
                    left: NA[0],
                    top: NA[1],
                    right: NA[0],
                    bottom: NA[1]
                  };
                else if (NA.length === 4)
                  NA = {
                    left: NA[0],
                    top: NA[1],
                    right: NA[2],
                    bottom: NA[3]
                  };
                else
                  throw new Error("Invalid pageMargins definition");
              return NA;
            }
            class an extends ei {
              /**
               * @param {DocumentContext} context
               */
              constructor(t) {
                super(t), this.transactionLevel = 0, this.repeatables = [];
              }
              addLine(t, C, b) {
                return this._fitOnPage(() => super.addLine(t, C, b));
              }
              addImage(t, C) {
                return this._fitOnPage(() => super.addImage(t, C));
              }
              addCanvas(t, C) {
                return this._fitOnPage(() => super.addCanvas(t, C));
              }
              addSVG(t, C) {
                return this._fitOnPage(() => super.addSVG(t, C));
              }
              addQr(t, C) {
                return this._fitOnPage(() => super.addQr(t, C));
              }
              addAttachment(t, C) {
                return this._fitOnPage(() => super.addAttachment(t, C));
              }
              addVector(t, C, b, nA, gA) {
                return super.addVector(t, C, b, nA, gA);
              }
              beginClip(t, C) {
                return super.beginClip(t, C);
              }
              endClip() {
                return super.endClip();
              }
              beginVerticalAlignment(t) {
                return super.beginVerticalAlignment(t);
              }
              endVerticalAlignment(t) {
                return super.endVerticalAlignment(t);
              }
              addFragment(t, C, b, nA) {
                return this._fitOnPage(() => super.addFragment(t, C, b, nA));
              }
              moveToNextPage(t) {
                let C = this.context().moveToNextPage(t);
                this.repeatables.forEach(function(b) {
                  b.insertedOnPages[this.context().page] === void 0 ? (b.insertedOnPages[this.context().page] = !0, this.addFragment(b, !0)) : this.context().moveDown(b.height);
                }, this), this.emit("pageChanged", {
                  prevPage: C.prevPage,
                  prevY: C.prevY,
                  y: this.context().y
                });
              }
              addPage(t, C, b, nA) {
                nA === void 0 && (nA = {});
                let gA = this.page, hA = this.y;
                this.context().addPage(St(t, C), ri(b), nA), this.emit("pageChanged", {
                  prevPage: gA,
                  prevY: hA,
                  y: this.context().y
                });
              }
              beginUnbreakableBlock(t, C) {
                this.transactionLevel++ === 0 && (this.originalX = this.context().x, this.pushContext(t, C));
              }
              commitUnbreakableBlock(t, C) {
                if (--this.transactionLevel === 0) {
                  let b = this.context();
                  this.popContext();
                  let nA = b.pages.length;
                  if (nA > 0) {
                    let gA = b.pages[0];
                    if (gA.xOffset = t, gA.yOffset = C, nA > 1)
                      if (t !== void 0 || C !== void 0)
                        gA.height = b.getCurrentPage().pageSize.height - b.pageMargins.top - b.pageMargins.bottom;
                      else {
                        gA.height = this.context().getCurrentPage().pageSize.height - this.context().pageMargins.top - this.context().pageMargins.bottom;
                        for (let hA = 0, HA = this.repeatables.length; hA < HA; hA++)
                          gA.height -= this.repeatables[hA].height;
                      }
                    else
                      gA.height = b.y;
                    t !== void 0 || C !== void 0 ? super.addFragment(gA, !0, !0, !0) : this.addFragment(gA);
                  }
                }
              }
              currentBlockToRepeatable() {
                let t = this.context(), C = {
                  items: []
                };
                return t.pages[0].items.forEach((b) => {
                  C.items.push(b);
                }), C.xOffset = this.originalX, C.height = t.y, C.insertedOnPages = [], C;
              }
              pushToRepeatables(t) {
                this.repeatables.push(t);
              }
              popFromRepeatables() {
                this.repeatables.pop();
              }
              /**
               * Move to the next column in a column group (snaking columns).
               * Handles repeatables and emits columnChanged event.
               */
              moveToNextColumn() {
                let t = this.context().moveToNextColumn();
                this.repeatables.forEach(function(C) {
                  this.addFragment(C, !1);
                }, this), this.emit("columnChanged", {
                  prevY: t.prevY,
                  y: this.context().y
                });
              }
              /**
               * Check if currently in a column group that can move to next column.
               * Only returns true if snakingColumns is enabled for the column group.
               * @returns {boolean}
               */
              canMoveToNextColumn() {
                let t = this.context(), C = t.getSnakingSnapshot();
                if (C) {
                  for (let De = t.snapshots.length - 1; De >= 0; De--) {
                    let g = t.snapshots[De];
                    if (g.snakingColumns)
                      break;
                    if (!g.overflowed)
                      return !1;
                  }
                  let b = 0;
                  for (let De = t.snapshots.length - 1; De >= 0 && t.snapshots[De].overflowed; De--)
                    b++;
                  if (C.columnWidths && b >= C.columnWidths.length - 1)
                    return !1;
                  let nA = t.availableWidth || t.lastColumnWidth || 0, gA = C.columnWidths ? C.columnWidths[b + 1] : nA, hA = t.x + nA + (C.gap || 0), HA = t.getCurrentPage(), GA = HA.pageSize.width, fe = HA.pageMargins ? HA.pageMargins.right : 0, we = t.marginXTopParent ? t.marginXTopParent[1] : 0, ye = GA - fe - we;
                  return hA + gA <= ye + 1;
                }
                return !1;
              }
              _fitOnPage(t) {
                let C = t();
                if (!C && (this.canMoveToNextColumn() && (this.moveToNextColumn(), C = t()), !C)) {
                  let b = this.context();
                  if (b.getSnakingSnapshot()) {
                    if (b.isInNestedNonSnakingGroup())
                      this.moveToNextPage();
                    else {
                      this.moveToNextPage();
                      let gA = b.lastColumnWidth;
                      b.resetSnakingColumnsForNewPage(), b.lastColumnWidth = gA;
                    }
                    C = t();
                  } else {
                    for (; b.snapshots.length > 0 && b.snapshots[b.snapshots.length - 1].overflowed; ) {
                      let gA = b.snapshots.pop(), hA = b.snapshots[b.snapshots.length - 1];
                      hA && (b.x = hA.x, b.y = hA.y, b.availableHeight = hA.availableHeight, b.availableWidth = gA.availableWidth, b.lastColumnWidth = hA.lastColumnWidth);
                    }
                    this.moveToNextPage(), C = t();
                  }
                }
                return C;
              }
            }
            const mi = an;
            class Ii {
              constructor(t) {
                this.tableNode = t;
              }
              beginTable(t) {
                const C = () => {
                  let GA = 0;
                  return gA.table.widths.forEach((fe) => {
                    GA += fe._calcWidth;
                  }), GA;
                }, b = () => {
                  let GA = [], fe = 0, we;
                  GA.push({
                    left: 0,
                    rowSpan: 0
                  });
                  for (let ye = 0, De = this.tableNode.table.body[0].length; ye < De; ye++) {
                    let g = this.layout.paddingLeft(ye, this.tableNode) + this.layout.paddingRight(ye, this.tableNode), s = this.layout.vLineWidth(ye, this.tableNode);
                    we = g + s + this.tableNode.table.widths[ye]._calcWidth, GA[GA.length - 1].width = we, fe += we, GA.push({
                      left: fe,
                      rowSpan: 0,
                      width: 0
                    });
                  }
                  return GA;
                }, nA = (GA) => {
                  for (let we = 0; we < GA.length; we++) {
                    let ye = GA[we];
                    for (let De = 0; De < ye.length; De++) {
                      let g = ye[De];
                      if (g.border) {
                        let s = g.rowSpan || 1, I = g.colSpan || 1;
                        for (let f = 0; f < s; f++)
                          g.border[0] !== void 0 && f > 0 && fe(we + f, De, 0, g.border[0]), g.border[2] !== void 0 && fe(we + f, De + I - 1, 2, g.border[2]);
                        for (let f = 0; f < I; f++)
                          g.border[1] !== void 0 && f > 0 && fe(we, De + f, 1, g.border[1]), g.border[3] !== void 0 && fe(we + s - 1, De + f, 3, g.border[3]);
                      }
                    }
                  }
                  function fe(we, ye, De, g) {
                    let s = GA[we][ye];
                    s.border = s.border || {}, s.border[De] = g;
                  }
                };
                let gA, hA;
                gA = this.tableNode, this.offsets = gA._offsets, this.layout = gA._layout, hA = t.context().availableWidth - this.offsets.total, pA.buildColumnWidths(gA.table.widths, hA, this.offsets.total, gA), this.tableWidth = gA._offsets.total + C(), this.rowSpanData = b(), this.cleanUpRepeatables = !1, this.headerRows = 0, this.rowsWithoutPageBreak = 0;
                const HA = gA.table.headerRows;
                if (J(HA)) {
                  if (this.headerRows = HA, this.headerRows > gA.table.body.length)
                    throw new Error(`Too few rows in the table. Property headerRows requires at least ${this.headerRows}, contains only ${gA.table.body.length}`);
                  this.rowsWithoutPageBreak = this.headerRows;
                  const GA = gA.table.keepWithHeaderRows;
                  J(GA) && (this.rowsWithoutPageBreak += GA);
                }
                this.dontBreakRows = gA.table.dontBreakRows || !1, (this.rowsWithoutPageBreak || this.dontBreakRows) && (t.beginUnbreakableBlock(), this.drawHorizontalLine(0, t), this.rowsWithoutPageBreak && this.dontBreakRows && t.beginUnbreakableBlock()), nA(this.tableNode.table.body);
              }
              onRowBreak(t, C) {
                return () => {
                  let b = this.rowPaddingTop + (this.headerRows ? 0 : this.topLineWidth);
                  C.context().availableHeight -= this.reservedAtBottom, C.context().moveDown(b);
                };
              }
              beginRow(t, C) {
                this.topLineWidth = this.layout.hLineWidth(t, this.tableNode), this.rowPaddingTop = this.layout.paddingTop(t, this.tableNode), this.bottomLineWidth = this.layout.hLineWidth(t + 1, this.tableNode), this.rowPaddingBottom = this.layout.paddingBottom(t, this.tableNode), this.rowCallback = this.onRowBreak(t, C), C.addListener("pageChanged", this.rowCallback), t == 0 && !this.dontBreakRows && !this.rowsWithoutPageBreak && (this._tableTopBorderY = C.context().y, C.context().moveDown(this.topLineWidth)), this.rowTopPageY = C.context().y + this.rowPaddingTop, this.dontBreakRows && t > 0 && C.beginUnbreakableBlock(), this.rowTopY = C.context().y, this.reservedAtBottom = this.bottomLineWidth + this.rowPaddingBottom, C.context().availableHeight -= this.reservedAtBottom, C.context().moveDown(this.rowPaddingTop);
              }
              drawHorizontalLine(t, C, b, nA, gA) {
                nA === void 0 && (nA = !0);
                let hA = this.layout.hLineWidth(t, this.tableNode);
                if (hA) {
                  let we = this.layout.hLineStyle(t, this.tableNode), ye;
                  we && we.dash && (ye = we.dash);
                  let De = hA / 2, g = null, s = this.tableNode.table.body, I, f, S;
                  for (let iA = 0, YA = this.rowSpanData.length; iA < YA; iA++) {
                    let ZA = this.rowSpanData[iA], oe = !ZA.rowSpan, pe = null;
                    if (oe && iA < YA - 1) {
                      var HA = !1, GA = !1, fe = !1;
                      t > 0 && (I = s[t - 1][iA], GA = I.border ? I.border[3] : this.layout.defaultBorder, GA && I.borderColor && (pe = I.borderColor[3])), t < s.length && (f = s[t][iA], HA = f.border ? f.border[1] : this.layout.defaultBorder, HA && pe == null && f.borderColor && (pe = f.borderColor[1])), oe = HA || GA;
                    }
                    if (I && I._rowSpanCurrentOffset && (S = s[t - 1 - I._rowSpanCurrentOffset][iA], fe = S && S.border ? S.border[3] : this.layout.defaultBorder, fe && S && S.borderColor && (pe = S.borderColor[3])), pe == null && (pe = typeof this.layout.hLineColor == "function" ? this.layout.hLineColor(t, this.tableNode, iA) : this.layout.hLineColor), !g && oe && (g = {
                      left: ZA.left,
                      width: 0
                    }), oe) {
                      let Qe = 0;
                      if (S && S.colSpan && fe) {
                        for (; S.colSpan > Qe; )
                          g.width += this.rowSpanData[iA + Qe++].width || 0;
                        iA += Qe - 1;
                      } else if (I && I.colSpan && GA) {
                        for (; I.colSpan > Qe; )
                          g.width += this.rowSpanData[iA + Qe++].width || 0;
                        iA += Qe - 1;
                      } else if (f && f.colSpan && HA) {
                        for (; f.colSpan > Qe; )
                          g.width += this.rowSpanData[iA + Qe++].width || 0;
                        iA += Qe - 1;
                      } else
                        g.width += this.rowSpanData[iA].width || 0;
                    }
                    let xe = (b || 0) + De;
                    oe && g && g.width && (C.addVector({
                      type: "line",
                      x1: g.left,
                      x2: g.left + g.width,
                      y1: xe,
                      y2: xe,
                      lineWidth: hA,
                      dash: ye,
                      lineColor: pe
                    }, !1, d(b), null, gA), g = null, I = null, f = null, S = null);
                  }
                  nA && C.context().moveDown(hA);
                }
              }
              drawVerticalLine(t, C, b, nA, gA, hA, HA) {
                let GA = this.layout.vLineWidth(nA, this.tableNode);
                if (GA === 0)
                  return;
                let fe = this.layout.vLineStyle(nA, this.tableNode), we;
                fe && fe.dash && (we = fe.dash);
                let ye = this.tableNode.table.body, De, g, s;
                if (nA > 0 && (De = ye[hA][HA], De && De.borderColor && (De.border ? De.border[2] : this.layout.defaultBorder) && (s = De.borderColor[2])), s == null && nA < ye.length && (g = ye[hA][nA], g && g.borderColor && (g.border ? g.border[0] : this.layout.defaultBorder) && (s = g.borderColor[0])), s == null && De && De._rowSpanCurrentOffset) {
                  let I = ye[hA - De._rowSpanCurrentOffset][HA];
                  I.borderColor && (I.border ? I.border[2] : this.layout.defaultBorder) && (s = I.borderColor[2]);
                }
                if (s == null && g && g._rowSpanCurrentOffset) {
                  let I = ye[hA - g._rowSpanCurrentOffset][nA];
                  I.borderColor && (I.border ? I.border[2] : this.layout.defaultBorder) && (s = I.borderColor[2]);
                }
                s == null && (s = typeof this.layout.vLineColor == "function" ? this.layout.vLineColor(nA, this.tableNode, hA) : this.layout.vLineColor), gA.addVector({
                  type: "line",
                  x1: t + GA / 2,
                  x2: t + GA / 2,
                  y1: C,
                  y2: b,
                  lineWidth: GA,
                  dash: we,
                  lineColor: s
                }, !1, !0);
              }
              endTable(t) {
                this.cleanUpRepeatables && t.popFromRepeatables();
              }
              endRow(t, C, b) {
                const nA = () => {
                  let S = [], iA = 0;
                  for (let YA = 0, ZA = this.tableNode.table.body[t].length; YA < ZA; YA++) {
                    if (!iA) {
                      S.push({
                        x: this.rowSpanData[YA].left,
                        index: YA
                      });
                      let oe = this.tableNode.table.body[t][YA];
                      iA = oe._colSpan || oe.colSpan || 0;
                    }
                    iA > 0 && iA--;
                  }
                  return S.push({
                    x: this.rowSpanData[this.rowSpanData.length - 1].left,
                    index: this.rowSpanData.length - 1
                  }), S;
                };
                C.removeListener("pageChanged", this.rowCallback), C.context().moveDown(this.layout.paddingBottom(t, this.tableNode)), C.context().availableHeight += this.reservedAtBottom;
                let gA = C.context().page, hA = C.context().y, HA = nA(), GA = [], fe = b && b.length > 0, we = this.tableNode.table.body;
                if (GA.push({
                  y0: this.rowTopY,
                  page: fe ? b[0].prevPage : gA
                }), fe)
                  for (let S = 0, iA = b.length; S < iA; S++) {
                    let YA = b[S];
                    GA[GA.length - 1].y1 = YA.prevY, GA.push({
                      y0: YA.y,
                      page: YA.prevPage + 1
                    });
                  }
                GA[GA.length - 1].y1 = hA;
                let ye = GA[0].y1 - GA[0].y0 === this.rowPaddingTop;
                if (t === 0 && !ye && !this.rowsWithoutPageBreak && !this.dontBreakRows) {
                  let S = null;
                  b && b.length > 0 && (S = b[0].prevPage), this.drawHorizontalLine(0, C, this._tableTopBorderY, !1, S);
                }
                for (let S = ye ? 1 : 0, iA = GA.length; S < iA; S++) {
                  let YA = S < GA.length - 1, ZA = S > 0 && !this.headerRows, oe = ZA ? 0 : this.topLineWidth, pe = GA[S].y0, xe = GA[S].y1;
                  YA && (xe = xe + this.rowPaddingBottom), C.context().page != GA[S].page && (C.context().page = GA[S].page, this.reservedAtBottom = 0), YA && this.layout.hLineWhenBroken !== !1 && this.drawHorizontalLine(t + 1, C, xe), ZA && this.layout.hLineWhenBroken !== !1 && this.drawHorizontalLine(t, C, pe);
                  for (let Qe = 0, ke = HA.length; Qe < ke; Qe++) {
                    let lt = !1, Xe = !1, et = HA[Qe].index;
                    if (et < we[t].length) {
                      let Oe = we[t][et];
                      lt = Oe.border ? Oe.border[0] : this.layout.defaultBorder, Xe = Oe.border ? Oe.border[2] : this.layout.defaultBorder;
                    }
                    if (et > 0 && !lt) {
                      let Oe = we[t][et - 1];
                      lt = Oe.border ? Oe.border[2] : this.layout.defaultBorder;
                    }
                    if (et + 1 < we[t].length && !Xe) {
                      let Oe = we[t][et + 1];
                      Xe = Oe.border ? Oe.border[0] : this.layout.defaultBorder;
                    }
                    if (lt && this.drawVerticalLine(HA[Qe].x, pe - oe, xe + this.bottomLineWidth, HA[Qe].index, C, t, HA[Qe - 1] ? HA[Qe - 1].index : null), Qe < ke - 1) {
                      if (we[t][et]._willBreak = we[t][et]._willBreak ?? YA, we[t][et]._bottomY === void 0) {
                        let $e = this.dontBreakRows ? xe + this.bottomLineWidth : xe + this.bottomLineWidth / 2;
                        (YA || this.dontBreakRows) && ($e = $e - this.rowPaddingBottom), we[t][et]._bottomY = $e - this.reservedAtBottom;
                      }
                      we[t][et]._rowTopPageY = this.rowTopPageY, this.dontBreakRows && (we[t][et]._rowTopPageYPadding = this.rowPaddingTop), we[t][et]._lastPageNumber = GA[S].page + 1;
                      let Oe = we[t][et].fillColor, rt = we[t][et].fillOpacity;
                      Oe || (Oe = typeof this.layout.fillColor == "function" ? this.layout.fillColor(t, this.tableNode, et) : this.layout.fillColor), d(rt) || (rt = typeof this.layout.fillOpacity == "function" ? this.layout.fillOpacity(t, this.tableNode, et) : this.layout.fillOpacity);
                      var De = we[t][et].overlayPattern, g = we[t][et].overlayOpacity;
                      if (Oe || De) {
                        let $e = lt ? this.layout.vLineWidth(et, this.tableNode) : 0, wt;
                        (et === 0 || et + 1 == we[t].length) && !Xe ? wt = this.layout.vLineWidth(et + 1, this.tableNode) : Xe ? wt = this.layout.vLineWidth(et + 1, this.tableNode) / 2 : wt = 0;
                        let Vt = this.dontBreakRows ? HA[Qe].x + $e : HA[Qe].x + $e / 2, Ai = this.dontBreakRows ? pe : pe - oe / 2, Gt = HA[Qe + 1].x + wt, ct = this.dontBreakRows ? xe + this.bottomLineWidth : xe + this.bottomLineWidth / 2;
                        var s = Gt - Vt, I = ct - Ai;
                        Oe && C.addVector({
                          type: "rect",
                          x: Vt,
                          y: Ai,
                          w: s,
                          h: I,
                          lineWidth: 0,
                          color: Oe,
                          fillOpacity: rt,
                          // mark if we are in an unbreakable block
                          _isFillColorFromUnbreakable: !!C.transactionLevel
                        }, !1, !0, C.context().backgroundLength[C.context().page]), De && C.addVector({
                          type: "rect",
                          x: Vt,
                          y: Ai,
                          w: s,
                          h: I,
                          lineWidth: 0,
                          color: De,
                          fillOpacity: g
                        }, !1, !0);
                      }
                    }
                  }
                }
                C.context().page = gA, C.context().y = hA;
                let f = this.tableNode.table.body[t];
                for (let S = 0, iA = f.length; S < iA; S++) {
                  if (f[S].rowSpan) {
                    if (this.rowSpanData[S].rowSpan = f[S].rowSpan, f[S].colSpan && f[S].colSpan > 1)
                      for (let YA = 1; YA < f[S].rowSpan; YA++)
                        this.tableNode.table.body[t + YA][S]._colSpan = f[S].colSpan;
                    if (f[S].rowSpan && f[S].rowSpan > 1)
                      for (let YA = 1; YA < f[S].rowSpan; YA++)
                        this.tableNode.table.body[t + YA][S]._rowSpanCurrentOffset = YA;
                  }
                  this.rowSpanData[S].rowSpan > 0 && this.rowSpanData[S].rowSpan--;
                }
                if (this.drawHorizontalLine(t + 1, C), this.headerRows && t === this.headerRows - 1 && (this.headerRepeatable = C.currentBlockToRepeatable()), this.dontBreakRows) {
                  const S = () => {
                    t > 0 && !this.headerRows && this.layout.hLineWhenBroken !== !1 && this.drawHorizontalLine(t, C);
                  };
                  C.addListener("pageChanged", S), C.commitUnbreakableBlock(), C.removeListener("pageChanged", S);
                }
                this.headerRepeatable && (t === this.rowsWithoutPageBreak - 1 || t === this.tableNode.table.body.length - 1) && (C.commitUnbreakableBlock(), C.pushToRepeatables(this.headerRepeatable), this.cleanUpRepeatables = !0, this.headerRepeatable = null);
              }
            }
            const Hi = Ii;
            class Mi {
              /**
               * @param {number} maxWidth Maximum width this line can have
               */
              constructor(t) {
                this.maxWidth = t, this.leadingCut = 0, this.trailingCut = 0, this.inlineWidths = 0, this.inlines = [];
              }
              /**
               * @param {object} inline
               */
              addInline(t) {
                this.inlines.length === 0 && (this.leadingCut = t.leadingCut || 0), this.trailingCut = t.trailingCut || 0, t.x = this.inlineWidths - this.leadingCut, this.inlines.push(t), this.inlineWidths += t.width, t.lineEnd && (this.newLineForced = !0);
              }
              /**
               * @returns {number}
               */
              getHeight() {
                let t = 0;
                return this.inlines.forEach((C) => {
                  t = Math.max(t, C.height || 0);
                }), t;
              }
              /**
               * @returns {number}
               */
              getAscenderHeight() {
                let t = 0;
                return this.inlines.forEach((C) => {
                  t = Math.max(t, C.font.ascender / 1e3 * C.fontSize);
                }), t;
              }
              /**
               * @returns {number}
               */
              getWidth() {
                return this.inlineWidths - this.leadingCut - this.trailingCut;
              }
              /**
               * @returns {number}
               */
              getAvailableWidth() {
                return this.maxWidth - this.getWidth();
              }
              /**
               * @param {object} inline
               * @param {Array} nextInlines
               * @returns {boolean}
               */
              hasEnoughSpaceForInline(t, C) {
                if (C === void 0 && (C = []), this.inlines.length === 0)
                  return !0;
                if (this.newLineForced)
                  return !1;
                let b = t.width, nA = t.trailingCut || 0;
                if (t.noNewLine)
                  for (let gA = 0, hA = C.length; gA < hA; gA++) {
                    let HA = C[gA];
                    if (b += HA.width, nA += HA.trailingCut || 0, !HA.noNewLine)
                      break;
                  }
                return this.inlineWidths + b - this.leadingCut - nA <= this.maxWidth;
              }
              clone() {
                let t = new Mi(this.maxWidth);
                for (let C in this)
                  this.hasOwnProperty(C) && (t[C] = this[C]);
                return t;
              }
            }
            const Li = Mi;
            function Fi(NA, t) {
              t.forEach((C) => {
                NA.push(C);
              });
            }
            class Ti {
              /**
               * @param {object} pageSize - an object defining page width and height
               * @param {object} pageMargins - an object defining top, left, right and bottom margins
               * @param {object} svgMeasure
               */
              constructor(t, C, b) {
                this.pageSize = t, this.pageMargins = C, this.svgMeasure = b, this.tableLayouts = {}, this.nestedLevel = 0, this.verticalAlignmentItemStack = [];
              }
              registerTableLayouts(t) {
                this.tableLayouts = ee(this.tableLayouts, t);
              }
              /**
               * Executes layout engine on document-definition-object and creates an array of pages
               * containing positioned Blocks, Lines and inlines
               *
               * @param {object} docStructure document-definition-object
               * @param {object} pdfDocument pdfkit document
               * @param {object} styleDictionary dictionary with style definitions
               * @param {object} defaultStyle default style definition
               * @param {object} background
               * @param {object} header
               * @param {object} footer
               * @param {object} watermark
               * @param {object} pageBreakBeforeFct
               * @returns {Array} an array of pages
               */
              layoutDocument(t, C, b, nA, gA, hA, HA, GA, fe) {
                function we(g, s) {
                  if (typeof fe != "function")
                    return !1;
                  const I = (f) => !(!f || f.positions.length === 0 || f.text === "" && !f.listMarker);
                  g = g.filter(I), g.forEach((f) => {
                    let S = {};
                    ["id", "text", "ul", "ol", "table", "image", "qr", "canvas", "svg", "columns", "headlineLevel", "style", "pageBreak", "pageOrientation", "width", "height"].forEach((iA) => {
                      f[iA] !== void 0 && (S[iA] = f[iA]);
                    }), S.startPosition = f.positions[0], S.pageNumbers = Array.from(new Set(f.positions.map((iA) => iA.pageNumber))), S.pages = s.length, S.stack = Array.isArray(f.stack), f.nodeInfo = S;
                  });
                  for (let f = 0; f < g.length; f++) {
                    let S = g[f];
                    if (S.pageBreak !== "before" && !S.pageBreakCalculated) {
                      S.pageBreakCalculated = !0;
                      let iA = S.nodeInfo.pageNumbers[0];
                      if (fe(S.nodeInfo, {
                        getFollowingNodesOnPage: () => {
                          let YA = [];
                          for (let ZA = f + 1, oe = g.length; ZA < oe; ZA++)
                            g[ZA].nodeInfo.pageNumbers.indexOf(iA) > -1 && YA.push(g[ZA].nodeInfo);
                          return YA;
                        },
                        getNodesOnNextPage: () => {
                          let YA = [];
                          for (let ZA = f + 1, oe = g.length; ZA < oe; ZA++)
                            g[ZA].nodeInfo.pageNumbers.indexOf(iA + 1) > -1 && YA.push(g[ZA].nodeInfo);
                          return YA;
                        },
                        getPreviousNodesOnPage: () => {
                          let YA = [];
                          for (let ZA = 0; ZA < f; ZA++)
                            g[ZA].nodeInfo.pageNumbers.indexOf(iA) > -1 && YA.push(g[ZA].nodeInfo);
                          return YA;
                        }
                      }))
                        return S.pageBreak = "before", !0;
                    }
                  }
                  return !1;
                }
                this.docPreprocessor = new tA(), this.docMeasure = new je(C, b, nA, this.svgMeasure, this.tableLayouts);
                function ye(g) {
                  g.linearNodeList.forEach((s) => {
                    s.resetXY();
                  });
                }
                let De = this.tryLayoutDocument(t, C, b, nA, gA, hA, HA, GA);
                for (; we(De.linearNodeList, De.pages); )
                  ye(De), De = this.tryLayoutDocument(t, C, b, nA, gA, hA, HA, GA);
                return De.pages;
              }
              tryLayoutDocument(t, C, b, nA, gA, hA, HA, GA) {
                const fe = (we) => we.stack && we.stack.length > 0 && we.stack[0].section ? !1 : !we.section;
                return this.linearNodeList = [], t = this.docPreprocessor.preprocessDocument(t), t = this.docMeasure.measureDocument(t), this.writer = new mi(new gt()), this.writer.context().addListener("pageAdded", (we) => {
                  let ye = gA;
                  (we.customProperties.background || we.customProperties.background === null) && (ye = we.customProperties.background), this.addBackground(ye);
                }), fe(t) && this.writer.addPage(this.pageSize, null, this.pageMargins), this.processNode(t), this.addHeadersAndFooters(hA, HA), this.addWatermark(GA, C, nA), {
                  pages: this.writer.context().pages,
                  linearNodeList: this.linearNodeList
                };
              }
              addBackground(t) {
                let C = typeof t == "function" ? t : () => t, b = this.writer.context(), nA = b.getCurrentPage().pageSize, gA = C(b.page + 1, nA);
                gA && (this.writer.beginUnbreakableBlock(nA.width, nA.height), gA = this.docPreprocessor.preprocessBlock(gA), this.processNode(this.docMeasure.measureBlock(gA)), this.writer.commitUnbreakableBlock(0, 0), b.backgroundLength[b.page] += gA.positions.length);
              }
              addDynamicRepeatable(t, C, b) {
                let nA = this.writer.context().pages;
                for (let gA = 0, hA = nA.length; gA < hA; gA++) {
                  this.writer.context().page = gA;
                  let HA = this.writer.context().getCurrentPage().customProperties, GA = t;
                  if ((HA[b] || HA[b] === null) && (GA = HA[b]), typeof GA > "u" || GA === null)
                    continue;
                  let fe = GA(gA + 1, hA, this.writer.context().pages[gA].pageSize);
                  if (fe) {
                    let we = C(this.writer.context().getCurrentPage().pageSize, this.writer.context().getCurrentPage().pageMargins);
                    this.writer.beginUnbreakableBlock(we.width, we.height), fe = this.docPreprocessor.preprocessBlock(fe), this.processNode(this.docMeasure.measureBlock(fe)), this.writer.commitUnbreakableBlock(we.x, we.y);
                  }
                }
              }
              addHeadersAndFooters(t, C) {
                const b = (gA, hA) => ({
                  x: 0,
                  y: 0,
                  width: gA.width,
                  height: hA.top
                }), nA = (gA, hA) => ({
                  x: 0,
                  y: gA.height - hA.bottom,
                  width: gA.width,
                  height: hA.bottom
                });
                this.addDynamicRepeatable(t, b, "header"), this.addDynamicRepeatable(C, nA, "footer");
              }
              addWatermark(t, C, b) {
                let nA = this.writer.context().pages;
                for (let GA = 0, fe = nA.length; GA < fe; GA++) {
                  let we = t;
                  (nA[GA].customProperties.watermark || nA[GA].customProperties.watermark === null) && (we = nA[GA].customProperties.watermark), we != null && (P(we) && (we = {
                    text: we
                  }), we.text && (nA[GA].watermark = gA({
                    ...we
                  }, nA[GA].pageSize, C, b)));
                }
                function gA(GA, fe, we, ye) {
                  GA.font = GA.font || ye.font || "Roboto", GA.fontSize = GA.fontSize || "auto", GA.color = GA.color || "black", GA.opacity = d(GA.opacity) ? GA.opacity : 0.6, GA.bold = GA.bold || !1, GA.italics = GA.italics || !1, GA.angle = K(GA.angle) ? GA.angle : null, GA.angle === null && (GA.angle = Math.atan2(fe.height, fe.width) * -180 / Math.PI), GA.fontSize === "auto" && (GA.fontSize = HA(fe, GA, we));
                  let De = {
                    text: GA.text,
                    font: we.provideFont(GA.font, GA.bold, GA.italics),
                    fontSize: GA.fontSize,
                    color: GA.color,
                    opacity: GA.opacity,
                    angle: GA.angle
                  };
                  return De._size = hA(GA, we), De;
                }
                function hA(GA, fe) {
                  let we = new R(fe), ye = new ie(null, {
                    font: GA.font,
                    bold: GA.bold,
                    italics: GA.italics
                  });
                  ye.push({
                    fontSize: GA.fontSize
                  });
                  let De = we.sizeOfText(GA.text, ye), g = we.sizeOfRotatedText(GA.text, GA.angle, ye);
                  return {
                    size: De,
                    rotatedSize: g
                  };
                }
                function HA(GA, fe, we) {
                  let ye = new R(we), De = new ie(null, {
                    font: fe.font,
                    bold: fe.bold,
                    italics: fe.italics
                  }), g, s = 0, I = 1e3, f = (s + I) / 2;
                  for (; Math.abs(s - I) > 1; )
                    De.push({
                      fontSize: f
                    }), g = ye.sizeOfRotatedText(fe.text, fe.angle, De), g.width > GA.width ? (I = f, f = (s + I) / 2) : g.width < GA.width && (g.height > GA.height ? (I = f, f = (s + I) / 2) : (s = f, f = (s + I) / 2)), De.pop();
                  return f;
                }
              }
              processNode(t, C) {
                C === void 0 && (C = !1);
                const b = (gA) => {
                  let hA = t._margin;
                  t.pageBreak === "before" ? this.writer.moveToNextPage(t.pageOrientation) : t.pageBreak === "beforeOdd" ? (this.writer.moveToNextPage(t.pageOrientation), (this.writer.context().page + 1) % 2 === 1 && this.writer.moveToNextPage(t.pageOrientation)) : t.pageBreak === "beforeEven" && (this.writer.moveToNextPage(t.pageOrientation), (this.writer.context().page + 1) % 2 === 0 && this.writer.moveToNextPage(t.pageOrientation));
                  const HA = t.relativePosition || t.absolutePosition;
                  if (hA && !HA) {
                    const GA = this.writer.context().availableHeight;
                    GA - hA[1] < 0 ? (this.writer.context().moveDown(GA), this.writer.context().inSnakingColumns() && !this.writer.context().isInNestedNonSnakingGroup() ? this.snakingAwarePageBreak(t.pageOrientation) : this.writer.moveToNextPage(t.pageOrientation)) : this.writer.context().moveDown(hA[1]), this.writer.context().addMargin(hA[0], hA[2]);
                  }
                  if (gA(), hA && !HA) {
                    const GA = this.writer.context().availableHeight;
                    GA - hA[3] < 0 ? (this.writer.context().moveDown(GA), this.writer.context().inSnakingColumns() && !this.writer.context().isInNestedNonSnakingGroup() ? this.snakingAwarePageBreak(t.pageOrientation) : this.writer.moveToNextPage(t.pageOrientation)) : this.writer.context().moveDown(hA[3]), this.writer.context().addMargin(-hA[0], -hA[2]);
                  }
                  t.pageBreak === "after" ? this.writer.moveToNextPage(t.pageOrientation) : t.pageBreak === "afterOdd" ? (this.writer.moveToNextPage(t.pageOrientation), (this.writer.context().page + 1) % 2 === 1 && this.writer.moveToNextPage(t.pageOrientation)) : t.pageBreak === "afterEven" && (this.writer.moveToNextPage(t.pageOrientation), (this.writer.context().page + 1) % 2 === 0 && this.writer.moveToNextPage(t.pageOrientation));
                };
                if (this.linearNodeList.push(t), Yi(t), this.writer.context().getCurrentPage() !== null)
                  var nA = this.writer.context().getCurrentPosition().top;
                b(() => {
                  let gA = t.verticalAlignment;
                  if (C && gA)
                    var hA = this.writer.beginVerticalAlignment(gA);
                  let HA = t.unbreakable;
                  HA && this.writer.beginUnbreakableBlock();
                  let GA = t.absolutePosition;
                  GA && (this.writer.context().beginDetachedBlock(), this.writer.context().moveTo(GA.x || 0, GA.y || 0));
                  let fe = t.relativePosition;
                  if (fe && (this.writer.context().beginDetachedBlock(), this.writer.context().moveToRelative(fe.x || 0, fe.y || 0)), t.stack)
                    this.processVerticalContainer(t);
                  else if (t.section)
                    this.processSection(t);
                  else if (t.columns)
                    this.processColumns(t);
                  else if (t.ul)
                    this.processList(!1, t);
                  else if (t.ol)
                    this.processList(!0, t);
                  else if (t.table)
                    this.processTable(t);
                  else if (t.text !== void 0)
                    this.processLeaf(t);
                  else if (t.toc)
                    this.processToc(t);
                  else if (t.image)
                    this.processImage(t);
                  else if (t.svg)
                    this.processSVG(t);
                  else if (t.canvas)
                    this.processCanvas(t);
                  else if (t.qr)
                    this.processQr(t);
                  else if (t.attachment)
                    this.processAttachment(t);
                  else if (!t._span)
                    throw new Error(`Unrecognized document structure: ${T(t)}`);
                  (GA || fe) && this.writer.context().endDetachedBlock(), HA && this.writer.commitUnbreakableBlock(), C && gA && this.verticalAlignmentItemStack.push({
                    begin: hA,
                    end: this.writer.endVerticalAlignment(gA)
                  });
                }), nA !== void 0 && (t.__height = this.writer.context().getCurrentPosition().top - nA);
              }
              /**
               * Helper for page breaks that respects snaking column context.
               * When in snaking columns, first tries moving to next column.
               * If no columns available, moves to next page and resets x to left margin.
               * @param {string} pageOrientation - Optional page orientation for the new page
               */
              snakingAwarePageBreak(t) {
                let C = this.writer.context();
                if (!C.getSnakingSnapshot())
                  return;
                if (this.writer.canMoveToNextColumn()) {
                  this.writer.moveToNextColumn();
                  return;
                }
                this.writer.moveToNextPage(t);
                let nA = C.lastColumnWidth;
                C.resetSnakingColumnsForNewPage(), C.lastColumnWidth = nA;
              }
              // vertical container
              processVerticalContainer(t) {
                t.stack.forEach((C) => {
                  this.processNode(C), Fi(t.positions, C.positions);
                }, this);
              }
              // section
              processSection(t) {
                let C = this.writer.context().getCurrentPage();
                if (!C || C && C.items.length) {
                  t.pageSize === "inherit" && (t.pageSize = C ? {
                    width: C.pageSize.width,
                    height: C.pageSize.height
                  } : void 0), t.pageOrientation === "inherit" && (t.pageOrientation = C ? C.pageSize.orientation : void 0), t.pageMargins === "inherit" && (t.pageMargins = C ? C.pageMargins : void 0), t.header === "inherit" && (t.header = C ? C.customProperties.header : void 0), t.footer === "inherit" && (t.footer = C ? C.customProperties.footer : void 0), t.background === "inherit" && (t.background = C ? C.customProperties.background : void 0), t.watermark === "inherit" && (t.watermark = C ? C.customProperties.watermark : void 0), t.header && typeof t.header != "function" && t.header !== null && (t.header = MA(t.header)), t.footer && typeof t.footer != "function" && t.footer !== null && (t.footer = MA(t.footer));
                  let b = {};
                  typeof t.header < "u" && (b.header = t.header), typeof t.footer < "u" && (b.footer = t.footer), typeof t.background < "u" && (b.background = t.background), typeof t.watermark < "u" && (b.watermark = t.watermark), this.writer.addPage(t.pageSize || this.pageSize, t.pageOrientation, t.pageMargins || this.pageMargins, b);
                }
                this.processNode(t.section);
              }
              // columns
              processColumns(t) {
                this.nestedLevel++;
                let C = t.columns, b = this.writer.context().availableWidth, nA = hA(t._gap);
                nA && (b -= (nA.length - 1) * t._gap), pA.buildColumnWidths(C, b);
                let gA = this.processRow({
                  marginX: t._margin ? [t._margin[0], t._margin[2]] : [0, 0],
                  cells: C,
                  widths: C,
                  gaps: nA,
                  snakingColumns: t.snakingColumns
                });
                Fi(t.positions, gA.positions), this.nestedLevel--, this.nestedLevel === 0 && this.writer.context().resetMarginXTopParent();
                function hA(HA) {
                  if (!HA)
                    return null;
                  let GA = [];
                  GA.push(0);
                  for (let fe = C.length - 1; fe > 0; fe--)
                    GA.push(HA);
                  return GA;
                }
              }
              /**
              * Searches for a cell in the same row that starts a rowspan and is positioned immediately before the current cell.
              * Alternatively, it finds a cell where the colspan initiating the rowspan extends to the cell just before the current one.
              *
              * @param {Array<object>} arr - An array representing cells in a row.
              * @param {number} i - The index of the current cell to search backward from.
              * @returns {object|null} The starting cell of the rowspan if found; otherwise, `null`.
              */
              _findStartingRowSpanCell(t, C) {
                let b = 1;
                for (let nA = C - 1; nA >= 0; nA--) {
                  if (!t[nA]._span)
                    return t[nA].rowSpan > 1 && (t[nA].colSpan || 1) === b ? t[nA] : null;
                  b++;
                }
                return null;
              }
              /**
              * Retrieves a page break description for a specified page from a list of page breaks.
              *
              * @param {Array<object>} pageBreaks - An array of page break descriptions, each containing `prevPage` properties.
              * @param {number} page - The page number to find the associated page break for.
              * @returns {object|undefined} The page break description object for the specified page if found; otherwise, `undefined`.
              */
              _getPageBreak(t, C) {
                return t.find((b) => b.prevPage === C);
              }
              _getPageBreakListBySpan(t, C, b) {
                if (!t || !t._breaksBySpan)
                  return null;
                const nA = t._breaksBySpan.filter((HA) => HA.prevPage === C && b <= HA.rowIndexOfSpanEnd);
                let gA = Number.MAX_VALUE, hA = Number.MIN_VALUE;
                return nA.forEach((HA) => {
                  hA = Math.max(HA.prevY, hA), gA = Math.min(HA.y, gA);
                }), {
                  prevPage: C,
                  prevY: hA,
                  y: gA
                };
              }
              _findSameRowPageBreakByRowSpanData(t, C, b) {
                return t ? t.find((nA) => nA.prevPage === C && b === nA.rowIndexOfSpanEnd) : null;
              }
              _updatePageBreaksData(t, C, b) {
                Object.keys(C._bottomByPage).forEach((nA) => {
                  const gA = Number(nA), hA = this._getPageBreak(t, gA);
                  if (hA && (hA.prevY = Math.max(hA.prevY, C._bottomByPage[gA])), C._breaksBySpan && C._breaksBySpan.length > 0) {
                    const HA = C._breaksBySpan.filter((GA) => GA.prevPage === gA && b <= GA.rowIndexOfSpanEnd);
                    HA && HA.length > 0 && HA.forEach((GA) => {
                      GA.prevY = Math.max(GA.prevY, C._bottomByPage[gA]);
                    });
                  }
                });
              }
              /**
              * Resolves the Y-coordinates for a target object by comparing two break points.
              *
              * @param {object} break1 - The first break point with `prevY` and `y` properties.
              * @param {object} break2 - The second break point with `prevY` and `y` properties.
              * @param {object} target - The target object to be updated with resolved Y-coordinates.
              * @property {number} target.prevY - Updated to the maximum `prevY` value between `break1` and `break2`.
              * @property {number} target.y - Updated to the minimum `y` value between `break1` and `break2`.
              */
              _resolveBreakY(t, C, b) {
                b.prevY = Math.max(t.prevY, C.prevY), b.y = Math.min(t.y, C.y);
              }
              _storePageBreakData(t, C, b, nA) {
                if (C) {
                  const gA = nA && nA._breaksBySpan || null;
                  let hA = this._findSameRowPageBreakByRowSpanData(gA, t.prevPage, t.rowIndex);
                  hA || (hA = {
                    ...t,
                    rowIndexOfSpanEnd: t.rowIndex + t.rowSpan - 1
                  }, nA._breaksBySpan || (nA._breaksBySpan = []), nA._breaksBySpan.push(hA)), hA.prevY = Math.max(hA.prevY, t.prevY), hA.y = Math.min(hA.y, t.y);
                  let HA = this._getPageBreak(b, t.prevPage);
                  HA && this._resolveBreakY(HA, hA, HA);
                } else {
                  let gA = this._getPageBreak(b, t.prevPage), hA = this._getPageBreakListBySpan(nA, t.prevPage, t.rowIndex);
                  gA || (gA = {
                    ...t
                  }, b.push(gA)), hA && this._resolveBreakY(gA, hA, gA), this._resolveBreakY(gA, t, gA);
                }
              }
              /**
              * Calculates the left offset for a column based on the specified gap values.
              *
              * @param {number} i - The index of the column for which the offset is being calculated.
              * @param {Array<number>} gaps - An array of gap values for each column.
              * @returns {number} The left offset for the column. Returns `gaps[i]` if it exists, otherwise `0`.
              */
              _colLeftOffset(t, C) {
                return C && C.length > t ? C[t] : 0;
              }
              /**
              * Retrieves the ending cell for a row span in case it exists in a specified table column.
              *
              * @param {Array<Array<object>>} tableBody - The table body, represented as a 2D array of cell objects.
              * @param {number} rowIndex - The index of the starting row for the row span.
              * @param {object} column - The column object containing row span information.
              * @param {number} columnIndex - The index of the column within the row.
              * @returns {object|null} The cell at the end of the row span if it exists; otherwise, `null`.
              * @throws {Error} If the row span extends beyond the total row count.
              */
              _getRowSpanEndingCell(t, C, b, nA) {
                if (b.rowSpan && b.rowSpan > 1) {
                  let gA = C + b.rowSpan - 1;
                  if (gA >= t.length)
                    throw new Error(`Row span for column ${nA} (with indexes starting from 0) exceeded row count`);
                  return t[gA][nA];
                }
                return null;
              }
              processRow(t) {
                let {
                  marginX: C = [0, 0],
                  dontBreakRows: b = !1,
                  rowsWithoutPageBreak: nA = 0,
                  cells: gA,
                  widths: hA,
                  gaps: HA,
                  tableNode: GA,
                  tableBody: fe,
                  rowIndex: we,
                  height: ye,
                  snakingColumns: De = !1
                } = t;
                const g = b || we <= nA - 1;
                let s = [], I = [], f = [], S = !1, iA = {};
                hA = hA || gA, !g && ye > this.writer.context().availableHeight && (S = !0);
                const YA = this.nestedLevel === 1 ? C : null, ZA = GA ? GA._bottomByPage : null, oe = HA && HA.length > 1 ? HA[1] : 0, pe = hA.map((Xe) => Xe._calcWidth);
                this.writer.context().beginColumnGroup(YA, ZA, De, oe, pe);
                for (let Xe = 0, et = gA.length; Xe < et; Xe++) {
                  let Oe = gA[Xe], rt = Xe;
                  const $e = (Ci) => {
                    const Xi = Oe.rowSpan && Oe.rowSpan > 1;
                    Xi && (Ci.rowSpan = Oe.rowSpan), Ci.rowIndex = we, this._storePageBreakData(Ci, Xi, s, GA);
                  };
                  this.writer.addListener("pageChanged", $e);
                  let wt = hA[Xe]._calcWidth, Vt = this._colLeftOffset(Xe, HA), Ai = this._findStartingRowSpanCell(gA, Xe);
                  if (Oe.colSpan && Oe.colSpan > 1)
                    for (let Ci = 1; Ci < Oe.colSpan; Ci++)
                      wt += hA[++Xe]._calcWidth + HA[Xe];
                  const Gt = this._getRowSpanEndingCell(fe, we, Oe, Xe), ct = this._getRowSpanEndingCell(fe, we, Oe, rt);
                  Gt && (Oe._endingCell = Gt, Oe._endingCell._startingRowSpanY = Oe._startingRowSpanY), ct && (Oe._leftEndingCell = ct, Oe._leftEndingCell._startingRowSpanY = Oe._startingRowSpanY);
                  let jt = null;
                  Ai && Ai._endingCell && (jt = Ai._endingCell, this.writer.transactionLevel > 0 && (jt._isUnbreakableContext = !0, jt._originalXOffset = this.writer.originalX)), this.writer.context().beginColumn(wt, Vt, jt);
                  const Pi = De && Xe > 0;
                  if (!Oe._span && !Pi)
                    this.processNode(Oe, !0), this.writer.context().updateBottomByPage(), Oe.verticalAlignment && (iA[rt] = this.verticalAlignmentItemStack.length - 1), Fi(f, Oe.positions);
                  else if (Oe._columnEndingContext) {
                    let Ci = 0;
                    b && (Ci = this.writer.contextStack[this.writer.contextStack.length - 1].y - Oe._startingRowSpanY);
                    let Xi = 0;
                    Oe._isUnbreakableContext && !this.writer.transactionLevel && (Xi = Oe._originalXOffset), this.writer.context().markEnding(Oe, Xi, Ci);
                  }
                  this.writer.removeListener("pageChanged", $e);
                }
                let xe = null;
                const Qe = gA.length > 0 ? gA[gA.length - 1] : null;
                if (Qe) {
                  if (Qe._endingCell)
                    xe = Qe._endingCell;
                  else if (Qe._span === !0) {
                    const Xe = this._findStartingRowSpanCell(gA, gA.length);
                    Xe && (xe = Xe._endingCell, this.writer.transactionLevel > 0 && (xe._isUnbreakableContext = !0, xe._originalXOffset = this.writer.originalX));
                  }
                }
                S && !g && s.length === 0 && (this.writer.context().moveDown(this.writer.context().availableHeight), De ? this.snakingAwarePageBreak() : this.writer.moveToNextPage());
                const ke = this.writer.context().completeColumnGroup(ye, xe);
                GA && (GA._bottomByPage = ke, this._updatePageBreaksData(s, GA, we));
                let lt = this.writer.context().height;
                for (let Xe = 0, et = gA.length; Xe < et; Xe++) {
                  let Oe = gA[Xe];
                  if (!Oe._span && Oe.verticalAlignment) {
                    let rt = this.verticalAlignmentItemStack[iA[Xe]].begin.item;
                    rt.viewHeight = lt, rt.nodeHeight = Oe.__height, rt.cell = Oe, rt.bottomY = this.writer.context().y, rt.isCellContentMultiPage = !rt.cell.positions.every((wt) => wt.pageNumber === rt.cell.positions[0].pageNumber), rt.getViewHeight = function() {
                      if (this.cell._willBreak)
                        return this.cell._bottomY - this.cell._rowTopPageY;
                      if (this.cell.rowSpan && this.cell.rowSpan > 1)
                        if (b) {
                          let wt = this.cell._leftEndingCell._startingRowSpanY + this.cell._leftEndingCell._rowTopPageYPadding;
                          return this.cell._leftEndingCell._rowTopPageY - wt + this.cell._leftEndingCell._bottomY;
                        } else
                          return this.cell.positions[0].pageNumber !== this.cell._leftEndingCell._lastPageNumber ? this.bottomY - this.cell._leftEndingCell._bottomY : this.viewHeight + this.cell._leftEndingCell._bottomY - this.bottomY;
                      return this.viewHeight;
                    }, rt.getNodeHeight = function() {
                      return this.nodeHeight;
                    };
                    let $e = this.verticalAlignmentItemStack[iA[Xe]].end.item;
                    $e.isCellContentMultiPage = rt.isCellContentMultiPage;
                  }
                }
                return {
                  pageBreaksBySpan: I,
                  pageBreaks: s,
                  positions: f
                };
              }
              // lists
              processList(t, C) {
                const b = (HA) => {
                  if (hA) {
                    let GA = hA;
                    if (hA = null, GA.canvas) {
                      let fe = GA.canvas[0];
                      Me(fe, -GA._minWidth, 0), this.writer.addVector(fe);
                    } else if (GA._inlines) {
                      let fe = new Li(this.pageSize.width);
                      fe.addInline(GA._inlines[0]), fe.x = -GA._minWidth, fe.y = HA.getAscenderHeight() - fe.getAscenderHeight(), this.writer.addLine(fe, !0);
                    }
                  }
                };
                let nA = t ? C.ol : C.ul, gA = C._gapSize;
                this.writer.context().addMargin(gA.width);
                let hA;
                this.writer.addListener("lineAdded", b), nA.forEach((HA) => {
                  hA = HA.listMarker, this.processNode(HA), Fi(C.positions, HA.positions);
                }), this.writer.removeListener("lineAdded", b), this.writer.context().addMargin(-gA.width);
              }
              // tables
              processTable(t) {
                this.nestedLevel++;
                let C = new Hi(t);
                C.beginTable(this.writer);
                let b = t.table.heights, nA = 0;
                for (let gA = 0, hA = t.table.body.length; gA < hA; gA++) {
                  if (gA > 0 && this.writer.context().inSnakingColumns()) {
                    let De = nA > 0 ? nA : C.rowPaddingTop + 14 + C.rowPaddingBottom + C.bottomLineWidth + C.topLineWidth;
                    this.writer.context().availableHeight < De && (this.snakingAwarePageBreak(), C.layout.hLineWhenBroken !== !1 && !C.headerRows && C.drawHorizontalLine(gA, this.writer));
                  }
                  let HA = this.writer.context().y;
                  C.dontBreakRows && t.table.body[gA].forEach((De) => {
                    De.rowSpan && De.rowSpan > 1 && (De._startingRowSpanY = this.writer.context().y);
                  }), C.beginRow(gA, this.writer);
                  let GA;
                  typeof b == "function" ? GA = b(gA) : Array.isArray(b) ? GA = b[gA] : GA = b, GA === "auto" && (GA = void 0);
                  const fe = this.writer.context().page;
                  let we = this.processRow({
                    marginX: t._margin ? [t._margin[0], t._margin[2]] : [0, 0],
                    dontBreakRows: C.dontBreakRows,
                    rowsWithoutPageBreak: C.rowsWithoutPageBreak,
                    cells: t.table.body[gA],
                    widths: t.table.widths,
                    gaps: t._offsets.offsets,
                    tableBody: t.table.body,
                    tableNode: t,
                    rowIndex: gA,
                    height: GA
                  });
                  if (Fi(t.positions, we.positions), !we.pageBreaks || we.pageBreaks.length === 0) {
                    const De = t && t._breaksBySpan || null, g = this._findSameRowPageBreakByRowSpanData(De, fe, gA);
                    if (g) {
                      const s = this._getPageBreakListBySpan(t, g.prevPage, gA);
                      we.pageBreaks.push(s);
                    }
                  }
                  C.endRow(gA, this.writer, we.pageBreaks);
                  let ye = this.writer.context().y;
                  this.writer.context().page === fe && (nA = ye - HA);
                }
                C.endTable(this.writer), this.nestedLevel--, this.nestedLevel === 0 && this.writer.context().resetMarginXTopParent();
              }
              // leafs (texts)
              processLeaf(t) {
                let C = this.buildNextLine(t);
                C && (t.tocItem || t.id) && (C._node = t);
                let b = C ? C.getHeight() : 0, nA = t.maxHeight || -1;
                if (C) {
                  let gA = H(t);
                  gA && (C.id = gA);
                }
                if (t.outline)
                  C._outline = {
                    id: t.id,
                    parentId: t.outlineParentId,
                    text: t.outlineText || t.text,
                    expanded: t.outlineExpanded || !1
                  };
                else if (Array.isArray(t.text))
                  for (let gA = 0, hA = t.text.length; gA < hA; gA++) {
                    let HA = t.text[gA];
                    HA.outline && (C._outline = {
                      id: HA.id,
                      parentId: HA.outlineParentId,
                      text: HA.outlineText || HA.text,
                      expanded: HA.outlineExpanded || !1
                    });
                  }
                if (t._tocItemRef && (C._pageNodeRef = t._tocItemRef), t._pageRef && (C._pageNodeRef = t._pageRef._nodeRef), C && C.inlines && Array.isArray(C.inlines))
                  for (let gA = 0, hA = C.inlines.length; gA < hA; gA++)
                    C.inlines[gA]._tocItemRef && (C.inlines[gA]._pageNodeRef = C.inlines[gA]._tocItemRef), C.inlines[gA]._pageRef && (C.inlines[gA]._pageNodeRef = C.inlines[gA]._pageRef._nodeRef);
                for (; C && (nA === -1 || b < nA); ) {
                  if (C.getHeight() > this.writer.context().availableHeight && this.writer.context().y > this.writer.context().pageMargins.top)
                    if (this.writer.context().inSnakingColumns() && !this.writer.context().isInNestedNonSnakingGroup()) {
                      this.snakingAwarePageBreak(t.pageOrientation), C.inlines && C.inlines.length > 0 && t._inlines.unshift(...C.inlines), C = this.buildNextLine(t);
                      continue;
                    } else
                      this.writer.moveToNextPage(t.pageOrientation);
                  let gA = this.writer.addLine(C);
                  t.positions.push(gA), C = this.buildNextLine(t), C && (b += C.getHeight());
                }
              }
              processToc(t) {
                !t.toc._table && t.toc.hideEmpty === !0 || (t.toc.title && this.processNode(t.toc.title), t.toc._table && this.processNode(t.toc._table));
              }
              buildNextLine(t) {
                function C(HA) {
                  let GA = HA.constructor();
                  for (let fe in HA)
                    GA[fe] = HA[fe];
                  return GA;
                }
                function b(HA, GA, fe) {
                  let we = 1, ye = HA.length, De = 1;
                  for (; we <= ye; ) {
                    const g = Math.floor((we + ye) / 2), s = HA.substring(0, g);
                    fe(s) <= GA ? (De = g, we = g + 1) : ye = g - 1;
                  }
                  return De;
                }
                if (!t._inlines || t._inlines.length === 0)
                  return null;
                let nA = new Li(this.writer.context().availableWidth);
                const gA = new R(null);
                let hA = !1;
                for (; t._inlines && t._inlines.length > 0 && (nA.hasEnoughSpaceForInline(t._inlines[0], t._inlines.slice(1)) || hA); ) {
                  let HA = !1, GA = t._inlines.shift();
                  if (!GA.noWrap && GA.text.length > 1 && GA.width > nA.getAvailableWidth()) {
                    let fe = b(GA.text, nA.getAvailableWidth(), (we) => gA.widthOfText(we, GA));
                    if (fe < GA.text.length) {
                      let we = C(GA);
                      we.text = GA.text.substr(fe), GA.text = GA.text.substr(0, fe), we.width = gA.widthOfText(we.text, we), GA.width = gA.widthOfText(GA.text, GA), t._inlines.unshift(we), HA = !0;
                    }
                  }
                  nA.addInline(GA), hA = GA.noNewLine && !HA;
                }
                return nA.lastLineInParagraph = t._inlines.length === 0, nA;
              }
              // images
              processImage(t) {
                let C = this.writer.addImage(t);
                t.positions.push(C);
              }
              processCanvas(t) {
                let C = this.writer.addCanvas(t);
                Fi(t.positions, C);
              }
              processSVG(t) {
                let C = this.writer.addSVG(t);
                t.positions.push(C);
              }
              processQr(t) {
                let C = this.writer.addQr(t);
                t.positions.push(C);
              }
              processAttachment(t) {
                let C = this.writer.addAttachment(t);
                t.positions.push(C);
              }
            }
            function Yi(NA) {
              let t = NA.x, C = NA.y;
              NA.positions = [], Array.isArray(NA.canvas) && NA.canvas.forEach((b) => {
                let nA = b.x, gA = b.y, hA = b.x1, HA = b.y1, GA = b.x2, fe = b.y2;
                b.resetXY = () => {
                  b.x = nA, b.y = gA, b.x1 = hA, b.y1 = HA, b.x2 = GA, b.y2 = fe;
                };
              }), NA.resetXY = () => {
                NA.x = t, NA.y = C, Array.isArray(NA.canvas) && NA.canvas.forEach((b) => {
                  b.resetXY();
                });
              };
            }
            const Oi = Ti;
            var Pn = r(7507);
            const Ui = (NA) => {
              let t = parseFloat(NA);
              if (!(typeof t != "number" || isNaN(t)))
                return t;
            }, An = (NA) => {
              let t;
              try {
                t = new Pn.XmlDocument(NA);
              } catch (C) {
                throw new Error("Invalid svg document (" + C + ")", {
                  cause: C
                });
              }
              if (t.name !== "svg")
                throw new Error("Invalid svg document (expected <svg>)");
              return t;
            };
            class vn {
              constructor() {
              }
              measureSVG(t) {
                let C, b, nA;
                if (P(t)) {
                  let HA = An(t);
                  C = HA.attr.width, b = HA.attr.height, nA = HA.attr.viewBox;
                } else if (typeof SVGElement < "u" && t instanceof SVGElement && typeof getComputedStyle == "function")
                  C = t.getAttribute("width"), b = t.getAttribute("height"), nA = t.getAttribute("viewBox");
                else
                  throw new Error("Invalid SVG document");
                let gA = Ui(C), hA = Ui(b);
                if ((gA === void 0 || hA === void 0) && typeof nA == "string") {
                  let HA = nA.split(/[,\s]+/);
                  if (HA.length !== 4)
                    throw new Error("Unexpected svg viewBox format, should have 4 entries but found: '" + nA + "'");
                  gA === void 0 && (gA = Ui(HA[2])), hA === void 0 && (hA = Ui(HA[3]));
                }
                return {
                  width: gA,
                  height: hA
                };
              }
              writeDimensions(t, C) {
                if (P(t)) {
                  let b = An(t);
                  return typeof b.attr.viewBox != "string" && (b.attr.viewBox = `0 0 ${Ui(b.attr.width)} ${Ui(b.attr.height)}`), b.attr.width = "" + C.width, b.attr.height = "" + C.height, b.toString();
                }
                return t.hasAttribute("viewBox") || t.setAttribute("viewBox", `0 0 ${Ui(t.getAttribute("width"))} ${Ui(t.getAttribute("height"))}`), t.setAttribute("width", "" + C.width), t.setAttribute("height", "" + C.height), t;
              }
            }
            const en = vn, hi = (NA) => {
              let t = [], C = null;
              for (let b = 0, nA = NA.inlines.length; b < nA; b++) {
                let gA = NA.inlines[b], hA = gA.decoration;
                if (!hA) {
                  C = null;
                  continue;
                }
                Array.isArray(hA) || (hA = [hA]);
                let HA = gA.decorationColor || gA.color || "black", GA = gA.decorationStyle || "solid", fe = d(gA.decorationThickness) ? gA.decorationThickness : null;
                for (let we = 0, ye = hA.length; we < ye; we++) {
                  let De = hA[we];
                  !C || De !== C.decoration || GA !== C.decorationStyle || HA !== C.decorationColor ? (C = {
                    line: NA,
                    decoration: De,
                    decorationColor: HA,
                    decorationStyle: GA,
                    decorationThickness: fe,
                    inlines: [gA]
                  }, t.push(C)) : C.inlines.push(gA);
                }
              }
              return t;
            };
            class Mn {
              constructor(t) {
                this.pdfDocument = t;
              }
              drawBackground(t, C, b) {
                let nA = t.getHeight();
                for (let gA = 0, hA = t.inlines.length; gA < hA; gA++) {
                  let HA = t.inlines[gA];
                  if (!HA.background)
                    continue;
                  let GA = HA.background, fe = this.pdfDocument.providePattern(HA.background);
                  fe !== null && (GA = fe);
                  let we = HA.justifyShift || 0;
                  this.pdfDocument.fillColor(GA).rect(C + HA.x - we, b, HA.width + we, nA).fill();
                }
              }
              drawDecorations(t, C, b) {
                let nA = hi(t);
                for (let gA = 0, hA = nA.length; gA < hA; gA++)
                  this._drawDecoration(nA[gA], C, b);
              }
              _drawDecoration(t, C, b) {
                const nA = () => {
                  let s = 0;
                  for (let I = 0, f = t.inlines.length; I < f; I++)
                    s = t.inlines[I].fontSize > s ? I : s;
                  return t.inlines[s];
                }, gA = () => {
                  let s = 0;
                  for (let I = 0, f = t.inlines.length; I < f; I++) {
                    let S = t.inlines[I].justifyShift || 0;
                    s += t.inlines[I].width + S;
                  }
                  return s;
                };
                let hA = t.inlines[0], HA = nA(), GA = gA(), fe = t.line.getAscenderHeight(), we = HA.font.ascender / 1e3 * HA.fontSize, De = HA.height - we, g = d(t.decorationThickness) ? t.decorationThickness : 0.5 + Math.floor(Math.max(HA.fontSize - 8, 0) / 2) * 0.12;
                switch (t.decoration) {
                  case "underline":
                    b += fe + De * 0.45;
                    break;
                  case "overline":
                    b += fe - we * 0.85;
                    break;
                  case "lineThrough":
                    b += fe - we * 0.25;
                    break;
                  default:
                    throw new Error(`Unknown decoration : ${t.decoration}`);
                }
                if (t.inlines[0].sup && (b -= t.inlines[0].fontSize * 0.75), t.inlines[0].sub && (b += t.inlines[0].fontSize * 0.35), this.pdfDocument.save(), t.decorationStyle === "double") {
                  let s = Math.max(0.5, g, HA.fontSize * 0.15);
                  this.pdfDocument.fillColor(t.decorationColor).rect(C + hA.x, b - g / 2, GA, g / 2).fill().rect(C + hA.x, b + s - g / 2, GA, g / 2).fill();
                } else if (t.decorationStyle === "dashed") {
                  let s = Math.ceil(GA / 6.8), I = C + hA.x;
                  this.pdfDocument.rect(I, b, GA, g).clip(), this.pdfDocument.fillColor(t.decorationColor);
                  for (let f = 0; f < s; f++)
                    this.pdfDocument.rect(I, b - g / 2, 3.96, g).fill(), I += 6.8;
                } else if (t.decorationStyle === "dotted") {
                  let s = Math.ceil(GA / (g * 3)), I = C + hA.x;
                  this.pdfDocument.rect(I, b, GA, g).clip(), this.pdfDocument.fillColor(t.decorationColor);
                  for (let f = 0; f < s; f++)
                    this.pdfDocument.rect(I, b - g / 2, g, g).fill(), I += g * 3;
                } else if (t.decorationStyle === "wavy") {
                  let s = 0.7, I = 1, f = Math.ceil(GA / (s * 2)) + 1, S = C + hA.x - 1;
                  this.pdfDocument.rect(C + hA.x, b - I, GA, b + I).clip(), this.pdfDocument.lineWidth(g / 3), this.pdfDocument.moveTo(S, b);
                  for (let iA = 0; iA < f; iA++)
                    this.pdfDocument.bezierCurveTo(S + s, b - I, S + s * 2, b - I, S + s * 3, b).bezierCurveTo(S + s * 4, b + I, S + s * 5, b + I, S + s * 6, b), S += s * 6;
                  this.pdfDocument.stroke(t.decorationColor);
                } else
                  this.pdfDocument.fillColor(t.decorationColor).rect(C + hA.x, b - g / 2, GA, g).fill();
                this.pdfDocument.restore();
              }
            }
            const Pr = Mn;
            var Ar = r(6582);
            const er = (NA, t, C) => {
              for (let b = 0; b < t.length; b++) {
                let nA = t[b].toLowerCase();
                for (let gA in NA)
                  if (gA.toLowerCase() === nA)
                    return gA;
              }
              return C;
            }, on = (NA, t) => {
              let C = NA;
              return t.sup && (C -= t.fontSize * 0.75), t.sub && (C += t.fontSize * 0.35), C;
            };
            class tr {
              constructor(t, C) {
                this.pdfDocument = t, this.progressCallback = C, this.outlineMap = [];
              }
              renderPages(t) {
                this.pdfDocument._pdfMakePages = t;
                let C = 0;
                this.progressCallback && t.forEach((nA) => {
                  C += nA.items.length;
                });
                let b = 0;
                for (let nA = 0; nA < t.length; nA++) {
                  this.pdfDocument.addPage({
                    size: [t[nA].pageSize.width, t[nA].pageSize.height]
                  });
                  let gA = t[nA];
                  for (let hA = 0, HA = gA.items.length; hA < HA; hA++) {
                    let GA = gA.items[hA];
                    switch (GA.type) {
                      case "vector":
                        this.renderVector(GA.item);
                        break;
                      case "line":
                        this.renderLine(GA.item, GA.item.x, GA.item.y);
                        break;
                      case "image":
                        this.renderImage(GA.item);
                        break;
                      case "svg":
                        this.renderSVG(GA.item);
                        break;
                      case "attachment":
                        this.renderAttachment(GA.item);
                        break;
                      case "beginClip":
                        this.beginClip(GA.item);
                        break;
                      case "endClip":
                        this.endClip();
                        break;
                      case "beginVerticalAlignment":
                        this.beginVerticalAlignment(GA.item);
                        break;
                      case "endVerticalAlignment":
                        this.endVerticalAlignment(GA.item);
                        break;
                    }
                    b++, this.progressCallback && this.progressCallback(b / C);
                  }
                  gA.watermark && this.renderWatermark(gA);
                }
              }
              renderLine(t, C, b) {
                function nA(fe, we) {
                  let ye, De, g = new R(null);
                  if (fe.positions === void 0)
                    throw new Error("Page reference id not found");
                  let s = fe.positions[0].pageNumber.toString();
                  switch (we.text = s, ye = g.widthOfText(we.text, we), De = we.width - ye, we.width = ye, we.alignment) {
                    case "right":
                      we.x += De;
                      break;
                    case "center":
                      we.x += De / 2;
                      break;
                  }
                }
                if (t._outline) {
                  let fe = this.pdfDocument.outline;
                  t._outline.parentId && this.outlineMap[t._outline.parentId] && (fe = this.outlineMap[t._outline.parentId]);
                  let we = fe.addItem(t._outline.text, {
                    expanded: t._outline.expanded
                  });
                  t._outline.id && (this.outlineMap[t._outline.id] = we);
                }
                t._pageNodeRef && nA(t._pageNodeRef, t.inlines[0]), C = C || 0, b = b || 0;
                let gA = t.getHeight(), hA = t.getAscenderHeight(), HA = gA - hA;
                const GA = new Pr(this.pdfDocument);
                GA.drawBackground(t, C, b);
                for (let fe = 0, we = t.inlines.length; fe < we; fe++) {
                  let ye = t.inlines[fe], De = gA - ye.font.ascender / 1e3 * ye.fontSize - HA;
                  ye._pageNodeRef && nA(ye._pageNodeRef, ye);
                  let g = {
                    lineBreak: !1,
                    textWidth: ye.width,
                    characterSpacing: ye.characterSpacing,
                    wordCount: 1,
                    link: ye.link
                  };
                  ye.linkToDestination && (g.goTo = ye.linkToDestination), t.id && fe === 0 && (g.destination = t.id), ye.fontFeatures && (g.features = ye.fontFeatures);
                  let s = d(ye.opacity) ? ye.opacity : 1;
                  this.pdfDocument.opacity(s), this.pdfDocument.fill(ye.color || "black"), this.pdfDocument._font = ye.font, this.pdfDocument.fontSize(ye.fontSize);
                  let I = on(b + De, ye);
                  this.pdfDocument.text(ye.text, C + ye.x, I, g), ye.linkToPage && (this.pdfDocument.ref({
                    Type: "Action",
                    S: "GoTo",
                    D: [ye.linkToPage, 0, 0]
                  }).end(), this.pdfDocument.annotate(C + ye.x, I, ye.width, ye.height, {
                    Subtype: "Link",
                    Dest: [ye.linkToPage - 1, "XYZ", null, null, null]
                  }));
                }
                GA.drawDecorations(t, C, b);
              }
              renderVector(t) {
                this.pdfDocument.lineWidth(t.lineWidth || 1), t.dash ? this.pdfDocument.dash(t.dash.length, {
                  space: t.dash.space || t.dash.length,
                  phase: t.dash.phase || 0
                }) : this.pdfDocument.undash(), this.pdfDocument.lineJoin(t.lineJoin || "miter"), this.pdfDocument.lineCap(t.lineCap || "butt");
                let C = null;
                switch (t.type) {
                  case "ellipse":
                    this.pdfDocument.ellipse(t.x, t.y, t.r1, t.r2), t.linearGradient && (C = this.pdfDocument.linearGradient(t.x - t.r1, t.y, t.x + t.r1, t.y));
                    break;
                  case "rect":
                    t.r ? this.pdfDocument.roundedRect(t.x, t.y, t.w, t.h, t.r) : this.pdfDocument.rect(t.x, t.y, t.w, t.h), t.linearGradient && (C = this.pdfDocument.linearGradient(t.x, t.y, t.x + t.w, t.y));
                    break;
                  case "line":
                    this.pdfDocument.moveTo(t.x1, t.y1), this.pdfDocument.lineTo(t.x2, t.y2);
                    break;
                  case "polyline":
                    if (t.points.length === 0)
                      break;
                    this.pdfDocument.moveTo(t.points[0].x, t.points[0].y);
                    for (let hA = 1, HA = t.points.length; hA < HA; hA++)
                      this.pdfDocument.lineTo(t.points[hA].x, t.points[hA].y);
                    if (t.points.length > 1) {
                      let hA = t.points[0], HA = t.points[t.points.length - 1];
                      (t.closePath || hA.x === HA.x && hA.y === HA.y) && this.pdfDocument.closePath();
                    }
                    break;
                  case "path":
                    this.pdfDocument.path(t.d);
                    break;
                }
                if (t.linearGradient && C) {
                  let hA = 1 / (t.linearGradient.length - 1);
                  for (let HA = 0; HA < t.linearGradient.length; HA++)
                    C.stop(HA * hA, t.linearGradient[HA]);
                  t.color = C;
                }
                let b = this.pdfDocument.providePattern(t.color);
                b !== null && (t.color = b);
                let nA = d(t.fillOpacity) ? t.fillOpacity : 1, gA = d(t.strokeOpacity) ? t.strokeOpacity : 1;
                t.color && t.lineColor ? (this.pdfDocument.fillColor(t.color, nA), this.pdfDocument.strokeColor(t.lineColor, gA), this.pdfDocument.fillAndStroke()) : t.color ? (this.pdfDocument.fillColor(t.color, nA), this.pdfDocument.fill()) : (this.pdfDocument.strokeColor(t.lineColor || "black", gA), this.pdfDocument.stroke());
              }
              renderImage(t) {
                let C = d(t.opacity) ? t.opacity : 1;
                if (this.pdfDocument.opacity(C), t.cover) {
                  const b = t.cover.align || "center", nA = t.cover.valign || "center", gA = t.cover.width ? t.cover.width : t.width, hA = t.cover.height ? t.cover.height : t.height;
                  this.pdfDocument.save(), this.pdfDocument.rect(t.x, t.y, gA, hA).clip(), this.pdfDocument.image(t.image, t.x, t.y, {
                    cover: [gA, hA],
                    align: b,
                    valign: nA
                  }), this.pdfDocument.restore();
                } else
                  this.pdfDocument.image(t.image, t.x, t.y, {
                    width: t._width,
                    height: t._height
                  });
                if (t.link && this.pdfDocument.link(t.x, t.y, t._width, t._height, t.link), t.linkToPage && (this.pdfDocument.ref({
                  Type: "Action",
                  S: "GoTo",
                  D: [t.linkToPage, 0, 0]
                }).end(), this.pdfDocument.annotate(t.x, t.y, t._width, t._height, {
                  Subtype: "Link",
                  Dest: [t.linkToPage - 1, "XYZ", null, null, null]
                })), t.linkToDestination && this.pdfDocument.goTo(t.x, t.y, t._width, t._height, t.linkToDestination), t.linkToFile) {
                  const b = this.pdfDocument.provideAttachment(t.linkToFile);
                  this.pdfDocument.fileAnnotation(
                    t.x,
                    t.y,
                    t._width,
                    t._height,
                    b,
                    // add empty rectangle as file annotation appearance with the same size as the rendered image
                    {
                      AP: {
                        N: {
                          Type: "XObject",
                          Subtype: "Form",
                          FormType: 1,
                          BBox: [t.x, t.y, t._width, t._height]
                        }
                      }
                    }
                  );
                }
              }
              renderSVG(t) {
                let C = {
                  width: t._width,
                  height: t._height,
                  assumePt: !0,
                  useCSS: !P(t.svg),
                  ...t.options
                };
                C.fontCallback = (b, nA, gA) => {
                  let hA = b.split(",").map((fe) => fe.trim().replace(/('|")/g, "")), HA = er(this.pdfDocument.fonts, hA, t.font || "Roboto"), GA = this.pdfDocument.getFontFile(HA, nA, gA);
                  if (GA === null) {
                    let fe = this.pdfDocument.getFontType(nA, gA);
                    throw new Error(`Font '${HA}' in style '${fe}' is not defined in the font section of the document definition.`);
                  }
                  return GA;
                }, (0, Ar.A)(this.pdfDocument, t.svg, t.x, t.y, C), t.link && this.pdfDocument.link(t.x, t.y, t._width, t._height, t.link), t.linkToPage && (this.pdfDocument.ref({
                  Type: "Action",
                  S: "GoTo",
                  D: [t.linkToPage, 0, 0]
                }).end(), this.pdfDocument.annotate(t.x, t.y, t._width, t._height, {
                  Subtype: "Link",
                  Dest: [t.linkToPage - 1, "XYZ", null, null, null]
                })), t.linkToDestination && this.pdfDocument.goTo(t.x, t.y, t._width, t._height, t.linkToDestination);
              }
              renderAttachment(t) {
                const C = this.pdfDocument.provideAttachment(t.attachment), b = {};
                t.icon && (b.Name = t.icon), this.pdfDocument.fileAnnotation(t.x, t.y, t._width, t._height, C, b);
              }
              beginClip(t) {
                this.pdfDocument.save(), this.pdfDocument.addContent(`${t.x} ${t.y} ${t.width} ${t.height} re`), this.pdfDocument.clip();
              }
              endClip() {
                this.pdfDocument.restore();
              }
              beginVerticalAlignment(t) {
                if (!t.isCellContentMultiPage)
                  switch (t.verticalAlignment) {
                    case "middle":
                      this.pdfDocument.save(), this.pdfDocument.translate(0, -(t.getNodeHeight() - t.getViewHeight()) / 2);
                      break;
                    case "bottom":
                      this.pdfDocument.save(), this.pdfDocument.translate(0, -(t.getNodeHeight() - t.getViewHeight()));
                      break;
                  }
              }
              endVerticalAlignment(t) {
                if (!t.isCellContentMultiPage)
                  switch (t.verticalAlignment) {
                    case "middle":
                    case "bottom":
                      this.pdfDocument.restore();
                      break;
                  }
              }
              renderWatermark(t) {
                let C = t.watermark;
                this.pdfDocument.fill(C.color), this.pdfDocument.opacity(C.opacity), this.pdfDocument.save(), this.pdfDocument.rotate(C.angle, {
                  origin: [this.pdfDocument.page.width / 2, this.pdfDocument.page.height / 2]
                });
                let b = this.pdfDocument.page.width / 2 - C._size.size.width / 2, nA = this.pdfDocument.page.height / 2 - C._size.size.height / 2;
                this.pdfDocument._font = C.font, this.pdfDocument.fontSize(C.fontSize), this.pdfDocument.text(C.text, b, nA, {
                  lineBreak: !1
                }), this.pdfDocument.restore();
              }
            }
            const ir = tr;
            class nr {
              /**
               * @param {object} fontDescriptors font definition dictionary
               * @param {object} virtualfs
               * @param {object} urlResolver
               */
              constructor(t, C, b) {
                this.fontDescriptors = t, this.virtualfs = C, this.urlResolver = b;
              }
              /**
               * Executes layout engine for the specified document and renders it into a pdfkit document
               * ready to be saved.
               *
               * @param {object} docDefinition
               * @param {object} options
               * @returns {Promise<PDFDocument>} resolved promise return a pdfkit document
               */
              async createPdfKitDocument(t, C) {
                C === void 0 && (C = {}), await this.resolveUrls(t), t.version = t.version || "1.3", t.subset = t.subset || void 0, t.tagged = typeof t.tagged == "boolean" ? t.tagged : !1, t.displayTitle = typeof t.displayTitle == "boolean" ? t.displayTitle : !1, t.compress = typeof t.compress == "boolean" ? t.compress : !0, t.images = t.images || {}, t.attachments = t.attachments || {}, t.pageMargins = K(t.pageMargins) ? t.pageMargins : 40, t.patterns = t.patterns || {}, t.header && typeof t.header != "function" && (t.header = MA(t.header)), t.footer && typeof t.footer != "function" && (t.footer = MA(t.footer));
                let b = St(t.pageSize, t.pageOrientation), nA = {
                  size: [b.width, b.height],
                  pdfVersion: t.version,
                  subset: t.subset,
                  tagged: t.tagged,
                  displayTitle: t.displayTitle,
                  compress: t.compress,
                  userPassword: t.userPassword,
                  ownerPassword: t.ownerPassword,
                  permissions: t.permissions,
                  lang: t.language,
                  fontLayoutCache: typeof C.fontLayoutCache == "boolean" ? C.fontLayoutCache : !0,
                  bufferPages: C.bufferPages || !1,
                  autoFirstPage: !1,
                  info: vr(t),
                  font: null
                };
                this.pdfKitDoc = new N(this.fontDescriptors, t.images, t.patterns, t.attachments, nA, this.virtualfs), br(t, this.pdfKitDoc);
                const gA = new Oi(b, ri(t.pageMargins), new en());
                gA.registerTableLayouts(Be), C.tableLayouts && gA.registerTableLayouts(C.tableLayouts);
                let hA = gA.layoutDocument(t.content, this.pdfKitDoc, t.styles || {}, t.defaultStyle || {
                  fontSize: 12,
                  font: "Roboto"
                }, t.background, t.header, t.footer, t.watermark, t.pageBreakBefore), HA = t.maxPagesNumber || -1;
                return d(HA) && HA > -1 && (hA = hA.slice(0, HA)), hA.forEach((fe) => {
                  fe.pageSize.height === 1 / 0 && (fe.pageSize.height = zr(fe, fe.pageMargins));
                }), new ir(this.pdfKitDoc, C.progressCallback).renderPages(hA), this.pdfKitDoc;
              }
              /**
               * @param {object} docDefinition
               * @returns {Promise}
               */
              async resolveUrls(t) {
                const C = (b) => typeof b == "object" ? {
                  url: b.url,
                  headers: b.headers
                } : {
                  url: b,
                  headers: {}
                };
                for (let b in this.fontDescriptors)
                  if (this.fontDescriptors.hasOwnProperty(b)) {
                    if (this.fontDescriptors[b].normal)
                      if (Array.isArray(this.fontDescriptors[b].normal)) {
                        let nA = C(this.fontDescriptors[b].normal[0]);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].normal[0] = nA.url;
                      } else {
                        let nA = C(this.fontDescriptors[b].normal);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].normal = nA.url;
                      }
                    if (this.fontDescriptors[b].bold)
                      if (Array.isArray(this.fontDescriptors[b].bold)) {
                        let nA = C(this.fontDescriptors[b].bold[0]);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].bold[0] = nA.url;
                      } else {
                        let nA = C(this.fontDescriptors[b].bold);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].bold = nA.url;
                      }
                    if (this.fontDescriptors[b].italics)
                      if (Array.isArray(this.fontDescriptors[b].italics)) {
                        let nA = C(this.fontDescriptors[b].italics[0]);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].italics[0] = nA.url;
                      } else {
                        let nA = C(this.fontDescriptors[b].italics);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].italics = nA.url;
                      }
                    if (this.fontDescriptors[b].bolditalics)
                      if (Array.isArray(this.fontDescriptors[b].bolditalics)) {
                        let nA = C(this.fontDescriptors[b].bolditalics[0]);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].bolditalics[0] = nA.url;
                      } else {
                        let nA = C(this.fontDescriptors[b].bolditalics);
                        this.urlResolver.resolve(nA.url, nA.headers), this.fontDescriptors[b].bolditalics = nA.url;
                      }
                  }
                if (t.images) {
                  for (let b in t.images)
                    if (t.images.hasOwnProperty(b)) {
                      let nA = C(t.images[b]);
                      this.urlResolver.resolve(nA.url, nA.headers), t.images[b] = nA.url;
                    }
                }
                if (t.attachments) {
                  for (let b in t.attachments)
                    if (t.attachments.hasOwnProperty(b) && t.attachments[b].src) {
                      let nA = C(t.attachments[b].src);
                      this.urlResolver.resolve(nA.url, nA.headers), t.attachments[b].src = nA.url;
                    }
                }
                if (t.files) {
                  for (let b in t.files)
                    if (t.files.hasOwnProperty(b) && t.files[b].src) {
                      let nA = C(t.files[b].src);
                      this.urlResolver.resolve(nA.url, nA.headers), t.files[b].src = nA.url;
                    }
                }
                await this.urlResolver.resolved();
              }
            }
            function vr(NA) {
              function t(b) {
                let nA = ["Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", "ModDate", "Trapped"], gA = b.charAt(0).toUpperCase() + b.slice(1);
                return nA.includes(gA) ? gA : b.replace(/\s+/g, "");
              }
              let C = {
                Producer: "pdfmake",
                Creator: "pdfmake"
              };
              if (NA.info)
                for (let b in NA.info) {
                  let nA = NA.info[b];
                  nA && (b = t(b), C[b] = nA);
                }
              return C;
            }
            function br(NA, t) {
              if (NA.files)
                for (const C in NA.files) {
                  const b = NA.files[C];
                  if (!b.src) return;
                  t.virtualfs && t.virtualfs.existsSync(b.src) && (b.src = t.virtualfs.readFileSync(b.src)), b.name = b.name || C, t.file(b.src, b);
                }
            }
            function zr(NA, t) {
              function C(hA) {
                return typeof hA.item.getHeight == "function" ? hA.item.getHeight() : hA.item._height ? hA.item._height : hA.type === "vector" ? typeof hA.item.y1 < "u" ? hA.item.y1 > hA.item.y2 ? hA.item.y1 : hA.item.y2 : hA.item.h : 0;
              }
              function b(hA) {
                let HA = hA.item.y || 0, GA = C(hA);
                return HA + GA;
              }
              let nA = ri(t || 40), gA = nA.top;
              return NA.items.forEach((hA) => {
                let HA = b(hA);
                HA > gA && (gA = HA);
              }), gA += nA.bottom, gA;
            }
            const Tr = nr;
            var Ur = r(6811);
            async function rr(NA, t) {
              t === void 0 && (t = {});
              try {
                const C = await fetch(NA, {
                  headers: t
                });
                if (!C.ok)
                  throw new Error(`Failed to fetch (status code: ${C.status}, url: "${NA}")`);
                return await C.arrayBuffer();
              } catch (C) {
                throw new Error(`Network request failed (url: "${NA}", error: ${C.message})`, {
                  cause: C
                });
              }
            }
            class Nr {
              constructor(t) {
                this.fs = t, this.resolving = {}, this.urlAccessPolicy = void 0;
              }
              /**
               * @param {(url: string) => boolean} callback
               */
              setUrlAccessPolicy(t) {
                this.urlAccessPolicy = t;
              }
              resolve(t, C) {
                C === void 0 && (C = {});
                const b = async () => {
                  if (t.toLowerCase().startsWith("https://") || t.toLowerCase().startsWith("http://")) {
                    if (this.fs.existsSync(t))
                      return;
                    if (typeof this.urlAccessPolicy < "u" && this.urlAccessPolicy(t) !== !0)
                      throw new Error(`Access to URL denied by resource access policy: ${t}`);
                    const nA = await rr(t, C);
                    this.fs.writeFileSync(t, nA);
                  }
                };
                return this.resolving[t] || (this.resolving[t] = b()), this.resolving[t];
              }
              resolved() {
                return Promise.all(Object.values(this.resolving));
              }
            }
            const sr = Nr;
            var bn = r(9964);
            class Dn {
              constructor() {
                this.virtualfs = Ur.default, this.urlAccessPolicy = void 0;
              }
              /**
               * @param {object} docDefinition
               * @param {?object} options
               * @returns {object}
               */
              createPdf(t, C) {
                if (C === void 0 && (C = {}), !q(t))
                  throw new Error("Parameter 'docDefinition' has an invalid type. Object expected.");
                if (!q(C))
                  throw new Error("Parameter 'options' has an invalid type. Object expected.");
                C.progressCallback = this.progressCallback, C.tableLayouts = this.tableLayouts;
                const b = typeof bn < "u" && bn?.versions?.node;
                typeof this.urlAccessPolicy > "u" && b && console.warn("No URL access policy defined. Consider using setUrlAccessPolicy() to restrict external resource downloads.");
                let nA = new sr(this.virtualfs);
                nA.setUrlAccessPolicy(this.urlAccessPolicy);
                const hA = new Tr(this.fonts, this.virtualfs, nA).createPdfKitDocument(t, C);
                return this._transformToDocument(hA);
              }
              /**
               * @param {(url: string) => boolean} callback
               */
              setUrlAccessPolicy(t) {
                if (t !== void 0 && typeof t != "function")
                  throw new Error("Parameter 'callback' has an invalid type. Function or undefined expected.");
                this.urlAccessPolicy = t;
              }
              setProgressCallback(t) {
                this.progressCallback = t;
              }
              addTableLayouts(t) {
                this.tableLayouts = ee(this.tableLayouts, t);
              }
              setTableLayouts(t) {
                this.tableLayouts = t;
              }
              clearTableLayouts() {
                this.tableLayouts = {};
              }
              addFonts(t) {
                this.fonts = ee(this.fonts, t);
              }
              setFonts(t) {
                this.fonts = t;
              }
              clearFonts() {
                this.fonts = {};
              }
              _transformToDocument(t) {
                return t;
              }
            }
            const kn = Dn;
            var Rr = r(783).Buffer;
            class ar {
              /**
               * @param {Promise<object>} pdfDocumentPromise
               */
              constructor(t) {
                this.bufferSize = 1073741824, this.pdfDocumentPromise = t, this.bufferPromise = null;
              }
              /**
               * @returns {Promise<object>}
               */
              getStream() {
                return this.pdfDocumentPromise;
              }
              /**
               * @returns {Promise<Buffer>}
               */
              getBuffer() {
                const t = async () => {
                  const C = await this.getStream();
                  return new Promise((b) => {
                    let nA = [];
                    C.on("readable", () => {
                      let gA;
                      for (; (gA = C.read(this.bufferSize)) !== null; )
                        nA.push(gA);
                    }), C.on("end", () => {
                      b(Rr.concat(nA));
                    }), C.end();
                  });
                };
                return this.bufferPromise === null && (this.bufferPromise = t()), this.bufferPromise;
              }
              /**
               * @returns {Promise<string>}
               */
              async getBase64() {
                return (await this.getBuffer()).toString("base64");
              }
              /**
               * @returns {Promise<string>}
               */
              async getDataUrl() {
                return "data:application/pdf;base64," + await this.getBase64();
              }
            }
            const Sr = ar;
            var Vi = r(6457);
            const Gr = () => {
              let NA = window.open("", "_blank");
              if (NA === null)
                throw new Error("Open PDF in new window blocked by browser");
              return NA;
            };
            class Bn extends Sr {
              /**
               * @returns {Promise<Blob>}
               */
              async getBlob() {
                const t = await this.getBuffer();
                return new Blob([t], {
                  type: "application/pdf"
                });
              }
              /**
               * @param {string} filename
               * @returns {Promise}
               */
              async download(t) {
                t === void 0 && (t = "file.pdf");
                const C = await this.getBlob();
                (0, Vi.saveAs)(C, t);
              }
              /**
               * @param {Window} win
               * @returns {Promise}
               */
              async open(t) {
                t === void 0 && (t = null), t || (t = Gr());
                const C = await this.getBlob();
                try {
                  let nA = (window.URL || window.webkitURL).createObjectURL(C);
                  t.location.href = nA;
                } catch (b) {
                  throw t.close(), b;
                }
              }
              /**
               * @param {Window} win
               * @returns {Promise}
               */
              async print(t) {
                t === void 0 && (t = null), (await this.getStream()).setOpenActionAsPrint(), await this.open(t);
              }
            }
            const Hr = Bn;
            var Lr = r(2416), kr = /* @__PURE__ */ r.n(Lr), dn = r(890), jr = /* @__PURE__ */ r.n(dn);
            jr()({
              useNative: ["Promise"]
            });
            let or = {
              Roboto: {
                normal: "Roboto-Regular.ttf",
                bold: "Roboto-Medium.ttf",
                italics: "Roboto-Italic.ttf",
                bolditalics: "Roboto-MediumItalic.ttf"
              }
            };
            class jn extends kn {
              constructor() {
                super(), this.fonts = or;
              }
              addFontContainer(t) {
                this.addVirtualFileSystem(t.vfs), this.addFonts(t.fonts);
              }
              addVirtualFileSystem(t) {
                for (let C in t)
                  if (t.hasOwnProperty(C)) {
                    let b, nA;
                    typeof t[C] == "object" ? (b = t[C].data, nA = t[C].encoding || "base64") : (b = t[C], nA = "base64"), kr().writeFileSync(C, b, nA);
                  }
              }
              _transformToDocument(t) {
                return new Hr(t);
              }
            }
            const Or = new jn();
          },
          /***/
          2736(Q, B, r) {
            Q.exports = r(7133).default;
          },
          /***/
          2416(Q, B, r) {
            Q.exports = r(6811).default;
          },
          /***/
          6811(Q, B, r) {
            var A = "/";
            r.d(B, {
              /* harmony export */
              default: () => N
              /* harmony export */
            });
            var a = r(783).Buffer;
            const D = (P) => (P.indexOf(A) === 0 && (P = P.substring(A.length)), P.indexOf("/") === 0 && (P = P.substring(1)), P);
            class x {
              constructor() {
                this.storage = {};
              }
              /**
               * @param {string} filename
               * @returns {boolean}
               */
              existsSync(d) {
                const J = D(d);
                return typeof this.storage[J] < "u";
              }
              /**
               * @param {string} filename
               * @param {?string|?object} options
               * @returns {string|Buffer}
               */
              readFileSync(d, J) {
                const q = D(d), AA = typeof J == "object" ? J.encoding : J;
                if (!this.existsSync(q))
                  throw new Error(`File '${q}' not found in virtual file system`);
                const K = this.storage[q];
                return AA ? K.toString(AA) : K;
              }
              /**
               * @param {string} filename
               * @param {string|Buffer} content
               * @param {?string|?object} options
               */
              writeFileSync(d, J, q) {
                const AA = D(d), K = typeof q == "object" ? q.encoding : q;
                if (!J && !q)
                  throw new Error("No content");
                this.storage[AA] = K || typeof J == "string" ? new a(J, K) : J;
              }
            }
            const N = new x();
          },
          /***/
          6582(Q, B, r) {
            B.A = void 0;
            var A = a(r(7696));
            function a(D) {
              return D && D.__esModule ? D : { default: D };
            }
            B.A = A.default;
          },
          /***/
          7696(Q, B, r) {
            Q = r.nmd(Q);
            var A = function(a, D, x, N, P) {
              const d = {
                aliceblue: [240, 248, 255],
                antiquewhite: [250, 235, 215],
                aqua: [0, 255, 255],
                aquamarine: [127, 255, 212],
                azure: [240, 255, 255],
                beige: [245, 245, 220],
                bisque: [255, 228, 196],
                black: [0, 0, 0],
                blanchedalmond: [255, 235, 205],
                blue: [0, 0, 255],
                blueviolet: [138, 43, 226],
                brown: [165, 42, 42],
                burlywood: [222, 184, 135],
                cadetblue: [95, 158, 160],
                chartreuse: [127, 255, 0],
                chocolate: [210, 105, 30],
                coral: [255, 127, 80],
                cornflowerblue: [100, 149, 237],
                cornsilk: [255, 248, 220],
                crimson: [220, 20, 60],
                cyan: [0, 255, 255],
                darkblue: [0, 0, 139],
                darkcyan: [0, 139, 139],
                darkgoldenrod: [184, 134, 11],
                darkgray: [169, 169, 169],
                darkgrey: [169, 169, 169],
                darkgreen: [0, 100, 0],
                darkkhaki: [189, 183, 107],
                darkmagenta: [139, 0, 139],
                darkolivegreen: [85, 107, 47],
                darkorange: [255, 140, 0],
                darkorchid: [153, 50, 204],
                darkred: [139, 0, 0],
                darksalmon: [233, 150, 122],
                darkseagreen: [143, 188, 143],
                darkslateblue: [72, 61, 139],
                darkslategray: [47, 79, 79],
                darkslategrey: [47, 79, 79],
                darkturquoise: [0, 206, 209],
                darkviolet: [148, 0, 211],
                deeppink: [255, 20, 147],
                deepskyblue: [0, 191, 255],
                dimgray: [105, 105, 105],
                dimgrey: [105, 105, 105],
                dodgerblue: [30, 144, 255],
                firebrick: [178, 34, 34],
                floralwhite: [255, 250, 240],
                forestgreen: [34, 139, 34],
                fuchsia: [255, 0, 255],
                gainsboro: [220, 220, 220],
                ghostwhite: [248, 248, 255],
                gold: [255, 215, 0],
                goldenrod: [218, 165, 32],
                gray: [128, 128, 128],
                grey: [128, 128, 128],
                green: [0, 128, 0],
                greenyellow: [173, 255, 47],
                honeydew: [240, 255, 240],
                hotpink: [255, 105, 180],
                indianred: [205, 92, 92],
                indigo: [75, 0, 130],
                ivory: [255, 255, 240],
                khaki: [240, 230, 140],
                lavender: [230, 230, 250],
                lavenderblush: [255, 240, 245],
                lawngreen: [124, 252, 0],
                lemonchiffon: [255, 250, 205],
                lightblue: [173, 216, 230],
                lightcoral: [240, 128, 128],
                lightcyan: [224, 255, 255],
                lightgoldenrodyellow: [250, 250, 210],
                lightgray: [211, 211, 211],
                lightgrey: [211, 211, 211],
                lightgreen: [144, 238, 144],
                lightpink: [255, 182, 193],
                lightsalmon: [255, 160, 122],
                lightseagreen: [32, 178, 170],
                lightskyblue: [135, 206, 250],
                lightslategray: [119, 136, 153],
                lightslategrey: [119, 136, 153],
                lightsteelblue: [176, 196, 222],
                lightyellow: [255, 255, 224],
                lime: [0, 255, 0],
                limegreen: [50, 205, 50],
                linen: [250, 240, 230],
                magenta: [255, 0, 255],
                maroon: [128, 0, 0],
                mediumaquamarine: [102, 205, 170],
                mediumblue: [0, 0, 205],
                mediumorchid: [186, 85, 211],
                mediumpurple: [147, 112, 219],
                mediumseagreen: [60, 179, 113],
                mediumslateblue: [123, 104, 238],
                mediumspringgreen: [0, 250, 154],
                mediumturquoise: [72, 209, 204],
                mediumvioletred: [199, 21, 133],
                midnightblue: [25, 25, 112],
                mintcream: [245, 255, 250],
                mistyrose: [255, 228, 225],
                moccasin: [255, 228, 181],
                navajowhite: [255, 222, 173],
                navy: [0, 0, 128],
                oldlace: [253, 245, 230],
                olive: [128, 128, 0],
                olivedrab: [107, 142, 35],
                orange: [255, 165, 0],
                orangered: [255, 69, 0],
                orchid: [218, 112, 214],
                palegoldenrod: [238, 232, 170],
                palegreen: [152, 251, 152],
                paleturquoise: [175, 238, 238],
                palevioletred: [219, 112, 147],
                papayawhip: [255, 239, 213],
                peachpuff: [255, 218, 185],
                peru: [205, 133, 63],
                pink: [255, 192, 203],
                plum: [221, 160, 221],
                powderblue: [176, 224, 230],
                purple: [128, 0, 128],
                rebeccapurple: [102, 51, 153],
                red: [255, 0, 0],
                rosybrown: [188, 143, 143],
                royalblue: [65, 105, 225],
                saddlebrown: [139, 69, 19],
                salmon: [250, 128, 114],
                sandybrown: [244, 164, 96],
                seagreen: [46, 139, 87],
                seashell: [255, 245, 238],
                sienna: [160, 82, 45],
                silver: [192, 192, 192],
                skyblue: [135, 206, 235],
                slateblue: [106, 90, 205],
                slategray: [112, 128, 144],
                slategrey: [112, 128, 144],
                snow: [255, 250, 250],
                springgreen: [0, 255, 127],
                steelblue: [70, 130, 180],
                tan: [210, 180, 140],
                teal: [0, 128, 128],
                thistle: [216, 191, 216],
                tomato: [255, 99, 71],
                turquoise: [64, 224, 208],
                violet: [238, 130, 238],
                wheat: [245, 222, 179],
                white: [255, 255, 255],
                whitesmoke: [245, 245, 245],
                yellow: [255, 255, 0]
              }, J = {
                black: [d.black, 1],
                white: [d.white, 1],
                transparent: [d.black, 0]
              }, q = {
                quot: 34,
                amp: 38,
                lt: 60,
                gt: 62,
                apos: 39,
                OElig: 338,
                oelig: 339,
                Scaron: 352,
                scaron: 353,
                Yuml: 376,
                circ: 710,
                tilde: 732,
                ensp: 8194,
                emsp: 8195,
                thinsp: 8201,
                zwnj: 8204,
                zwj: 8205,
                lrm: 8206,
                rlm: 8207,
                ndash: 8211,
                mdash: 8212,
                lsquo: 8216,
                rsquo: 8217,
                sbquo: 8218,
                ldquo: 8220,
                rdquo: 8221,
                bdquo: 8222,
                dagger: 8224,
                Dagger: 8225,
                permil: 8240,
                lsaquo: 8249,
                rsaquo: 8250,
                euro: 8364,
                nbsp: 160,
                iexcl: 161,
                cent: 162,
                pound: 163,
                curren: 164,
                yen: 165,
                brvbar: 166,
                sect: 167,
                uml: 168,
                copy: 169,
                ordf: 170,
                laquo: 171,
                not: 172,
                shy: 173,
                reg: 174,
                macr: 175,
                deg: 176,
                plusmn: 177,
                sup2: 178,
                sup3: 179,
                acute: 180,
                micro: 181,
                para: 182,
                middot: 183,
                cedil: 184,
                sup1: 185,
                ordm: 186,
                raquo: 187,
                frac14: 188,
                frac12: 189,
                frac34: 190,
                iquest: 191,
                Agrave: 192,
                Aacute: 193,
                Acirc: 194,
                Atilde: 195,
                Auml: 196,
                Aring: 197,
                AElig: 198,
                Ccedil: 199,
                Egrave: 200,
                Eacute: 201,
                Ecirc: 202,
                Euml: 203,
                Igrave: 204,
                Iacute: 205,
                Icirc: 206,
                Iuml: 207,
                ETH: 208,
                Ntilde: 209,
                Ograve: 210,
                Oacute: 211,
                Ocirc: 212,
                Otilde: 213,
                Ouml: 214,
                times: 215,
                Oslash: 216,
                Ugrave: 217,
                Uacute: 218,
                Ucirc: 219,
                Uuml: 220,
                Yacute: 221,
                THORN: 222,
                szlig: 223,
                agrave: 224,
                aacute: 225,
                acirc: 226,
                atilde: 227,
                auml: 228,
                aring: 229,
                aelig: 230,
                ccedil: 231,
                egrave: 232,
                eacute: 233,
                ecirc: 234,
                euml: 235,
                igrave: 236,
                iacute: 237,
                icirc: 238,
                iuml: 239,
                eth: 240,
                ntilde: 241,
                ograve: 242,
                oacute: 243,
                ocirc: 244,
                otilde: 245,
                ouml: 246,
                divide: 247,
                oslash: 248,
                ugrave: 249,
                uacute: 250,
                ucirc: 251,
                uuml: 252,
                yacute: 253,
                thorn: 254,
                yuml: 255,
                fnof: 402,
                Alpha: 913,
                Beta: 914,
                Gamma: 915,
                Delta: 916,
                Epsilon: 917,
                Zeta: 918,
                Eta: 919,
                Theta: 920,
                Iota: 921,
                Kappa: 922,
                Lambda: 923,
                Mu: 924,
                Nu: 925,
                Xi: 926,
                Omicron: 927,
                Pi: 928,
                Rho: 929,
                Sigma: 931,
                Tau: 932,
                Upsilon: 933,
                Phi: 934,
                Chi: 935,
                Psi: 936,
                Omega: 937,
                alpha: 945,
                beta: 946,
                gamma: 947,
                delta: 948,
                epsilon: 949,
                zeta: 950,
                eta: 951,
                theta: 952,
                iota: 953,
                kappa: 954,
                lambda: 955,
                mu: 956,
                nu: 957,
                xi: 958,
                omicron: 959,
                pi: 960,
                rho: 961,
                sigmaf: 962,
                sigma: 963,
                tau: 964,
                upsilon: 965,
                phi: 966,
                chi: 967,
                psi: 968,
                omega: 969,
                thetasym: 977,
                upsih: 978,
                piv: 982,
                bull: 8226,
                hellip: 8230,
                prime: 8242,
                Prime: 8243,
                oline: 8254,
                frasl: 8260,
                weierp: 8472,
                image: 8465,
                real: 8476,
                trade: 8482,
                alefsym: 8501,
                larr: 8592,
                uarr: 8593,
                rarr: 8594,
                darr: 8595,
                harr: 8596,
                crarr: 8629,
                lArr: 8656,
                uArr: 8657,
                rArr: 8658,
                dArr: 8659,
                hArr: 8660,
                forall: 8704,
                part: 8706,
                exist: 8707,
                empty: 8709,
                nabla: 8711,
                isin: 8712,
                notin: 8713,
                ni: 8715,
                prod: 8719,
                sum: 8721,
                minus: 8722,
                lowast: 8727,
                radic: 8730,
                prop: 8733,
                infin: 8734,
                ang: 8736,
                and: 8743,
                or: 8744,
                cap: 8745,
                cup: 8746,
                int: 8747,
                there4: 8756,
                sim: 8764,
                cong: 8773,
                asymp: 8776,
                ne: 8800,
                equiv: 8801,
                le: 8804,
                ge: 8805,
                sub: 8834,
                sup: 8835,
                nsub: 8836,
                sube: 8838,
                supe: 8839,
                oplus: 8853,
                otimes: 8855,
                perp: 8869,
                sdot: 8901,
                lceil: 8968,
                rceil: 8969,
                lfloor: 8970,
                rfloor: 8971,
                lang: 9001,
                rang: 9002,
                loz: 9674,
                spades: 9824,
                clubs: 9827,
                hearts: 9829,
                diams: 9830
              }, AA = {
                A: 7,
                a: 7,
                C: 6,
                c: 6,
                H: 1,
                h: 1,
                L: 2,
                l: 2,
                M: 2,
                m: 2,
                Q: 4,
                q: 4,
                S: 4,
                s: 4,
                T: 2,
                t: 2,
                V: 1,
                v: 1,
                Z: 0,
                z: 0
              }, K = {
                A3: !0,
                A4: !0,
                a3: !0,
                a4: !0
              }, z = {
                color: {
                  inherit: !0,
                  initial: void 0
                },
                visibility: {
                  inherit: !0,
                  initial: "visible",
                  values: {
                    hidden: "hidden",
                    collapse: "hidden",
                    visible: "visible"
                  }
                },
                fill: {
                  inherit: !0,
                  initial: J.black
                },
                stroke: {
                  inherit: !0,
                  initial: "none"
                },
                "stop-color": {
                  inherit: !1,
                  initial: J.black
                },
                "fill-opacity": {
                  inherit: !0,
                  initial: 1
                },
                "stroke-opacity": {
                  inherit: !0,
                  initial: 1
                },
                "stop-opacity": {
                  inherit: !1,
                  initial: 1
                },
                "fill-rule": {
                  inherit: !0,
                  initial: "nonzero",
                  values: {
                    nonzero: "nonzero",
                    evenodd: "evenodd"
                  }
                },
                "clip-rule": {
                  inherit: !0,
                  initial: "nonzero",
                  values: {
                    nonzero: "nonzero",
                    evenodd: "evenodd"
                  }
                },
                "stroke-width": {
                  inherit: !0,
                  initial: 1
                },
                "stroke-dasharray": {
                  inherit: !0,
                  initial: []
                },
                "stroke-dashoffset": {
                  inherit: !0,
                  initial: 0
                },
                "stroke-miterlimit": {
                  inherit: !0,
                  initial: 4
                },
                "stroke-linejoin": {
                  inherit: !0,
                  initial: "miter",
                  values: {
                    miter: "miter",
                    round: "round",
                    bevel: "bevel"
                  }
                },
                "stroke-linecap": {
                  inherit: !0,
                  initial: "butt",
                  values: {
                    butt: "butt",
                    round: "round",
                    square: "square"
                  }
                },
                "font-size": {
                  inherit: !0,
                  initial: 16,
                  values: {
                    "xx-small": 9,
                    "x-small": 10,
                    small: 13,
                    medium: 16,
                    large: 18,
                    "x-large": 24,
                    "xx-large": 32
                  }
                },
                "font-family": {
                  inherit: !0,
                  initial: "sans-serif"
                },
                "font-weight": {
                  inherit: !0,
                  initial: "normal",
                  values: {
                    600: "bold",
                    700: "bold",
                    800: "bold",
                    900: "bold",
                    bold: "bold",
                    bolder: "bold",
                    500: "normal",
                    400: "normal",
                    300: "normal",
                    200: "normal",
                    100: "normal",
                    normal: "normal",
                    lighter: "normal"
                  }
                },
                "font-style": {
                  inherit: !0,
                  initial: "normal",
                  values: {
                    italic: "italic",
                    oblique: "italic",
                    normal: "normal"
                  }
                },
                "text-anchor": {
                  inherit: !0,
                  initial: "start",
                  values: {
                    start: "start",
                    middle: "middle",
                    end: "end"
                  }
                },
                direction: {
                  inherit: !0,
                  initial: "ltr",
                  values: {
                    ltr: "ltr",
                    rtl: "rtl"
                  }
                },
                "dominant-baseline": {
                  inherit: !0,
                  initial: "baseline",
                  values: {
                    auto: "baseline",
                    baseline: "baseline",
                    "before-edge": "before-edge",
                    "text-before-edge": "before-edge",
                    middle: "middle",
                    central: "central",
                    "after-edge": "after-edge",
                    "text-after-edge": "after-edge",
                    ideographic: "ideographic",
                    alphabetic: "alphabetic",
                    hanging: "hanging",
                    mathematical: "mathematical"
                  }
                },
                "alignment-baseline": {
                  inherit: !1,
                  initial: void 0,
                  values: {
                    auto: "baseline",
                    baseline: "baseline",
                    "before-edge": "before-edge",
                    "text-before-edge": "before-edge",
                    middle: "middle",
                    central: "central",
                    "after-edge": "after-edge",
                    "text-after-edge": "after-edge",
                    ideographic: "ideographic",
                    alphabetic: "alphabetic",
                    hanging: "hanging",
                    mathematical: "mathematical"
                  }
                },
                "baseline-shift": {
                  inherit: !0,
                  initial: "baseline",
                  values: {
                    baseline: "baseline",
                    sub: "sub",
                    super: "super"
                  }
                },
                "word-spacing": {
                  inherit: !0,
                  initial: 0,
                  values: {
                    normal: 0
                  }
                },
                "letter-spacing": {
                  inherit: !0,
                  initial: 0,
                  values: {
                    normal: 0
                  }
                },
                "text-decoration": {
                  inherit: !1,
                  initial: "none",
                  values: {
                    none: "none",
                    underline: "underline",
                    overline: "overline",
                    "line-through": "line-through"
                  }
                },
                "xml:space": {
                  inherit: !0,
                  initial: "default",
                  css: "white-space",
                  values: {
                    preserve: "preserve",
                    default: "default",
                    pre: "preserve",
                    "pre-line": "preserve",
                    "pre-wrap": "preserve",
                    nowrap: "default"
                  }
                },
                "marker-start": {
                  inherit: !0,
                  initial: "none"
                },
                "marker-mid": {
                  inherit: !0,
                  initial: "none"
                },
                "marker-end": {
                  inherit: !0,
                  initial: "none"
                },
                opacity: {
                  inherit: !1,
                  initial: 1
                },
                transform: {
                  inherit: !1,
                  initial: [1, 0, 0, 1, 0, 0]
                },
                display: {
                  inherit: !1,
                  initial: "inline",
                  values: {
                    none: "none",
                    inline: "inline",
                    block: "inline"
                  }
                },
                "clip-path": {
                  inherit: !1,
                  initial: "none"
                },
                mask: {
                  inherit: !1,
                  initial: "none"
                },
                overflow: {
                  inherit: !1,
                  initial: "hidden",
                  values: {
                    hidden: "hidden",
                    scroll: "hidden",
                    visible: "visible"
                  }
                },
                "vector-effect": {
                  inherit: !0,
                  initial: "none",
                  values: {
                    none: "none",
                    "non-scaling-stroke": "non-scaling-stroke"
                  }
                }
              };
              function T(vA) {
                let UA = new function() {
                }();
                return UA.name = "G" + (a._groupCount = (a._groupCount || 0) + 1), UA.resources = a.ref(), UA.xobj = a.ref({
                  Type: "XObject",
                  Subtype: "Form",
                  FormType: 1,
                  BBox: vA,
                  Group: {
                    S: "Transparency",
                    CS: "DeviceRGB",
                    I: !0,
                    K: !1
                  },
                  Resources: UA.resources
                }), UA.xobj.write(""), UA.savedMatrix = a._ctm, UA.savedPage = a.page, ut.push(UA), a._ctm = [1, 0, 0, 1, 0, 0], a.page = {
                  width: a.page.width,
                  height: a.page.height,
                  write: function(mA) {
                    UA.xobj.write(mA);
                  },
                  fonts: {},
                  xobjects: {},
                  ext_gstates: {},
                  patterns: {}
                }, UA;
              }
              function H(vA) {
                if (vA !== ut.pop())
                  throw "Group not matching";
                Object.keys(a.page.fonts).length && (vA.resources.data.Font = a.page.fonts), Object.keys(a.page.xobjects).length && (vA.resources.data.XObject = a.page.xobjects), Object.keys(a.page.ext_gstates).length && (vA.resources.data.ExtGState = a.page.ext_gstates), Object.keys(a.page.patterns).length && (vA.resources.data.Pattern = a.page.patterns), vA.resources.end(), vA.xobj.end(), a._ctm = vA.savedMatrix, a.page = vA.savedPage;
              }
              function eA(vA) {
                a.page.xobjects[vA.name] = vA.xobj, a.addContent("/" + vA.name + " Do");
              }
              function CA(vA, UA) {
                let mA = "M" + (a._maskCount = (a._maskCount || 0) + 1), _A = a.ref({
                  Type: "ExtGState",
                  CA: 1,
                  ca: 1,
                  BM: "Normal",
                  SMask: {
                    S: "Luminosity",
                    G: vA.xobj,
                    BC: [0, 0, 0]
                  }
                });
                _A.end(), a.page.ext_gstates[mA] = _A, a.addContent("/" + mA + " gs");
              }
              function IA(vA, UA, mA, _A) {
                return {
                  type: "PDFPattern",
                  group: vA,
                  dx: UA,
                  dy: mA,
                  matrix: _A || [1, 0, 0, 1, 0, 0]
                };
              }
              function k(vA, UA) {
                let mA = "P" + (a._patternCount = (a._patternCount || 0) + 1), _A = a.ref({
                  Type: "Pattern",
                  PatternType: 1,
                  PaintType: 1,
                  TilingType: 2,
                  BBox: [0, 0, vA.dx, vA.dy],
                  XStep: vA.dx,
                  YStep: vA.dy,
                  Matrix: zA(a._ctm, vA.matrix),
                  Resources: {
                    ProcSet: ["PDF", "Text", "ImageB", "ImageC", "ImageI"],
                    XObject: (function() {
                      let $A = {};
                      return $A[vA.group.name] = vA.group.xobj, $A;
                    })()
                  }
                });
                _A.write("/" + vA.group.name + " Do"), _A.end(), a.page.patterns[mA] = _A, UA ? (a.addContent("/Pattern CS"), a.addContent("/" + mA + " SCN")) : (a.addContent("/Pattern cs"), a.addContent("/" + mA + " scn"));
              }
              function tA(vA, UA) {
                a.page.fonts[vA.id] || (a.page.fonts[vA.id] = vA.ref()), a.addContent("BT").addContent("/" + vA.id + " " + UA + " Tf");
              }
              function lA(vA, UA, mA, _A, $A, jA) {
                a.addContent(_(vA) + " " + _(UA) + " " + _(-mA) + " " + _(-_A) + " " + _($A) + " " + _(jA) + " Tm");
              }
              function uA(vA, UA) {
                let mA = vA && UA ? 2 : UA ? 1 : vA ? 0 : 3;
                a.addContent(mA + " Tr");
              }
              function w(vA, UA) {
                let mA = [], _A = "";
                const $A = UA.fauxItalic ? -0.25 : 0;
                function jA(JA) {
                  _A += JA.glyph, JA.kern !== 0 && (mA.push(`<${_A}> ${_(JA.kern)}`), _A = "");
                }
                function le() {
                  _A.length && (mA.push(`<${_A}> 0`), _A = ""), mA.length && (a.addContent(`[${mA.join(" ")}] TJ`), mA = []);
                }
                for (let JA = 0; JA < vA.length; JA++) {
                  const ne = vA[JA];
                  if (ne.hidden || o(ne.width, 0)) {
                    le();
                    continue;
                  }
                  if (ne.continuous) {
                    jA(ne);
                    continue;
                  }
                  le();
                  const ae = Math.cos(ne.rotate), ve = Math.sin(ne.rotate);
                  lA(ae * ne.scale, ve * ne.scale, ae * $A - ve, ve * $A + ae, ne.x, ne.y), jA(ne);
                }
                le();
              }
              function v() {
                a.addContent("ET");
              }
              function RA(vA) {
                vA[0].type === "PDFPattern" ? (a.fillOpacity(vA[1]), k(vA[0], !1)) : a.fillColor(vA[0], vA[1]);
              }
              function DA(vA) {
                vA[0].type === "PDFPattern" ? (a.strokeOpacity(vA[1]), k(vA[0], !0)) : a.strokeColor(vA[0], vA[1]);
              }
              function $(vA, UA) {
                let mA;
                for (; (mA = vA.slice(1, -1).indexOf(0)) !== -1; ) {
                  let $A = mA + 1, jA = vA[$A - 1] + vA[$A + 1];
                  vA = vA.slice(0, $A - 1).concat([jA]).concat(vA.slice($A + 2));
                }
                if (vA.length === 2)
                  if (vA[0] === 0) {
                    a.strokeOpacity(0);
                    return;
                  } else vA[1] === 0 && (vA = []);
                else
                  vA[0] === 0 && (UA -= vA[1], vA[vA.length - 1] += vA[1], vA = vA.slice(2)), vA[vA.length - 1] === 0 && (UA += vA[vA.length - 2], vA[0] += vA[vA.length - 2], vA = vA.slice(0, -2));
                let _A = 0;
                for (let $A = 0; $A < vA.length; $A++)
                  _A += vA[$A];
                if (_A > 0)
                  for (; UA < 0; )
                    UA += _A;
                a.dash(vA, {
                  phase: UA
                });
              }
              function cA(vA, UA, mA, _A, $A) {
                let jA = a.ref({
                  Type: "Annot",
                  Subtype: "Link",
                  Rect: [vA, UA, mA, _A],
                  Border: [0, 0, 0],
                  A: {
                    S: "URI",
                    URI: new String($A)
                  }
                });
                jA.end(), wi.push(jA);
              }
              function Ae(vA) {
                let UA = function(JA, ne, ae, ve) {
                  this.error = ve, this.nodeName = JA, this.nodeValue = ae, this.nodeType = ne, this.attributes = /* @__PURE__ */ Object.create(null), this.childNodes = [], this.parentNode = null, this.id = "", this.textContent = "", this.classList = [];
                };
                UA.prototype.getAttribute = function(JA) {
                  return this.attributes[JA] != null ? this.attributes[JA] : null;
                }, UA.prototype.getElementById = function(JA) {
                  let ne = null;
                  return (function ae(ve) {
                    if (!ne && ve.nodeType === 1) {
                      ve.id === JA && (ne = ve);
                      for (let ze = 0; ze < ve.childNodes.length; ze++)
                        ae(ve.childNodes[ze]);
                    }
                  })(this), ne;
                }, UA.prototype.getElementsByTagName = function(JA) {
                  let ne = [];
                  return (function ae(ve) {
                    if (ve.nodeType === 1) {
                      ve.nodeName === JA && ne.push(ve);
                      for (let ze = 0; ze < ve.childNodes.length; ze++)
                        ae(ve.childNodes[ze]);
                    }
                  })(this), ne;
                };
                let mA = new Re(vA.trim()), _A, $A, jA = !1, le = function() {
                  let JA, ne;
                  if (JA = mA.match(/^<([\w:.-]+)\s*/, !0)) {
                    let ae = new UA(JA[1], 1, null, jA);
                    for (; JA = mA.match(/^([\w:.-]+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?\s*/, !0); ) {
                      let ve = JA[1], ze = kA(JA[2] || JA[3] || "");
                      ae.attributes[ve] ? (bt('parseXml: duplicate attribute "' + ve + '"'), jA = !0) : (ae.attributes[ve] = ze, ve === "id" && (ae.id = ze), ve === "class" && (ae.classList = ze.split(" ")));
                    }
                    if (mA.match(/^>/)) {
                      for (; ne = le(); )
                        ae.childNodes.push(ne), ne.parentNode = ae, ae.textContent += ne.nodeType === 3 || ne.nodeType === 4 ? ne.nodeValue : ne.textContent;
                      return (JA = mA.match(/^<\/([\w:.-]+)\s*>/, !0)) ? (JA[1] === ae.nodeName || (bt('parseXml: tag not matching, opening "' + ae.nodeName + '" & closing "' + JA[1] + '"'), jA = !0), ae) : (bt('parseXml: tag not matching, opening "' + ae.nodeName + '" & not closing'), jA = !0, ae);
                    } else {
                      if (mA.match(/^\/>/))
                        return ae;
                      bt('parseXml: tag could not be parsed "' + ae.nodeName + '"'), jA = !0;
                    }
                  } else {
                    if (JA = mA.match(/^<!--[\s\S]*?-->/))
                      return new UA(null, 8, JA, jA);
                    if (JA = mA.match(/^<\?[\s\S]*?\?>/))
                      return new UA(null, 7, JA, jA);
                    if (JA = mA.match(/^<!DOCTYPE\s*([\s\S]*?)>/))
                      return new UA(null, 10, JA, jA);
                    if (JA = mA.match(/^<!\[CDATA\[([\s\S]*?)\]\]>/, !0))
                      return new UA("#cdata-section", 4, JA[1], jA);
                    if (JA = mA.match(/^([^<]+)/, !0))
                      return new UA("#text", 3, kA(JA[1]), jA);
                  }
                };
                for (; $A = le(); )
                  $A.nodeType === 1 && !_A ? _A = $A : ($A.nodeType === 1 || $A.nodeType === 3 && $A.nodeValue.trim() !== "") && bt("parseXml: data after document end has been discarded");
                return mA.matchAll() && bt("parseXml: parsing error"), _A;
              }
              function kA(vA) {
                return vA.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g, function(UA, mA, _A, $A) {
                  return mA ? String.fromCharCode(parseInt(mA, 10)) : _A ? String.fromCharCode(parseInt(_A, 16)) : $A && q[$A] ? String.fromCharCode(q[$A]) : UA;
                });
              }
              function VA(vA) {
                let UA, mA;
                return vA = (vA || "").trim(), (UA = d[vA]) ? mA = [UA.slice(), 1] : (UA = vA.match(/^cmyk\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i)) ? (UA[1] = parseInt(UA[1]), UA[2] = parseInt(UA[2]), UA[3] = parseInt(UA[3]), UA[4] = parseFloat(UA[4]), UA[1] <= 100 && UA[2] <= 100 && UA[3] <= 100 && UA[4] <= 100 && (mA = [UA.slice(1, 5), 1])) : (UA = vA.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i)) ? (UA[1] = parseInt(UA[1]), UA[2] = parseInt(UA[2]), UA[3] = parseInt(UA[3]), UA[4] = parseFloat(UA[4]), UA[1] < 256 && UA[2] < 256 && UA[3] < 256 && UA[4] <= 1 && (mA = [UA.slice(1, 4), UA[4]])) : (UA = vA.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i)) ? (UA[1] = parseInt(UA[1]), UA[2] = parseInt(UA[2]), UA[3] = parseInt(UA[3]), UA[1] < 256 && UA[2] < 256 && UA[3] < 256 && (mA = [UA.slice(1, 4), 1])) : (UA = vA.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i)) ? (UA[1] = 2.55 * parseFloat(UA[1]), UA[2] = 2.55 * parseFloat(UA[2]), UA[3] = 2.55 * parseFloat(UA[3]), UA[1] < 256 && UA[2] < 256 && UA[3] < 256 && (mA = [UA.slice(1, 4), 1])) : (UA = vA.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)) ? mA = [[parseInt(UA[1], 16), parseInt(UA[2], 16), parseInt(UA[3], 16)], 1] : (UA = vA.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)) && (mA = [[17 * parseInt(UA[1], 16), 17 * parseInt(UA[2], 16), 17 * parseInt(UA[3], 16)], 1]), Ke ? Ke(mA, vA) : mA;
              }
              function EA(vA, UA, mA) {
                let _A = vA[0].slice(), $A = vA[1] * UA;
                if (mA) {
                  for (let jA = 0; jA < vA.length; jA++)
                    _A[jA] *= $A;
                  return [_A, 1];
                } else
                  return [_A, $A];
              }
              function zA() {
                function vA(mA, _A) {
                  return [mA[0] * _A[0] + mA[2] * _A[1], mA[1] * _A[0] + mA[3] * _A[1], mA[0] * _A[2] + mA[2] * _A[3], mA[1] * _A[2] + mA[3] * _A[3], mA[0] * _A[4] + mA[2] * _A[5] + mA[4], mA[1] * _A[4] + mA[3] * _A[5] + mA[5]];
                }
                let UA = arguments[0];
                for (let mA = 1; mA < arguments.length; mA++)
                  UA = vA(UA, arguments[mA]);
                return UA;
              }
              function OA(vA, UA) {
                return [UA[0] * vA[0] + UA[2] * vA[1] + UA[4], UA[1] * vA[0] + UA[3] * vA[1] + UA[5]];
              }
              function xA() {
                let vA = a._ctm;
                for (let UA = ut.length - 1; UA >= 0; UA--)
                  vA = zA(ut[UA].savedMatrix, vA);
                return vA;
              }
              function LA() {
                return new Ee().M(0, 0).L(a.page.width, 0).L(a.page.width, a.page.height).L(0, a.page.height).transform(TA(xA())).getBoundingBox();
              }
              function yA() {
                const vA = LA();
                return a.page.width / vA[2];
              }
              function TA(vA) {
                let UA = vA[0] * vA[3] - vA[1] * vA[2];
                return [vA[3] / UA, -vA[1] / UA, -vA[2] / UA, vA[0] / UA, (vA[2] * vA[5] - vA[3] * vA[4]) / UA, (vA[1] * vA[4] - vA[0] * vA[5]) / UA];
              }
              function fA(vA) {
                let UA = _(vA[0]), mA = _(vA[1]), _A = _(vA[2]), $A = _(vA[3]), jA = _(vA[4]), le = _(vA[5]);
                if (h(UA * $A - mA * _A, 0))
                  return [UA, mA, _A, $A, jA, le];
              }
              function sA(vA) {
                let UA = vA[2] || 0, mA = vA[1] || 0, _A = vA[0] || 0;
                if (o(UA, 0) && o(mA, 0))
                  return [];
                if (o(UA, 0))
                  return [-_A / mA];
                {
                  let $A = mA * mA - 4 * UA * _A;
                  return h($A, 0) && $A > 0 ? [(-mA + Math.sqrt($A)) / (2 * UA), (-mA - Math.sqrt($A)) / (2 * UA)] : o($A, 0) ? [-mA / (2 * UA)] : [];
                }
              }
              function F(vA, UA) {
                return (UA[0] || 0) + (UA[1] || 0) * vA + (UA[2] || 0) * vA * vA + (UA[3] || 0) * vA * vA * vA;
              }
              function o(vA, UA) {
                return Math.abs(vA - UA) < 1e-10;
              }
              function h(vA, UA) {
                return Math.abs(vA - UA) >= 1e-10;
              }
              function _(vA) {
                return vA > -1e21 && vA < 1e21 ? Math.round(vA * 1e6) / 1e6 : 0;
              }
              function oA(vA) {
                return typeof vA == "object" && vA !== null && typeof vA.length == "number";
              }
              function p(vA) {
                let UA = new Re((vA || "").trim()), mA = [1, 0, 0, 1, 0, 0], _A;
                for (; _A = UA.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/, !0); ) {
                  let $A = _A[1], jA = [], le = new Re(_A[2].trim()), JA;
                  for (; JA = le.matchNumber(); )
                    jA.push(Number(JA)), le.matchSeparator();
                  if ($A === "matrix" && jA.length === 6)
                    mA = zA(mA, [jA[0], jA[1], jA[2], jA[3], jA[4], jA[5]]);
                  else if ($A === "translate" && jA.length === 2)
                    mA = zA(mA, [1, 0, 0, 1, jA[0], jA[1]]);
                  else if ($A === "translate" && jA.length === 1)
                    mA = zA(mA, [1, 0, 0, 1, jA[0], 0]);
                  else if ($A === "scale" && jA.length === 2)
                    mA = zA(mA, [jA[0], 0, 0, jA[1], 0, 0]);
                  else if ($A === "scale" && jA.length === 1)
                    mA = zA(mA, [jA[0], 0, 0, jA[0], 0, 0]);
                  else if ($A === "rotate" && jA.length === 3) {
                    let ne = jA[0] * Math.PI / 180;
                    mA = zA(mA, [1, 0, 0, 1, jA[1], jA[2]], [Math.cos(ne), Math.sin(ne), -Math.sin(ne), Math.cos(ne), 0, 0], [1, 0, 0, 1, -jA[1], -jA[2]]);
                  } else if ($A === "rotate" && jA.length === 1) {
                    let ne = jA[0] * Math.PI / 180;
                    mA = zA(mA, [Math.cos(ne), Math.sin(ne), -Math.sin(ne), Math.cos(ne), 0, 0]);
                  } else if ($A === "skewX" && jA.length === 1) {
                    let ne = jA[0] * Math.PI / 180;
                    mA = zA(mA, [1, 0, Math.tan(ne), 1, 0, 0]);
                  } else if ($A === "skewY" && jA.length === 1) {
                    let ne = jA[0] * Math.PI / 180;
                    mA = zA(mA, [1, Math.tan(ne), 0, 1, 0, 0]);
                  } else
                    return;
                  UA.matchSeparator();
                }
                if (!UA.matchAll())
                  return mA;
              }
              function rA(vA, UA, mA, _A, $A, jA) {
                let le = (vA || "").trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/) || [], JA = le[1] || le[4] || "meet", ne = le[2] || "Mid", ae = le[3] || "Mid", ve = UA / _A, ze = mA / $A, At = {
                  Min: 0,
                  Mid: 0.5,
                  Max: 1
                }[ne] - (jA || 0), Bt = {
                  Min: 0,
                  Mid: 0.5,
                  Max: 1
                }[ae] - (jA || 0);
                return JA === "slice" ? ze = ve = Math.max(ve, ze) : JA === "meet" && (ze = ve = Math.min(ve, ze)), [ve, 0, 0, ze, At * (UA - _A * ve), Bt * (mA - $A * ze)];
              }
              function QA(vA) {
                let UA = /* @__PURE__ */ Object.create(null);
                vA = (vA || "").trim().split(/;/);
                for (let mA = 0; mA < vA.length; mA++) {
                  let _A = (vA[mA].split(":")[0] || "").trim(), $A = (vA[mA].split(":")[1] || "").trim();
                  _A && (UA[_A] = $A);
                }
                if (UA.marker && (UA["marker-start"] || (UA["marker-start"] = UA.marker), UA["marker-mid"] || (UA["marker-mid"] = UA.marker), UA["marker-end"] || (UA["marker-end"] = UA.marker)), UA.font) {
                  let mA = null, _A = null, $A = "normal", jA = "normal", le = "normal", JA = UA.font.split(/\s+/);
                  for (let ne = 0; ne < JA.length; ne++)
                    switch (JA[ne]) {
                      case "normal":
                        break;
                      case "italic":
                      case "oblique":
                        $A = JA[ne];
                        break;
                      case "small-caps":
                        le = JA[ne];
                        break;
                      case "bold":
                      case "bolder":
                      case "lighter":
                      case "100":
                      case "200":
                      case "300":
                      case "400":
                      case "500":
                      case "600":
                      case "700":
                      case "800":
                      case "900":
                        jA = JA[ne];
                        break;
                      default:
                        _A ? mA ? mA += " " + JA[ne] : mA = JA[ne] : _A = JA[ne].split("/")[0];
                        break;
                    }
                  UA["font-style"] || (UA["font-style"] = $A), UA["font-variant"] || (UA["font-variant"] = le), UA["font-weight"] || (UA["font-weight"] = jA), UA["font-size"] || (UA["font-size"] = _A), UA["font-family"] || (UA["font-family"] = mA);
                }
                return UA;
              }
              function bA(vA) {
                let UA = vA.split(/(?=[.#])/g), mA = [], _A = [], $A = [], jA;
                for (let le = 0; le < UA.length; le++)
                  if (jA = UA[le].match(/^[#]([_A-Za-z0-9-]+)$/))
                    mA.push(jA[1]);
                  else if (jA = UA[le].match(/^[.]([_A-Za-z0-9-]+)$/))
                    _A.push(jA[1]);
                  else if (jA = UA[le].match(/^([_A-Za-z0-9-]+)$/))
                    $A.push(jA[1]);
                  else if (UA[le] !== "*")
                    return;
                return {
                  tags: $A,
                  ids: mA,
                  classes: _A,
                  specificity: mA.length * 1e4 + _A.length * 100 + $A.length
                };
              }
              function y(vA) {
                let UA = new Re(vA.trim()), mA = [], _A;
                for (; _A = UA.match(/^\s*([^\{\}]*?)\s*\{([^\{\}]*?)\}/, !0); ) {
                  let $A = _A[1].split(/\s*,\s*/g), jA = QA(_A[2]);
                  for (let le = 0; le < $A.length; le++) {
                    let JA = bA($A[le]);
                    JA && mA.push({
                      selector: JA,
                      css: jA
                    });
                  }
                }
                return mA;
              }
              function M(vA, UA) {
                if (vA.nodeType !== 1)
                  return !1;
                for (let mA = 0; mA < UA.tags.length; mA++)
                  if (UA.tags[mA] !== vA.nodeName)
                    return !1;
                for (let mA = 0; mA < UA.ids.length; mA++)
                  if (UA.ids[mA] !== vA.id)
                    return !1;
                for (let mA = 0; mA < UA.classes.length; mA++)
                  if (vA.classList.indexOf(UA.classes[mA]) === -1)
                    return !1;
                return !0;
              }
              function FA(vA) {
                let UA = /* @__PURE__ */ Object.create(null), mA = /* @__PURE__ */ Object.create(null);
                for (let _A = 0; _A < pi.length; _A++) {
                  let $A = pi[_A];
                  if (M(vA, $A.selector))
                    for (let jA in $A.css)
                      mA[jA] > $A.selector.specificity || (UA[jA] = $A.css[jA], mA[jA] = $A.selector.specificity);
                }
                return UA;
              }
              function dA(vA, UA) {
                return vA.concat(UA.slice(vA.length));
              }
              function he(vA, UA) {
                return Math.max(vA.ascender, (vA.bbox[3] || vA.bbox.maxY) * (vA.scale || 1)) * UA / 1e3;
              }
              function ie(vA, UA) {
                return Math.min(vA.descender, (vA.bbox[1] || vA.bbox.minY) * (vA.scale || 1)) * UA / 1e3;
              }
              function KA(vA, UA) {
                return (vA.xHeight || 0.5 * (vA.ascender - vA.descender)) * UA / 1e3;
              }
              function Pe(vA, UA, mA, _A) {
                let $A, jA;
                switch (mA) {
                  case "middle":
                    $A = 0.5 * KA(vA, UA);
                    break;
                  case "central":
                    $A = 0.5 * (ie(vA, UA) + he(vA, UA));
                    break;
                  case "after-edge":
                  case "text-after-edge":
                    $A = ie(vA, UA);
                    break;
                  case "alphabetic":
                  case "auto":
                  case "baseline":
                    $A = 0;
                    break;
                  case "mathematical":
                    $A = 0.5 * he(vA, UA);
                    break;
                  case "hanging":
                    $A = 0.8 * he(vA, UA);
                    break;
                  case "before-edge":
                  case "text-before-edge":
                    $A = he(vA, UA);
                    break;
                  default:
                    $A = 0;
                    break;
                }
                switch (_A) {
                  case "baseline":
                    jA = 0;
                    break;
                  case "super":
                    jA = 0.6 * UA;
                    break;
                  case "sub":
                    jA = -0.6 * UA;
                    break;
                  default:
                    jA = _A;
                    break;
                }
                return $A - jA;
              }
              function Je(vA, UA, mA) {
                let _A = vA.encode("" + mA), $A = _A[0], jA = _A[1], le = [];
                for (let JA = 0; JA < $A.length; JA++) {
                  let ne = vA.unicode ? vA.unicode[parseInt($A[JA], 16)] : [mA.charCodeAt(JA)];
                  le.push({
                    glyph: $A[JA],
                    unicode: ne,
                    kern: jA[JA].advanceWidth - jA[JA].xAdvance,
                    width: jA[JA].advanceWidth * UA / 1e3,
                    xOffset: jA[JA].xOffset * UA / 1e3,
                    yOffset: jA[JA].yOffset * UA / 1e3,
                    xAdvance: jA[JA].xAdvance * UA / 1e3,
                    yAdvance: jA[JA].yAdvance * UA / 1e3
                  });
                }
                return le;
              }
              function Le(vA, UA) {
                switch (vA.nodeName) {
                  case "use":
                    return new aA(vA, UA);
                  case "symbol":
                    return new j(vA, UA);
                  case "g":
                    return new pA(vA, UA);
                  case "a":
                    return new Be(vA, UA);
                  case "svg":
                    return new Ie(vA, UA);
                  case "image":
                    return new ee(vA, UA);
                  case "rect":
                    return new at(vA, UA);
                  case "circle":
                    return new V(vA, UA);
                  case "ellipse":
                    return new me(vA, UA);
                  case "line":
                    return new Ye(vA, UA);
                  case "polyline":
                    return new SA(vA, UA);
                  case "polygon":
                    return new ue(vA, UA);
                  case "path":
                    return new Fe(vA, UA);
                  case "text":
                    return new Mt(vA, UA);
                  case "tspan":
                    return new st(vA, UA);
                  case "textPath":
                    return new pt(vA, UA);
                  case "#text":
                  case "#cdata-section":
                    return new fi(vA);
                  default:
                    return new wA(vA, UA);
                }
              }
              var Re = function(vA) {
                this.match = function(UA, mA) {
                  let _A = vA.match(UA);
                  if (!(!_A || _A.index !== 0))
                    return vA = vA.substring(_A[0].length), mA ? _A : _A[0];
                }, this.matchSeparator = function() {
                  return this.match(/^(?:\s*,\s*|\s*|)/);
                }, this.matchSpace = function() {
                  return this.match(/^(?:\s*)/);
                }, this.matchLengthUnit = function() {
                  return this.match(/^(?:px|pt|cm|mm|in|pc|em|ex|%|)/);
                }, this.matchNumber = function() {
                  return this.match(/^(?:[-+]?(?:[0-9]+[.][0-9]+|[0-9]+[.]|[.][0-9]+|[0-9]+)(?:[eE][-+]?[0-9]+)?)/);
                }, this.matchAll = function() {
                  return this.match(/^[\s\S]+/);
                };
              }, _e = function(vA, UA, mA, _A, $A, jA, le, JA) {
                let ne = 6 * Dt, ae = [vA, -3 * vA + 3 * mA, 3 * vA - 6 * mA + 3 * $A, -vA + 3 * mA - 3 * $A + le], ve = [UA, -3 * UA + 3 * _A, 3 * UA - 6 * _A + 3 * jA, -UA + 3 * _A - 3 * jA + JA], ze = [-3 * vA + 3 * mA, 6 * vA - 12 * mA + 6 * $A, -3 * vA + 9 * mA - 9 * $A + 3 * le], At = [-3 * UA + 3 * _A, 6 * UA - 12 * _A + 6 * jA, -3 * UA + 9 * _A - 9 * jA + 3 * JA], Bt = [0];
                for (let He = 1; He <= ne; He++) {
                  let Ce = (He - 0.5) / ne, je = F(Ce, ze) / ne, it = F(Ce, At) / ne, Et = Math.sqrt(je * je + it * it);
                  Bt[He] = Bt[He - 1] + Et;
                }
                this.totalLength = Bt[ne], this.startPoint = [vA, UA, o(vA, mA) && o(UA, _A) ? Math.atan2(jA - _A, $A - mA) : Math.atan2(_A - UA, mA - vA)], this.endPoint = [le, JA, o($A, le) && o(jA, JA) ? Math.atan2(jA - _A, $A - mA) : Math.atan2(JA - jA, le - $A)], this.getBoundingBox = function() {
                  let He, Ce = F(0, ae), je = F(0, ve), it = F(1, ae), Et = F(1, ve);
                  Ce > it && (He = it, it = Ce, Ce = He), je > Et && (He = Et, Et = je, je = He);
                  let Ft = sA(ze);
                  for (let Rt = 0; Rt < Ft.length; Rt++)
                    if (Ft[Rt] >= 0 && Ft[Rt] <= 1) {
                      let gt = F(Ft[Rt], ae);
                      gt < Ce && (Ce = gt), gt > it && (it = gt);
                    }
                  let Qt = sA(At);
                  for (let Rt = 0; Rt < Qt.length; Rt++)
                    if (Qt[Rt] >= 0 && Qt[Rt] <= 1) {
                      let gt = F(Qt[Rt], ve);
                      gt < je && (je = gt), gt > Et && (Et = gt);
                    }
                  return [Ce, je, it, Et];
                }, this.getPointAtLength = function(He) {
                  if (o(He, 0))
                    return this.startPoint;
                  if (o(He, this.totalLength))
                    return this.endPoint;
                  if (!(He < 0 || He > this.totalLength))
                    for (let Ce = 1; Ce <= ne; Ce++) {
                      let je = Bt[Ce - 1], it = Bt[Ce];
                      if (je <= He && He <= it) {
                        let Et = (Ce - (it - He) / (it - je)) / ne, Ft = F(Et, ae), Qt = F(Et, ve), Rt = F(Et, ze), gt = F(Et, At);
                        return [Ft, Qt, Math.atan2(gt, Rt)];
                      }
                    }
                };
              }, se = function(vA, UA, mA, _A) {
                this.totalLength = Math.sqrt((mA - vA) * (mA - vA) + (_A - UA) * (_A - UA)), this.startPoint = [vA, UA, Math.atan2(_A - UA, mA - vA)], this.endPoint = [mA, _A, Math.atan2(_A - UA, mA - vA)], this.getBoundingBox = function() {
                  return [Math.min(this.startPoint[0], this.endPoint[0]), Math.min(this.startPoint[1], this.endPoint[1]), Math.max(this.startPoint[0], this.endPoint[0]), Math.max(this.startPoint[1], this.endPoint[1])];
                }, this.getPointAtLength = function($A) {
                  if ($A >= 0 && $A <= this.totalLength) {
                    let jA = $A / this.totalLength || 0, le = this.startPoint[0] + jA * (this.endPoint[0] - this.startPoint[0]), JA = this.startPoint[1] + jA * (this.endPoint[1] - this.startPoint[1]);
                    return [le, JA, this.startPoint[2]];
                  }
                };
              }, Ee = function() {
                this.pathCommands = [], this.pathSegments = [], this.startPoint = null, this.endPoint = null, this.totalLength = 0;
                let vA = 0, UA = 0, mA = 0, _A = 0, $A, jA, le;
                this.move = function(JA, ne) {
                  return vA = mA = JA, UA = _A = ne, null;
                }, this.line = function(JA, ne) {
                  let ae = new se(mA, _A, JA, ne);
                  return mA = JA, _A = ne, ae;
                }, this.curve = function(JA, ne, ae, ve, ze, At) {
                  let Bt = new _e(mA, _A, JA, ne, ae, ve, ze, At);
                  return mA = ze, _A = At, Bt;
                }, this.close = function() {
                  let JA = new se(mA, _A, vA, UA);
                  return mA = vA, _A = UA, JA;
                }, this.addCommand = function(JA) {
                  this.pathCommands.push(JA);
                  let ne = this[JA[0]].apply(this, JA.slice(3));
                  ne && (ne.hasStart = JA[1], ne.hasEnd = JA[2], this.startPoint = this.startPoint || ne.startPoint, this.endPoint = ne.endPoint, this.pathSegments.push(ne), this.totalLength += ne.totalLength);
                }, this.M = function(JA, ne) {
                  return this.addCommand(["move", !0, !0, JA, ne]), $A = "M", this;
                }, this.m = function(JA, ne) {
                  return this.M(mA + JA, _A + ne);
                }, this.Z = this.z = function() {
                  return this.addCommand(["close", !0, !0]), $A = "Z", this;
                }, this.L = function(JA, ne) {
                  return this.addCommand(["line", !0, !0, JA, ne]), $A = "L", this;
                }, this.l = function(JA, ne) {
                  return this.L(mA + JA, _A + ne);
                }, this.H = function(JA) {
                  return this.L(JA, _A);
                }, this.h = function(JA) {
                  return this.L(mA + JA, _A);
                }, this.V = function(JA) {
                  return this.L(mA, JA);
                }, this.v = function(JA) {
                  return this.L(mA, _A + JA);
                }, this.C = function(JA, ne, ae, ve, ze, At) {
                  return this.addCommand(["curve", !0, !0, JA, ne, ae, ve, ze, At]), $A = "C", jA = ae, le = ve, this;
                }, this.c = function(JA, ne, ae, ve, ze, At) {
                  return this.C(mA + JA, _A + ne, mA + ae, _A + ve, mA + ze, _A + At);
                }, this.S = function(JA, ne, ae, ve) {
                  return this.C(mA + ($A === "C" ? mA - jA : 0), _A + ($A === "C" ? _A - le : 0), JA, ne, ae, ve);
                }, this.s = function(JA, ne, ae, ve) {
                  return this.C(mA + ($A === "C" ? mA - jA : 0), _A + ($A === "C" ? _A - le : 0), mA + JA, _A + ne, mA + ae, _A + ve);
                }, this.Q = function(JA, ne, ae, ve) {
                  let ze = mA + 0.6666666666666666 * (JA - mA), At = _A + 2 / 3 * (ne - _A), Bt = ae + 2 / 3 * (JA - ae), He = ve + 2 / 3 * (ne - ve);
                  return this.addCommand(["curve", !0, !0, ze, At, Bt, He, ae, ve]), $A = "Q", jA = JA, le = ne, this;
                }, this.q = function(JA, ne, ae, ve) {
                  return this.Q(mA + JA, _A + ne, mA + ae, _A + ve);
                }, this.T = function(JA, ne) {
                  return this.Q(mA + ($A === "Q" ? mA - jA : 0), _A + ($A === "Q" ? _A - le : 0), JA, ne);
                }, this.t = function(JA, ne) {
                  return this.Q(mA + ($A === "Q" ? mA - jA : 0), _A + ($A === "Q" ? _A - le : 0), mA + JA, _A + ne);
                }, this.A = function(JA, ne, ae, ve, ze, At, Bt) {
                  if (o(JA, 0) || o(ne, 0))
                    this.addCommand(["line", !0, !0, At, Bt]);
                  else {
                    ae = ae * (Math.PI / 180), JA = Math.abs(JA), ne = Math.abs(ne), ve = 1 * !!ve, ze = 1 * !!ze;
                    let He = Math.cos(ae) * (mA - At) / 2 + Math.sin(ae) * (_A - Bt) / 2, Ce = Math.cos(ae) * (_A - Bt) / 2 - Math.sin(ae) * (mA - At) / 2, je = He * He / (JA * JA) + Ce * Ce / (ne * ne);
                    je > 1 && (JA *= Math.sqrt(je), ne *= Math.sqrt(je));
                    let it = Math.sqrt(Math.max(0, JA * JA * ne * ne - JA * JA * Ce * Ce - ne * ne * He * He) / (JA * JA * Ce * Ce + ne * ne * He * He)), Et = (ve === ze ? -1 : 1) * it * JA * Ce / ne, Ft = (ve === ze ? 1 : -1) * it * ne * He / JA, Qt = Math.cos(ae) * Et - Math.sin(ae) * Ft + (mA + At) / 2, Rt = Math.sin(ae) * Et + Math.cos(ae) * Ft + (_A + Bt) / 2, gt = Math.atan2((Ce - Ft) / ne, (He - Et) / JA), yt = Math.atan2((-Ce - Ft) / ne, (-He - Et) / JA);
                    ze === 0 && yt - gt > 0 ? yt -= 2 * Math.PI : ze === 1 && yt - gt < 0 && (yt += 2 * Math.PI);
                    let oi = Math.ceil(Math.abs(yt - gt) / (Math.PI / Dt));
                    for (let ei = 0; ei < oi; ei++) {
                      let $t = gt + ei * (yt - gt) / oi, St = gt + (ei + 1) * (yt - gt) / oi, ri = 4 / 3 * Math.tan((St - $t) / 4), an = Qt + Math.cos(ae) * JA * (Math.cos($t) - ri * Math.sin($t)) - Math.sin(ae) * ne * (Math.sin($t) + ri * Math.cos($t)), mi = Rt + Math.sin(ae) * JA * (Math.cos($t) - ri * Math.sin($t)) + Math.cos(ae) * ne * (Math.sin($t) + ri * Math.cos($t)), Ii = Qt + Math.cos(ae) * JA * (Math.cos(St) + ri * Math.sin(St)) - Math.sin(ae) * ne * (Math.sin(St) - ri * Math.cos(St)), Hi = Rt + Math.sin(ae) * JA * (Math.cos(St) + ri * Math.sin(St)) + Math.cos(ae) * ne * (Math.sin(St) - ri * Math.cos(St)), Mi = Qt + Math.cos(ae) * JA * Math.cos(St) - Math.sin(ae) * ne * Math.sin(St), Li = Rt + Math.sin(ae) * JA * Math.cos(St) + Math.cos(ae) * ne * Math.sin(St);
                      this.addCommand(["curve", ei === 0, ei === oi - 1, an, mi, Ii, Hi, Mi, Li]);
                    }
                  }
                  return $A = "A", this;
                }, this.a = function(JA, ne, ae, ve, ze, At, Bt) {
                  return this.A(JA, ne, ae, ve, ze, mA + At, _A + Bt);
                }, this.path = function(JA) {
                  let ne, ae, ve, ze = new Re((JA || "").trim());
                  for (; ne = ze.match(/^[astvzqmhlcASTVZQMHLC]/); ) {
                    ze.matchSeparator();
                    let At = [];
                    for (; ae = K[ne + At.length] ? ze.match(/^[01]/) : ze.matchNumber(); )
                      ze.matchSeparator(), At.length === AA[ne] && (this[ne].apply(this, At), At = [], ne === "M" ? ne = "L" : ne === "m" && (ne = "l")), At.push(Number(ae));
                    if (At.length === AA[ne])
                      this[ne].apply(this, At);
                    else {
                      bt("SvgPath: command " + ne + " with " + At.length + " numbers");
                      return;
                    }
                  }
                  return (ve = ze.matchAll()) && bt("SvgPath: unexpected string " + ve), this;
                }, this.getBoundingBox = function() {
                  let JA = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
                  function ne(ae) {
                    ae[0] < JA[0] && (JA[0] = ae[0]), ae[2] > JA[2] && (JA[2] = ae[2]), ae[1] < JA[1] && (JA[1] = ae[1]), ae[3] > JA[3] && (JA[3] = ae[3]);
                  }
                  for (let ae = 0; ae < this.pathSegments.length; ae++)
                    ne(this.pathSegments[ae].getBoundingBox());
                  return JA[0] === 1 / 0 && (JA[0] = 0), JA[1] === 1 / 0 && (JA[1] = 0), JA[2] === -1 / 0 && (JA[2] = 0), JA[3] === -1 / 0 && (JA[3] = 0), JA;
                }, this.getPointAtLength = function(JA) {
                  if (JA >= 0 && JA <= this.totalLength) {
                    let ne;
                    for (let ae = 0; ae < this.pathSegments.length; ae++) {
                      if (ne = this.pathSegments[ae].getPointAtLength(JA))
                        return ne;
                      JA -= this.pathSegments[ae].totalLength;
                    }
                    return this.endPoint;
                  }
                }, this.transform = function(JA) {
                  this.pathSegments = [], this.startPoint = null, this.endPoint = null, this.totalLength = 0;
                  for (let ne = 0; ne < this.pathCommands.length; ne++) {
                    let ae = this.pathCommands.shift();
                    for (let ve = 3; ve < ae.length; ve += 2) {
                      let ze = OA([ae[ve], ae[ve + 1]], JA);
                      ae[ve] = ze[0], ae[ve + 1] = ze[1];
                    }
                    this.addCommand(ae);
                  }
                  return this;
                }, this.mergeShape = function(JA) {
                  for (let ne = 0; ne < JA.pathCommands.length; ne++)
                    this.addCommand(JA.pathCommands[ne].slice());
                  return this;
                }, this.clone = function() {
                  return new Ee().mergeShape(this);
                }, this.insertInDocument = function() {
                  for (let JA = 0; JA < this.pathCommands.length; JA++) {
                    let ne = this.pathCommands[JA][0], ae = this.pathCommands[JA].slice(3);
                    switch (ne) {
                      case "move":
                        a.moveTo(ae[0], ae[1]);
                        break;
                      case "line":
                        a.lineTo(ae[0], ae[1]);
                        break;
                      case "curve":
                        a.bezierCurveTo(ae[0], ae[1], ae[2], ae[3], ae[4], ae[5]);
                        break;
                      case "close":
                        a.closePath();
                        break;
                    }
                  }
                }, this.getSubPaths = function() {
                  let JA = [], ne = new Ee();
                  for (let ae = 0; ae < this.pathCommands.length; ae++) {
                    let ve = this.pathCommands[ae];
                    this.pathCommands[ae][0] === "move" && ae !== 0 && (JA.push(ne), ne = new Ee()), ne.addCommand(ve);
                  }
                  return JA.push(ne), JA;
                }, this.getMarkers = function() {
                  let JA = [], ne = this.getSubPaths();
                  for (let ae = 0; ae < ne.length; ae++) {
                    let ve = ne[ae], ze = [];
                    for (let At = 0; At < ve.pathSegments.length; At++) {
                      let Bt = ve.pathSegments[At];
                      if (h(Bt.totalLength, 0) || At === 0 || At === ve.pathSegments.length - 1) {
                        if (Bt.hasStart) {
                          let He = Bt.getPointAtLength(0), Ce = ze.pop();
                          Ce && (He[2] = 0.5 * (Ce[2] + He[2])), ze.push(He);
                        }
                        if (Bt.hasEnd) {
                          let He = Bt.getPointAtLength(Bt.totalLength);
                          ze.push(He);
                        }
                      }
                    }
                    JA = JA.concat(ze);
                  }
                  return JA;
                };
              }, wA = function(vA, UA) {
                let mA = /* @__PURE__ */ Object.create(null), _A = null;
                this.name = vA.nodeName, this.isOuterElement = vA === D || !vA.parentNode, this.inherits = UA || (this.isOuterElement ? null : Le(vA.parentNode, null)), this.stack = this.inherits ? this.inherits.stack.concat(vA) : [vA], this.style = QA(typeof vA.getAttribute == "function" && vA.getAttribute("style")), this.css = Ot ? getComputedStyle(vA) : FA(vA), this.allowedChildren = [], this.attr = function($A) {
                  if (typeof vA.getAttribute == "function")
                    return vA.getAttribute($A);
                }, this.resolveUrl = function($A) {
                  let jA = ($A || "").match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/) || [], le = jA[1] || jA[3] || jA[5] || jA[7], JA = jA[2] || jA[4] || jA[6] || jA[8];
                  if (JA) {
                    if (!le) {
                      let ne = D.getElementById(JA);
                      if (ne) {
                        if (this.stack.indexOf(ne) === -1)
                          return ne;
                        bt('SVGtoPDF: loop of circular references for id "' + JA + '"');
                        return;
                      }
                    }
                    if (qe) {
                      let ne = ni[le];
                      if (!ne) {
                        ne = qe(le), oA(ne) || (ne = [ne]);
                        for (let ae = 0; ae < ne.length; ae++)
                          typeof ne[ae] == "string" && (ne[ae] = Ae(ne[ae]));
                        ni[le] = ne;
                      }
                      for (let ae = 0; ae < ne.length; ae++) {
                        let ve = ne[ae].getElementById(JA);
                        if (ve) {
                          if (this.stack.indexOf(ve) === -1)
                            return ve;
                          bt('SVGtoPDF: loop of circular references for id "' + le + "#" + JA + '"');
                          return;
                        }
                      }
                    }
                  }
                }, this.computeUnits = function($A, jA, le, JA) {
                  return jA === "%" ? parseFloat($A) / 100 * (JA || le != null ? le : this.getViewport()) : jA === "ex" || jA === "em" ? $A * {
                    em: 1,
                    ex: 0.5
                  }[jA] * (JA ? le : this.get("font-size")) : $A * {
                    "": 1,
                    px: 1,
                    pt: 96 / 72,
                    cm: 96 / 2.54,
                    mm: 96 / 25.4,
                    in: 96,
                    pc: 96 / 6
                  }[jA];
                }, this.computeLength = function($A, jA, le, JA) {
                  let ne = new Re(($A || "").trim()), ae, ve;
                  return typeof (ae = ne.matchNumber()) == "string" && typeof (ve = ne.matchLengthUnit()) == "string" && !ne.matchAll() ? this.computeUnits(ae, ve, jA, JA) : le;
                }, this.computeLengthList = function($A, jA, le) {
                  let JA = new Re(($A || "").trim()), ne = [], ae, ve;
                  for (; typeof (ae = JA.matchNumber()) == "string" && typeof (ve = JA.matchLengthUnit()) == "string"; )
                    ne.push(this.computeUnits(ae, ve, jA)), JA.matchSeparator();
                  if (!(le && JA.matchAll()))
                    return ne;
                }, this.getLength = function($A, jA, le) {
                  return this.computeLength(this.attr($A), jA, le);
                }, this.getLengthList = function($A, jA) {
                  return this.computeLengthList(this.attr($A), jA);
                }, this.getUrl = function($A) {
                  return this.resolveUrl(this.attr($A));
                }, this.getNumberList = function($A) {
                  let jA = new Re((this.attr($A) || "").trim()), le = [], JA;
                  for (; JA = jA.matchNumber(); )
                    le.push(Number(JA)), jA.matchSeparator();
                  return le.error = jA.matchAll(), le;
                }, this.getViewbox = function($A, jA) {
                  let le = this.getNumberList($A);
                  return le.length === 4 && le[2] >= 0 && le[3] >= 0 ? le : jA;
                }, this.getPercent = function($A, jA) {
                  let le = this.attr($A), JA = new Re((le || "").trim()), ne = JA.matchNumber();
                  return !ne || (JA.match("%") && (ne *= 0.01), JA.matchAll()) ? jA : Math.max(0, Math.min(1, ne));
                }, this.chooseValue = function($A) {
                  for (let jA = 0; jA < arguments.length; jA++)
                    if (arguments[jA] != null && arguments[jA] === arguments[jA])
                      return arguments[jA];
                  return arguments[arguments.length - 1];
                }, this.get = function($A) {
                  if (mA[$A] !== void 0)
                    return mA[$A];
                  let jA = z[$A] || {}, le, JA;
                  for (let ne = 0; ne < 3; ne++) {
                    switch (ne) {
                      case 0:
                        $A !== "transform" && (le = this.css[jA.css || $A]);
                        break;
                      case 1:
                        le = this.style[$A];
                        break;
                      case 2:
                        le = this.attr($A);
                        break;
                    }
                    if (le === "inherit" && (JA = this.inherits ? this.inherits.get($A) : jA.initial, JA != null) || jA.values != null && (JA = jA.values[le], JA != null))
                      return mA[$A] = JA;
                    if (le != null) {
                      let ae;
                      switch ($A) {
                        case "font-size":
                          JA = this.computeLength(le, this.inherits ? this.inherits.get($A) : jA.initial, void 0, !0);
                          break;
                        case "baseline-shift":
                          JA = this.computeLength(le, this.get("font-size"));
                          break;
                        case "font-family":
                          JA = le || void 0;
                          break;
                        case "opacity":
                        case "stroke-opacity":
                        case "fill-opacity":
                        case "stop-opacity":
                          ae = parseFloat(le), isNaN(ae) || (JA = Math.max(0, Math.min(1, ae)));
                          break;
                        case "transform":
                          JA = p(le);
                          break;
                        case "stroke-dasharray":
                          if (le === "none")
                            JA = [];
                          else if (ae = this.computeLengthList(le, this.getViewport(), !0)) {
                            let ve = 0, ze = !1;
                            for (let At = 0; At < ae.length; At++)
                              ae[At] < 0 && (ze = !0), ve += ae[At];
                            ze || (ae.length % 2 === 1 && (ae = ae.concat(ae)), JA = ve === 0 ? [] : ae);
                          }
                          break;
                        case "color":
                          le === "none" || le === "transparent" ? JA = "none" : JA = VA(le);
                          break;
                        case "fill":
                        case "stroke":
                          if (le === "none" || le === "transparent")
                            JA = "none";
                          else if (le === "currentColor")
                            JA = this.get("color");
                          else {
                            if (ae = VA(le))
                              return ae;
                            if (ae = (le || "").split(" ")) {
                              let ve = this.resolveUrl(ae[0]), ze = VA(ae[1]);
                              ve == null ? JA = ze : ve.nodeName === "linearGradient" || ve.nodeName === "radialGradient" ? JA = new MA(ve, null, ze) : ve.nodeName === "pattern" ? JA = new Me(ve, null, ze) : JA = ze;
                            }
                          }
                          break;
                        case "stop-color":
                          le === "none" || le === "transparent" ? JA = "none" : le === "currentColor" ? JA = this.get("color") : JA = VA(le);
                          break;
                        case "marker-start":
                        case "marker-mid":
                        case "marker-end":
                        case "clip-path":
                        case "mask":
                          le === "none" ? JA = "none" : JA = this.resolveUrl(le);
                          break;
                        case "stroke-width":
                          ae = this.computeLength(le, this.getViewport()), ae != null && ae >= 0 && (JA = ae);
                          break;
                        case "stroke-miterlimit":
                          ae = parseFloat(le), ae != null && ae >= 1 && (JA = ae);
                          break;
                        case "word-spacing":
                        case "letter-spacing":
                          JA = this.computeLength(le, this.getViewport());
                          break;
                        case "stroke-dashoffset":
                          JA = this.computeLength(le, this.getViewport());
                          break;
                      }
                      if (JA != null)
                        return mA[$A] = JA;
                    }
                  }
                  return mA[$A] = jA.inherit && this.inherits ? this.inherits.get($A) : jA.initial;
                }, this.getChildren = function() {
                  if (_A != null)
                    return _A;
                  let $A = [];
                  for (let jA = 0; jA < vA.childNodes.length; jA++) {
                    let le = vA.childNodes[jA];
                    !le.error && this.allowedChildren.indexOf(le.nodeName) !== -1 && $A.push(Le(le, this));
                  }
                  return _A = $A;
                }, this.getParentVWidth = function() {
                  return this.inherits ? this.inherits.getVWidth() : Zt;
                }, this.getParentVHeight = function() {
                  return this.inherits ? this.inherits.getVHeight() : yi;
                }, this.getParentViewport = function() {
                  return Math.sqrt(0.5 * this.getParentVWidth() * this.getParentVWidth() + 0.5 * this.getParentVHeight() * this.getParentVHeight());
                }, this.getVWidth = function() {
                  return this.getParentVWidth();
                }, this.getVHeight = function() {
                  return this.getParentVHeight();
                }, this.getViewport = function() {
                  return Math.sqrt(0.5 * this.getVWidth() * this.getVWidth() + 0.5 * this.getVHeight() * this.getVHeight());
                }, this.getBoundingBox = function() {
                  return this.getBoundingShape().getBoundingBox();
                };
              }, R = function(vA, UA) {
                wA.call(this, vA, UA), this.transform = function() {
                  a.transform.apply(a, this.getTransformation());
                }, this.clip = function() {
                  if (this.get("clip-path") !== "none") {
                    let mA = new We(this.get("clip-path"), null);
                    return mA.useMask(mA.attr("clipPathUnits") === "objectBoundingBox" ? this.getBoundingBox() : null), !0;
                  }
                }, this.mask = function() {
                  if (this.get("mask") !== "none")
                    return new Ze(this.get("mask"), null).useMask(this.getBoundingBox()), !0;
                }, this.getFill = function(mA, _A) {
                  let $A = this.get("opacity"), jA = this.get("fill"), le = this.get("fill-opacity");
                  if (mA)
                    return J.white;
                  if (jA !== "none" && $A && le)
                    return jA instanceof MA || jA instanceof Me ? jA.getPaint(this.getBoundingBox(), le * $A, mA, _A) : EA(jA, le * $A, _A);
                }, this.getStroke = function(mA, _A) {
                  let $A = this.get("opacity"), jA = this.get("stroke"), le = this.get("stroke-opacity");
                  if (!(mA || o(this.get("stroke-width"), 0)) && jA !== "none" && $A && le)
                    return jA instanceof MA || jA instanceof Me ? jA.getPaint(this.getBoundingBox(), le * $A, mA, _A) : EA(jA, le * $A, _A);
                };
              }, G = function(vA, UA) {
                R.call(this, vA, UA), this.allowedChildren = ["use", "g", "a", "svg", "image", "rect", "circle", "ellipse", "line", "polyline", "polygon", "path", "text"], this.getBoundingShape = function() {
                  let mA = new Ee(), _A = this.getChildren();
                  for (let $A = 0; $A < _A.length; $A++)
                    if (_A[$A].get("display") !== "none" && typeof _A[$A].getBoundingShape == "function") {
                      let jA = _A[$A].getBoundingShape().clone();
                      typeof _A[$A].getTransformation == "function" && jA.transform(_A[$A].getTransformation()), mA.mergeShape(jA);
                    }
                  return mA;
                }, this.drawChildren = function(mA, _A) {
                  let $A = this.getChildren();
                  for (let jA = 0; jA < $A.length; jA++)
                    $A[jA].get("display") !== "none" && typeof $A[jA].drawInDocument == "function" && $A[jA].drawInDocument(mA, _A);
                };
              }, W = function(vA, UA) {
                G.call(this, vA, UA), this.drawContent = function(mA, _A) {
                  this.transform();
                  let $A = this.clip(), jA = this.mask(), le;
                  (this.get("opacity") < 1 || $A || jA) && !mA && (le = T(LA())), this.drawChildren(mA, _A), le && (H(le), a.fillOpacity(this.get("opacity")), eA(le));
                };
              }, aA = function(vA, UA) {
                W.call(this, vA, UA);
                let mA = this.getLength("x", this.getVWidth(), 0), _A = this.getLength("y", this.getVHeight(), 0), $A = this.getUrl("href") || this.getUrl("xlink:href");
                $A && ($A = Le($A, this)), this.getChildren = function() {
                  return $A ? [$A] : [];
                }, this.drawInDocument = function(jA, le) {
                  a.save(), this.drawContent(jA, le), a.restore();
                }, this.getTransformation = function() {
                  return zA(this.get("transform"), [1, 0, 0, 1, mA, _A]);
                };
              }, j = function(vA, UA) {
                W.call(this, vA, UA);
                let mA = this.getLength("width", this.getParentVWidth(), this.getParentVWidth()), _A = this.getLength("height", this.getParentVHeight(), this.getParentVHeight());
                UA instanceof aA && (mA = UA.getLength("width", UA.getParentVWidth(), mA), _A = UA.getLength("height", UA.getParentVHeight(), _A));
                let $A = (this.attr("preserveAspectRatio") || "").trim(), jA = this.getViewbox("viewBox", [0, 0, mA, _A]);
                this.getVWidth = function() {
                  return jA[2];
                }, this.getVHeight = function() {
                  return jA[3];
                }, this.drawInDocument = function(le, JA) {
                  a.save(), this.drawContent(le, JA), a.restore();
                }, this.getTransformation = function() {
                  return zA(rA($A, mA, _A, jA[2], jA[3]), [1, 0, 0, 1, -jA[0], -jA[1]]);
                };
              }, pA = function(vA, UA) {
                W.call(this, vA, UA), this.drawInDocument = function(mA, _A) {
                  a.save(), this.link && !mA && !_A && this.addLink(), this.drawContent(mA, _A), a.restore();
                }, this.getTransformation = function() {
                  return this.get("transform");
                };
              }, Be = function(vA, UA) {
                UA && UA.isText ? (st.call(this, vA, UA), this.allowedChildren = ["textPath", "tspan", "#text", "#cdata-section", "a"]) : pA.call(this, vA, UA), this.link = this.attr("href") || this.attr("xlink:href"), this.addLink = function() {
                  if (this.link.match(/^(?:[a-z][a-z0-9+.-]*:|\/\/)?/i) && this.getChildren().length) {
                    let mA = this.getBoundingShape().transform(xA()).getBoundingBox();
                    cA(mA[0], mA[1], mA[2], mA[3], this.link);
                  }
                };
              }, Ie = function(vA, UA) {
                W.call(this, vA, UA);
                let mA = this.getLength("width", this.getParentVWidth(), this.getParentVWidth()), _A = this.getLength("height", this.getParentVHeight(), this.getParentVHeight()), $A = this.getLength("x", this.getParentVWidth(), 0), jA = this.getLength("y", this.getParentVHeight(), 0);
                UA instanceof aA && (mA = UA.getLength("width", UA.getParentVWidth(), mA), _A = UA.getLength("height", UA.getParentVHeight(), _A));
                let le = this.attr("preserveAspectRatio"), JA = this.getViewbox("viewBox", [0, 0, mA, _A]);
                this.isOuterElement && xi && ($A = jA = 0, mA = Zt, _A = yi, le = xi), this.getVWidth = function() {
                  return JA[2];
                }, this.getVHeight = function() {
                  return JA[3];
                }, this.drawInDocument = function(ne, ae) {
                  a.save(), this.get("overflow") === "hidden" && (new Ee().M($A, jA).L($A + mA, jA).L($A + mA, jA + _A).L($A, jA + _A).Z().transform(this.get("transform")).insertInDocument(), a.clip()), this.drawContent(ne, ae), a.restore();
                }, this.getTransformation = function() {
                  return zA(this.get("transform"), [1, 0, 0, 1, $A, jA], rA(le, mA, _A, JA[2], JA[3]), [1, 0, 0, 1, -JA[0], -JA[1]]);
                };
              }, ee = function(vA, UA) {
                R.call(this, vA, UA);
                let mA = ti(this.attr("href") || this.attr("xlink:href") || ""), _A = this.getLength("x", this.getVWidth(), 0), $A = this.getLength("y", this.getVHeight(), 0), jA = this.getLength("width", this.getVWidth(), "auto"), le = this.getLength("height", this.getVHeight(), "auto"), JA;
                try {
                  JA = a.openImage(mA);
                } catch {
                  bt('SVGElemImage: failed to open image "' + mA + '" in PDFKit');
                }
                JA && (jA === "auto" && le !== "auto" ? jA = le * JA.width / JA.height : le === "auto" && jA !== "auto" ? le = jA * JA.height / JA.width : jA === "auto" && le === "auto" && (jA = JA.width, le = JA.height)), (jA === "auto" || jA < 0) && (jA = 0), (le === "auto" || le < 0) && (le = 0), this.getTransformation = function() {
                  return this.get("transform");
                }, this.getBoundingShape = function() {
                  return new Ee().M(_A, $A).L(_A + jA, $A).M(_A + jA, $A + le).L(_A, $A + le);
                }, this.drawInDocument = function(ne, ae) {
                  this.get("visibility") === "hidden" || !JA || (a.save(), this.transform(), this.get("overflow") === "hidden" && a.rect(_A, $A, jA, le).clip(), this.clip(), this.mask(), a.translate(_A, $A), a.transform.apply(a, rA(this.attr("preserveAspectRatio"), jA, le, JA ? JA.width : jA, JA ? JA.height : le)), ne ? (a.rect(0, 0, JA.width, JA.height), RA(J.white).fill()) : (a.fillOpacity(this.get("opacity")), a.image(JA, 0, 0)), a.restore());
                };
              }, Me = function(vA, UA, mA) {
                G.call(this, vA, UA), this.ref = (function() {
                  let jA = this.getUrl("href") || this.getUrl("xlink:href");
                  if (jA && jA.nodeName === vA.nodeName)
                    return new Me(jA, UA, mA);
                }).call(this);
                let _A = this.attr;
                this.attr = function(jA) {
                  let le = _A.call(this, jA);
                  return le != null || jA === "href" || jA === "xlink:href" ? le : this.ref ? this.ref.attr(jA) : null;
                };
                let $A = this.getChildren;
                this.getChildren = function() {
                  let jA = $A.call(this);
                  return jA.length > 0 ? jA : this.ref ? this.ref.getChildren() : [];
                }, this.getPaint = function(jA, le, JA, ne) {
                  let ae = this.attr("patternUnits") !== "userSpaceOnUse", ve = this.attr("patternContentUnits") === "objectBoundingBox", ze = this.getLength("x", ae ? 1 : this.getParentVWidth(), 0), At = this.getLength("y", ae ? 1 : this.getParentVHeight(), 0), Bt = this.getLength("width", ae ? 1 : this.getParentVWidth(), 0), He = this.getLength("height", ae ? 1 : this.getParentVHeight(), 0);
                  ve && !ae ? (ze = (ze - jA[0]) / (jA[2] - jA[0]) || 0, At = (At - jA[1]) / (jA[3] - jA[1]) || 0, Bt = Bt / (jA[2] - jA[0]) || 0, He = He / (jA[3] - jA[1]) || 0) : !ve && ae && (ze = jA[0] + ze * (jA[2] - jA[0]), At = jA[1] + At * (jA[3] - jA[1]), Bt = Bt * (jA[2] - jA[0]), He = He * (jA[3] - jA[1]));
                  let Ce = this.getViewbox("viewBox", [0, 0, Bt, He]), je = (this.attr("preserveAspectRatio") || "").trim(), it = zA(rA(je, Bt, He, Ce[2], Ce[3], 0), [1, 0, 0, 1, -Ce[0], -Ce[1]]), Et = p(this.attr("patternTransform"));
                  if (ve && (Et = zA([jA[2] - jA[0], 0, 0, jA[3] - jA[1], jA[0], jA[1]], Et)), Et = zA(Et, [1, 0, 0, 1, ze, At]), (Et = fA(Et)) && (it = fA(it)) && (Bt = _(Bt)) && (He = _(He))) {
                    let Ft = T([0, 0, Bt, He]);
                    return a.transform.apply(a, it), this.drawChildren(JA, ne), H(Ft), [IA(Ft, Bt, He, Et), le];
                  } else
                    return mA ? [mA[0], mA[1] * le] : void 0;
                }, this.getVWidth = function() {
                  let jA = this.attr("patternUnits") !== "userSpaceOnUse", le = this.getLength("width", jA ? 1 : this.getParentVWidth(), 0);
                  return this.getViewbox("viewBox", [0, 0, le, 0])[2];
                }, this.getVHeight = function() {
                  let jA = this.attr("patternUnits") !== "userSpaceOnUse", le = this.getLength("height", jA ? 1 : this.getParentVHeight(), 0);
                  return this.getViewbox("viewBox", [0, 0, 0, le])[3];
                };
              }, MA = function(vA, UA, mA) {
                wA.call(this, vA, UA), this.allowedChildren = ["stop"], this.ref = (function() {
                  let jA = this.getUrl("href") || this.getUrl("xlink:href");
                  if (jA && jA.nodeName === vA.nodeName)
                    return new MA(jA, UA, mA);
                }).call(this);
                let _A = this.attr;
                this.attr = function(jA) {
                  let le = _A.call(this, jA);
                  return le != null || jA === "href" || jA === "xlink:href" ? le : this.ref ? this.ref.attr(jA) : null;
                };
                let $A = this.getChildren;
                this.getChildren = function() {
                  let jA = $A.call(this);
                  return jA.length > 0 ? jA : this.ref ? this.ref.getChildren() : [];
                }, this.getPaint = function(jA, le, JA, ne) {
                  let ae = this.getChildren();
                  if (ae.length === 0)
                    return;
                  if (ae.length === 1) {
                    let gt = ae[0], yt = gt.get("stop-color");
                    return yt === "none" ? void 0 : EA(yt, gt.get("stop-opacity") * le, ne);
                  }
                  let ve = this.attr("gradientUnits") !== "userSpaceOnUse", ze = p(this.attr("gradientTransform")), At = this.attr("spreadMethod"), Bt, He, Ce, je, it, Et, Ft = 0, Qt = 0, Rt = 1;
                  if (ve && (ze = zA([jA[2] - jA[0], 0, 0, jA[3] - jA[1], jA[0], jA[1]], ze)), ze = fA(ze)) {
                    if (this.name === "linearGradient")
                      He = this.getLength("x1", ve ? 1 : this.getVWidth(), 0), Ce = this.getLength("x2", ve ? 1 : this.getVWidth(), ve ? 1 : this.getVWidth()), je = this.getLength("y1", ve ? 1 : this.getVHeight(), 0), it = this.getLength("y2", ve ? 1 : this.getVHeight(), 0);
                    else {
                      Ce = this.getLength("cx", ve ? 1 : this.getVWidth(), ve ? 0.5 : 0.5 * this.getVWidth()), it = this.getLength("cy", ve ? 1 : this.getVHeight(), ve ? 0.5 : 0.5 * this.getVHeight()), Et = this.getLength("r", ve ? 1 : this.getViewport(), ve ? 0.5 : 0.5 * this.getViewport()), He = this.getLength("fx", ve ? 1 : this.getVWidth(), Ce), je = this.getLength("fy", ve ? 1 : this.getVHeight(), it), Et < 0 && bt("SvgElemGradient: negative r value");
                      let gt = Math.sqrt(Math.pow(Ce - He, 2) + Math.pow(it - je, 2)), yt = 1;
                      gt > Et && (yt = Et / gt, He = Ce + (He - Ce) * yt, je = it + (je - it) * yt), Et = Math.max(Et, gt * yt * (1 + 1e-6));
                    }
                    if (At === "reflect" || At === "repeat") {
                      let gt = TA(ze), yt = OA([jA[0], jA[1]], gt), oi = OA([jA[2], jA[1]], gt), ei = OA([jA[2], jA[3]], gt), $t = OA([jA[0], jA[3]], gt);
                      this.name === "linearGradient" ? (Ft = Math.max((yt[0] - Ce) * (Ce - He) + (yt[1] - it) * (it - je), (oi[0] - Ce) * (Ce - He) + (oi[1] - it) * (it - je), (ei[0] - Ce) * (Ce - He) + (ei[1] - it) * (it - je), ($t[0] - Ce) * (Ce - He) + ($t[1] - it) * (it - je)) / (Math.pow(Ce - He, 2) + Math.pow(it - je, 2)), Qt = Math.max((yt[0] - He) * (He - Ce) + (yt[1] - je) * (je - it), (oi[0] - He) * (He - Ce) + (oi[1] - je) * (je - it), (ei[0] - He) * (He - Ce) + (ei[1] - je) * (je - it), ($t[0] - He) * (He - Ce) + ($t[1] - je) * (je - it)) / (Math.pow(Ce - He, 2) + Math.pow(it - je, 2))) : Ft = Math.sqrt(Math.max(Math.pow(yt[0] - Ce, 2) + Math.pow(yt[1] - it, 2), Math.pow(oi[0] - Ce, 2) + Math.pow(oi[1] - it, 2), Math.pow(ei[0] - Ce, 2) + Math.pow(ei[1] - it, 2), Math.pow($t[0] - Ce, 2) + Math.pow($t[1] - it, 2))) / Et - 1, Ft = Math.ceil(Ft + 0.5), Qt = Math.ceil(Qt + 0.5), Rt = Qt + 1 + Ft;
                    }
                    this.name === "linearGradient" ? Bt = a.linearGradient(He - Qt * (Ce - He), je - Qt * (it - je), Ce + Ft * (Ce - He), it + Ft * (it - je)) : Bt = a.radialGradient(He, je, 0, Ce, it, Et + Ft * Et);
                    for (let gt = 0; gt < Rt; gt++) {
                      let yt = 0, oi = At !== "reflect" || (gt - Qt) % 2 === 0;
                      for (let ei = 0; ei < ae.length; ei++) {
                        let $t = ae[oi ? ei : ae.length - 1 - ei], St = $t.get("stop-color");
                        St === "none" && (St = J.transparent), St = EA(St, $t.get("stop-opacity") * le, ne), yt = Math.max(yt, oi ? $t.getPercent("offset", 0) : 1 - $t.getPercent("offset", 0)), ei === 0 && St[0].length === 4 && (Bt._colorSpace = "DeviceCMYK"), ei === 0 && yt > 0 && Bt.stop((gt + 0) / Rt, St[0], St[1]), Bt.stop((gt + yt) / (Ft + Qt + 1), St[0], St[1]), ei === ae.length - 1 && yt < 1 && Bt.stop((gt + 1) / Rt, St[0], St[1]);
                      }
                    }
                    return Bt.setTransform.apply(Bt, ze), [Bt, 1];
                  } else
                    return mA ? [mA[0], mA[1] * le] : void 0;
                };
              }, be = function(vA, UA) {
                R.call(this, vA, UA), this.dashScale = 1, this.getBoundingShape = function() {
                  return this.shape;
                }, this.getTransformation = function() {
                  return this.get("transform");
                }, this.drawInDocument = function(mA, _A) {
                  if (!(this.get("visibility") === "hidden" || !this.shape)) {
                    if (a.save(), this.get("vector-effect") === "non-scaling-stroke" ? this.shape.transform(this.getTransformation()) : this.transform(), this.clip(), mA)
                      this.shape.insertInDocument(), RA(J.white), a.fill(this.get("clip-rule"));
                    else {
                      let $A = this.mask(), jA;
                      $A && (jA = T(LA()));
                      let le = this.shape.getSubPaths(), JA = this.getFill(mA, _A), ne = this.getStroke(mA, _A), ae = this.get("stroke-width"), ve = this.get("stroke-linecap");
                      if (this.get("vector-effect") === "non-scaling-stroke" && (ae = ae / yA()), JA || ne) {
                        if (JA && RA(JA), ne) {
                          for (let je = 0; je < le.length; je++)
                            if (o(le[je].totalLength, 0) && (ve === "square" || ve === "round") && ae > 0 && le[je].startPoint && le[je].startPoint.length > 1) {
                              let it = le[je].startPoint[0], Et = le[je].startPoint[1];
                              RA(ne), ve === "square" ? a.rect(it - 0.5 * ae, Et - 0.5 * ae, ae, ae) : ve === "round" && a.circle(it, Et, 0.5 * ae), a.fill();
                            }
                          let He = this.get("stroke-dasharray"), Ce = this.get("stroke-dashoffset");
                          if (h(this.dashScale, 1)) {
                            for (let je = 0; je < He.length; je++)
                              He[je] *= this.dashScale;
                            Ce *= this.dashScale;
                          }
                          DA(ne), a.lineWidth(ae).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(ve), $(He, Ce);
                        }
                        for (let He = 0; He < le.length; He++)
                          le[He].totalLength > 0 && le[He].insertInDocument();
                        JA && ne ? a.fillAndStroke(this.get("fill-rule")) : JA ? a.fill(this.get("fill-rule")) : ne && a.stroke();
                      }
                      let ze = this.get("marker-start"), At = this.get("marker-mid"), Bt = this.get("marker-end");
                      if (ze !== "none" || At !== "none" || Bt !== "none") {
                        let He = this.shape.getMarkers();
                        if (ze !== "none" && He.length > 0 && new tt(ze, null).drawMarker(!1, _A, He[0], ae), At !== "none")
                          for (let Ce = 1; Ce < He.length - 1; Ce++)
                            new tt(At, null).drawMarker(!1, _A, He[Ce], ae);
                        Bt !== "none" && He.length > 0 && new tt(Bt, null).drawMarker(!1, _A, He[He.length - 1], ae);
                      }
                      jA && (H(jA), eA(jA));
                    }
                    a.restore();
                  }
                };
              }, at = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getLength("x", this.getVWidth(), 0), _A = this.getLength("y", this.getVHeight(), 0), $A = this.getLength("width", this.getVWidth(), 0), jA = this.getLength("height", this.getVHeight(), 0), le = this.getLength("rx", this.getVWidth()), JA = this.getLength("ry", this.getVHeight());
                le === void 0 && JA === void 0 ? le = JA = 0 : le === void 0 && JA !== void 0 ? le = JA : le !== void 0 && JA === void 0 && (JA = le), $A > 0 && jA > 0 ? le && JA ? (le = Math.min(le, 0.5 * $A), JA = Math.min(JA, 0.5 * jA), this.shape = new Ee().M(mA + le, _A).L(mA + $A - le, _A).A(le, JA, 0, 0, 1, mA + $A, _A + JA).L(mA + $A, _A + jA - JA).A(le, JA, 0, 0, 1, mA + $A - le, _A + jA).L(mA + le, _A + jA).A(le, JA, 0, 0, 1, mA, _A + jA - JA).L(mA, _A + JA).A(le, JA, 0, 0, 1, mA + le, _A).Z()) : this.shape = new Ee().M(mA, _A).L(mA + $A, _A).L(mA + $A, _A + jA).L(mA, _A + jA).Z() : this.shape = new Ee();
              }, V = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getLength("cx", this.getVWidth(), 0), _A = this.getLength("cy", this.getVHeight(), 0), $A = this.getLength("r", this.getViewport(), 0);
                $A > 0 ? this.shape = new Ee().M(mA + $A, _A).A($A, $A, 0, 0, 1, mA - $A, _A).A($A, $A, 0, 0, 1, mA + $A, _A).Z() : this.shape = new Ee();
              }, me = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getLength("cx", this.getVWidth(), 0), _A = this.getLength("cy", this.getVHeight(), 0), $A = this.getLength("rx", this.getVWidth(), 0), jA = this.getLength("ry", this.getVHeight(), 0);
                $A > 0 && jA > 0 ? this.shape = new Ee().M(mA + $A, _A).A($A, jA, 0, 0, 1, mA - $A, _A).A($A, jA, 0, 0, 1, mA + $A, _A).Z() : this.shape = new Ee();
              }, Ye = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getLength("x1", this.getVWidth(), 0), _A = this.getLength("y1", this.getVHeight(), 0), $A = this.getLength("x2", this.getVWidth(), 0), jA = this.getLength("y2", this.getVHeight(), 0);
                this.shape = new Ee().M(mA, _A).L($A, jA);
              }, SA = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getNumberList("points");
                this.shape = new Ee();
                for (let _A = 0; _A < mA.length - 1; _A += 2)
                  _A === 0 ? this.shape.M(mA[_A], mA[_A + 1]) : this.shape.L(mA[_A], mA[_A + 1]);
                mA.error && bt("SvgElemPolygon: unexpected string " + mA.error), mA.length % 2 === 1 && bt("SvgElemPolyline: uneven number of coordinates");
              }, ue = function(vA, UA) {
                be.call(this, vA, UA);
                let mA = this.getNumberList("points");
                this.shape = new Ee();
                for (let _A = 0; _A < mA.length - 1; _A += 2)
                  _A === 0 ? this.shape.M(mA[_A], mA[_A + 1]) : this.shape.L(mA[_A], mA[_A + 1]);
                this.shape.Z(), mA.error && bt("SvgElemPolygon: unexpected string " + mA.error), mA.length % 2 === 1 && bt("SvgElemPolygon: uneven number of coordinates");
              }, Fe = function(vA, UA) {
                be.call(this, vA, UA), this.shape = new Ee().path(this.attr("d"));
                let mA = this.getLength("pathLength", this.getViewport());
                this.pathLength = mA > 0 ? mA : void 0, this.dashScale = this.pathLength !== void 0 ? this.shape.totalLength / this.pathLength : 1;
              }, tt = function(vA, UA) {
                G.call(this, vA, UA);
                let mA = this.getLength("markerWidth", this.getParentVWidth(), 3), _A = this.getLength("markerHeight", this.getParentVHeight(), 3), $A = this.getViewbox("viewBox", [0, 0, mA, _A]);
                this.getVWidth = function() {
                  return $A[2];
                }, this.getVHeight = function() {
                  return $A[3];
                }, this.drawMarker = function(jA, le, JA, ne) {
                  a.save();
                  let ae = this.attr("orient"), ve = this.attr("markerUnits"), ze = ae === "auto" ? JA[2] : (parseFloat(ae) || 0) * Math.PI / 180, At = ve === "userSpaceOnUse" ? 1 : ne;
                  a.transform(Math.cos(ze) * At, Math.sin(ze) * At, -Math.sin(ze) * At, Math.cos(ze) * At, JA[0], JA[1]);
                  let Bt = this.getLength("refX", this.getVWidth(), 0), He = this.getLength("refY", this.getVHeight(), 0), Ce = rA(this.attr("preserveAspectRatio"), mA, _A, $A[2], $A[3], 0.5);
                  this.get("overflow") === "hidden" && a.rect(Ce[0] * ($A[0] + $A[2] / 2 - Bt) - mA / 2, Ce[3] * ($A[1] + $A[3] / 2 - He) - _A / 2, mA, _A).clip(), a.transform.apply(a, Ce), a.translate(-Bt, -He);
                  let je;
                  this.get("opacity") < 1 && !jA && (je = T(LA())), this.drawChildren(jA, le), je && (H(je), a.fillOpacity(this.get("opacity")), eA(je)), a.restore();
                };
              }, We = function(vA, UA) {
                G.call(this, vA, UA), this.useMask = function(mA) {
                  let _A = T(LA());
                  a.save(), a.transform.apply(a, this.get("transform")), this.attr("clipPathUnits") === "objectBoundingBox" && a.transform(mA[2] - mA[0], 0, 0, mA[3] - mA[1], mA[0], mA[1]), this.clip(), this.drawChildren(!0, !1), a.restore(), H(_A), CA(_A);
                };
              }, Ze = function(vA, UA) {
                G.call(this, vA, UA), this.useMask = function(mA) {
                  let _A = T(LA());
                  a.save(), this.attr("maskUnits") === "userSpaceOnUse" ? (this.getLength("x", this.getVWidth(), -0.1 * (mA[2] - mA[0]) + mA[0]), this.getLength("y", this.getVHeight(), -0.1 * (mA[3] - mA[1]) + mA[1]), this.getLength("width", this.getVWidth(), 1.2 * (mA[2] - mA[0])), this.getLength("height", this.getVHeight(), 1.2 * (mA[3] - mA[1]))) : (this.getLength("x", this.getVWidth(), -0.1) * (mA[2] - mA[0]) + mA[0], this.getLength("y", this.getVHeight(), -0.1) * (mA[3] - mA[1]) + mA[1], this.getLength("width", this.getVWidth(), 1.2) * (mA[2] - mA[0]), this.getLength("height", this.getVHeight(), 1.2) * (mA[3] - mA[1])), this.attr("maskContentUnits") === "objectBoundingBox" && a.transform(mA[2] - mA[0], 0, 0, mA[3] - mA[1], mA[0], mA[1]), this.clip(), this.drawChildren(!1, !0), a.restore(), H(_A), CA(_A);
                };
              }, Ct = function(vA, UA) {
                R.call(this, vA, UA), this.allowedChildren = ["tspan", "#text", "#cdata-section", "a"], this.isText = !0, this.getBoundingShape = function() {
                  let mA = new Ee();
                  for (let _A = 0; _A < this._pos.length; _A++) {
                    let $A = this._pos[_A];
                    if (!$A.hidden) {
                      let jA = $A.ascent * Math.sin($A.rotate), le = -$A.ascent * Math.cos($A.rotate), JA = $A.descent * Math.sin($A.rotate), ne = -$A.descent * Math.cos($A.rotate), ae = $A.width * Math.cos($A.rotate), ve = $A.width * Math.sin($A.rotate);
                      mA.M($A.x + jA, $A.y + le).L($A.x + jA + ae, $A.y + le + ve).M($A.x + JA + ae, $A.y + ne + ve).L($A.x + JA, $A.y + ne);
                    }
                  }
                  return mA;
                }, this.drawTextInDocument = function(mA, _A) {
                  this.link && !mA && !_A && this.addLink(), this.get("text-decoration") === "underline" && this.decorate(0.05 * this._font.size, -0.075 * this._font.size, mA, _A), this.get("text-decoration") === "overline" && this.decorate(0.05 * this._font.size, he(this._font.font, this._font.size) + 0.075 * this._font.size, mA, _A);
                  let $A = this.getFill(mA, _A), jA = this.getStroke(mA, _A), le = this.get("stroke-width");
                  this._font.fauxBold && (jA ? le += this._font.size * 0.03 : (jA = $A, le = this._font.size * 0.03));
                  let JA = this.getChildren();
                  for (let ne = 0; ne < JA.length; ne++) {
                    let ae = JA[ne];
                    switch (ae.name) {
                      case "tspan":
                      case "textPath":
                      case "a":
                        ae.get("display") !== "none" && ae.drawTextInDocument(mA, _A);
                        break;
                      case "#text":
                      case "#cdata-section":
                        if (this.get("visibility") === "hidden")
                          continue;
                        ($A || jA || mA) && ($A && RA($A), jA && le && (DA(jA), a.lineWidth(le).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(this.get("stroke-linecap")), $(this.get("stroke-dasharray"), this.get("stroke-dashoffset"))), tA(this._font.font, this._font.size), uA(!!$A, !!jA), w(ae._pos, this._font), v());
                        break;
                    }
                  }
                  this.get("text-decoration") === "line-through" && this.decorate(0.05 * this._font.size, 0.5 * (he(this._font.font, this._font.size) + ie(this._font.font, this._font.size)), mA, _A);
                }, this.decorate = function(mA, _A, $A, jA) {
                  let le = this.getFill($A, jA), JA = this.getStroke($A, jA);
                  le && RA(le), JA && (DA(JA), a.lineWidth(this.get("stroke-width")).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(this.get("stroke-linecap")), $(this.get("stroke-dasharray"), this.get("stroke-dashoffset")));
                  for (let ne = 0, ae = this._pos; ne < ae.length; ne++)
                    if (!ae[ne].hidden && h(ae[ne].width, 0)) {
                      let ve = (_A + mA / 2) * Math.sin(ae[ne].rotate), ze = -(_A + mA / 2) * Math.cos(ae[ne].rotate), At = (_A - mA / 2) * Math.sin(ae[ne].rotate), Bt = -(_A - mA / 2) * Math.cos(ae[ne].rotate), He = ae[ne].width * Math.cos(ae[ne].rotate), Ce = ae[ne].width * Math.sin(ae[ne].rotate);
                      new Ee().M(ae[ne].x + ve, ae[ne].y + ze).L(ae[ne].x + ve + He, ae[ne].y + ze + Ce).L(ae[ne].x + At + He, ae[ne].y + Bt + Ce).L(ae[ne].x + At, ae[ne].y + Bt).Z().insertInDocument(), le && JA ? a.fillAndStroke() : le ? a.fill() : JA && a.stroke();
                    }
                };
              }, fi = function(vA, UA) {
                this.name = vA.nodeName, this.textContent = vA.nodeValue;
              }, st = function(vA, UA) {
                Ct.call(this, vA, UA);
              }, pt = function(vA, UA) {
                Ct.call(this, vA, UA);
                let mA;
                if ((mA = this.attr("path")) && mA.trim() !== "") {
                  let _A = this.getLength("pathLength", this.getViewport());
                  this.pathObject = new Ee().path(mA), this.pathLength = _A > 0 ? _A : this.pathObject.totalLength, this.pathScale = this.pathObject.totalLength / this.pathLength;
                } else if ((mA = this.getUrl("href") || this.getUrl("xlink:href")) && mA.nodeName === "path") {
                  let _A = new Fe(mA, this);
                  this.pathObject = _A.shape.clone().transform(_A.get("transform")), this.pathLength = this.chooseValue(_A.pathLength, this.pathObject.totalLength), this.pathScale = this.pathObject.totalLength / this.pathLength;
                }
              }, Mt = function(vA, UA) {
                Ct.call(this, vA, UA), this.allowedChildren = ["textPath", "tspan", "#text", "#cdata-section", "a"], (function(mA) {
                  let _A = "", $A = vA.textContent, jA = [], le = [], JA, ne, ae = 0, ve = 0;
                  function ze() {
                    if (le.length) {
                      let Ce = le[le.length - 1], je = le[0], it = Ce.x + Ce.width - je.x, Et = {
                        startltr: 0,
                        middleltr: 0.5,
                        endltr: 1,
                        startrtl: 1,
                        middlertl: 0.5,
                        endrtl: 0
                      }[JA + ne] * it || 0;
                      for (let Ft = 0; Ft < le.length; Ft++)
                        le[Ft].x -= Et;
                    }
                    le = [];
                  }
                  function At(Ce, je, it) {
                    let Et = Ce[0], Ft = Ce[Ce.length - 1], Qt = Et.x, Rt = Ft.x + Ft.width;
                    if (it) {
                      let gt = je / (Rt - Qt);
                      if (gt > 0 && gt < 1 / 0)
                        for (let yt = 0; yt < Ce.length; yt++)
                          Ce[yt].continuous = !1, Ce[yt].x = Qt + gt * (Ce[yt].x - Qt), Ce[yt].scale *= gt, Ce[yt].width *= gt;
                    } else if (Ce.length >= 2) {
                      let gt = (je - (Rt - Qt)) / (Ce.length - 1);
                      for (let yt = 0; yt < Ce.length; yt++)
                        Ce[yt].continuous = !1, Ce[yt].x += yt * gt;
                    }
                    ae += je - (Rt - Qt);
                  }
                  function Bt(Ce, je) {
                    Ce._x = dA(Ce.getLengthList("x", Ce.getVWidth()), je ? je._x.slice(je._pos.length) : []), Ce._y = dA(Ce.getLengthList("y", Ce.getVHeight()), je ? je._y.slice(je._pos.length) : []), Ce._dx = dA(Ce.getLengthList("dx", Ce.getVWidth()), je ? je._dx.slice(je._pos.length) : []), Ce._dy = dA(Ce.getLengthList("dy", Ce.getVHeight()), je ? je._dy.slice(je._pos.length) : []), Ce._rot = dA(Ce.getNumberList("rotate"), je ? je._rot.slice(je._pos.length) : []), Ce._defRot = Ce.chooseValue(Ce._rot[Ce._rot.length - 1], je && je._defRot, 0), Ce.name === "textPath" && (Ce._y = []);
                    let it = {
                      fauxItalic: !1,
                      fauxBold: !1
                    }, Et = qt(Ce.get("font-family"), Ce.get("font-weight") === "bold", Ce.get("font-style") === "italic", it);
                    try {
                      a.font(Et);
                    } catch (mi) {
                      bt('SVGElemText: failed to open font "' + Et + '" in PDFKit: ' + mi.message);
                    }
                    Ce._pos = [], Ce._index = 0, Ce._font = {
                      font: a._font,
                      size: Ce.get("font-size"),
                      fauxItalic: it.fauxItalic,
                      fauxBold: it.fauxBold
                    };
                    let Ft = Ce.getLength("textLength", Ce.getVWidth(), void 0), Qt = Ce.attr("lengthAdjust") === "spacingAndGlyphs", Rt = Ce.get("word-spacing"), gt = Ce.get("letter-spacing"), yt = Ce.get("text-anchor"), oi = Ce.get("direction"), ei = Ce.name === "text", $t = ei ? Ce.get("dominant-baseline") : Ce.get("alignment-baseline") || Ce.get("dominant-baseline"), St = ei ? "baseline" : Ce.get("baseline-shift"), ri = Pe(Ce._font.font, Ce._font.size, $t, St);
                    Ce.name === "textPath" && (ze(), ae = ve = 0);
                    let an = Ce.getChildren();
                    for (let mi = 0; mi < an.length; mi++) {
                      let Ii = an[mi];
                      switch (Ii.name) {
                        case "tspan":
                        case "textPath":
                        case "a":
                          Bt(Ii, Ce);
                          break;
                        case "#text":
                        case "#cdata-section":
                          let Hi = Ii.textContent, Mi = Hi, Li;
                          Ii._font = Ce._font, Ii._pos = [], $A = $A.substring(Hi.length), Ce.get("xml:space") === "preserve" ? Mi = Mi.replace(/[\s]/g, " ") : (Mi = Mi.replace(/[\s]+/g, " "), _A.match(/[\s]$|^$/) && (Mi = Mi.replace(/^[\s]/, "")), $A.match(/^[\s]*$/) && (Mi = Mi.replace(/[\s]$/, ""))), _A += Hi, Rt === 0 ? Li = [Mi] : Li = Mi.split(/(\s)/);
                          for (let Fi = 0; Fi < Li.length; Fi++) {
                            let Ti = Je(Ce._font.font, Ce._font.size, Li[Fi]);
                            for (let Yi = 0; Yi < Ti.length; Yi++) {
                              let Oi = Ce._index, Pn = Ce._x[Oi], Ui = Ce._y[Oi], An = Ce._dx[Oi], vn = Ce._dy[Oi], en = Ce._rot[Oi], hi = !(Fi === 0 && Yi === 0);
                              gt !== 0 && (hi = !1), Rt !== 0 && (hi = !1), Pn !== void 0 && (hi = !1, ze(), ae = Pn), Ui !== void 0 && (hi = !1, ze(), ve = Ui), An !== void 0 && (hi = !1, ae += An), vn !== void 0 && (hi = !1, ve += vn), (en !== void 0 || Ce._defRot !== 0) && (hi = !1);
                              let Mn = {
                                glyph: Ti[Yi].glyph,
                                rotate: Math.PI / 180 * Ce.chooseValue(en, Ce._defRot),
                                x: ae + Ti[Yi].xOffset,
                                kern: Ti[Yi].kern,
                                y: ve + ri + Ti[Yi].yOffset,
                                width: Ti[Yi].width,
                                ascent: he(Ce._font.font, Ce._font.size),
                                descent: ie(Ce._font.font, Ce._font.size),
                                scale: 1,
                                hidden: !1,
                                continuous: hi
                              };
                              le.push(Mn), Ii._pos.push(Mn), Ce._pos.push(Mn), Ce._index += Ti[Yi].unicode.length, le.length === 1 && (JA = yt, ne = oi), ae += Ti[Yi].xAdvance + gt, ve += Ti[Yi].yAdvance;
                            }
                            Li[Fi] === " " && (ae += Rt);
                          }
                          break;
                        default:
                          $A = $A.substring(Ii.textContent.length);
                      }
                    }
                    if (Ft && Ce._pos.length && At(Ce._pos, Ft, Qt), (Ce.name === "textPath" || Ce.name === "text") && ze(), Ce.name === "textPath") {
                      jA.push(Ce);
                      let mi = Ce.pathObject;
                      mi && (ae = mi.endPoint[0], ve = mi.endPoint[1]);
                    }
                    je && (je._pos = je._pos.concat(Ce._pos), je._index += Ce._index);
                  }
                  function He(Ce) {
                    let je = Ce.pathObject, it = Ce.pathLength, Et = Ce.pathScale;
                    if (je) {
                      let Ft = Ce.getLength("startOffset", it, 0);
                      for (let Qt = 0; Qt < Ce._pos.length; Qt++) {
                        let Rt = Ft + Ce._pos[Qt].x + 0.5 * Ce._pos[Qt].width;
                        if (Rt > it || Rt < 0)
                          Ce._pos[Qt].hidden = !0;
                        else {
                          let gt = je.getPointAtLength(Rt * Et);
                          h(Et, 1) && (Ce._pos[Qt].scale *= Et, Ce._pos[Qt].width *= Et), Ce._pos[Qt].x = gt[0] - 0.5 * Ce._pos[Qt].width * Math.cos(gt[2]) - Ce._pos[Qt].y * Math.sin(gt[2]), Ce._pos[Qt].y = gt[1] - 0.5 * Ce._pos[Qt].width * Math.sin(gt[2]) + Ce._pos[Qt].y * Math.cos(gt[2]), Ce._pos[Qt].rotate = gt[2] + Ce._pos[Qt].rotate, Ce._pos[Qt].continuous = !1;
                        }
                      }
                    } else
                      for (let Ft = 0; Ft < Ce._pos.length; Ft++)
                        Ce._pos[Ft].hidden = !0;
                  }
                  Bt(mA, null);
                  for (let Ce = 0; Ce < jA.length; Ce++)
                    He(jA[Ce]);
                })(this), this.getTransformation = function() {
                  return this.get("transform");
                }, this.drawInDocument = function(mA, _A) {
                  a.save(), this.transform(), this.clip();
                  let $A = this.mask(), jA;
                  $A && (jA = T(LA())), this.drawTextInDocument(mA, _A), jA && (H(jA), eA(jA)), a.restore();
                };
              };
              P = P || {};
              var Tt = P.assumePt ? 1 : 72 / 96, Zt = (P.width || a.page.width) / Tt, yi = (P.height || a.page.height) / Tt, xi = P.preserveAspectRatio || null, Ot = P.useCSS && typeof SVGElement < "u" && D instanceof SVGElement && typeof getComputedStyle == "function", bt = P.warningCallback, qt = P.fontCallback, ti = P.imageCallback, Ke = P.colorCallback, qe = P.documentCallback, Dt = Math.ceil(Math.max(1, P.precision)) || 3, ut = [], ni = {}, wi = [], pi = [];
              if (typeof bt != "function" && (bt = function(vA) {
                typeof console !== void 0 && typeof console.warn == "function" && console.warn(vA);
              }), typeof qt != "function" && (qt = function(vA, UA, mA, _A) {
                if (UA && mA) {
                  if (a._registeredFonts.hasOwnProperty(vA + "-BoldItalic"))
                    return vA + "-BoldItalic";
                  if (a._registeredFonts.hasOwnProperty(vA + "-Italic"))
                    return _A.fauxBold = !0, vA + "-Italic";
                  if (a._registeredFonts.hasOwnProperty(vA + "-Bold"))
                    return _A.fauxItalic = !0, vA + "-Bold";
                  if (a._registeredFonts.hasOwnProperty(vA))
                    return _A.fauxBold = !0, _A.fauxItalic = !0, vA;
                }
                if (UA && !mA) {
                  if (a._registeredFonts.hasOwnProperty(vA + "-Bold"))
                    return vA + "-Bold";
                  if (a._registeredFonts.hasOwnProperty(vA))
                    return _A.fauxBold = !0, vA;
                }
                if (!UA && mA) {
                  if (a._registeredFonts.hasOwnProperty(vA + "-Italic"))
                    return vA + "-Italic";
                  if (a._registeredFonts.hasOwnProperty(vA))
                    return _A.fauxItalic = !0, vA;
                }
                if (!UA && !mA && a._registeredFonts.hasOwnProperty(vA))
                  return vA;
                if (vA.match(/(?:^|,)\s*serif\s*$/)) {
                  if (UA && mA)
                    return "Times-BoldItalic";
                  if (UA && !mA)
                    return "Times-Bold";
                  if (!UA && mA)
                    return "Times-Italic";
                  if (!UA && !mA)
                    return "Times-Roman";
                } else if (vA.match(/(?:^|,)\s*monospace\s*$/)) {
                  if (UA && mA)
                    return "Courier-BoldOblique";
                  if (UA && !mA)
                    return "Courier-Bold";
                  if (!UA && mA)
                    return "Courier-Oblique";
                  if (!UA && !mA)
                    return "Courier";
                } else {
                  if (vA.match(/(?:^|,)\s*sans-serif\s*$/), UA && mA)
                    return "Helvetica-BoldOblique";
                  if (UA && !mA)
                    return "Helvetica-Bold";
                  if (!UA && mA)
                    return "Helvetica-Oblique";
                  if (!UA && !mA)
                    return "Helvetica";
                }
              }), typeof ti != "function" && (ti = function(vA) {
                return vA.replace(/\s+/g, "");
              }), typeof Ke != "function")
                Ke = null;
              else
                for (let vA in J) {
                  let UA = Ke(J[vA]);
                  J[vA][0] = UA[0], J[vA][1] = UA[1];
                }
              if (typeof qe != "function" && (qe = null), typeof D == "string" && (D = Ae(D)), D) {
                let vA = D.getElementsByTagName("style");
                for (let mA = 0; mA < vA.length; mA++)
                  pi = pi.concat(y(vA[mA].textContent));
                let UA = Le(D, null);
                if (typeof UA.drawInDocument == "function") {
                  P.useCSS && !Ot && bt("SVGtoPDF: useCSS option can only be used for SVG *elements* in compatible browsers");
                  let mA = a._fillColor;
                  a.save().translate(x || 0, N || 0).scale(Tt), UA.drawInDocument();
                  for (let _A = 0; _A < wi.length; _A++)
                    a.page.annotations.push(wi[_A]);
                  a.restore(), a._fillColor = mA;
                } else
                  bt("SVGtoPDF: this element can't be rendered directly: " + D.nodeName);
              } else
                bt("SVGtoPDF: the input does not look like a valid SVG");
            };
            Q && typeof Q.exports < "u" && (Q.exports = A);
          },
          /***/
          783(Q, B, r) {
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <https://feross.org>
             * @license  MIT
             */
            r(187), r(8376), r(6401), r(2017);
            const A = r(2504), a = r(9029), D = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
            B.Buffer = d, B.SlowBuffer = k, B.INSPECT_MAX_BYTES = 50;
            const x = 2147483647;
            B.kMaxLength = x, d.TYPED_ARRAY_SUPPORT = N(), !d.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
            function N() {
              try {
                const wA = new Uint8Array(1), R = {
                  foo: function() {
                    return 42;
                  }
                };
                return Object.setPrototypeOf(R, Uint8Array.prototype), Object.setPrototypeOf(wA, R), wA.foo() === 42;
              } catch {
                return !1;
              }
            }
            Object.defineProperty(d.prototype, "parent", {
              enumerable: !0,
              get: function() {
                if (d.isBuffer(this))
                  return this.buffer;
              }
            }), Object.defineProperty(d.prototype, "offset", {
              enumerable: !0,
              get: function() {
                if (d.isBuffer(this))
                  return this.byteOffset;
              }
            });
            function P(wA) {
              if (wA > x)
                throw new RangeError('The value "' + wA + '" is invalid for option "size"');
              const R = new Uint8Array(wA);
              return Object.setPrototypeOf(R, d.prototype), R;
            }
            function d(wA, R, G) {
              if (typeof wA == "number") {
                if (typeof R == "string")
                  throw new TypeError('The "string" argument must be of type string. Received type number');
                return K(wA);
              }
              return J(wA, R, G);
            }
            d.poolSize = 8192;
            function J(wA, R, G) {
              if (typeof wA == "string")
                return z(wA, R);
              if (ArrayBuffer.isView(wA))
                return H(wA);
              if (wA == null)
                throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof wA);
              if (Le(wA, ArrayBuffer) || wA && Le(wA.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Le(wA, SharedArrayBuffer) || wA && Le(wA.buffer, SharedArrayBuffer)))
                return eA(wA, R, G);
              if (typeof wA == "number")
                throw new TypeError('The "value" argument must not be of type number. Received type number');
              const W = wA.valueOf && wA.valueOf();
              if (W != null && W !== wA)
                return d.from(W, R, G);
              const aA = CA(wA);
              if (aA) return aA;
              if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof wA[Symbol.toPrimitive] == "function")
                return d.from(wA[Symbol.toPrimitive]("string"), R, G);
              throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof wA);
            }
            d.from = function(wA, R, G) {
              return J(wA, R, G);
            }, Object.setPrototypeOf(d.prototype, Uint8Array.prototype), Object.setPrototypeOf(d, Uint8Array);
            function q(wA) {
              if (typeof wA != "number")
                throw new TypeError('"size" argument must be of type number');
              if (wA < 0)
                throw new RangeError('The value "' + wA + '" is invalid for option "size"');
            }
            function AA(wA, R, G) {
              return q(wA), wA <= 0 ? P(wA) : R !== void 0 ? typeof G == "string" ? P(wA).fill(R, G) : P(wA).fill(R) : P(wA);
            }
            d.alloc = function(wA, R, G) {
              return AA(wA, R, G);
            };
            function K(wA) {
              return q(wA), P(wA < 0 ? 0 : IA(wA) | 0);
            }
            d.allocUnsafe = function(wA) {
              return K(wA);
            }, d.allocUnsafeSlow = function(wA) {
              return K(wA);
            };
            function z(wA, R) {
              if ((typeof R != "string" || R === "") && (R = "utf8"), !d.isEncoding(R))
                throw new TypeError("Unknown encoding: " + R);
              const G = tA(wA, R) | 0;
              let W = P(G);
              const aA = W.write(wA, R);
              return aA !== G && (W = W.slice(0, aA)), W;
            }
            function T(wA) {
              const R = wA.length < 0 ? 0 : IA(wA.length) | 0, G = P(R);
              for (let W = 0; W < R; W += 1)
                G[W] = wA[W] & 255;
              return G;
            }
            function H(wA) {
              if (Le(wA, Uint8Array)) {
                const R = new Uint8Array(wA);
                return eA(R.buffer, R.byteOffset, R.byteLength);
              }
              return T(wA);
            }
            function eA(wA, R, G) {
              if (R < 0 || wA.byteLength < R)
                throw new RangeError('"offset" is outside of buffer bounds');
              if (wA.byteLength < R + (G || 0))
                throw new RangeError('"length" is outside of buffer bounds');
              let W;
              return R === void 0 && G === void 0 ? W = new Uint8Array(wA) : G === void 0 ? W = new Uint8Array(wA, R) : W = new Uint8Array(wA, R, G), Object.setPrototypeOf(W, d.prototype), W;
            }
            function CA(wA) {
              if (d.isBuffer(wA)) {
                const R = IA(wA.length) | 0, G = P(R);
                return G.length === 0 || wA.copy(G, 0, 0, R), G;
              }
              if (wA.length !== void 0)
                return typeof wA.length != "number" || Re(wA.length) ? P(0) : T(wA);
              if (wA.type === "Buffer" && Array.isArray(wA.data))
                return T(wA.data);
            }
            function IA(wA) {
              if (wA >= x)
                throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + x.toString(16) + " bytes");
              return wA | 0;
            }
            function k(wA) {
              return +wA != wA && (wA = 0), d.alloc(+wA);
            }
            d.isBuffer = function(R) {
              return R != null && R._isBuffer === !0 && R !== d.prototype;
            }, d.compare = function(R, G) {
              if (Le(R, Uint8Array) && (R = d.from(R, R.offset, R.byteLength)), Le(G, Uint8Array) && (G = d.from(G, G.offset, G.byteLength)), !d.isBuffer(R) || !d.isBuffer(G))
                throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
              if (R === G) return 0;
              let W = R.length, aA = G.length;
              for (let j = 0, pA = Math.min(W, aA); j < pA; ++j)
                if (R[j] !== G[j]) {
                  W = R[j], aA = G[j];
                  break;
                }
              return W < aA ? -1 : aA < W ? 1 : 0;
            }, d.isEncoding = function(R) {
              switch (String(R).toLowerCase()) {
                case "hex":
                case "utf8":
                case "utf-8":
                case "ascii":
                case "latin1":
                case "binary":
                case "base64":
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return !0;
                default:
                  return !1;
              }
            }, d.concat = function(R, G) {
              if (!Array.isArray(R))
                throw new TypeError('"list" argument must be an Array of Buffers');
              if (R.length === 0)
                return d.alloc(0);
              let W;
              if (G === void 0)
                for (G = 0, W = 0; W < R.length; ++W)
                  G += R[W].length;
              const aA = d.allocUnsafe(G);
              let j = 0;
              for (W = 0; W < R.length; ++W) {
                let pA = R[W];
                if (Le(pA, Uint8Array))
                  j + pA.length > aA.length ? (d.isBuffer(pA) || (pA = d.from(pA)), pA.copy(aA, j)) : Uint8Array.prototype.set.call(aA, pA, j);
                else if (d.isBuffer(pA))
                  pA.copy(aA, j);
                else
                  throw new TypeError('"list" argument must be an Array of Buffers');
                j += pA.length;
              }
              return aA;
            };
            function tA(wA, R) {
              if (d.isBuffer(wA))
                return wA.length;
              if (ArrayBuffer.isView(wA) || Le(wA, ArrayBuffer))
                return wA.byteLength;
              if (typeof wA != "string")
                throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof wA);
              const G = wA.length, W = arguments.length > 2 && arguments[2] === !0;
              if (!W && G === 0) return 0;
              let aA = !1;
              for (; ; )
                switch (R) {
                  case "ascii":
                  case "latin1":
                  case "binary":
                    return G;
                  case "utf8":
                  case "utf-8":
                    return he(wA).length;
                  case "ucs2":
                  case "ucs-2":
                  case "utf16le":
                  case "utf-16le":
                    return G * 2;
                  case "hex":
                    return G >>> 1;
                  case "base64":
                    return Pe(wA).length;
                  default:
                    if (aA)
                      return W ? -1 : he(wA).length;
                    R = ("" + R).toLowerCase(), aA = !0;
                }
            }
            d.byteLength = tA;
            function lA(wA, R, G) {
              let W = !1;
              if ((R === void 0 || R < 0) && (R = 0), R > this.length || ((G === void 0 || G > this.length) && (G = this.length), G <= 0) || (G >>>= 0, R >>>= 0, G <= R))
                return "";
              for (wA || (wA = "utf8"); ; )
                switch (wA) {
                  case "hex":
                    return LA(this, R, G);
                  case "utf8":
                  case "utf-8":
                    return VA(this, R, G);
                  case "ascii":
                    return OA(this, R, G);
                  case "latin1":
                  case "binary":
                    return xA(this, R, G);
                  case "base64":
                    return kA(this, R, G);
                  case "ucs2":
                  case "ucs-2":
                  case "utf16le":
                  case "utf-16le":
                    return yA(this, R, G);
                  default:
                    if (W) throw new TypeError("Unknown encoding: " + wA);
                    wA = (wA + "").toLowerCase(), W = !0;
                }
            }
            d.prototype._isBuffer = !0;
            function uA(wA, R, G) {
              const W = wA[R];
              wA[R] = wA[G], wA[G] = W;
            }
            d.prototype.swap16 = function() {
              const R = this.length;
              if (R % 2 !== 0)
                throw new RangeError("Buffer size must be a multiple of 16-bits");
              for (let G = 0; G < R; G += 2)
                uA(this, G, G + 1);
              return this;
            }, d.prototype.swap32 = function() {
              const R = this.length;
              if (R % 4 !== 0)
                throw new RangeError("Buffer size must be a multiple of 32-bits");
              for (let G = 0; G < R; G += 4)
                uA(this, G, G + 3), uA(this, G + 1, G + 2);
              return this;
            }, d.prototype.swap64 = function() {
              const R = this.length;
              if (R % 8 !== 0)
                throw new RangeError("Buffer size must be a multiple of 64-bits");
              for (let G = 0; G < R; G += 8)
                uA(this, G, G + 7), uA(this, G + 1, G + 6), uA(this, G + 2, G + 5), uA(this, G + 3, G + 4);
              return this;
            }, d.prototype.toString = function() {
              const R = this.length;
              return R === 0 ? "" : arguments.length === 0 ? VA(this, 0, R) : lA.apply(this, arguments);
            }, d.prototype.toLocaleString = d.prototype.toString, d.prototype.equals = function(R) {
              if (!d.isBuffer(R)) throw new TypeError("Argument must be a Buffer");
              return this === R ? !0 : d.compare(this, R) === 0;
            }, d.prototype.inspect = function() {
              let R = "";
              const G = B.INSPECT_MAX_BYTES;
              return R = this.toString("hex", 0, G).replace(/(.{2})/g, "$1 ").trim(), this.length > G && (R += " ... "), "<Buffer " + R + ">";
            }, D && (d.prototype[D] = d.prototype.inspect), d.prototype.compare = function(R, G, W, aA, j) {
              if (Le(R, Uint8Array) && (R = d.from(R, R.offset, R.byteLength)), !d.isBuffer(R))
                throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof R);
              if (G === void 0 && (G = 0), W === void 0 && (W = R ? R.length : 0), aA === void 0 && (aA = 0), j === void 0 && (j = this.length), G < 0 || W > R.length || aA < 0 || j > this.length)
                throw new RangeError("out of range index");
              if (aA >= j && G >= W)
                return 0;
              if (aA >= j)
                return -1;
              if (G >= W)
                return 1;
              if (G >>>= 0, W >>>= 0, aA >>>= 0, j >>>= 0, this === R) return 0;
              let pA = j - aA, Be = W - G;
              const Ie = Math.min(pA, Be), ee = this.slice(aA, j), Me = R.slice(G, W);
              for (let MA = 0; MA < Ie; ++MA)
                if (ee[MA] !== Me[MA]) {
                  pA = ee[MA], Be = Me[MA];
                  break;
                }
              return pA < Be ? -1 : Be < pA ? 1 : 0;
            };
            function w(wA, R, G, W, aA) {
              if (wA.length === 0) return -1;
              if (typeof G == "string" ? (W = G, G = 0) : G > 2147483647 ? G = 2147483647 : G < -2147483648 && (G = -2147483648), G = +G, Re(G) && (G = aA ? 0 : wA.length - 1), G < 0 && (G = wA.length + G), G >= wA.length) {
                if (aA) return -1;
                G = wA.length - 1;
              } else if (G < 0)
                if (aA) G = 0;
                else return -1;
              if (typeof R == "string" && (R = d.from(R, W)), d.isBuffer(R))
                return R.length === 0 ? -1 : v(wA, R, G, W, aA);
              if (typeof R == "number")
                return R = R & 255, typeof Uint8Array.prototype.indexOf == "function" ? aA ? Uint8Array.prototype.indexOf.call(wA, R, G) : Uint8Array.prototype.lastIndexOf.call(wA, R, G) : v(wA, [R], G, W, aA);
              throw new TypeError("val must be string, number or Buffer");
            }
            function v(wA, R, G, W, aA) {
              let j = 1, pA = wA.length, Be = R.length;
              if (W !== void 0 && (W = String(W).toLowerCase(), W === "ucs2" || W === "ucs-2" || W === "utf16le" || W === "utf-16le")) {
                if (wA.length < 2 || R.length < 2)
                  return -1;
                j = 2, pA /= 2, Be /= 2, G /= 2;
              }
              function Ie(Me, MA) {
                return j === 1 ? Me[MA] : Me.readUInt16BE(MA * j);
              }
              let ee;
              if (aA) {
                let Me = -1;
                for (ee = G; ee < pA; ee++)
                  if (Ie(wA, ee) === Ie(R, Me === -1 ? 0 : ee - Me)) {
                    if (Me === -1 && (Me = ee), ee - Me + 1 === Be) return Me * j;
                  } else
                    Me !== -1 && (ee -= ee - Me), Me = -1;
              } else
                for (G + Be > pA && (G = pA - Be), ee = G; ee >= 0; ee--) {
                  let Me = !0;
                  for (let MA = 0; MA < Be; MA++)
                    if (Ie(wA, ee + MA) !== Ie(R, MA)) {
                      Me = !1;
                      break;
                    }
                  if (Me) return ee;
                }
              return -1;
            }
            d.prototype.includes = function(R, G, W) {
              return this.indexOf(R, G, W) !== -1;
            }, d.prototype.indexOf = function(R, G, W) {
              return w(this, R, G, W, !0);
            }, d.prototype.lastIndexOf = function(R, G, W) {
              return w(this, R, G, W, !1);
            };
            function RA(wA, R, G, W) {
              G = Number(G) || 0;
              const aA = wA.length - G;
              W ? (W = Number(W), W > aA && (W = aA)) : W = aA;
              const j = R.length;
              W > j / 2 && (W = j / 2);
              let pA;
              for (pA = 0; pA < W; ++pA) {
                const Be = parseInt(R.substr(pA * 2, 2), 16);
                if (Re(Be)) return pA;
                wA[G + pA] = Be;
              }
              return pA;
            }
            function DA(wA, R, G, W) {
              return Je(he(R, wA.length - G), wA, G, W);
            }
            function $(wA, R, G, W) {
              return Je(ie(R), wA, G, W);
            }
            function cA(wA, R, G, W) {
              return Je(Pe(R), wA, G, W);
            }
            function Ae(wA, R, G, W) {
              return Je(KA(R, wA.length - G), wA, G, W);
            }
            d.prototype.write = function(R, G, W, aA) {
              if (G === void 0)
                aA = "utf8", W = this.length, G = 0;
              else if (W === void 0 && typeof G == "string")
                aA = G, W = this.length, G = 0;
              else if (isFinite(G))
                G = G >>> 0, isFinite(W) ? (W = W >>> 0, aA === void 0 && (aA = "utf8")) : (aA = W, W = void 0);
              else
                throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
              const j = this.length - G;
              if ((W === void 0 || W > j) && (W = j), R.length > 0 && (W < 0 || G < 0) || G > this.length)
                throw new RangeError("Attempt to write outside buffer bounds");
              aA || (aA = "utf8");
              let pA = !1;
              for (; ; )
                switch (aA) {
                  case "hex":
                    return RA(this, R, G, W);
                  case "utf8":
                  case "utf-8":
                    return DA(this, R, G, W);
                  case "ascii":
                  case "latin1":
                  case "binary":
                    return $(this, R, G, W);
                  case "base64":
                    return cA(this, R, G, W);
                  case "ucs2":
                  case "ucs-2":
                  case "utf16le":
                  case "utf-16le":
                    return Ae(this, R, G, W);
                  default:
                    if (pA) throw new TypeError("Unknown encoding: " + aA);
                    aA = ("" + aA).toLowerCase(), pA = !0;
                }
            }, d.prototype.toJSON = function() {
              return {
                type: "Buffer",
                data: Array.prototype.slice.call(this._arr || this, 0)
              };
            };
            function kA(wA, R, G) {
              return R === 0 && G === wA.length ? A.fromByteArray(wA) : A.fromByteArray(wA.slice(R, G));
            }
            function VA(wA, R, G) {
              G = Math.min(wA.length, G);
              const W = [];
              let aA = R;
              for (; aA < G; ) {
                const j = wA[aA];
                let pA = null, Be = j > 239 ? 4 : j > 223 ? 3 : j > 191 ? 2 : 1;
                if (aA + Be <= G) {
                  let Ie, ee, Me, MA;
                  switch (Be) {
                    case 1:
                      j < 128 && (pA = j);
                      break;
                    case 2:
                      Ie = wA[aA + 1], (Ie & 192) === 128 && (MA = (j & 31) << 6 | Ie & 63, MA > 127 && (pA = MA));
                      break;
                    case 3:
                      Ie = wA[aA + 1], ee = wA[aA + 2], (Ie & 192) === 128 && (ee & 192) === 128 && (MA = (j & 15) << 12 | (Ie & 63) << 6 | ee & 63, MA > 2047 && (MA < 55296 || MA > 57343) && (pA = MA));
                      break;
                    case 4:
                      Ie = wA[aA + 1], ee = wA[aA + 2], Me = wA[aA + 3], (Ie & 192) === 128 && (ee & 192) === 128 && (Me & 192) === 128 && (MA = (j & 15) << 18 | (Ie & 63) << 12 | (ee & 63) << 6 | Me & 63, MA > 65535 && MA < 1114112 && (pA = MA));
                  }
                }
                pA === null ? (pA = 65533, Be = 1) : pA > 65535 && (pA -= 65536, W.push(pA >>> 10 & 1023 | 55296), pA = 56320 | pA & 1023), W.push(pA), aA += Be;
              }
              return zA(W);
            }
            const EA = 4096;
            function zA(wA) {
              const R = wA.length;
              if (R <= EA)
                return String.fromCharCode.apply(String, wA);
              let G = "", W = 0;
              for (; W < R; )
                G += String.fromCharCode.apply(String, wA.slice(W, W += EA));
              return G;
            }
            function OA(wA, R, G) {
              let W = "";
              G = Math.min(wA.length, G);
              for (let aA = R; aA < G; ++aA)
                W += String.fromCharCode(wA[aA] & 127);
              return W;
            }
            function xA(wA, R, G) {
              let W = "";
              G = Math.min(wA.length, G);
              for (let aA = R; aA < G; ++aA)
                W += String.fromCharCode(wA[aA]);
              return W;
            }
            function LA(wA, R, G) {
              const W = wA.length;
              (!R || R < 0) && (R = 0), (!G || G < 0 || G > W) && (G = W);
              let aA = "";
              for (let j = R; j < G; ++j)
                aA += _e[wA[j]];
              return aA;
            }
            function yA(wA, R, G) {
              const W = wA.slice(R, G);
              let aA = "";
              for (let j = 0; j < W.length - 1; j += 2)
                aA += String.fromCharCode(W[j] + W[j + 1] * 256);
              return aA;
            }
            d.prototype.slice = function(R, G) {
              const W = this.length;
              R = ~~R, G = G === void 0 ? W : ~~G, R < 0 ? (R += W, R < 0 && (R = 0)) : R > W && (R = W), G < 0 ? (G += W, G < 0 && (G = 0)) : G > W && (G = W), G < R && (G = R);
              const aA = this.subarray(R, G);
              return Object.setPrototypeOf(aA, d.prototype), aA;
            };
            function TA(wA, R, G) {
              if (wA % 1 !== 0 || wA < 0) throw new RangeError("offset is not uint");
              if (wA + R > G) throw new RangeError("Trying to access beyond buffer length");
            }
            d.prototype.readUintLE = d.prototype.readUIntLE = function(R, G, W) {
              R = R >>> 0, G = G >>> 0, W || TA(R, G, this.length);
              let aA = this[R], j = 1, pA = 0;
              for (; ++pA < G && (j *= 256); )
                aA += this[R + pA] * j;
              return aA;
            }, d.prototype.readUintBE = d.prototype.readUIntBE = function(R, G, W) {
              R = R >>> 0, G = G >>> 0, W || TA(R, G, this.length);
              let aA = this[R + --G], j = 1;
              for (; G > 0 && (j *= 256); )
                aA += this[R + --G] * j;
              return aA;
            }, d.prototype.readUint8 = d.prototype.readUInt8 = function(R, G) {
              return R = R >>> 0, G || TA(R, 1, this.length), this[R];
            }, d.prototype.readUint16LE = d.prototype.readUInt16LE = function(R, G) {
              return R = R >>> 0, G || TA(R, 2, this.length), this[R] | this[R + 1] << 8;
            }, d.prototype.readUint16BE = d.prototype.readUInt16BE = function(R, G) {
              return R = R >>> 0, G || TA(R, 2, this.length), this[R] << 8 | this[R + 1];
            }, d.prototype.readUint32LE = d.prototype.readUInt32LE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), (this[R] | this[R + 1] << 8 | this[R + 2] << 16) + this[R + 3] * 16777216;
            }, d.prototype.readUint32BE = d.prototype.readUInt32BE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), this[R] * 16777216 + (this[R + 1] << 16 | this[R + 2] << 8 | this[R + 3]);
            }, d.prototype.readBigUInt64LE = se(function(R) {
              R = R >>> 0, y(R, "offset");
              const G = this[R], W = this[R + 7];
              (G === void 0 || W === void 0) && M(R, this.length - 8);
              const aA = G + this[++R] * 2 ** 8 + this[++R] * 2 ** 16 + this[++R] * 2 ** 24, j = this[++R] + this[++R] * 2 ** 8 + this[++R] * 2 ** 16 + W * 2 ** 24;
              return BigInt(aA) + (BigInt(j) << BigInt(32));
            }), d.prototype.readBigUInt64BE = se(function(R) {
              R = R >>> 0, y(R, "offset");
              const G = this[R], W = this[R + 7];
              (G === void 0 || W === void 0) && M(R, this.length - 8);
              const aA = G * 2 ** 24 + this[++R] * 2 ** 16 + this[++R] * 2 ** 8 + this[++R], j = this[++R] * 2 ** 24 + this[++R] * 2 ** 16 + this[++R] * 2 ** 8 + W;
              return (BigInt(aA) << BigInt(32)) + BigInt(j);
            }), d.prototype.readIntLE = function(R, G, W) {
              R = R >>> 0, G = G >>> 0, W || TA(R, G, this.length);
              let aA = this[R], j = 1, pA = 0;
              for (; ++pA < G && (j *= 256); )
                aA += this[R + pA] * j;
              return j *= 128, aA >= j && (aA -= Math.pow(2, 8 * G)), aA;
            }, d.prototype.readIntBE = function(R, G, W) {
              R = R >>> 0, G = G >>> 0, W || TA(R, G, this.length);
              let aA = G, j = 1, pA = this[R + --aA];
              for (; aA > 0 && (j *= 256); )
                pA += this[R + --aA] * j;
              return j *= 128, pA >= j && (pA -= Math.pow(2, 8 * G)), pA;
            }, d.prototype.readInt8 = function(R, G) {
              return R = R >>> 0, G || TA(R, 1, this.length), this[R] & 128 ? (255 - this[R] + 1) * -1 : this[R];
            }, d.prototype.readInt16LE = function(R, G) {
              R = R >>> 0, G || TA(R, 2, this.length);
              const W = this[R] | this[R + 1] << 8;
              return W & 32768 ? W | 4294901760 : W;
            }, d.prototype.readInt16BE = function(R, G) {
              R = R >>> 0, G || TA(R, 2, this.length);
              const W = this[R + 1] | this[R] << 8;
              return W & 32768 ? W | 4294901760 : W;
            }, d.prototype.readInt32LE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), this[R] | this[R + 1] << 8 | this[R + 2] << 16 | this[R + 3] << 24;
            }, d.prototype.readInt32BE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), this[R] << 24 | this[R + 1] << 16 | this[R + 2] << 8 | this[R + 3];
            }, d.prototype.readBigInt64LE = se(function(R) {
              R = R >>> 0, y(R, "offset");
              const G = this[R], W = this[R + 7];
              (G === void 0 || W === void 0) && M(R, this.length - 8);
              const aA = this[R + 4] + this[R + 5] * 2 ** 8 + this[R + 6] * 2 ** 16 + (W << 24);
              return (BigInt(aA) << BigInt(32)) + BigInt(G + this[++R] * 256 + this[++R] * 65536 + this[++R] * 16777216);
            }), d.prototype.readBigInt64BE = se(function(R) {
              R = R >>> 0, y(R, "offset");
              const G = this[R], W = this[R + 7];
              (G === void 0 || W === void 0) && M(R, this.length - 8);
              const aA = (G << 24) + // Overflow
              this[++R] * 2 ** 16 + this[++R] * 2 ** 8 + this[++R];
              return (BigInt(aA) << BigInt(32)) + BigInt(this[++R] * 16777216 + this[++R] * 65536 + this[++R] * 256 + W);
            }), d.prototype.readFloatLE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), a.read(this, R, !0, 23, 4);
            }, d.prototype.readFloatBE = function(R, G) {
              return R = R >>> 0, G || TA(R, 4, this.length), a.read(this, R, !1, 23, 4);
            }, d.prototype.readDoubleLE = function(R, G) {
              return R = R >>> 0, G || TA(R, 8, this.length), a.read(this, R, !0, 52, 8);
            }, d.prototype.readDoubleBE = function(R, G) {
              return R = R >>> 0, G || TA(R, 8, this.length), a.read(this, R, !1, 52, 8);
            };
            function fA(wA, R, G, W, aA, j) {
              if (!d.isBuffer(wA)) throw new TypeError('"buffer" argument must be a Buffer instance');
              if (R > aA || R < j) throw new RangeError('"value" argument is out of bounds');
              if (G + W > wA.length) throw new RangeError("Index out of range");
            }
            d.prototype.writeUintLE = d.prototype.writeUIntLE = function(R, G, W, aA) {
              if (R = +R, G = G >>> 0, W = W >>> 0, !aA) {
                const Be = Math.pow(2, 8 * W) - 1;
                fA(this, R, G, W, Be, 0);
              }
              let j = 1, pA = 0;
              for (this[G] = R & 255; ++pA < W && (j *= 256); )
                this[G + pA] = R / j & 255;
              return G + W;
            }, d.prototype.writeUintBE = d.prototype.writeUIntBE = function(R, G, W, aA) {
              if (R = +R, G = G >>> 0, W = W >>> 0, !aA) {
                const Be = Math.pow(2, 8 * W) - 1;
                fA(this, R, G, W, Be, 0);
              }
              let j = W - 1, pA = 1;
              for (this[G + j] = R & 255; --j >= 0 && (pA *= 256); )
                this[G + j] = R / pA & 255;
              return G + W;
            }, d.prototype.writeUint8 = d.prototype.writeUInt8 = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 1, 255, 0), this[G] = R & 255, G + 1;
            }, d.prototype.writeUint16LE = d.prototype.writeUInt16LE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 2, 65535, 0), this[G] = R & 255, this[G + 1] = R >>> 8, G + 2;
            }, d.prototype.writeUint16BE = d.prototype.writeUInt16BE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 2, 65535, 0), this[G] = R >>> 8, this[G + 1] = R & 255, G + 2;
            }, d.prototype.writeUint32LE = d.prototype.writeUInt32LE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 4, 4294967295, 0), this[G + 3] = R >>> 24, this[G + 2] = R >>> 16, this[G + 1] = R >>> 8, this[G] = R & 255, G + 4;
            }, d.prototype.writeUint32BE = d.prototype.writeUInt32BE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 4, 4294967295, 0), this[G] = R >>> 24, this[G + 1] = R >>> 16, this[G + 2] = R >>> 8, this[G + 3] = R & 255, G + 4;
            };
            function sA(wA, R, G, W, aA) {
              bA(R, W, aA, wA, G, 7);
              let j = Number(R & BigInt(4294967295));
              wA[G++] = j, j = j >> 8, wA[G++] = j, j = j >> 8, wA[G++] = j, j = j >> 8, wA[G++] = j;
              let pA = Number(R >> BigInt(32) & BigInt(4294967295));
              return wA[G++] = pA, pA = pA >> 8, wA[G++] = pA, pA = pA >> 8, wA[G++] = pA, pA = pA >> 8, wA[G++] = pA, G;
            }
            function F(wA, R, G, W, aA) {
              bA(R, W, aA, wA, G, 7);
              let j = Number(R & BigInt(4294967295));
              wA[G + 7] = j, j = j >> 8, wA[G + 6] = j, j = j >> 8, wA[G + 5] = j, j = j >> 8, wA[G + 4] = j;
              let pA = Number(R >> BigInt(32) & BigInt(4294967295));
              return wA[G + 3] = pA, pA = pA >> 8, wA[G + 2] = pA, pA = pA >> 8, wA[G + 1] = pA, pA = pA >> 8, wA[G] = pA, G + 8;
            }
            d.prototype.writeBigUInt64LE = se(function(R, G) {
              return G === void 0 && (G = 0), sA(this, R, G, BigInt(0), BigInt("0xffffffffffffffff"));
            }), d.prototype.writeBigUInt64BE = se(function(R, G) {
              return G === void 0 && (G = 0), F(this, R, G, BigInt(0), BigInt("0xffffffffffffffff"));
            }), d.prototype.writeIntLE = function(R, G, W, aA) {
              if (R = +R, G = G >>> 0, !aA) {
                const Ie = Math.pow(2, 8 * W - 1);
                fA(this, R, G, W, Ie - 1, -Ie);
              }
              let j = 0, pA = 1, Be = 0;
              for (this[G] = R & 255; ++j < W && (pA *= 256); )
                R < 0 && Be === 0 && this[G + j - 1] !== 0 && (Be = 1), this[G + j] = (R / pA >> 0) - Be & 255;
              return G + W;
            }, d.prototype.writeIntBE = function(R, G, W, aA) {
              if (R = +R, G = G >>> 0, !aA) {
                const Ie = Math.pow(2, 8 * W - 1);
                fA(this, R, G, W, Ie - 1, -Ie);
              }
              let j = W - 1, pA = 1, Be = 0;
              for (this[G + j] = R & 255; --j >= 0 && (pA *= 256); )
                R < 0 && Be === 0 && this[G + j + 1] !== 0 && (Be = 1), this[G + j] = (R / pA >> 0) - Be & 255;
              return G + W;
            }, d.prototype.writeInt8 = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 1, 127, -128), R < 0 && (R = 255 + R + 1), this[G] = R & 255, G + 1;
            }, d.prototype.writeInt16LE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 2, 32767, -32768), this[G] = R & 255, this[G + 1] = R >>> 8, G + 2;
            }, d.prototype.writeInt16BE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 2, 32767, -32768), this[G] = R >>> 8, this[G + 1] = R & 255, G + 2;
            }, d.prototype.writeInt32LE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 4, 2147483647, -2147483648), this[G] = R & 255, this[G + 1] = R >>> 8, this[G + 2] = R >>> 16, this[G + 3] = R >>> 24, G + 4;
            }, d.prototype.writeInt32BE = function(R, G, W) {
              return R = +R, G = G >>> 0, W || fA(this, R, G, 4, 2147483647, -2147483648), R < 0 && (R = 4294967295 + R + 1), this[G] = R >>> 24, this[G + 1] = R >>> 16, this[G + 2] = R >>> 8, this[G + 3] = R & 255, G + 4;
            }, d.prototype.writeBigInt64LE = se(function(R, G) {
              return G === void 0 && (G = 0), sA(this, R, G, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
            }), d.prototype.writeBigInt64BE = se(function(R, G) {
              return G === void 0 && (G = 0), F(this, R, G, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
            });
            function o(wA, R, G, W, aA, j) {
              if (G + W > wA.length) throw new RangeError("Index out of range");
              if (G < 0) throw new RangeError("Index out of range");
            }
            function h(wA, R, G, W, aA) {
              return R = +R, G = G >>> 0, aA || o(wA, R, G, 4), a.write(wA, R, G, W, 23, 4), G + 4;
            }
            d.prototype.writeFloatLE = function(R, G, W) {
              return h(this, R, G, !0, W);
            }, d.prototype.writeFloatBE = function(R, G, W) {
              return h(this, R, G, !1, W);
            };
            function _(wA, R, G, W, aA) {
              return R = +R, G = G >>> 0, aA || o(wA, R, G, 8), a.write(wA, R, G, W, 52, 8), G + 8;
            }
            d.prototype.writeDoubleLE = function(R, G, W) {
              return _(this, R, G, !0, W);
            }, d.prototype.writeDoubleBE = function(R, G, W) {
              return _(this, R, G, !1, W);
            }, d.prototype.copy = function(R, G, W, aA) {
              if (!d.isBuffer(R)) throw new TypeError("argument should be a Buffer");
              if (W || (W = 0), !aA && aA !== 0 && (aA = this.length), G >= R.length && (G = R.length), G || (G = 0), aA > 0 && aA < W && (aA = W), aA === W || R.length === 0 || this.length === 0) return 0;
              if (G < 0)
                throw new RangeError("targetStart out of bounds");
              if (W < 0 || W >= this.length) throw new RangeError("Index out of range");
              if (aA < 0) throw new RangeError("sourceEnd out of bounds");
              aA > this.length && (aA = this.length), R.length - G < aA - W && (aA = R.length - G + W);
              const j = aA - W;
              return this === R && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(G, W, aA) : Uint8Array.prototype.set.call(R, this.subarray(W, aA), G), j;
            }, d.prototype.fill = function(R, G, W, aA) {
              if (typeof R == "string") {
                if (typeof G == "string" ? (aA = G, G = 0, W = this.length) : typeof W == "string" && (aA = W, W = this.length), aA !== void 0 && typeof aA != "string")
                  throw new TypeError("encoding must be a string");
                if (typeof aA == "string" && !d.isEncoding(aA))
                  throw new TypeError("Unknown encoding: " + aA);
                if (R.length === 1) {
                  const pA = R.charCodeAt(0);
                  (aA === "utf8" && pA < 128 || aA === "latin1") && (R = pA);
                }
              } else typeof R == "number" ? R = R & 255 : typeof R == "boolean" && (R = Number(R));
              if (G < 0 || this.length < G || this.length < W)
                throw new RangeError("Out of range index");
              if (W <= G)
                return this;
              G = G >>> 0, W = W === void 0 ? this.length : W >>> 0, R || (R = 0);
              let j;
              if (typeof R == "number")
                for (j = G; j < W; ++j)
                  this[j] = R;
              else {
                const pA = d.isBuffer(R) ? R : d.from(R, aA), Be = pA.length;
                if (Be === 0)
                  throw new TypeError('The value "' + R + '" is invalid for argument "value"');
                for (j = 0; j < W - G; ++j)
                  this[j + G] = pA[j % Be];
              }
              return this;
            };
            const oA = {};
            function p(wA, R, G) {
              oA[wA] = class extends G {
                constructor() {
                  super(), Object.defineProperty(this, "message", {
                    value: R.apply(this, arguments),
                    writable: !0,
                    configurable: !0
                  }), this.name = `${this.name} [${wA}]`, this.stack, delete this.name;
                }
                get code() {
                  return wA;
                }
                set code(aA) {
                  Object.defineProperty(this, "code", {
                    configurable: !0,
                    enumerable: !0,
                    value: aA,
                    writable: !0
                  });
                }
                toString() {
                  return `${this.name} [${wA}]: ${this.message}`;
                }
              };
            }
            p("ERR_BUFFER_OUT_OF_BOUNDS", function(wA) {
              return wA ? `${wA} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
            }, RangeError), p("ERR_INVALID_ARG_TYPE", function(wA, R) {
              return `The "${wA}" argument must be of type number. Received type ${typeof R}`;
            }, TypeError), p("ERR_OUT_OF_RANGE", function(wA, R, G) {
              let W = `The value of "${wA}" is out of range.`, aA = G;
              return Number.isInteger(G) && Math.abs(G) > 4294967296 ? aA = rA(String(G)) : typeof G == "bigint" && (aA = String(G), (G > BigInt(2) ** BigInt(32) || G < -(BigInt(2) ** BigInt(32))) && (aA = rA(aA)), aA += "n"), W += ` It must be ${R}. Received ${aA}`, W;
            }, RangeError);
            function rA(wA) {
              let R = "", G = wA.length;
              const W = wA[0] === "-" ? 1 : 0;
              for (; G >= W + 4; G -= 3)
                R = `_${wA.slice(G - 3, G)}${R}`;
              return `${wA.slice(0, G)}${R}`;
            }
            function QA(wA, R, G) {
              y(R, "offset"), (wA[R] === void 0 || wA[R + G] === void 0) && M(R, wA.length - (G + 1));
            }
            function bA(wA, R, G, W, aA, j) {
              if (wA > G || wA < R) {
                const pA = typeof R == "bigint" ? "n" : "";
                let Be;
                throw R === 0 || R === BigInt(0) ? Be = `>= 0${pA} and < 2${pA} ** ${(j + 1) * 8}${pA}` : Be = `>= -(2${pA} ** ${(j + 1) * 8 - 1}${pA}) and < 2 ** ${(j + 1) * 8 - 1}${pA}`, new oA.ERR_OUT_OF_RANGE("value", Be, wA);
              }
              QA(W, aA, j);
            }
            function y(wA, R) {
              if (typeof wA != "number")
                throw new oA.ERR_INVALID_ARG_TYPE(R, "number", wA);
            }
            function M(wA, R, G) {
              throw Math.floor(wA) !== wA ? (y(wA, G), new oA.ERR_OUT_OF_RANGE("offset", "an integer", wA)) : R < 0 ? new oA.ERR_BUFFER_OUT_OF_BOUNDS() : new oA.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${R}`, wA);
            }
            const FA = /[^+/0-9A-Za-z-_]/g;
            function dA(wA) {
              if (wA = wA.split("=")[0], wA = wA.trim().replace(FA, ""), wA.length < 2) return "";
              for (; wA.length % 4 !== 0; )
                wA = wA + "=";
              return wA;
            }
            function he(wA, R) {
              R = R || 1 / 0;
              let G;
              const W = wA.length;
              let aA = null;
              const j = [];
              for (let pA = 0; pA < W; ++pA) {
                if (G = wA.charCodeAt(pA), G > 55295 && G < 57344) {
                  if (!aA) {
                    if (G > 56319) {
                      (R -= 3) > -1 && j.push(239, 191, 189);
                      continue;
                    } else if (pA + 1 === W) {
                      (R -= 3) > -1 && j.push(239, 191, 189);
                      continue;
                    }
                    aA = G;
                    continue;
                  }
                  if (G < 56320) {
                    (R -= 3) > -1 && j.push(239, 191, 189), aA = G;
                    continue;
                  }
                  G = (aA - 55296 << 10 | G - 56320) + 65536;
                } else aA && (R -= 3) > -1 && j.push(239, 191, 189);
                if (aA = null, G < 128) {
                  if ((R -= 1) < 0) break;
                  j.push(G);
                } else if (G < 2048) {
                  if ((R -= 2) < 0) break;
                  j.push(G >> 6 | 192, G & 63 | 128);
                } else if (G < 65536) {
                  if ((R -= 3) < 0) break;
                  j.push(G >> 12 | 224, G >> 6 & 63 | 128, G & 63 | 128);
                } else if (G < 1114112) {
                  if ((R -= 4) < 0) break;
                  j.push(G >> 18 | 240, G >> 12 & 63 | 128, G >> 6 & 63 | 128, G & 63 | 128);
                } else
                  throw new Error("Invalid code point");
              }
              return j;
            }
            function ie(wA) {
              const R = [];
              for (let G = 0; G < wA.length; ++G)
                R.push(wA.charCodeAt(G) & 255);
              return R;
            }
            function KA(wA, R) {
              let G, W, aA;
              const j = [];
              for (let pA = 0; pA < wA.length && !((R -= 2) < 0); ++pA)
                G = wA.charCodeAt(pA), W = G >> 8, aA = G % 256, j.push(aA), j.push(W);
              return j;
            }
            function Pe(wA) {
              return A.toByteArray(dA(wA));
            }
            function Je(wA, R, G, W) {
              let aA;
              for (aA = 0; aA < W && !(aA + G >= R.length || aA >= wA.length); ++aA)
                R[aA + G] = wA[aA];
              return aA;
            }
            function Le(wA, R) {
              return wA instanceof R || wA != null && wA.constructor != null && wA.constructor.name != null && wA.constructor.name === R.name;
            }
            function Re(wA) {
              return wA !== wA;
            }
            const _e = (function() {
              const wA = "0123456789abcdef", R = new Array(256);
              for (let G = 0; G < 16; ++G) {
                const W = G * 16;
                for (let aA = 0; aA < 16; ++aA)
                  R[W + aA] = wA[G] + wA[aA];
              }
              return R;
            })();
            function se(wA) {
              return typeof BigInt > "u" ? Ee : wA;
            }
            function Ee() {
              throw new Error("BigInt not supported");
            }
          },
          /***/
          4406(Q) {
            var B = 1, r = 0;
            class A {
              constructor(D) {
                this.stateTable = D.stateTable, this.accepting = D.accepting, this.tags = D.tags;
              }
              /**
               * Returns an iterable object that yields pattern matches over the input sequence.
               * Matches are of the form [startIndex, endIndex, tags].
               */
              match(D) {
                var x = this;
                return {
                  *[Symbol.iterator]() {
                    for (var N = B, P = null, d = null, J = null, q = 0; q < D.length; q++) {
                      var AA = D[q];
                      J = N, N = x.stateTable[N][AA], N === r && (P != null && d != null && d >= P && (yield [P, d, x.tags[J]]), N = x.stateTable[B][AA], P = null), N !== r && P == null && (P = q), x.accepting[N] && (d = q), N === r && (N = B);
                    }
                    P != null && d != null && d >= P && (yield [P, d, x.tags[N]]);
                  }
                };
              }
              /**
               * For each match over the input sequence, action functions matching
               * the tag definitions in the input pattern are called with the startIndex,
               * endIndex, and sub-match sequence.
               */
              apply(D, x) {
                for (var [N, P, d] of this.match(D))
                  for (var J of d)
                    typeof x[J] == "function" && x[J](N, P, D.slice(N, P + 1));
              }
            }
            Q.exports = A;
          },
          /***/
          3915(Q, B, r) {
            r(8376), r(6401), r(2017);
            var A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            (function(a) {
              var D = typeof Uint8Array < "u" ? Uint8Array : Array, x = 43, N = 47, P = 48, d = 97, J = 65, q = 45, AA = 95;
              function K(H) {
                var eA = H.charCodeAt(0);
                if (eA === x || eA === q) return 62;
                if (eA === N || eA === AA) return 63;
                if (eA < P) return -1;
                if (eA < P + 10) return eA - P + 26 + 26;
                if (eA < J + 26) return eA - J;
                if (eA < d + 26) return eA - d + 26;
              }
              function z(H) {
                var eA, CA, IA, k, tA, lA;
                if (H.length % 4 > 0)
                  throw new Error("Invalid string. Length must be a multiple of 4");
                var uA = H.length;
                tA = H.charAt(uA - 2) === "=" ? 2 : H.charAt(uA - 1) === "=" ? 1 : 0, lA = new D(H.length * 3 / 4 - tA), IA = tA > 0 ? H.length - 4 : H.length;
                var w = 0;
                function v(RA) {
                  lA[w++] = RA;
                }
                for (eA = 0, CA = 0; eA < IA; eA += 4, CA += 3)
                  k = K(H.charAt(eA)) << 18 | K(H.charAt(eA + 1)) << 12 | K(H.charAt(eA + 2)) << 6 | K(H.charAt(eA + 3)), v((k & 16711680) >> 16), v((k & 65280) >> 8), v(k & 255);
                return tA === 2 ? (k = K(H.charAt(eA)) << 2 | K(H.charAt(eA + 1)) >> 4, v(k & 255)) : tA === 1 && (k = K(H.charAt(eA)) << 10 | K(H.charAt(eA + 1)) << 4 | K(H.charAt(eA + 2)) >> 2, v(k >> 8 & 255), v(k & 255)), lA;
              }
              function T(H) {
                var eA, CA = H.length % 3, IA = "", k, tA;
                function lA(w) {
                  return A.charAt(w);
                }
                function uA(w) {
                  return lA(w >> 18 & 63) + lA(w >> 12 & 63) + lA(w >> 6 & 63) + lA(w & 63);
                }
                for (eA = 0, tA = H.length - CA; eA < tA; eA += 3)
                  k = (H[eA] << 16) + (H[eA + 1] << 8) + H[eA + 2], IA += uA(k);
                switch (CA) {
                  case 1:
                    k = H[H.length - 1], IA += lA(k >> 2), IA += lA(k << 4 & 63), IA += "==";
                    break;
                  case 2:
                    k = (H[H.length - 2] << 8) + H[H.length - 1], IA += lA(k >> 10), IA += lA(k >> 4 & 63), IA += lA(k << 2 & 63), IA += "=";
                    break;
                }
                return IA;
              }
              a.toByteArray = z, a.fromByteArray = T;
            })(B);
          },
          /***/
          336(Q, B, r) {
            var A = r(783).Buffer;
            r(187);
            const a = r(2416), D = r(6729);
            Q.exports = class pa {
              static decode(N, P) {
                return a.readFile(N, function(d, J) {
                  return new pa(J).decode((AA) => P(AA));
                });
              }
              static load(N) {
                const P = a.readFileSync(N);
                return new pa(P);
              }
              constructor(N) {
                let P;
                for (this.data = N, this.pos = 8, this.palette = [], this.imgData = [], this.transparency = {}, this.text = {}; ; ) {
                  const z = this.readUInt32();
                  let T = "";
                  for (P = 0; P < 4; P++)
                    T += String.fromCharCode(this.data[this.pos++]);
                  switch (T) {
                    case "IHDR":
                      this.width = this.readUInt32(), this.height = this.readUInt32(), this.bits = this.data[this.pos++], this.colorType = this.data[this.pos++], this.compressionMethod = this.data[this.pos++], this.filterMethod = this.data[this.pos++], this.interlaceMethod = this.data[this.pos++];
                      break;
                    case "PLTE":
                      this.palette = this.read(z);
                      break;
                    case "IDAT":
                      for (P = 0; P < z; P++)
                        this.imgData.push(this.data[this.pos++]);
                      break;
                    case "tRNS":
                      switch (this.transparency = {}, this.colorType) {
                        case 3:
                          this.transparency.indexed = this.read(z);
                          var d = 255 - this.transparency.indexed.length;
                          if (d > 0)
                            for (P = 0; P < d; P++)
                              this.transparency.indexed.push(255);
                          break;
                        case 0:
                          this.transparency.grayscale = this.read(z)[0];
                          break;
                        case 2:
                          this.transparency.rgb = this.read(z);
                          break;
                      }
                      break;
                    case "tEXt":
                      var J = this.read(z), q = J.indexOf(0), AA = String.fromCharCode.apply(String, J.slice(0, q));
                      this.text[AA] = String.fromCharCode.apply(String, J.slice(q + 1));
                      break;
                    case "IEND":
                      switch (this.colorType) {
                        case 0:
                        case 3:
                        case 4:
                          this.colors = 1;
                          break;
                        case 2:
                        case 6:
                          this.colors = 3;
                          break;
                      }
                      this.hasAlphaChannel = [4, 6].includes(this.colorType);
                      var K = this.colors + (this.hasAlphaChannel ? 1 : 0);
                      switch (this.pixelBitlength = this.bits * K, this.colors) {
                        case 1:
                          this.colorSpace = "DeviceGray";
                          break;
                        case 3:
                          this.colorSpace = "DeviceRGB";
                          break;
                      }
                      this.imgData = new A(this.imgData);
                      return;
                    // removed by dead control flow
                    default:
                      this.pos += z;
                  }
                  if (this.pos += 4, this.pos > this.data.length)
                    throw new Error("Incomplete or corrupt PNG file");
                }
              }
              read(N) {
                const P = new Array(N);
                for (let d = 0; d < N; d++)
                  P[d] = this.data[this.pos++];
                return P;
              }
              readUInt32() {
                const N = this.data[this.pos++] << 24, P = this.data[this.pos++] << 16, d = this.data[this.pos++] << 8, J = this.data[this.pos++];
                return N | P | d | J;
              }
              readUInt16() {
                const N = this.data[this.pos++] << 8, P = this.data[this.pos++];
                return N | P;
              }
              decodePixels(N) {
                return D.inflate(this.imgData, (P, d) => {
                  if (P)
                    throw P;
                  const {
                    width: J,
                    height: q
                  } = this, AA = this.pixelBitlength / 8, K = new A(J * q * AA), {
                    length: z
                  } = d;
                  let T = 0;
                  function H(eA, CA, IA, k, tA) {
                    tA === void 0 && (tA = !1);
                    const lA = Math.ceil((J - eA) / IA), uA = Math.ceil((q - CA) / k), w = AA * lA, v = tA ? K : new A(w * uA);
                    let RA = 0, DA = 0;
                    for (; RA < uA && T < z; ) {
                      var $, cA, Ae, kA, VA;
                      switch (d[T++]) {
                        case 0:
                          for (Ae = 0; Ae < w; Ae++)
                            v[DA++] = d[T++];
                          break;
                        case 1:
                          for (Ae = 0; Ae < w; Ae++)
                            $ = d[T++], kA = Ae < AA ? 0 : v[DA - AA], v[DA++] = ($ + kA) % 256;
                          break;
                        case 2:
                          for (Ae = 0; Ae < w; Ae++)
                            $ = d[T++], cA = (Ae - Ae % AA) / AA, VA = RA && v[(RA - 1) * w + cA * AA + Ae % AA], v[DA++] = (VA + $) % 256;
                          break;
                        case 3:
                          for (Ae = 0; Ae < w; Ae++)
                            $ = d[T++], cA = (Ae - Ae % AA) / AA, kA = Ae < AA ? 0 : v[DA - AA], VA = RA && v[(RA - 1) * w + cA * AA + Ae % AA], v[DA++] = ($ + Math.floor((kA + VA) / 2)) % 256;
                          break;
                        case 4:
                          for (Ae = 0; Ae < w; Ae++) {
                            var EA, zA;
                            $ = d[T++], cA = (Ae - Ae % AA) / AA, kA = Ae < AA ? 0 : v[DA - AA], RA === 0 ? VA = zA = 0 : (VA = v[(RA - 1) * w + cA * AA + Ae % AA], zA = cA && v[(RA - 1) * w + (cA - 1) * AA + Ae % AA]);
                            const OA = kA + VA - zA, xA = Math.abs(OA - kA), LA = Math.abs(OA - VA), yA = Math.abs(OA - zA);
                            xA <= LA && xA <= yA ? EA = kA : LA <= yA ? EA = VA : EA = zA, v[DA++] = ($ + EA) % 256;
                          }
                          break;
                        default:
                          throw new Error(`Invalid filter algorithm: ${d[T - 1]}`);
                      }
                      if (!tA) {
                        let OA = ((CA + RA * k) * J + eA) * AA, xA = RA * w;
                        for (Ae = 0; Ae < lA; Ae++) {
                          for (let LA = 0; LA < AA; LA++) K[OA++] = v[xA++];
                          OA += (IA - 1) * AA;
                        }
                      }
                      RA++;
                    }
                  }
                  return this.interlaceMethod === 1 ? (H(0, 0, 8, 8), H(4, 0, 8, 8), H(0, 4, 4, 8), H(2, 0, 4, 4), H(0, 2, 2, 4), H(1, 0, 2, 2), H(0, 1, 1, 2)) : H(0, 0, 1, 1, !0), N(K);
                });
              }
              decodePalette() {
                const {
                  palette: N
                } = this, {
                  length: P
                } = N, d = this.transparency.indexed || [], J = new A(d.length + P);
                let q = 0, AA = 0;
                for (let z = 0; z < P; z += 3) {
                  var K;
                  J[q++] = N[z], J[q++] = N[z + 1], J[q++] = N[z + 2], J[q++] = (K = d[AA++]) != null ? K : 255;
                }
                return J;
              }
              copyToImageData(N, P) {
                let d, J, {
                  colors: q
                } = this, AA = null, K = this.hasAlphaChannel;
                this.palette.length && (AA = this._decodedPalette || (this._decodedPalette = this.decodePalette()), q = 4, K = !0);
                const z = N.data || N, {
                  length: T
                } = z, H = AA || P;
                let eA = d = 0;
                if (q === 1)
                  for (; eA < T; ) {
                    J = AA ? P[eA / 4] * 4 : d;
                    const CA = H[J++];
                    z[eA++] = CA, z[eA++] = CA, z[eA++] = CA, z[eA++] = K ? H[J++] : 255, d = J;
                  }
                else
                  for (; eA < T; )
                    J = AA ? P[eA / 4] * 4 : d, z[eA++] = H[J++], z[eA++] = H[J++], z[eA++] = H[J++], z[eA++] = K ? H[J++] : 255, d = J;
              }
              decode(N) {
                const P = new A(this.width * this.height * 4);
                return this.decodePixels((d) => (this.copyToImageData(P, d), N(P)));
              }
            };
          },
          /***/
          182(Q, B, r) {
            function A(eA, CA) {
              var IA = Object.keys(eA);
              if (Object.getOwnPropertySymbols) {
                var k = Object.getOwnPropertySymbols(eA);
                CA && (k = k.filter(function(tA) {
                  return Object.getOwnPropertyDescriptor(eA, tA).enumerable;
                })), IA.push.apply(IA, k);
              }
              return IA;
            }
            function a(eA) {
              for (var CA = 1; CA < arguments.length; CA++) {
                var IA = arguments[CA] != null ? arguments[CA] : {};
                CA % 2 ? A(Object(IA), !0).forEach(function(k) {
                  D(eA, k, IA[k]);
                }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(eA, Object.getOwnPropertyDescriptors(IA)) : A(Object(IA)).forEach(function(k) {
                  Object.defineProperty(eA, k, Object.getOwnPropertyDescriptor(IA, k));
                });
              }
              return eA;
            }
            function D(eA, CA, IA) {
              return CA = d(CA), CA in eA ? Object.defineProperty(eA, CA, {
                value: IA,
                enumerable: !0,
                configurable: !0,
                writable: !0
              }) : eA[CA] = IA, eA;
            }
            function x(eA, CA) {
              if (!(eA instanceof CA))
                throw new TypeError("Cannot call a class as a function");
            }
            function N(eA, CA) {
              for (var IA = 0; IA < CA.length; IA++) {
                var k = CA[IA];
                k.enumerable = k.enumerable || !1, k.configurable = !0, "value" in k && (k.writable = !0), Object.defineProperty(eA, d(k.key), k);
              }
            }
            function P(eA, CA, IA) {
              return CA && N(eA.prototype, CA), Object.defineProperty(eA, "prototype", {
                writable: !1
              }), eA;
            }
            function d(eA) {
              var CA = J(eA, "string");
              return typeof CA == "symbol" ? CA : String(CA);
            }
            function J(eA, CA) {
              if (typeof eA != "object" || eA === null) return eA;
              var IA = eA[Symbol.toPrimitive];
              if (IA !== void 0) {
                var k = IA.call(eA, CA);
                if (typeof k != "object") return k;
                throw new TypeError("@@toPrimitive must return a primitive value.");
              }
              return String(eA);
            }
            var q = r(783), AA = q.Buffer, K = r(3779), z = K.inspect, T = z && z.custom || "inspect";
            function H(eA, CA, IA) {
              AA.prototype.copy.call(eA, CA, IA);
            }
            Q.exports = /* @__PURE__ */ (function() {
              function eA() {
                x(this, eA), this.head = null, this.tail = null, this.length = 0;
              }
              return P(eA, [{
                key: "push",
                value: function(IA) {
                  var k = {
                    data: IA,
                    next: null
                  };
                  this.length > 0 ? this.tail.next = k : this.head = k, this.tail = k, ++this.length;
                }
              }, {
                key: "unshift",
                value: function(IA) {
                  var k = {
                    data: IA,
                    next: this.head
                  };
                  this.length === 0 && (this.tail = k), this.head = k, ++this.length;
                }
              }, {
                key: "shift",
                value: function() {
                  if (this.length !== 0) {
                    var IA = this.head.data;
                    return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, IA;
                  }
                }
              }, {
                key: "clear",
                value: function() {
                  this.head = this.tail = null, this.length = 0;
                }
              }, {
                key: "join",
                value: function(IA) {
                  if (this.length === 0) return "";
                  for (var k = this.head, tA = "" + k.data; k = k.next; ) tA += IA + k.data;
                  return tA;
                }
              }, {
                key: "concat",
                value: function(IA) {
                  if (this.length === 0) return AA.alloc(0);
                  for (var k = AA.allocUnsafe(IA >>> 0), tA = this.head, lA = 0; tA; )
                    H(tA.data, k, lA), lA += tA.data.length, tA = tA.next;
                  return k;
                }
                // Consumes a specified amount of bytes or characters from the buffered data.
              }, {
                key: "consume",
                value: function(IA, k) {
                  var tA;
                  return IA < this.head.data.length ? (tA = this.head.data.slice(0, IA), this.head.data = this.head.data.slice(IA)) : IA === this.head.data.length ? tA = this.shift() : tA = k ? this._getString(IA) : this._getBuffer(IA), tA;
                }
              }, {
                key: "first",
                value: function() {
                  return this.head.data;
                }
                // Consumes a specified amount of characters from the buffered data.
              }, {
                key: "_getString",
                value: function(IA) {
                  var k = this.head, tA = 1, lA = k.data;
                  for (IA -= lA.length; k = k.next; ) {
                    var uA = k.data, w = IA > uA.length ? uA.length : IA;
                    if (w === uA.length ? lA += uA : lA += uA.slice(0, IA), IA -= w, IA === 0) {
                      w === uA.length ? (++tA, k.next ? this.head = k.next : this.head = this.tail = null) : (this.head = k, k.data = uA.slice(w));
                      break;
                    }
                    ++tA;
                  }
                  return this.length -= tA, lA;
                }
                // Consumes a specified amount of bytes from the buffered data.
              }, {
                key: "_getBuffer",
                value: function(IA) {
                  var k = AA.allocUnsafe(IA), tA = this.head, lA = 1;
                  for (tA.data.copy(k), IA -= tA.data.length; tA = tA.next; ) {
                    var uA = tA.data, w = IA > uA.length ? uA.length : IA;
                    if (uA.copy(k, k.length - IA, 0, w), IA -= w, IA === 0) {
                      w === uA.length ? (++lA, tA.next ? this.head = tA.next : this.head = this.tail = null) : (this.head = tA, tA.data = uA.slice(w));
                      break;
                    }
                    ++lA;
                  }
                  return this.length -= lA, k;
                }
                // Make sure the linked list only shows the minimal necessary information.
              }, {
                key: T,
                value: function(IA, k) {
                  return z(this, a(a({}, k), {}, {
                    // Only inspect one level.
                    depth: 0,
                    // It should not recurse.
                    customInspect: !1
                  }));
                }
              }]), eA;
            })();
          },
          /***/
          5691(Q, B, r) {
            var A = r(783), a = A.Buffer;
            function D(N, P) {
              for (var d in N)
                P[d] = N[d];
            }
            a.from && a.alloc && a.allocUnsafe && a.allocUnsafeSlow ? Q.exports = A : (D(A, B), B.Buffer = x);
            function x(N, P, d) {
              return a(N, P, d);
            }
            D(a, x), x.from = function(N, P, d) {
              if (typeof N == "number")
                throw new TypeError("Argument must not be a number");
              return a(N, P, d);
            }, x.alloc = function(N, P, d) {
              if (typeof N != "number")
                throw new TypeError("Argument must be a number");
              var J = a(N);
              return P !== void 0 ? typeof d == "string" ? J.fill(P, d) : J.fill(P) : J.fill(0), J;
            }, x.allocUnsafe = function(N) {
              if (typeof N != "number")
                throw new TypeError("Argument must be a number");
              return a(N);
            }, x.allocUnsafeSlow = function(N) {
              if (typeof N != "number")
                throw new TypeError("Argument must be a number");
              return A.SlowBuffer(N);
            };
          },
          /***/
          7571(Q, B, r) {
            r(8376), r(6401), r(2017);
            const A = r(3483), {
              swap32LE: a
            } = r(6016), D = 11, x = 5, N = D - x, P = 65536 >> D, J = (1 << N) - 1, q = 2, K = (1 << x) - 1, z = 65536 >> x, T = 1024 >> x, IA = z + T + 32, k = 1 << q;
            class tA {
              constructor(uA) {
                const w = typeof uA.readUInt32BE == "function" && typeof uA.slice == "function";
                if (w || uA instanceof Uint8Array) {
                  let v;
                  if (w)
                    this.highStart = uA.readUInt32LE(0), this.errorValue = uA.readUInt32LE(4), v = uA.readUInt32LE(8), uA = uA.slice(12);
                  else {
                    const RA = new DataView(uA.buffer);
                    this.highStart = RA.getUint32(0, !0), this.errorValue = RA.getUint32(4, !0), v = RA.getUint32(8, !0), uA = uA.subarray(12);
                  }
                  uA = A(uA, new Uint8Array(v)), uA = A(uA, new Uint8Array(v)), a(uA), this.data = new Uint32Array(uA.buffer);
                } else
                  ({
                    data: this.data,
                    highStart: this.highStart,
                    errorValue: this.errorValue
                  } = uA);
              }
              get(uA) {
                let w;
                return uA < 0 || uA > 1114111 ? this.errorValue : uA < 55296 || uA > 56319 && uA <= 65535 ? (w = (this.data[uA >> x] << q) + (uA & K), this.data[w]) : uA <= 65535 ? (w = (this.data[z + (uA - 55296 >> x)] << q) + (uA & K), this.data[w]) : uA < this.highStart ? (w = this.data[IA - P + (uA >> D)], w = this.data[w + (uA >> x & J)], w = (w << q) + (uA & K), this.data[w]) : this.data[this.data.length - k];
              }
            }
            Q.exports = tA;
          },
          /***/
          6016(Q, B, r) {
            r(8376), r(6401), r(2017);
            const A = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18, a = (N, P, d) => {
              let J = N[P];
              N[P] = N[d], N[d] = J;
            }, D = (N) => {
              const P = N.length;
              for (let d = 0; d < P; d += 4)
                a(N, d, d + 3), a(N, d + 1, d + 2);
            }, x = (N) => {
              A && D(N);
            };
            Q.exports = {
              swap32LE: x
            };
          },
          /***/
          5167(Q, B, r) {
            var A = "/", a = r(783).Buffer;
            B.A = void 0, r(187), r(8376), r(6401), r(2017);
            var D = H(r(9760)), x = H(r(6729)), N = r(3973), P = H(r(1632)), d = r(7785), J = r(2651), q = T(r(1715)), AA = r(4785), K = H(r(2532)), z = H(r(336));
            function T(g, s) {
              if (typeof WeakMap == "function") var I = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap();
              return (T = function(S, iA) {
                if (!iA && S && S.__esModule) return S;
                var YA, ZA, oe = { __proto__: null, default: S };
                if (S === null || typeof S != "object" && typeof S != "function") return oe;
                if (YA = iA ? f : I) {
                  if (YA.has(S)) return YA.get(S);
                  YA.set(S, oe);
                }
                for (const pe in S) pe !== "default" && {}.hasOwnProperty.call(S, pe) && ((ZA = (YA = Object.defineProperty) && Object.getOwnPropertyDescriptor(S, pe)) && (ZA.get || ZA.set) ? YA(oe, pe, ZA) : oe[pe] = S[pe]);
                return oe;
              })(g, s);
            }
            function H(g) {
              return g && g.__esModule ? g : { default: g };
            }
            var eA = r(2416);
            class CA {
              toString() {
                throw new Error("Must be implemented by subclasses");
              }
            }
            class IA {
              constructor() {
                let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
                this._items = {}, this.limits = typeof s.limits == "boolean" ? s.limits : !0;
              }
              add(s, I) {
                return this._items[s] = I;
              }
              get(s) {
                return this._items[s];
              }
              toString() {
                const s = Object.keys(this._items).sort((f, S) => this._compareKeys(f, S)), I = ["<<"];
                if (this.limits && s.length > 1) {
                  const f = s[0], S = s[s.length - 1];
                  I.push(`  /Limits ${v.convert([this._dataForKey(f), this._dataForKey(S)])}`);
                }
                I.push(`  /${this._keysName()} [`);
                for (let f of s)
                  I.push(`    ${v.convert(this._dataForKey(f))} ${v.convert(this._items[f])}`);
                return I.push("]"), I.push(">>"), I.join(`
`);
              }
              _compareKeys() {
                throw new Error("Must be implemented by subclasses");
              }
              _keysName() {
                throw new Error("Must be implemented by subclasses");
              }
              _dataForKey() {
                throw new Error("Must be implemented by subclasses");
              }
            }
            class k {
              constructor(s, I, f, S, iA, YA) {
                this.id = "CS" + Object.keys(s.spotColors).length, this.name = I, this.values = [f, S, iA, YA], this.ref = s.ref(["Separation", this.name, "DeviceCMYK", {
                  Range: [0, 1, 0, 1, 0, 1, 0, 1],
                  C0: [0, 0, 0, 0],
                  C1: this.values.map((ZA) => ZA / 100),
                  FunctionType: 2,
                  Domain: [0, 1],
                  N: 1
                }]), this.ref.end();
              }
              toString() {
                return `${this.ref.id} 0 R`;
              }
            }
            const tA = (g, s) => (Array(s + 1).join("0") + g).slice(-s), lA = /[\n\r\t\b\f()\\]/g, uA = {
              "\n": "\\n",
              "\r": "\\r",
              "	": "\\t",
              "\b": "\\b",
              "\f": "\\f",
              "\\": "\\\\",
              "(": "\\(",
              ")": "\\)"
            }, w = function(g) {
              const s = g.length;
              if (s & 1)
                throw new Error("Buffer length must be even");
              for (let I = 0, f = s - 1; I < f; I += 2) {
                const S = g[I];
                g[I] = g[I + 1], g[I + 1] = S;
              }
              return g;
            };
            class v {
              static convert(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
                if (typeof s == "string")
                  return `/${s}`;
                if (s instanceof String) {
                  let f = s, S = !1;
                  for (let YA = 0, ZA = f.length; YA < ZA; YA++)
                    if (f.charCodeAt(YA) > 127) {
                      S = !0;
                      break;
                    }
                  let iA;
                  return S ? iA = w(a.from(`\uFEFF${f}`, "utf16le")) : iA = a.from(f.valueOf(), "ascii"), I ? f = I(iA).toString("binary") : f = iA.toString("binary"), f = f.replace(lA, (YA) => uA[YA]), `(${f})`;
                } else {
                  if (a.isBuffer(s))
                    return `<${s.toString("hex")}>`;
                  if (s instanceof CA || s instanceof IA || s instanceof k)
                    return s.toString();
                  if (s instanceof Date) {
                    let f = `D:${tA(s.getUTCFullYear(), 4)}` + tA(s.getUTCMonth() + 1, 2) + tA(s.getUTCDate(), 2) + tA(s.getUTCHours(), 2) + tA(s.getUTCMinutes(), 2) + tA(s.getUTCSeconds(), 2) + "Z";
                    return I && (f = I(a.from(f, "ascii")).toString("binary"), f = f.replace(lA, (S) => uA[S])), `(${f})`;
                  } else {
                    if (Array.isArray(s))
                      return `[${s.map((S) => v.convert(S, I)).join(" ")}]`;
                    if ({}.toString.call(s) === "[object Object]") {
                      const f = ["<<"];
                      for (let S in s) {
                        const iA = s[S];
                        f.push(`/${S} ${v.convert(iA, I)}`);
                      }
                      return f.push(">>"), f.join(`
`);
                    } else return typeof s == "number" ? v.number(s) : `${s}`;
                  }
                }
              }
              static number(s) {
                if (s > -1e21 && s < 1e21)
                  return Math.round(s * 1e6) / 1e6;
                throw new Error(`unsupported number: ${s}`);
              }
            }
            class RA extends CA {
              constructor(s, I) {
                let f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
                super(), this.document = s, this.id = I, this.data = f, this.gen = 0, this.compress = this.document.compress && !this.data.Filter, this.uncompressedLength = 0, this.buffer = [];
              }
              write(s) {
                s instanceof Uint8Array || (s = a.from(s + `
`, "binary")), this.uncompressedLength += s.length, this.data.Length == null && (this.data.Length = 0), this.buffer.push(s), this.data.Length += s.length, this.compress && (this.data.Filter = "FlateDecode");
              }
              end(s) {
                s && this.write(s), this.finalize();
              }
              finalize() {
                this.offset = this.document._offset;
                const s = this.document._security ? this.document._security.getEncryptFn(this.id, this.gen) : null;
                this.buffer.length && (this.buffer = a.concat(this.buffer), this.compress && (this.buffer = x.default.deflateSync(this.buffer)), s && (this.buffer = s(this.buffer)), this.data.Length = this.buffer.length), this.document._write(`${this.id} ${this.gen} obj`), this.document._write(v.convert(this.data, s)), this.buffer.length && (this.document._write("stream"), this.document._write(this.buffer), this.buffer = [], this.document._write(`
endstream`)), this.document._write("endobj"), this.document._refEnd(this);
              }
              toString() {
                return `${this.id} ${this.gen} R`;
              }
            }
            const DA = new Float32Array(1), $ = new Uint32Array(DA.buffer);
            function cA(g) {
              const s = Math.fround(g);
              return s <= g ? s : (DA[0] = g, g <= 0 ? $[0] += 1 : $[0] -= 1, DA[0]);
            }
            function Ae(g) {
              let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0, I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (f) => f;
              return (g == null || typeof g == "object" && Object.keys(g).length === 0) && (g = s), g == null || typeof g != "object" ? g = {
                top: g,
                right: g,
                bottom: g,
                left: g
              } : Array.isArray(g) && (g.length === 2 ? g = {
                vertical: g[0],
                horizontal: g[1]
              } : g = {
                top: g[0],
                right: g[1],
                bottom: g[2],
                left: g[3]
              }), ("vertical" in g || "horizontal" in g) && (g = {
                top: g.vertical,
                right: g.horizontal,
                bottom: g.vertical,
                left: g.horizontal
              }), {
                top: I(g.top),
                right: I(g.right),
                bottom: I(g.bottom),
                left: I(g.left)
              };
            }
            const kA = 1 / 10, VA = 1 / 2.54, EA = 1 / 96, zA = 72, OA = 12;
            function xA(g) {
              return g === 0 ? 1 : g === 90 ? 0 : g === 180 ? -1 : g === 270 ? 0 : Math.cos(g * Math.PI / 180);
            }
            function LA(g) {
              return g === 0 ? 0 : g === 90 ? 1 : g === 180 ? 0 : g === 270 ? -1 : Math.sin(g * Math.PI / 180);
            }
            const yA = {
              top: 72,
              left: 72,
              bottom: 72,
              right: 72
            }, TA = {
              "4A0": [4767.87, 6740.79],
              "2A0": [3370.39, 4767.87],
              A0: [2383.94, 3370.39],
              A1: [1683.78, 2383.94],
              A2: [1190.55, 1683.78],
              A3: [841.89, 1190.55],
              A4: [595.28, 841.89],
              A5: [419.53, 595.28],
              A6: [297.64, 419.53],
              A7: [209.76, 297.64],
              A8: [147.4, 209.76],
              A9: [104.88, 147.4],
              A10: [73.7, 104.88],
              B0: [2834.65, 4008.19],
              B1: [2004.09, 2834.65],
              B2: [1417.32, 2004.09],
              B3: [1000.63, 1417.32],
              B4: [708.66, 1000.63],
              B5: [498.9, 708.66],
              B6: [354.33, 498.9],
              B7: [249.45, 354.33],
              B8: [175.75, 249.45],
              B9: [124.72, 175.75],
              B10: [87.87, 124.72],
              C0: [2599.37, 3676.54],
              C1: [1836.85, 2599.37],
              C2: [1298.27, 1836.85],
              C3: [918.43, 1298.27],
              C4: [649.13, 918.43],
              C5: [459.21, 649.13],
              C6: [323.15, 459.21],
              C7: [229.61, 323.15],
              C8: [161.57, 229.61],
              C9: [113.39, 161.57],
              C10: [79.37, 113.39],
              RA0: [2437.8, 3458.27],
              RA1: [1729.13, 2437.8],
              RA2: [1218.9, 1729.13],
              RA3: [864.57, 1218.9],
              RA4: [609.45, 864.57],
              SRA0: [2551.18, 3628.35],
              SRA1: [1814.17, 2551.18],
              SRA2: [1275.59, 1814.17],
              SRA3: [907.09, 1275.59],
              SRA4: [637.8, 907.09],
              EXECUTIVE: [521.86, 756],
              FOLIO: [612, 936],
              LEGAL: [612, 1008],
              LETTER: [612, 792],
              TABLOID: [792, 1224]
            };
            class fA {
              constructor(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                this.document = s, this._options = I, this.size = I.size || "letter", this.layout = I.layout || "portrait", this.userUnit = I.userUnit || 1;
                const f = Array.isArray(this.size) ? this.size : TA[this.size.toUpperCase()];
                this.width = f[this.layout === "portrait" ? 0 : 1], this.height = f[this.layout === "portrait" ? 1 : 0], this.content = this.document.ref(), I.font && s.font(I.font, I.fontFamily), I.fontSize && s.fontSize(I.fontSize), this.margins = Ae(I.margin ?? I.margins, yA, (S) => s.sizeToPoint(S, 0, this)), this.resources = this.document.ref({
                  ProcSet: ["PDF", "Text", "ImageB", "ImageC", "ImageI"]
                }), this.dictionary = this.document.ref({
                  Type: "Page",
                  Parent: this.document._root.data.Pages,
                  MediaBox: [0, 0, this.width, this.height],
                  Contents: this.content,
                  Resources: this.resources,
                  UserUnit: this.userUnit
                }), this.markings = [];
              }
              get fonts() {
                const s = this.resources.data;
                return s.Font != null ? s.Font : s.Font = {};
              }
              get xobjects() {
                const s = this.resources.data;
                return s.XObject != null ? s.XObject : s.XObject = {};
              }
              get ext_gstates() {
                const s = this.resources.data;
                return s.ExtGState != null ? s.ExtGState : s.ExtGState = {};
              }
              get patterns() {
                const s = this.resources.data;
                return s.Pattern != null ? s.Pattern : s.Pattern = {};
              }
              get colorSpaces() {
                const s = this.resources.data;
                return s.ColorSpace || (s.ColorSpace = {});
              }
              get annotations() {
                const s = this.dictionary.data;
                return s.Annots != null ? s.Annots : s.Annots = [];
              }
              get structParentTreeKey() {
                const s = this.dictionary.data;
                return s.StructParents != null ? s.StructParents : s.StructParents = this.document.createStructParentTreeNextKey();
              }
              get contentWidth() {
                return this.width - this.margins.left - this.margins.right;
              }
              get contentHeight() {
                return this.height - this.margins.top - this.margins.bottom;
              }
              maxY() {
                return this.height - this.margins.bottom;
              }
              write(s) {
                return this.content.write(s);
              }
              _setTabOrder() {
                !this.dictionary.Tabs && this.document.hasMarkInfoDictionary() && (this.dictionary.data.Tabs = "S");
              }
              end() {
                this._setTabOrder(), this.dictionary.end(), this.resources.data.ColorSpace = this.resources.data.ColorSpace || {};
                for (let s of Object.values(this.document.spotColors))
                  this.resources.data.ColorSpace[s.id] = s;
                return this.resources.end(), this.content.end();
              }
            }
            class sA extends IA {
              _compareKeys(s, I) {
                return s.localeCompare(I);
              }
              _keysName() {
                return "Names";
              }
              _dataForKey(s) {
                return new String(s);
              }
            }
            function F(g) {
              return new Uint8Array(P.default.arrayBuffer(g));
            }
            function o(g) {
              return (0, P.default)(g);
            }
            function h(g) {
              return (0, d.sha256)(g);
            }
            function _(g, s, I) {
              let f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0;
              return (0, J.cbc)(s, I, {
                disablePadding: !f
              }).encrypt(g);
            }
            function oA(g, s) {
              return (0, J.ecb)(s, {
                disablePadding: !0
              }).encrypt(g);
            }
            function p(g, s) {
              const I = new Uint8Array(256);
              for (let iA = 0; iA < 256; iA++)
                I[iA] = iA;
              let f = 0;
              for (let iA = 0; iA < 256; iA++)
                f = f + I[iA] + s[iA % s.length] & 255, [I[iA], I[f]] = [I[f], I[iA]];
              const S = new Uint8Array(g.length);
              for (let iA = 0, YA = 0, ZA = 0; ZA < g.length; ZA++)
                iA = iA + 1 & 255, YA = YA + I[iA] & 255, [I[iA], I[YA]] = [I[YA], I[iA]], S[ZA] = g[ZA] ^ I[I[iA] + I[YA] & 255];
              return S;
            }
            function rA(g) {
              const s = new Uint8Array(g);
              return globalThis.crypto?.getRandomValues ? globalThis.crypto.getRandomValues(s) : r(5470).randomFillSync(s), s;
            }
            function QA(g, s) {
              if (g < s[0]) return !1;
              let I = 0, f = s.length / 2;
              for (; I <= f; ) {
                const S = Math.floor((I + f) / 2), iA = S * 2;
                if (g >= s[iA] && g <= s[iA + 1])
                  return !0;
                g > s[iA + 1] ? I = S + 1 : f = S - 1;
              }
              return !1;
            }
            const bA = [545, 545, 564, 591, 686, 687, 751, 767, 848, 863, 880, 883, 886, 889, 891, 893, 895, 899, 907, 907, 909, 909, 930, 930, 975, 975, 1015, 1023, 1159, 1159, 1231, 1231, 1270, 1271, 1274, 1279, 1296, 1328, 1367, 1368, 1376, 1376, 1416, 1416, 1419, 1424, 1442, 1442, 1466, 1466, 1477, 1487, 1515, 1519, 1525, 1547, 1549, 1562, 1564, 1566, 1568, 1568, 1595, 1599, 1622, 1631, 1774, 1775, 1791, 1791, 1806, 1806, 1837, 1839, 1867, 1919, 1970, 2304, 2308, 2308, 2362, 2363, 2382, 2383, 2389, 2391, 2417, 2432, 2436, 2436, 2445, 2446, 2449, 2450, 2473, 2473, 2481, 2481, 2483, 2485, 2490, 2491, 2493, 2493, 2501, 2502, 2505, 2506, 2510, 2518, 2520, 2523, 2526, 2526, 2532, 2533, 2555, 2561, 2563, 2564, 2571, 2574, 2577, 2578, 2601, 2601, 2609, 2609, 2612, 2612, 2615, 2615, 2618, 2619, 2621, 2621, 2627, 2630, 2633, 2634, 2638, 2648, 2653, 2653, 2655, 2661, 2677, 2688, 2692, 2692, 2700, 2700, 2702, 2702, 2706, 2706, 2729, 2729, 2737, 2737, 2740, 2740, 2746, 2747, 2758, 2758, 2762, 2762, 2766, 2767, 2769, 2783, 2785, 2789, 2800, 2816, 2820, 2820, 2829, 2830, 2833, 2834, 2857, 2857, 2865, 2865, 2868, 2869, 2874, 2875, 2884, 2886, 2889, 2890, 2894, 2901, 2904, 2907, 2910, 2910, 2914, 2917, 2929, 2945, 2948, 2948, 2955, 2957, 2961, 2961, 2966, 2968, 2971, 2971, 2973, 2973, 2976, 2978, 2981, 2983, 2987, 2989, 2998, 2998, 3002, 3005, 3011, 3013, 3017, 3017, 3022, 3030, 3032, 3046, 3059, 3072, 3076, 3076, 3085, 3085, 3089, 3089, 3113, 3113, 3124, 3124, 3130, 3133, 3141, 3141, 3145, 3145, 3150, 3156, 3159, 3167, 3170, 3173, 3184, 3201, 3204, 3204, 3213, 3213, 3217, 3217, 3241, 3241, 3252, 3252, 3258, 3261, 3269, 3269, 3273, 3273, 3278, 3284, 3287, 3293, 3295, 3295, 3298, 3301, 3312, 3329, 3332, 3332, 3341, 3341, 3345, 3345, 3369, 3369, 3386, 3389, 3396, 3397, 3401, 3401, 3406, 3414, 3416, 3423, 3426, 3429, 3440, 3457, 3460, 3460, 3479, 3481, 3506, 3506, 3516, 3516, 3518, 3519, 3527, 3529, 3531, 3534, 3541, 3541, 3543, 3543, 3552, 3569, 3573, 3584, 3643, 3646, 3676, 3712, 3715, 3715, 3717, 3718, 3721, 3721, 3723, 3724, 3726, 3731, 3736, 3736, 3744, 3744, 3748, 3748, 3750, 3750, 3752, 3753, 3756, 3756, 3770, 3770, 3774, 3775, 3781, 3781, 3783, 3783, 3790, 3791, 3802, 3803, 3806, 3839, 3912, 3912, 3947, 3952, 3980, 3983, 3992, 3992, 4029, 4029, 4045, 4046, 4048, 4095, 4130, 4130, 4136, 4136, 4139, 4139, 4147, 4149, 4154, 4159, 4186, 4255, 4294, 4303, 4345, 4346, 4348, 4351, 4442, 4446, 4515, 4519, 4602, 4607, 4615, 4615, 4679, 4679, 4681, 4681, 4686, 4687, 4695, 4695, 4697, 4697, 4702, 4703, 4743, 4743, 4745, 4745, 4750, 4751, 4783, 4783, 4785, 4785, 4790, 4791, 4799, 4799, 4801, 4801, 4806, 4807, 4815, 4815, 4823, 4823, 4847, 4847, 4879, 4879, 4881, 4881, 4886, 4887, 4895, 4895, 4935, 4935, 4955, 4960, 4989, 5023, 5109, 5120, 5751, 5759, 5789, 5791, 5873, 5887, 5901, 5901, 5909, 5919, 5943, 5951, 5972, 5983, 5997, 5997, 6001, 6001, 6004, 6015, 6109, 6111, 6122, 6143, 6159, 6159, 6170, 6175, 6264, 6271, 6314, 7679, 7836, 7839, 7930, 7935, 7958, 7959, 7966, 7967, 8006, 8007, 8014, 8015, 8024, 8024, 8026, 8026, 8028, 8028, 8030, 8030, 8062, 8063, 8117, 8117, 8133, 8133, 8148, 8149, 8156, 8156, 8176, 8177, 8181, 8181, 8191, 8191, 8275, 8278, 8280, 8286, 8292, 8297, 8306, 8307, 8335, 8351, 8370, 8399, 8427, 8447, 8507, 8508, 8524, 8530, 8580, 8591, 9167, 9215, 9255, 9279, 9291, 9311, 9471, 9471, 9748, 9749, 9752, 9752, 9854, 9855, 9866, 9984, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10079, 10080, 10133, 10135, 10160, 10160, 10175, 10191, 10220, 10223, 11008, 11903, 11930, 11930, 12020, 12031, 12246, 12271, 12284, 12287, 12352, 12352, 12439, 12440, 12544, 12548, 12589, 12592, 12687, 12687, 12728, 12783, 12829, 12831, 12868, 12880, 12924, 12926, 13004, 13007, 13055, 13055, 13175, 13178, 13278, 13279, 13311, 13311, 19894, 19967, 40870, 40959, 42125, 42127, 42183, 44031, 55204, 55295, 64046, 64047, 64107, 64255, 64263, 64274, 64280, 64284, 64311, 64311, 64317, 64317, 64319, 64319, 64322, 64322, 64325, 64325, 64434, 64466, 64832, 64847, 64912, 64913, 64968, 64975, 65021, 65023, 65040, 65055, 65060, 65071, 65095, 65096, 65107, 65107, 65127, 65127, 65132, 65135, 65141, 65141, 65277, 65278, 65280, 65280, 65471, 65473, 65480, 65481, 65488, 65489, 65496, 65497, 65501, 65503, 65511, 65511, 65519, 65528, 65536, 66303, 66335, 66335, 66340, 66351, 66379, 66559, 66598, 66599, 66638, 118783, 119030, 119039, 119079, 119081, 119262, 119807, 119893, 119893, 119965, 119965, 119968, 119969, 119971, 119972, 119975, 119976, 119981, 119981, 119994, 119994, 119996, 119996, 120001, 120001, 120004, 120004, 120070, 120070, 120075, 120076, 120085, 120085, 120093, 120093, 120122, 120122, 120127, 120127, 120133, 120133, 120135, 120137, 120145, 120145, 120484, 120487, 120778, 120781, 120832, 131069, 173783, 194559, 195102, 196605, 196608, 262141, 262144, 327677, 327680, 393213, 393216, 458749, 458752, 524285, 524288, 589821, 589824, 655357, 655360, 720893, 720896, 786429, 786432, 851965, 851968, 917501, 917504, 917504, 917506, 917535, 917632, 983037], y = (g) => QA(g, bA), M = [173, 173, 847, 847, 6150, 6150, 6155, 6155, 6156, 6156, 6157, 6157, 8203, 8203, 8204, 8204, 8205, 8205, 8288, 8288, 65024, 65024, 65025, 65025, 65026, 65026, 65027, 65027, 65028, 65028, 65029, 65029, 65030, 65030, 65031, 65031, 65032, 65032, 65033, 65033, 65034, 65034, 65035, 65035, 65036, 65036, 65037, 65037, 65038, 65038, 65039, 65039, 65279, 65279], FA = (g) => QA(g, M), dA = [160, 160, 5760, 5760, 8192, 8192, 8193, 8193, 8194, 8194, 8195, 8195, 8196, 8196, 8197, 8197, 8198, 8198, 8199, 8199, 8200, 8200, 8201, 8201, 8202, 8202, 8203, 8203, 8239, 8239, 8287, 8287, 12288, 12288], he = (g) => QA(g, dA), ie = [128, 159, 1757, 1757, 1807, 1807, 6158, 6158, 8204, 8204, 8205, 8205, 8232, 8232, 8233, 8233, 8288, 8288, 8289, 8289, 8290, 8290, 8291, 8291, 8298, 8303, 65279, 65279, 65529, 65532, 119155, 119162], KA = [64976, 65007, 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1114110, 1114111], Pe = [0, 31, 127, 127, 832, 832, 833, 833, 8206, 8206, 8207, 8207, 8234, 8234, 8235, 8235, 8236, 8236, 8237, 8237, 8238, 8238, 8298, 8298, 8299, 8299, 8300, 8300, 8301, 8301, 8302, 8302, 8303, 8303, 12272, 12283, 55296, 57343, 57344, 63743, 65529, 65529, 65530, 65530, 65531, 65531, 65532, 65532, 65533, 65533, 917505, 917505, 917536, 917631, 983040, 1048573, 1048576, 1114109], Je = (g) => QA(g, dA) || QA(g, Pe) || QA(g, ie) || QA(g, KA), Le = [1470, 1470, 1472, 1472, 1475, 1475, 1488, 1514, 1520, 1524, 1563, 1563, 1567, 1567, 1569, 1594, 1600, 1610, 1645, 1647, 1649, 1749, 1757, 1757, 1765, 1766, 1786, 1790, 1792, 1805, 1808, 1808, 1810, 1836, 1920, 1957, 1969, 1969, 8207, 8207, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65020, 65136, 65140, 65142, 65276], Re = (g) => QA(g, Le), _e = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 544, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 1013, 1024, 1154, 1162, 1230, 1232, 1269, 1272, 1273, 1280, 1295, 1329, 1366, 1369, 1375, 1377, 1415, 1417, 1417, 2307, 2307, 2309, 2361, 2365, 2368, 2377, 2380, 2384, 2384, 2392, 2401, 2404, 2416, 2434, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2494, 2496, 2503, 2504, 2507, 2508, 2519, 2519, 2524, 2525, 2527, 2529, 2534, 2545, 2548, 2554, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2624, 2649, 2652, 2654, 2654, 2662, 2671, 2674, 2676, 2691, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2752, 2761, 2761, 2763, 2764, 2768, 2768, 2784, 2784, 2790, 2799, 2818, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2878, 2880, 2880, 2887, 2888, 2891, 2892, 2903, 2903, 2908, 2909, 2911, 2913, 2918, 2928, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3007, 3009, 3010, 3014, 3016, 3018, 3020, 3031, 3031, 3047, 3058, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3137, 3140, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3262, 3264, 3268, 3271, 3272, 3274, 3275, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3392, 3398, 3400, 3402, 3404, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3535, 3537, 3544, 3551, 3570, 3572, 3585, 3632, 3634, 3635, 3648, 3654, 3663, 3675, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3792, 3801, 3804, 3805, 3840, 3863, 3866, 3892, 3894, 3894, 3896, 3896, 3902, 3911, 3913, 3946, 3967, 3967, 3973, 3973, 3976, 3979, 4030, 4037, 4039, 4044, 4047, 4047, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4140, 4145, 4145, 4152, 4152, 4160, 4183, 4256, 4293, 4304, 4344, 4347, 4347, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4961, 4988, 5024, 5108, 5121, 5750, 5761, 5786, 5792, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5941, 5942, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6070, 6078, 6085, 6087, 6088, 6100, 6106, 6108, 6108, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8206, 8206, 8305, 8305, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8509, 8511, 8517, 8521, 8544, 8579, 9014, 9082, 9109, 9109, 9372, 9449, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12588, 12593, 12686, 12688, 12727, 12784, 12828, 12832, 12867, 12896, 12923, 12927, 12976, 12992, 13003, 13008, 13054, 13056, 13174, 13179, 13277, 13280, 13310, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 55296, 64045, 64048, 64106, 64256, 64262, 64275, 64279, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 66304, 66334, 66336, 66339, 66352, 66378, 66560, 66597, 66600, 66637, 118784, 119029, 119040, 119078, 119082, 119142, 119146, 119154, 119171, 119172, 119180, 119209, 119214, 119261, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 12e4, 120002, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120483, 120488, 120777, 131072, 173782, 194560, 195101, 983040, 1048573, 1048576, 1114109], se = (g) => QA(g, _e), Ee = he, wA = FA, R = (g) => g.codePointAt(0), G = (g) => g[0], W = (g) => g[g.length - 1];
            function aA(g) {
              const s = [], I = g.length;
              for (let f = 0; f < I; f += 1) {
                const S = g.charCodeAt(f);
                if (S >= 55296 && S <= 56319 && I > f + 1) {
                  const iA = g.charCodeAt(f + 1);
                  if (iA >= 56320 && iA <= 57343) {
                    s.push((S - 55296) * 1024 + iA - 56320 + 65536), f += 1;
                    continue;
                  }
                }
                s.push(S);
              }
              return s;
            }
            function j(g) {
              let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
              if (typeof g != "string")
                throw new TypeError("Expected string.");
              if (g.length === 0)
                return "";
              const I = aA(g).map((xe) => Ee(xe) ? 32 : xe).filter((xe) => !wA(xe)), f = String.fromCodePoint.apply(null, I).normalize("NFKC"), S = aA(f);
              if (S.some(Je))
                throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");
              if (s.allowUnassigned !== !0 && S.some(y))
                throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");
              const YA = S.some(Re), ZA = S.some(se);
              if (YA && ZA)
                throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");
              const oe = Re(R(G(f))), pe = Re(R(W(f)));
              if (YA && !(oe && pe))
                throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");
              return f;
            }
            class pA {
              static generateFileID() {
                let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, I = `${s.CreationDate.getTime()}
`;
                for (let f in s)
                  s.hasOwnProperty(f) && (I += `${f}: ${s[f].valueOf()}
`);
                return a.from(F(I));
              }
              static generateRandomWordArray(s) {
                return rA(s);
              }
              static create(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                return !I.ownerPassword && !I.userPassword ? null : new pA(s, I);
              }
              constructor(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                if (!I.ownerPassword && !I.userPassword)
                  throw new Error("None of owner password and user password is defined.");
                this.document = s, this._setupEncryption(I);
              }
              _setupEncryption(s) {
                switch (s.pdfVersion) {
                  case "1.4":
                  case "1.5":
                    this.version = 2;
                    break;
                  case "1.6":
                  case "1.7":
                    this.version = 4;
                    break;
                  case "1.7ext3":
                    this.version = 5;
                    break;
                  default:
                    this.version = 1;
                    break;
                }
                const I = {
                  Filter: "Standard"
                };
                switch (this.version) {
                  case 1:
                  case 2:
                  case 4:
                    this._setupEncryptionV1V2V4(this.version, I, s);
                    break;
                  case 5:
                    this._setupEncryptionV5(I, s);
                    break;
                }
                this.dictionary = this.document.ref(I);
              }
              _setupEncryptionV1V2V4(s, I, f) {
                let S, iA;
                switch (s) {
                  case 1:
                    S = 2, this.keyBits = 40, iA = Be(f.permissions);
                    break;
                  case 2:
                    S = 3, this.keyBits = 128, iA = Ie(f.permissions);
                    break;
                  case 4:
                    S = 4, this.keyBits = 128, iA = Ie(f.permissions);
                    break;
                }
                const YA = Fe(f.userPassword), ZA = f.ownerPassword ? Fe(f.ownerPassword) : YA, oe = MA(S, this.keyBits, YA, ZA);
                this.encryptionKey = be(S, this.keyBits, this.document._id, YA, oe, iA);
                let pe;
                S === 2 ? pe = ee(this.encryptionKey) : pe = Me(this.document._id, this.encryptionKey), I.V = s, s >= 2 && (I.Length = this.keyBits), s === 4 && (I.CF = {
                  StdCF: {
                    AuthEvent: "DocOpen",
                    CFM: "AESV2",
                    Length: this.keyBits / 8
                  }
                }, I.StmF = "StdCF", I.StrF = "StdCF"), I.R = S, I.O = a.from(oe), I.U = a.from(pe), I.P = iA;
              }
              _setupEncryptionV5(s, I) {
                this.keyBits = 256;
                const f = Ie(I.permissions), S = tt(I.userPassword), iA = I.ownerPassword ? tt(I.ownerPassword) : S;
                this.encryptionKey = SA(pA.generateRandomWordArray);
                const YA = at(S, pA.generateRandomWordArray), ZA = YA.slice(40, 48), oe = V(S, ZA, this.encryptionKey), pe = me(iA, YA, pA.generateRandomWordArray), xe = pe.slice(40, 48), Qe = Ye(iA, xe, YA, this.encryptionKey), ke = ue(f, this.encryptionKey, pA.generateRandomWordArray);
                s.V = 5, s.Length = this.keyBits, s.CF = {
                  StdCF: {
                    AuthEvent: "DocOpen",
                    CFM: "AESV3",
                    Length: this.keyBits / 8
                  }
                }, s.StmF = "StdCF", s.StrF = "StdCF", s.R = 5, s.O = a.from(pe), s.OE = a.from(Qe), s.U = a.from(YA), s.UE = a.from(oe), s.P = f, s.Perms = a.from(ke);
              }
              getEncryptFn(s, I) {
                let f;
                if (this.version < 5) {
                  const YA = new Uint8Array([s & 255, s >> 8 & 255, s >> 16 & 255, I & 255, I >> 8 & 255]);
                  f = (0, N.concatBytes)(this.encryptionKey, YA);
                }
                if (this.version === 1 || this.version === 2) {
                  let YA = F(f);
                  const ZA = Math.min(16, this.keyBits / 8 + 5);
                  return YA = YA.slice(0, ZA), (oe) => a.from(p(new Uint8Array(oe), YA));
                }
                let S;
                if (this.version === 4) {
                  const YA = new Uint8Array([115, 65, 108, 84]);
                  S = F((0, N.concatBytes)(f, YA));
                } else
                  S = this.encryptionKey;
                const iA = pA.generateRandomWordArray(16);
                return (YA) => {
                  const ZA = _(new Uint8Array(YA), S, iA, !0);
                  return a.from((0, N.concatBytes)(iA, ZA));
                };
              }
              end() {
                this.dictionary.end();
              }
            }
            function Be() {
              let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = -64;
              return g.printing && (s |= 4), g.modifying && (s |= 8), g.copying && (s |= 16), g.annotating && (s |= 32), s;
            }
            function Ie() {
              let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = -3904;
              return g.printing === "lowResolution" && (s |= 4), g.printing === "highResolution" && (s |= 2052), g.modifying && (s |= 8), g.copying && (s |= 16), g.annotating && (s |= 32), g.fillingForms && (s |= 256), g.contentAccessibility && (s |= 512), g.documentAssembly && (s |= 1024), s;
            }
            function ee(g) {
              return p(Fe(), g);
            }
            function Me(g, s) {
              const I = s.slice();
              let f = F((0, N.concatBytes)(Fe(), new Uint8Array(g)));
              for (let iA = 0; iA < 20; iA++) {
                const YA = new Uint8Array(I.length);
                for (let ZA = 0; ZA < I.length; ZA++)
                  YA[ZA] = s[ZA] ^ iA;
                f = p(f, YA);
              }
              const S = new Uint8Array(32);
              return S.set(f), S;
            }
            function MA(g, s, I, f) {
              let S = f, iA = g >= 3 ? 51 : 1;
              for (let pe = 0; pe < iA; pe++)
                S = F(S);
              const YA = s / 8;
              let ZA = S.slice(0, YA), oe = I;
              iA = g >= 3 ? 20 : 1;
              for (let pe = 0; pe < iA; pe++) {
                const xe = new Uint8Array(YA);
                for (let Qe = 0; Qe < YA; Qe++)
                  xe[Qe] = ZA[Qe] ^ pe;
                oe = p(oe, xe);
              }
              return oe;
            }
            function be(g, s, I, f, S, iA) {
              const YA = new Uint8Array([iA & 255, iA >> 8 & 255, iA >> 16 & 255, iA >> 24 & 255]);
              let ZA = (0, N.concatBytes)(f, S, YA, new Uint8Array(I));
              const oe = g >= 3 ? 51 : 1, pe = s / 8;
              for (let xe = 0; xe < oe; xe++)
                ZA = F(ZA), ZA = ZA.slice(0, pe);
              return ZA;
            }
            function at(g, s) {
              const I = s(8), f = s(8), S = h((0, N.concatBytes)(g, I));
              return (0, N.concatBytes)(S, I, f);
            }
            function V(g, s, I) {
              const f = h((0, N.concatBytes)(g, s)), S = new Uint8Array(16);
              return _(I, f, S, !1);
            }
            function me(g, s, I) {
              const f = I(8), S = I(8), iA = h((0, N.concatBytes)(g, f, s));
              return (0, N.concatBytes)(iA, f, S);
            }
            function Ye(g, s, I, f) {
              const S = h((0, N.concatBytes)(g, s, I)), iA = new Uint8Array(16);
              return _(f, S, iA, !1);
            }
            function SA(g) {
              return g(32);
            }
            function ue(g, s, I) {
              const f = new Uint8Array(16);
              f[0] = g & 255, f[1] = g >> 8 & 255, f[2] = g >> 16 & 255, f[3] = g >> 24 & 255, f[4] = 255, f[5] = 255, f[6] = 255, f[7] = 255, f[8] = 84, f[9] = 97, f[10] = 100, f[11] = 98;
              const S = I(4);
              return f.set(S, 12), oA(f, s);
            }
            function Fe() {
              let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
              const s = new Uint8Array(32), I = g.length;
              let f = 0;
              for (; f < I && f < 32; ) {
                const S = g.charCodeAt(f);
                if (S > 255)
                  throw new Error("Password contains one or more invalid characters.");
                s[f] = S, f++;
              }
              for (; f < 32; )
                s[f] = We[f - I], f++;
              return s;
            }
            function tt() {
              let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
              g = unescape(encodeURIComponent(j(g)));
              const s = Math.min(127, g.length), I = new Uint8Array(s);
              for (let f = 0; f < s; f++)
                I[f] = g.charCodeAt(f);
              return I;
            }
            const We = [40, 191, 78, 94, 78, 117, 138, 65, 100, 0, 78, 86, 255, 250, 1, 8, 46, 46, 0, 182, 208, 104, 62, 128, 47, 12, 169, 254, 100, 83, 105, 122], {
              number: Ze
            } = v;
            class Ct {
              constructor(s) {
                this.doc = s, this.stops = [], this.embedded = !1, this.transform = [1, 0, 0, 1, 0, 0];
              }
              stop(s, I, f) {
                if (f == null && (f = 1), I = this.doc._normalizeColor(I), this.stops.length === 0)
                  if (I.length === 3)
                    this._colorSpace = "DeviceRGB";
                  else if (I.length === 4)
                    this._colorSpace = "DeviceCMYK";
                  else if (I.length === 1)
                    this._colorSpace = "DeviceGray";
                  else
                    throw new Error("Unknown color space");
                else if (this._colorSpace === "DeviceRGB" && I.length !== 3 || this._colorSpace === "DeviceCMYK" && I.length !== 4 || this._colorSpace === "DeviceGray" && I.length !== 1)
                  throw new Error("All gradient stops must use the same color space");
                return f = Math.max(0, Math.min(1, f)), this.stops.push([s, I, f]), this;
              }
              setTransform(s, I, f, S, iA, YA) {
                return this.transform = [s, I, f, S, iA, YA], this;
              }
              embed(s) {
                let I;
                const f = this.stops.length;
                if (f === 0)
                  return;
                this.embedded = !0, this.matrix = s;
                const S = this.stops[f - 1];
                S[0] < 1 && this.stops.push([1, S[1], S[2]]);
                const iA = [], YA = [], ZA = [];
                for (let xe = 0; xe < f - 1; xe++)
                  YA.push(0, 1), xe + 2 !== f && iA.push(this.stops[xe + 1][0]), I = this.doc.ref({
                    FunctionType: 2,
                    Domain: [0, 1],
                    C0: this.stops[xe + 0][1],
                    C1: this.stops[xe + 1][1],
                    N: 1
                  }), ZA.push(I), I.end();
                f === 1 ? I = ZA[0] : (I = this.doc.ref({
                  FunctionType: 3,
                  Domain: [0, 1],
                  Functions: ZA,
                  Bounds: iA,
                  Encode: YA
                }), I.end()), this.id = `Sh${++this.doc._gradCount}`;
                const oe = this.shader(I);
                oe.end();
                const pe = this.doc.ref({
                  Type: "Pattern",
                  PatternType: 2,
                  Shading: oe,
                  Matrix: this.matrix.map(Ze)
                });
                if (pe.end(), this.stops.some((xe) => xe[2] < 1)) {
                  let xe = this.opacityGradient();
                  xe._colorSpace = "DeviceGray";
                  for (let et of this.stops)
                    xe.stop(et[0], [et[2]]);
                  xe = xe.embed(this.matrix);
                  const Qe = [0, 0, this.doc.page.width, this.doc.page.height], ke = this.doc.ref({
                    Type: "XObject",
                    Subtype: "Form",
                    FormType: 1,
                    BBox: Qe,
                    Group: {
                      Type: "Group",
                      S: "Transparency",
                      CS: "DeviceGray"
                    },
                    Resources: {
                      ProcSet: ["PDF", "Text", "ImageB", "ImageC", "ImageI"],
                      Pattern: {
                        Sh1: xe
                      }
                    }
                  });
                  ke.write("/Pattern cs /Sh1 scn"), ke.end(`${Qe.join(" ")} re f`);
                  const lt = this.doc.ref({
                    Type: "ExtGState",
                    SMask: {
                      Type: "Mask",
                      S: "Luminosity",
                      G: ke
                    }
                  });
                  lt.end();
                  const Xe = this.doc.ref({
                    Type: "Pattern",
                    PatternType: 1,
                    PaintType: 1,
                    TilingType: 2,
                    BBox: Qe,
                    XStep: Qe[2],
                    YStep: Qe[3],
                    Resources: {
                      ProcSet: ["PDF", "Text", "ImageB", "ImageC", "ImageI"],
                      Pattern: {
                        Sh1: pe
                      },
                      ExtGState: {
                        Gs1: lt
                      }
                    }
                  });
                  Xe.write("/Gs1 gs /Pattern cs /Sh1 scn"), Xe.end(`${Qe.join(" ")} re f`), this.doc.page.patterns[this.id] = Xe;
                } else
                  this.doc.page.patterns[this.id] = pe;
                return pe;
              }
              apply(s) {
                const [I, f, S, iA, YA, ZA] = this.doc._ctm, [oe, pe, xe, Qe, ke, lt] = this.transform, Xe = [I * oe + S * pe, f * oe + iA * pe, I * xe + S * Qe, f * xe + iA * Qe, I * ke + S * lt + YA, f * ke + iA * lt + ZA];
                (!this.embedded || Xe.join(" ") !== this.matrix.join(" ")) && this.embed(Xe), this.doc._setColorSpace("Pattern", s);
                const et = s ? "SCN" : "scn";
                return this.doc.addContent(`/${this.id} ${et}`);
              }
            }
            class fi extends Ct {
              constructor(s, I, f, S, iA) {
                super(s), this.x1 = I, this.y1 = f, this.x2 = S, this.y2 = iA;
              }
              shader(s) {
                return this.doc.ref({
                  ShadingType: 2,
                  ColorSpace: this._colorSpace,
                  Coords: [this.x1, this.y1, this.x2, this.y2],
                  Function: s,
                  Extend: [!0, !0]
                });
              }
              opacityGradient() {
                return new fi(this.doc, this.x1, this.y1, this.x2, this.y2);
              }
            }
            class st extends Ct {
              constructor(s, I, f, S, iA, YA, ZA) {
                super(s), this.doc = s, this.x1 = I, this.y1 = f, this.r1 = S, this.x2 = iA, this.y2 = YA, this.r2 = ZA;
              }
              shader(s) {
                return this.doc.ref({
                  ShadingType: 3,
                  ColorSpace: this._colorSpace,
                  Coords: [this.x1, this.y1, this.r1, this.x2, this.y2, this.r2],
                  Function: s,
                  Extend: [!0, !0]
                });
              }
              opacityGradient() {
                return new st(this.doc, this.x1, this.y1, this.r1, this.x2, this.y2, this.r2);
              }
            }
            var pt = {
              PDFGradient: Ct,
              PDFLinearGradient: fi,
              PDFRadialGradient: st
            };
            const Mt = ["DeviceCMYK", "DeviceRGB"];
            class Tt {
              constructor(s, I, f, S, iA) {
                this.doc = s, this.bBox = I, this.xStep = f, this.yStep = S, this.stream = iA;
              }
              createPattern() {
                const s = this.doc.ref();
                s.end();
                const [I, f, S, iA, YA, ZA] = this.doc._ctm, [oe, pe, xe, Qe, ke, lt] = [1, 0, 0, 1, 0, 0], Xe = [I * oe + S * pe, f * oe + iA * pe, I * xe + S * Qe, f * xe + iA * Qe, I * ke + S * lt + YA, f * ke + iA * lt + ZA], et = this.doc.ref({
                  Type: "Pattern",
                  PatternType: 1,
                  PaintType: 2,
                  TilingType: 2,
                  BBox: this.bBox,
                  XStep: this.xStep,
                  YStep: this.yStep,
                  Matrix: Xe.map((Oe) => +Oe.toFixed(5)),
                  Resources: s
                });
                return et.end(this.stream), et;
              }
              embedPatternColorSpaces() {
                Mt.forEach((s) => {
                  const I = this.getPatternColorSpaceId(s);
                  if (this.doc.page.colorSpaces[I]) return;
                  const f = this.doc.ref(["Pattern", s]);
                  f.end(), this.doc.page.colorSpaces[I] = f;
                });
              }
              getPatternColorSpaceId(s) {
                return `CsP${s}`;
              }
              embed() {
                this.id || (this.doc._patternCount = this.doc._patternCount + 1, this.id = "P" + this.doc._patternCount, this.pattern = this.createPattern()), this.doc.page.patterns[this.id] || (this.doc.page.patterns[this.id] = this.pattern);
              }
              apply(s, I) {
                this.embedPatternColorSpaces(), this.embed();
                const f = this.doc._normalizeColor(I);
                if (!f) throw Error(`invalid pattern color. (value: ${I})`);
                const S = this.getPatternColorSpaceId(this.doc._getColorSpace(f));
                this.doc._setColorSpace(S, s);
                const iA = s ? "SCN" : "scn";
                return this.doc.addContent(`${f.join(" ")} /${this.id} ${iA}`);
              }
            }
            var Zt = {
              PDFTilingPattern: Tt
            };
            const {
              PDFGradient: yi,
              PDFLinearGradient: xi,
              PDFRadialGradient: Ot
            } = pt, {
              PDFTilingPattern: bt
            } = Zt;
            var qt = {
              initColor() {
                this.spotColors = {}, this._opacityRegistry = {}, this._opacityCount = 0, this._patternCount = 0, this._gradCount = 0;
              },
              _normalizeColor(g) {
                if (typeof g == "string") {
                  if (g.charAt(0) === "#") {
                    g.length === 4 && (g = g.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i, "#$1$1$2$2$3$3"));
                    const s = parseInt(g.slice(1), 16);
                    g = [s >> 16, s >> 8 & 255, s & 255];
                  } else if (ti[g])
                    g = ti[g];
                  else if (this.spotColors[g])
                    return this.spotColors[g];
                }
                return Array.isArray(g) ? (g.length === 3 ? g = g.map((s) => s / 255) : g.length === 4 && (g = g.map((s) => s / 100)), g) : null;
              },
              _setColor(g, s) {
                return g instanceof yi ? (g.apply(s), !0) : Array.isArray(g) && g[0] instanceof bt ? (g[0].apply(s, g[1]), !0) : this._setColorCore(g, s);
              },
              _setColorCore(g, s) {
                if (g = this._normalizeColor(g), !g)
                  return !1;
                const I = s ? "SCN" : "scn", f = this._getColorSpace(g);
                return this._setColorSpace(f, s), g instanceof k ? (this.page.colorSpaces[g.id] = g.ref, this.addContent(`1 ${I}`)) : this.addContent(`${g.join(" ")} ${I}`), !0;
              },
              _setColorSpace(g, s) {
                const I = s ? "CS" : "cs";
                return this.addContent(`/${g} ${I}`);
              },
              _getColorSpace(g) {
                return g instanceof k ? g.id : g.length === 4 ? "DeviceCMYK" : "DeviceRGB";
              },
              fillColor(g, s) {
                return this._setColor(g, !1) && this.fillOpacity(s), this._fillColor = [g, s], this;
              },
              strokeColor(g, s) {
                return this._setColor(g, !0) && this.strokeOpacity(s), this;
              },
              opacity(g) {
                return this._doOpacity(g, g), this;
              },
              fillOpacity(g) {
                return this._doOpacity(g, null), this;
              },
              strokeOpacity(g) {
                return this._doOpacity(null, g), this;
              },
              _doOpacity(g, s) {
                let I, f;
                if (g == null && s == null)
                  return;
                g != null && (g = Math.max(0, Math.min(1, g))), s != null && (s = Math.max(0, Math.min(1, s)));
                const S = `${g}_${s}`;
                return this._opacityRegistry[S] ? [I, f] = this._opacityRegistry[S] : (I = {
                  Type: "ExtGState"
                }, g != null && (I.ca = g), s != null && (I.CA = s), I = this.ref(I), I.end(), f = `Gs${++this._opacityCount}`, this._opacityRegistry[S] = [I, f]), this.page.ext_gstates[f] = I, this.addContent(`/${f} gs`);
              },
              linearGradient(g, s, I, f) {
                return new xi(this, g, s, I, f);
              },
              radialGradient(g, s, I, f, S, iA) {
                return new Ot(this, g, s, I, f, S, iA);
              },
              pattern(g, s, I, f) {
                return new bt(this, g, s, I, f);
              },
              addSpotColor(g, s, I, f, S) {
                const iA = new k(this, g, s, I, f, S);
                return this.spotColors[g] = iA, this;
              }
            }, ti = {
              aliceblue: [240, 248, 255],
              antiquewhite: [250, 235, 215],
              aqua: [0, 255, 255],
              aquamarine: [127, 255, 212],
              azure: [240, 255, 255],
              beige: [245, 245, 220],
              bisque: [255, 228, 196],
              black: [0, 0, 0],
              blanchedalmond: [255, 235, 205],
              blue: [0, 0, 255],
              blueviolet: [138, 43, 226],
              brown: [165, 42, 42],
              burlywood: [222, 184, 135],
              cadetblue: [95, 158, 160],
              chartreuse: [127, 255, 0],
              chocolate: [210, 105, 30],
              coral: [255, 127, 80],
              cornflowerblue: [100, 149, 237],
              cornsilk: [255, 248, 220],
              crimson: [220, 20, 60],
              cyan: [0, 255, 255],
              darkblue: [0, 0, 139],
              darkcyan: [0, 139, 139],
              darkgoldenrod: [184, 134, 11],
              darkgray: [169, 169, 169],
              darkgreen: [0, 100, 0],
              darkgrey: [169, 169, 169],
              darkkhaki: [189, 183, 107],
              darkmagenta: [139, 0, 139],
              darkolivegreen: [85, 107, 47],
              darkorange: [255, 140, 0],
              darkorchid: [153, 50, 204],
              darkred: [139, 0, 0],
              darksalmon: [233, 150, 122],
              darkseagreen: [143, 188, 143],
              darkslateblue: [72, 61, 139],
              darkslategray: [47, 79, 79],
              darkslategrey: [47, 79, 79],
              darkturquoise: [0, 206, 209],
              darkviolet: [148, 0, 211],
              deeppink: [255, 20, 147],
              deepskyblue: [0, 191, 255],
              dimgray: [105, 105, 105],
              dimgrey: [105, 105, 105],
              dodgerblue: [30, 144, 255],
              firebrick: [178, 34, 34],
              floralwhite: [255, 250, 240],
              forestgreen: [34, 139, 34],
              fuchsia: [255, 0, 255],
              gainsboro: [220, 220, 220],
              ghostwhite: [248, 248, 255],
              gold: [255, 215, 0],
              goldenrod: [218, 165, 32],
              gray: [128, 128, 128],
              grey: [128, 128, 128],
              green: [0, 128, 0],
              greenyellow: [173, 255, 47],
              honeydew: [240, 255, 240],
              hotpink: [255, 105, 180],
              indianred: [205, 92, 92],
              indigo: [75, 0, 130],
              ivory: [255, 255, 240],
              khaki: [240, 230, 140],
              lavender: [230, 230, 250],
              lavenderblush: [255, 240, 245],
              lawngreen: [124, 252, 0],
              lemonchiffon: [255, 250, 205],
              lightblue: [173, 216, 230],
              lightcoral: [240, 128, 128],
              lightcyan: [224, 255, 255],
              lightgoldenrodyellow: [250, 250, 210],
              lightgray: [211, 211, 211],
              lightgreen: [144, 238, 144],
              lightgrey: [211, 211, 211],
              lightpink: [255, 182, 193],
              lightsalmon: [255, 160, 122],
              lightseagreen: [32, 178, 170],
              lightskyblue: [135, 206, 250],
              lightslategray: [119, 136, 153],
              lightslategrey: [119, 136, 153],
              lightsteelblue: [176, 196, 222],
              lightyellow: [255, 255, 224],
              lime: [0, 255, 0],
              limegreen: [50, 205, 50],
              linen: [250, 240, 230],
              magenta: [255, 0, 255],
              maroon: [128, 0, 0],
              mediumaquamarine: [102, 205, 170],
              mediumblue: [0, 0, 205],
              mediumorchid: [186, 85, 211],
              mediumpurple: [147, 112, 219],
              mediumseagreen: [60, 179, 113],
              mediumslateblue: [123, 104, 238],
              mediumspringgreen: [0, 250, 154],
              mediumturquoise: [72, 209, 204],
              mediumvioletred: [199, 21, 133],
              midnightblue: [25, 25, 112],
              mintcream: [245, 255, 250],
              mistyrose: [255, 228, 225],
              moccasin: [255, 228, 181],
              navajowhite: [255, 222, 173],
              navy: [0, 0, 128],
              oldlace: [253, 245, 230],
              olive: [128, 128, 0],
              olivedrab: [107, 142, 35],
              orange: [255, 165, 0],
              orangered: [255, 69, 0],
              orchid: [218, 112, 214],
              palegoldenrod: [238, 232, 170],
              palegreen: [152, 251, 152],
              paleturquoise: [175, 238, 238],
              palevioletred: [219, 112, 147],
              papayawhip: [255, 239, 213],
              peachpuff: [255, 218, 185],
              peru: [205, 133, 63],
              pink: [255, 192, 203],
              plum: [221, 160, 221],
              powderblue: [176, 224, 230],
              purple: [128, 0, 128],
              red: [255, 0, 0],
              rosybrown: [188, 143, 143],
              royalblue: [65, 105, 225],
              saddlebrown: [139, 69, 19],
              salmon: [250, 128, 114],
              sandybrown: [244, 164, 96],
              seagreen: [46, 139, 87],
              seashell: [255, 245, 238],
              sienna: [160, 82, 45],
              silver: [192, 192, 192],
              skyblue: [135, 206, 235],
              slateblue: [106, 90, 205],
              slategray: [112, 128, 144],
              slategrey: [112, 128, 144],
              snow: [255, 250, 250],
              springgreen: [0, 255, 127],
              steelblue: [70, 130, 180],
              tan: [210, 180, 140],
              teal: [0, 128, 128],
              thistle: [216, 191, 216],
              tomato: [255, 99, 71],
              turquoise: [64, 224, 208],
              violet: [238, 130, 238],
              wheat: [245, 222, 179],
              white: [255, 255, 255],
              whitesmoke: [245, 245, 245],
              yellow: [255, 255, 0],
              yellowgreen: [154, 205, 50]
            };
            let Ke, qe, Dt, ut, ni, wi;
            Ke = qe = Dt = ut = ni = wi = 0;
            const pi = {
              A: 7,
              a: 7,
              C: 6,
              c: 6,
              H: 1,
              h: 1,
              L: 2,
              l: 2,
              M: 2,
              m: 2,
              Q: 4,
              q: 4,
              S: 4,
              s: 4,
              T: 2,
              t: 2,
              V: 1,
              v: 1,
              Z: 0,
              z: 0
            }, vA = function(g) {
              return g in pi;
            }, UA = function(g) {
              const s = g.codePointAt(0);
              return s === 32 || s === 9 || s === 13 || s === 10;
            }, mA = function(g) {
              const s = g.codePointAt(0);
              return s == null ? !1 : 48 <= s && s <= 57;
            }, _A = function(g, s) {
              let I = s, f = "", S = "none";
              for (; I < g.length; I += 1) {
                const YA = g[I];
                if (YA === "+" || YA === "-") {
                  if (S === "none") {
                    S = "sign", f += YA;
                    continue;
                  }
                  if (S === "e") {
                    S = "exponent_sign", f += YA;
                    continue;
                  }
                }
                if (mA(YA)) {
                  if (S === "none" || S === "sign" || S === "whole") {
                    S = "whole", f += YA;
                    continue;
                  }
                  if (S === "decimal_point" || S === "decimal") {
                    S = "decimal", f += YA;
                    continue;
                  }
                  if (S === "e" || S === "exponent_sign" || S === "exponent") {
                    S = "exponent", f += YA;
                    continue;
                  }
                }
                if (YA === "." && (S === "none" || S === "sign" || S === "whole")) {
                  S = "decimal_point", f += YA;
                  continue;
                }
                if ((YA === "E" || YA === "e") && (S === "whole" || S === "decimal_point" || S === "decimal")) {
                  S = "e", f += YA;
                  continue;
                }
                break;
              }
              const iA = Number.parseFloat(f);
              return Number.isNaN(iA) ? [s, null] : [I - 1, iA];
            }, $A = function(g) {
              const s = [];
              let I = null, f = [], S = 0, iA = !1, YA = !1;
              for (let ZA = 0; ZA < g.length; ZA += 1) {
                const oe = g.charAt(ZA);
                if (UA(oe))
                  continue;
                if (iA && oe === ",") {
                  if (YA)
                    break;
                  YA = !0;
                  continue;
                }
                if (vA(oe)) {
                  if (YA)
                    return s;
                  if (I == null) {
                    if (oe !== "M" && oe !== "m")
                      return s;
                  } else if (f.length !== 0)
                    return s;
                  I = oe, f = [], S = pi[I], iA = !1, S === 0 && s.push({
                    command: I,
                    args: f
                  });
                  continue;
                }
                if (I == null)
                  return s;
                let pe = ZA, xe = null;
                if (I === "A" || I === "a") {
                  const Qe = f.length;
                  (Qe === 0 || Qe === 1) && oe !== "+" && oe !== "-" && ([pe, xe] = _A(g, ZA)), (Qe === 2 || Qe === 5 || Qe === 6) && ([pe, xe] = _A(g, ZA)), (Qe === 3 || Qe === 4) && (oe === "0" && (xe = 0), oe === "1" && (xe = 1));
                } else
                  [pe, xe] = _A(g, ZA);
                if (xe == null)
                  return s;
                f.push(xe), iA = !0, YA = !1, ZA = pe, f.length === S && (s.push({
                  command: I,
                  args: f
                }), I === "M" && (I = "L"), I === "m" && (I = "l"), f = []);
              }
              return s;
            }, jA = function(g, s) {
              Ke = qe = Dt = ut = ni = wi = 0;
              for (let I = 0; I < g.length; I++) {
                const f = g[I];
                typeof le[f.command] == "function" && le[f.command](s, f.args);
              }
            }, le = {
              M(g, s) {
                return Ke = s[0], qe = s[1], Dt = ut = null, ni = Ke, wi = qe, g.moveTo(Ke, qe);
              },
              m(g, s) {
                return Ke += s[0], qe += s[1], Dt = ut = null, ni = Ke, wi = qe, g.moveTo(Ke, qe);
              },
              C(g, s) {
                return Ke = s[4], qe = s[5], Dt = s[2], ut = s[3], g.bezierCurveTo(...s);
              },
              c(g, s) {
                return g.bezierCurveTo(s[0] + Ke, s[1] + qe, s[2] + Ke, s[3] + qe, s[4] + Ke, s[5] + qe), Dt = Ke + s[2], ut = qe + s[3], Ke += s[4], qe += s[5];
              },
              S(g, s) {
                return Dt === null && (Dt = Ke, ut = qe), g.bezierCurveTo(Ke - (Dt - Ke), qe - (ut - qe), s[0], s[1], s[2], s[3]), Dt = s[0], ut = s[1], Ke = s[2], qe = s[3];
              },
              s(g, s) {
                return Dt === null && (Dt = Ke, ut = qe), g.bezierCurveTo(Ke - (Dt - Ke), qe - (ut - qe), Ke + s[0], qe + s[1], Ke + s[2], qe + s[3]), Dt = Ke + s[0], ut = qe + s[1], Ke += s[2], qe += s[3];
              },
              Q(g, s) {
                return Dt = s[0], ut = s[1], Ke = s[2], qe = s[3], g.quadraticCurveTo(s[0], s[1], Ke, qe);
              },
              q(g, s) {
                return g.quadraticCurveTo(s[0] + Ke, s[1] + qe, s[2] + Ke, s[3] + qe), Dt = Ke + s[0], ut = qe + s[1], Ke += s[2], qe += s[3];
              },
              T(g, s) {
                return Dt === null ? (Dt = Ke, ut = qe) : (Dt = Ke - (Dt - Ke), ut = qe - (ut - qe)), g.quadraticCurveTo(Dt, ut, s[0], s[1]), Dt = Ke - (Dt - Ke), ut = qe - (ut - qe), Ke = s[0], qe = s[1];
              },
              t(g, s) {
                return Dt === null ? (Dt = Ke, ut = qe) : (Dt = Ke - (Dt - Ke), ut = qe - (ut - qe)), g.quadraticCurveTo(Dt, ut, Ke + s[0], qe + s[1]), Ke += s[0], qe += s[1];
              },
              A(g, s) {
                return JA(g, Ke, qe, s), Ke = s[5], qe = s[6];
              },
              a(g, s) {
                return s[5] += Ke, s[6] += qe, JA(g, Ke, qe, s), Ke = s[5], qe = s[6];
              },
              L(g, s) {
                return Ke = s[0], qe = s[1], Dt = ut = null, g.lineTo(Ke, qe);
              },
              l(g, s) {
                return Ke += s[0], qe += s[1], Dt = ut = null, g.lineTo(Ke, qe);
              },
              H(g, s) {
                return Ke = s[0], Dt = ut = null, g.lineTo(Ke, qe);
              },
              h(g, s) {
                return Ke += s[0], Dt = ut = null, g.lineTo(Ke, qe);
              },
              V(g, s) {
                return qe = s[0], Dt = ut = null, g.lineTo(Ke, qe);
              },
              v(g, s) {
                return qe += s[0], Dt = ut = null, g.lineTo(Ke, qe);
              },
              Z(g) {
                return g.closePath(), Ke = ni, qe = wi;
              },
              z(g) {
                return g.closePath(), Ke = ni, qe = wi;
              }
            }, JA = function(g, s, I, f) {
              const [S, iA, YA, ZA, oe, pe, xe] = f, Qe = ne(pe, xe, S, iA, ZA, oe, YA, s, I);
              for (let ke of Qe) {
                const lt = ae(...ke);
                g.bezierCurveTo(...lt);
              }
            }, ne = function(g, s, I, f, S, iA, YA, ZA, oe) {
              const pe = YA * (Math.PI / 180), xe = Math.sin(pe), Qe = Math.cos(pe);
              I = Math.abs(I), f = Math.abs(f), Dt = Qe * (ZA - g) * 0.5 + xe * (oe - s) * 0.5, ut = Qe * (oe - s) * 0.5 - xe * (ZA - g) * 0.5;
              let ke = Dt * Dt / (I * I) + ut * ut / (f * f);
              ke > 1 && (ke = Math.sqrt(ke), I *= ke, f *= ke);
              const lt = Qe / I, Xe = xe / I, et = -xe / f, Oe = Qe / f, rt = lt * ZA + Xe * oe, $e = et * ZA + Oe * oe, wt = lt * g + Xe * s, Vt = et * g + Oe * s;
              let Gt = 1 / ((wt - rt) * (wt - rt) + (Vt - $e) * (Vt - $e)) - 0.25;
              Gt < 0 && (Gt = 0);
              let ct = Math.sqrt(Gt);
              iA === S && (ct = -ct);
              const jt = 0.5 * (rt + wt) - ct * (Vt - $e), Pi = 0.5 * ($e + Vt) + ct * (wt - rt), Ci = Math.atan2($e - Pi, rt - jt);
              let ki = Math.atan2(Vt - Pi, wt - jt) - Ci;
              ki < 0 && iA === 1 ? ki += 2 * Math.PI : ki > 0 && iA === 0 && (ki -= 2 * Math.PI);
              const In = Math.ceil(Math.abs(ki / (Math.PI * 0.5 + 1e-3))), as = [];
              for (let On = 0; On < In; On++) {
                const os = Ci + On * ki / In, _s = Ci + (On + 1) * ki / In;
                as[On] = [jt, Pi, os, _s, I, f, xe, Qe];
              }
              return as;
            }, ae = function(g, s, I, f, S, iA, YA, ZA) {
              const oe = ZA * S, pe = -YA * iA, xe = YA * S, Qe = ZA * iA, ke = 0.5 * (f - I), lt = 8 / 3 * Math.sin(ke * 0.5) * Math.sin(ke * 0.5) / Math.sin(ke), Xe = g + Math.cos(I) - lt * Math.sin(I), et = s + Math.sin(I) + lt * Math.cos(I), Oe = g + Math.cos(f), rt = s + Math.sin(f), $e = Oe + lt * Math.sin(f), wt = rt - lt * Math.cos(f);
              return [oe * Xe + pe * et, xe * Xe + Qe * et, oe * $e + pe * wt, xe * $e + Qe * wt, oe * Oe + pe * rt, xe * Oe + Qe * rt];
            };
            class ve {
              static apply(s, I) {
                const f = $A(I);
                jA(f, s);
              }
            }
            const {
              number: ze
            } = v, At = 4 * ((Math.sqrt(2) - 1) / 3);
            var Bt = {
              initVector() {
                this._ctm = [1, 0, 0, 1, 0, 0], this._ctmStack = [];
              },
              save() {
                return this._ctmStack.push(this._ctm.slice()), this.addContent("q");
              },
              restore() {
                return this._ctm = this._ctmStack.pop() || [1, 0, 0, 1, 0, 0], this.addContent("Q");
              },
              closePath() {
                return this.addContent("h");
              },
              lineWidth(g) {
                return this.addContent(`${ze(g)} w`);
              },
              _CAP_STYLES: {
                BUTT: 0,
                ROUND: 1,
                SQUARE: 2
              },
              lineCap(g) {
                return typeof g == "string" && (g = this._CAP_STYLES[g.toUpperCase()]), this.addContent(`${g} J`);
              },
              _JOIN_STYLES: {
                MITER: 0,
                ROUND: 1,
                BEVEL: 2
              },
              lineJoin(g) {
                return typeof g == "string" && (g = this._JOIN_STYLES[g.toUpperCase()]), this.addContent(`${g} j`);
              },
              miterLimit(g) {
                return this.addContent(`${ze(g)} M`);
              },
              dash(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                const I = g;
                if (Array.isArray(g) || (g = [g, s.space || g]), !g.every((S) => Number.isFinite(S) && S > 0))
                  throw new Error(`dash(${JSON.stringify(I)}, ${JSON.stringify(s)}) invalid, lengths must be numeric and greater than zero`);
                return g = g.map(ze).join(" "), this.addContent(`[${g}] ${ze(s.phase || 0)} d`);
              },
              undash() {
                return this.addContent("[] 0 d");
              },
              moveTo(g, s) {
                return this.addContent(`${ze(g)} ${ze(s)} m`);
              },
              lineTo(g, s) {
                return this.addContent(`${ze(g)} ${ze(s)} l`);
              },
              bezierCurveTo(g, s, I, f, S, iA) {
                return this.addContent(`${ze(g)} ${ze(s)} ${ze(I)} ${ze(f)} ${ze(S)} ${ze(iA)} c`);
              },
              quadraticCurveTo(g, s, I, f) {
                return this.addContent(`${ze(g)} ${ze(s)} ${ze(I)} ${ze(f)} v`);
              },
              rect(g, s, I, f) {
                return this.addContent(`${ze(g)} ${ze(s)} ${ze(I)} ${ze(f)} re`);
              },
              roundedRect(g, s, I, f, S) {
                S == null && (S = 0), S = Math.min(S, 0.5 * I, 0.5 * f);
                const iA = S * (1 - At);
                return this.moveTo(g + S, s), this.lineTo(g + I - S, s), this.bezierCurveTo(g + I - iA, s, g + I, s + iA, g + I, s + S), this.lineTo(g + I, s + f - S), this.bezierCurveTo(g + I, s + f - iA, g + I - iA, s + f, g + I - S, s + f), this.lineTo(g + S, s + f), this.bezierCurveTo(g + iA, s + f, g, s + f - iA, g, s + f - S), this.lineTo(g, s + S), this.bezierCurveTo(g, s + iA, g + iA, s, g + S, s), this.closePath();
              },
              ellipse(g, s, I, f) {
                f == null && (f = I), g -= I, s -= f;
                const S = I * At, iA = f * At, YA = g + I * 2, ZA = s + f * 2, oe = g + I, pe = s + f;
                return this.moveTo(g, pe), this.bezierCurveTo(g, pe - iA, oe - S, s, oe, s), this.bezierCurveTo(oe + S, s, YA, pe - iA, YA, pe), this.bezierCurveTo(YA, pe + iA, oe + S, ZA, oe, ZA), this.bezierCurveTo(oe - S, ZA, g, pe + iA, g, pe), this.closePath();
              },
              circle(g, s, I) {
                return this.ellipse(g, s, I);
              },
              arc(g, s, I, f, S, iA) {
                iA == null && (iA = !1);
                const YA = 2 * Math.PI, ZA = 0.5 * Math.PI;
                let oe = S - f;
                Math.abs(oe) > YA ? oe = YA : oe !== 0 && iA !== oe < 0 && (oe = (iA ? -1 : 1) * YA + oe);
                const pe = Math.ceil(Math.abs(oe) / ZA), xe = oe / pe, Qe = xe / ZA * At * I;
                let ke = f, lt = -Math.sin(ke) * Qe, Xe = Math.cos(ke) * Qe, et = g + Math.cos(ke) * I, Oe = s + Math.sin(ke) * I;
                this.moveTo(et, Oe);
                for (let rt = 0; rt < pe; rt++) {
                  const $e = et + lt, wt = Oe + Xe;
                  ke += xe, et = g + Math.cos(ke) * I, Oe = s + Math.sin(ke) * I, lt = -Math.sin(ke) * Qe, Xe = Math.cos(ke) * Qe;
                  const Vt = et - lt, Ai = Oe - Xe;
                  this.bezierCurveTo($e, wt, Vt, Ai, et, Oe);
                }
                return this;
              },
              polygon() {
                for (var g = arguments.length, s = new Array(g), I = 0; I < g; I++)
                  s[I] = arguments[I];
                this.moveTo(...s.shift() || []);
                for (let f of s)
                  this.lineTo(...f || []);
                return this.closePath();
              },
              path(g) {
                return ve.apply(this, g), this;
              },
              _windingRule(g) {
                return /even-?odd/.test(g) ? "*" : "";
              },
              fill(g, s) {
                return /(even-?odd)|(non-?zero)/.test(g) && (s = g, g = null), g && this.fillColor(g), this.addContent(`f${this._windingRule(s)}`);
              },
              stroke(g) {
                return g && this.strokeColor(g), this.addContent("S");
              },
              fillAndStroke(g, s, I) {
                s == null && (s = g);
                const f = /(even-?odd)|(non-?zero)/;
                return f.test(g) && (I = g, g = null), f.test(s) && (I = s, s = g), g && (this.fillColor(g), this.strokeColor(s)), this.addContent(`B${this._windingRule(I)}`);
              },
              clip(g) {
                return this.addContent(`W${this._windingRule(g)} n`);
              },
              transform(g, s, I, f, S, iA) {
                if (g === 1 && s === 0 && I === 0 && f === 1 && S === 0 && iA === 0)
                  return this;
                const YA = this._ctm, [ZA, oe, pe, xe, Qe, ke] = YA;
                YA[0] = ZA * g + pe * s, YA[1] = oe * g + xe * s, YA[2] = ZA * I + pe * f, YA[3] = oe * I + xe * f, YA[4] = ZA * S + pe * iA + Qe, YA[5] = oe * S + xe * iA + ke;
                const lt = [g, s, I, f, S, iA].map((Xe) => ze(Xe)).join(" ");
                return this.addContent(`${lt} cm`);
              },
              translate(g, s) {
                return this.transform(1, 0, 0, 1, g, s);
              },
              rotate(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I;
                const f = g * Math.PI / 180, S = Math.cos(f), iA = Math.sin(f);
                let YA = I = 0;
                if (s.origin != null) {
                  [YA, I] = s.origin;
                  const ZA = YA * S - I * iA, oe = YA * iA + I * S;
                  YA -= ZA, I -= oe;
                }
                return this.transform(S, iA, -iA, S, YA, I);
              },
              scale(g, s) {
                let I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, f;
                s == null && (s = g), typeof s == "object" && (I = s, s = g);
                let S = f = 0;
                return I.origin != null && ([S, f] = I.origin, S -= g * S, f -= s * f), this.transform(g, 0, 0, s, S, f);
              }
            };
            const He = {
              402: 131,
              8211: 150,
              8212: 151,
              8216: 145,
              8217: 146,
              8218: 130,
              8220: 147,
              8221: 148,
              8222: 132,
              8224: 134,
              8225: 135,
              8226: 149,
              8230: 133,
              8364: 128,
              8240: 137,
              8249: 139,
              8250: 155,
              710: 136,
              8482: 153,
              338: 140,
              339: 156,
              732: 152,
              352: 138,
              353: 154,
              376: 159,
              381: 142,
              382: 158
            }, Ce = `.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
.notdef       .notdef        .notdef        .notdef
  
space         exclam         quotedbl       numbersign
dollar        percent        ampersand      quotesingle
parenleft     parenright     asterisk       plus
comma         hyphen         period         slash
zero          one            two            three
four          five           six            seven
eight         nine           colon          semicolon
less          equal          greater        question
  
at            A              B              C
D             E              F              G
H             I              J              K
L             M              N              O
P             Q              R              S
T             U              V              W
X             Y              Z              bracketleft
backslash     bracketright   asciicircum    underscore
  
grave         a              b              c
d             e              f              g
h             i              j              k
l             m              n              o
p             q              r              s
t             u              v              w
x             y              z              braceleft
bar           braceright     asciitilde     .notdef
  
Euro          .notdef        quotesinglbase florin
quotedblbase  ellipsis       dagger         daggerdbl
circumflex    perthousand    Scaron         guilsinglleft
OE            .notdef        Zcaron         .notdef
.notdef       quoteleft      quoteright     quotedblleft
quotedblright bullet         endash         emdash
tilde         trademark      scaron         guilsinglright
oe            .notdef        zcaron         ydieresis
  
space         exclamdown     cent           sterling
currency      yen            brokenbar      section
dieresis      copyright      ordfeminine    guillemotleft
logicalnot    hyphen         registered     macron
degree        plusminus      twosuperior    threesuperior
acute         mu             paragraph      periodcentered
cedilla       onesuperior    ordmasculine   guillemotright
onequarter    onehalf        threequarters  questiondown
  
Agrave        Aacute         Acircumflex    Atilde
Adieresis     Aring          AE             Ccedilla
Egrave        Eacute         Ecircumflex    Edieresis
Igrave        Iacute         Icircumflex    Idieresis
Eth           Ntilde         Ograve         Oacute
Ocircumflex   Otilde         Odieresis      multiply
Oslash        Ugrave         Uacute         Ucircumflex
Udieresis     Yacute         Thorn          germandbls
  
agrave        aacute         acircumflex    atilde
adieresis     aring          ae             ccedilla
egrave        eacute         ecircumflex    edieresis
igrave        iacute         icircumflex    idieresis
eth           ntilde         ograve         oacute
ocircumflex   otilde         odieresis      divide
oslash        ugrave         uacute         ucircumflex
udieresis     yacute         thorn          ydieresis`.split(/\s+/);
            class je {
              constructor(s) {
                this.attributes = {}, this.glyphWidths = {}, this.boundingBoxes = {}, this.kernPairs = {}, this.parse(s), this.bbox = this.attributes.FontBBox.split(/\s+/).map((I) => +I), this.ascender = +(this.attributes.Ascender || 0), this.descender = +(this.attributes.Descender || 0), this.xHeight = +(this.attributes.XHeight || 0), this.capHeight = +(this.attributes.CapHeight || 0), this.lineGap = this.bbox[3] - this.bbox[1] - (this.ascender - this.descender);
              }
              parse(s) {
                let I = "";
                for (let oe of s.split(`
`)) {
                  var f, S;
                  if (f = oe.match(/^Start(\w+)/)) {
                    I = f[1];
                    continue;
                  } else if (f = oe.match(/^End(\w+)/)) {
                    I = "";
                    continue;
                  }
                  switch (I) {
                    case "FontMetrics":
                      f = oe.match(/(^\w+)\s+(.*)/);
                      var iA = f[1], YA = f[2];
                      (S = this.attributes[iA]) ? (Array.isArray(S) || (S = this.attributes[iA] = [S]), S.push(YA)) : this.attributes[iA] = YA;
                      break;
                    case "CharMetrics":
                      if (!/^CH?\s/.test(oe))
                        continue;
                      var ZA = oe.match(/\bN\s+(\.?\w+)\s*;/)[1];
                      this.glyphWidths[ZA] = +oe.match(/\bWX\s+(\d+)\s*;/)[1];
                      break;
                    case "KernPairs":
                      f = oe.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/), f && (this.kernPairs[f[1] + "\0" + f[2]] = parseInt(f[3]));
                      break;
                  }
                }
              }
              encodeText(s) {
                const I = [];
                for (let f = 0, S = s.length; f < S; f++) {
                  let iA = s.charCodeAt(f);
                  iA = He[iA] || iA, I.push(iA.toString(16));
                }
                return I;
              }
              glyphsForString(s) {
                const I = [];
                for (let f = 0, S = s.length; f < S; f++) {
                  const iA = s.charCodeAt(f);
                  I.push(this.characterToGlyph(iA));
                }
                return I;
              }
              characterToGlyph(s) {
                return Ce[He[s] || s] || ".notdef";
              }
              widthOfGlyph(s) {
                return this.glyphWidths[s] || 0;
              }
              getKernPair(s, I) {
                return this.kernPairs[s + "\0" + I] || 0;
              }
              advancesForGlyphs(s) {
                const I = [];
                for (let f = 0; f < s.length; f++) {
                  const S = s[f], iA = s[f + 1];
                  I.push(this.widthOfGlyph(S) + this.getKernPair(S, iA));
                }
                return I;
              }
            }
            class it {
              constructor() {
              }
              encode() {
                throw new Error("Must be implemented by subclasses");
              }
              widthOfString() {
                throw new Error("Must be implemented by subclasses");
              }
              ref() {
                return this.dictionary != null ? this.dictionary : this.dictionary = this.document.ref();
              }
              finalize() {
                this.embedded || this.dictionary == null || (this.embed(), this.embedded = !0);
              }
              embed() {
                throw new Error("Must be implemented by subclasses");
              }
              lineHeight(s) {
                const f = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1) ? this.lineGap : 0;
                return (this.ascender + f - this.descender) / 1e3 * s;
              }
            }
            const Et = {
              Courier() {
                return eA.readFileSync(A + "/data/Courier.afm", "utf8");
              },
              "Courier-Bold"() {
                return eA.readFileSync(A + "/data/Courier-Bold.afm", "utf8");
              },
              "Courier-Oblique"() {
                return eA.readFileSync(A + "/data/Courier-Oblique.afm", "utf8");
              },
              "Courier-BoldOblique"() {
                return eA.readFileSync(A + "/data/Courier-BoldOblique.afm", "utf8");
              },
              Helvetica() {
                return eA.readFileSync(A + "/data/Helvetica.afm", "utf8");
              },
              "Helvetica-Bold"() {
                return eA.readFileSync(A + "/data/Helvetica-Bold.afm", "utf8");
              },
              "Helvetica-Oblique"() {
                return eA.readFileSync(A + "/data/Helvetica-Oblique.afm", "utf8");
              },
              "Helvetica-BoldOblique"() {
                return eA.readFileSync(A + "/data/Helvetica-BoldOblique.afm", "utf8");
              },
              "Times-Roman"() {
                return eA.readFileSync(A + "/data/Times-Roman.afm", "utf8");
              },
              "Times-Bold"() {
                return eA.readFileSync(A + "/data/Times-Bold.afm", "utf8");
              },
              "Times-Italic"() {
                return eA.readFileSync(A + "/data/Times-Italic.afm", "utf8");
              },
              "Times-BoldItalic"() {
                return eA.readFileSync(A + "/data/Times-BoldItalic.afm", "utf8");
              },
              Symbol() {
                return eA.readFileSync(A + "/data/Symbol.afm", "utf8");
              },
              ZapfDingbats() {
                return eA.readFileSync(A + "/data/ZapfDingbats.afm", "utf8");
              }
            };
            class Ft extends it {
              constructor(s, I, f) {
                super(), this.document = s, this.name = I, this.id = f, this.font = new je(Et[this.name]()), {
                  ascender: this.ascender,
                  descender: this.descender,
                  bbox: this.bbox,
                  lineGap: this.lineGap,
                  xHeight: this.xHeight,
                  capHeight: this.capHeight
                } = this.font;
              }
              embed() {
                return this.dictionary.data = {
                  Type: "Font",
                  BaseFont: this.name,
                  Subtype: "Type1",
                  Encoding: "WinAnsiEncoding"
                }, this.dictionary.end();
              }
              encode(s) {
                const I = this.font.encodeText(s), f = this.font.glyphsForString(`${s}`), S = this.font.advancesForGlyphs(f), iA = [];
                for (let YA = 0; YA < f.length; YA++) {
                  const ZA = f[YA];
                  iA.push({
                    xAdvance: S[YA],
                    yAdvance: 0,
                    xOffset: 0,
                    yOffset: 0,
                    advanceWidth: this.font.widthOfGlyph(ZA)
                  });
                }
                return [I, iA];
              }
              widthOfString(s, I) {
                const f = this.font.glyphsForString(`${s}`), S = this.font.advancesForGlyphs(f);
                let iA = 0;
                for (let ZA of S)
                  iA += ZA;
                const YA = I / 1e3;
                return iA * YA;
              }
              static isStandardFont(s) {
                return s in Et;
              }
            }
            const Qt = function(g) {
              return `0000${g.toString(16)}`.slice(-4);
            };
            class Rt extends it {
              constructor(s, I, f) {
                super(), this.document = s, this.font = I, this.id = f, this.subset = this.font.createSubset(), this.unicode = [[0]], this.widths = [this.font.getGlyph(0).advanceWidth], this.name = this.font.postscriptName, this.scale = 1e3 / this.font.unitsPerEm, this.ascender = this.font.ascent * this.scale, this.descender = this.font.descent * this.scale, this.xHeight = this.font.xHeight * this.scale, this.capHeight = this.font.capHeight * this.scale, this.lineGap = this.font.lineGap * this.scale, this.bbox = this.font.bbox, s.options.fontLayoutCache !== !1 && (this.layoutCache = /* @__PURE__ */ Object.create(null));
              }
              layoutRun(s, I) {
                const f = this.font.layout(s, I);
                for (let S = 0; S < f.positions.length; S++) {
                  const iA = f.positions[S];
                  for (let YA in iA)
                    iA[YA] *= this.scale;
                  iA.advanceWidth = f.glyphs[S].advanceWidth * this.scale;
                }
                return f;
              }
              layoutCached(s) {
                if (!this.layoutCache)
                  return this.layoutRun(s);
                let I;
                if (I = this.layoutCache[s])
                  return I;
                const f = this.layoutRun(s);
                return this.layoutCache[s] = f, f;
              }
              layout(s, I, f) {
                if (I)
                  return this.layoutRun(s, I);
                let S = f ? null : [], iA = f ? null : [], YA = 0, ZA = 0, oe = 0;
                for (; oe <= s.length; ) {
                  var pe;
                  if (oe === s.length && ZA < oe || (pe = s.charAt(oe), [" ", "	"].includes(pe))) {
                    const xe = this.layoutCached(s.slice(ZA, ++oe));
                    f || (S = S.concat(xe.glyphs), iA = iA.concat(xe.positions)), YA += xe.advanceWidth, ZA = oe;
                  } else
                    oe++;
                }
                return {
                  glyphs: S,
                  positions: iA,
                  advanceWidth: YA
                };
              }
              encode(s, I) {
                const {
                  glyphs: f,
                  positions: S
                } = this.layout(s, I), iA = [];
                for (let YA = 0; YA < f.length; YA++) {
                  const ZA = f[YA], oe = this.subset.includeGlyph(ZA.id);
                  iA.push(`0000${oe.toString(16)}`.slice(-4)), this.widths[oe] == null && (this.widths[oe] = ZA.advanceWidth * this.scale), this.unicode[oe] == null && (this.unicode[oe] = ZA.codePoints);
                }
                return [iA, S];
              }
              widthOfString(s, I, f) {
                const S = this.layout(s, f, !0).advanceWidth, iA = I / 1e3;
                return S * iA;
              }
              embed() {
                const s = this.subset.cff != null, I = this.document.ref();
                s && (I.data.Subtype = "CIDFontType0C"), I.end(this.subset.encode());
                const f = ((this.font["OS/2"] != null ? this.font["OS/2"].sFamilyClass : void 0) || 0) >> 8;
                let S = 0;
                this.font.post.isFixedPitch && (S |= 1), 1 <= f && f <= 7 && (S |= 2), S |= 4, f === 10 && (S |= 8), this.font.head.macStyle.italic && (S |= 64);
                const YA = [1, 2, 3, 4, 5, 6].map((Qe) => String.fromCharCode((this.id.charCodeAt(Qe) || 73) + 17)).join("") + "+" + this.font.postscriptName?.replaceAll(" ", "_"), {
                  bbox: ZA
                } = this.font, oe = this.document.ref({
                  Type: "FontDescriptor",
                  FontName: YA,
                  Flags: S,
                  FontBBox: [ZA.minX * this.scale, ZA.minY * this.scale, ZA.maxX * this.scale, ZA.maxY * this.scale],
                  ItalicAngle: this.font.italicAngle,
                  Ascent: this.ascender,
                  Descent: this.descender,
                  CapHeight: (this.font.capHeight || this.font.ascent) * this.scale,
                  XHeight: (this.font.xHeight || 0) * this.scale,
                  StemV: 0
                });
                if (s ? oe.data.FontFile3 = I : oe.data.FontFile2 = I, this.document.subset && this.document.subset === 1) {
                  const Qe = a.from("FFFFFFFFC0", "hex"), ke = this.document.ref();
                  ke.write(Qe), ke.end(), oe.data.CIDSet = ke;
                }
                oe.end();
                const pe = {
                  Type: "Font",
                  Subtype: "CIDFontType0",
                  BaseFont: YA,
                  CIDSystemInfo: {
                    Registry: new String("Adobe"),
                    Ordering: new String("Identity"),
                    Supplement: 0
                  },
                  FontDescriptor: oe,
                  W: [0, this.widths]
                };
                s || (pe.Subtype = "CIDFontType2", pe.CIDToGIDMap = "Identity");
                const xe = this.document.ref(pe);
                return xe.end(), this.dictionary.data = {
                  Type: "Font",
                  Subtype: "Type0",
                  BaseFont: YA,
                  Encoding: "Identity-H",
                  DescendantFonts: [xe],
                  ToUnicode: this.toUnicodeCmap()
                }, this.dictionary.end();
              }
              toUnicodeCmap() {
                const s = this.document.ref(), I = [];
                for (let YA of this.unicode) {
                  const ZA = [];
                  for (let oe of YA)
                    oe > 65535 && (oe -= 65536, ZA.push(Qt(oe >>> 10 & 1023 | 55296)), oe = 56320 | oe & 1023), ZA.push(Qt(oe));
                  I.push(`<${ZA.join(" ")}>`);
                }
                const f = 256, S = Math.ceil(I.length / f), iA = [];
                for (let YA = 0; YA < S; YA++) {
                  const ZA = YA * f, oe = Math.min((YA + 1) * f, I.length);
                  iA.push(`<${Qt(ZA)}> <${Qt(oe - 1)}> [${I.slice(ZA, oe).join(" ")}]`);
                }
                return s.end(`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange
${iA.length} beginbfrange
${iA.join(`
`)}
endbfrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end`), s;
              }
            }
            class gt {
              static open(s, I, f, S) {
                let iA;
                if (typeof I == "string") {
                  if (Ft.isStandardFont(I))
                    return new Ft(s, I, S);
                  I = eA.readFileSync(I);
                }
                if (I instanceof Uint8Array ? iA = q.create(I, f) : I instanceof ArrayBuffer && (iA = q.create(new Uint8Array(I), f)), iA == null)
                  throw new Error("Not a supported font format or standard PDF font.");
                return new Rt(s, iA, S);
              }
            }
            const yt = (g, s) => !(g.font._tables?.head?.checkSumAdjustment !== s.font._tables?.head?.checkSumAdjustment || JSON.stringify(g.font._tables?.name?.records) !== JSON.stringify(s.font._tables?.name?.records));
            var oi = {
              initFonts() {
                let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "Helvetica", s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 12;
                this._fontFamilies = {}, this._fontCount = 0, this._fontSource = g, this._fontFamily = s, this._fontSize = I, this._font = null, this._remSize = I, this._registeredFonts = {}, g && this.font(g, s);
              },
              font(g, s, I) {
                let f, S;
                if (typeof s == "number" && (I = s, s = null), typeof g == "string" && this._registeredFonts[g] ? (f = g, {
                  src: g,
                  family: s
                } = this._registeredFonts[g]) : (f = s || g, typeof f != "string" && (f = null)), this._fontSource = g, this._fontFamily = s, I != null && this.fontSize(I), S = this._fontFamilies[f])
                  return this._font = S, this;
                const iA = `F${++this._fontCount}`;
                return this._font = gt.open(this, g, s, iA), (S = this._fontFamilies[this._font.name]) && yt(this._font, S) ? (this._font = S, this) : (f && (this._fontFamilies[f] = this._font), this._font.name && (this._fontFamilies[this._font.name] = this._font), this);
              },
              fontSize(g) {
                return this._fontSize = this.sizeToPoint(g), this;
              },
              currentLineHeight(g) {
                return this._font.lineHeight(this._fontSize, g);
              },
              registerFont(g, s, I) {
                return this._registeredFonts[g] = {
                  src: s,
                  family: I
                }, this;
              },
              sizeToPoint(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.page, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0;
                if (f || (f = this._fontSize), typeof s != "number" && (s = this.sizeToPoint(s)), g === void 0) return s;
                if (typeof g == "number") return g;
                if (typeof g == "boolean") return Number(g);
                const S = String(g).match(/((\d+)?(\.\d+)?)(em|in|px|cm|mm|pc|ex|ch|rem|vw|vh|vmin|vmax|%|pt)?/);
                if (!S) throw new Error(`Unsupported size '${g}'`);
                let iA;
                switch (S[4]) {
                  case "em":
                    iA = this._fontSize;
                    break;
                  case "in":
                    iA = zA;
                    break;
                  case "px":
                    iA = EA * zA;
                    break;
                  case "cm":
                    iA = VA * zA;
                    break;
                  case "mm":
                    iA = kA * VA * zA;
                    break;
                  case "pc":
                    iA = OA;
                    break;
                  case "ex":
                    iA = this.currentLineHeight();
                    break;
                  case "ch":
                    iA = this.widthOfString("0");
                    break;
                  case "rem":
                    iA = this._remSize;
                    break;
                  case "vw":
                    iA = I.width / 100;
                    break;
                  case "vh":
                    iA = I.height / 100;
                    break;
                  case "vmin":
                    iA = Math.min(I.width, I.height) / 100;
                    break;
                  case "vmax":
                    iA = Math.max(I.width, I.height) / 100;
                    break;
                  case "%":
                    iA = f / 100;
                    break;
                  case "pt":
                  default:
                    iA = 1;
                }
                return iA * Number(S[1]);
              }
            };
            const ei = "­", $t = "-";
            class St extends AA.EventEmitter {
              constructor(s, I) {
                super(), this.document = s, this.horizontalScaling = I.horizontalScaling || 100, this.indent = (I.indent || 0) * this.horizontalScaling / 100, this.indentAllLines = I.indentAllLines || !1, this.characterSpacing = (I.characterSpacing || 0) * this.horizontalScaling / 100, this.wordSpacing = (I.wordSpacing === 0) * this.horizontalScaling / 100, this.columns = I.columns || 1, this.columnGap = (I.columnGap != null ? I.columnGap : 18) * this.horizontalScaling / 100, this.lineWidth = (I.width * this.horizontalScaling / 100 - this.columnGap * (this.columns - 1)) / this.columns, this.spaceLeft = this.lineWidth, this.startX = this.document.x, this.startY = this.document.y, this.column = 1, this.ellipsis = I.ellipsis, this.continuedX = 0, this.features = I.features, I.height != null ? (this.height = I.height, this.maxY = cA(this.startY + I.height)) : this.maxY = cA(this.document.page.maxY()), this.on("firstLine", (f) => {
                  const S = this.continuedX || this.indent;
                  this.document.x += S, this.lineWidth -= S, !f.indentAllLines && this.once("line", () => {
                    this.document.x -= S, this.lineWidth += S, f.continued && !this.continuedX && (this.continuedX = this.indent), f.continued || (this.continuedX = 0);
                  });
                }), this.on("lastLine", (f) => {
                  const {
                    align: S
                  } = f;
                  S === "justify" && (f.align = "left"), this.lastLine = !0, this.once("line", () => (this.document.y += f.paragraphGap || 0, f.align = S, this.lastLine = !1));
                });
              }
              wordWidth(s) {
                return cA(this.document.widthOfString(s, this) + this.characterSpacing + this.wordSpacing);
              }
              canFit(s, I) {
                return s[s.length - 1] != ei ? I <= this.spaceLeft : I + this.wordWidth($t) <= this.spaceLeft;
              }
              eachWord(s, I) {
                let f;
                const S = new K.default(s);
                let iA = null;
                const YA = /* @__PURE__ */ Object.create(null);
                for (; f = S.nextBreak(); ) {
                  var ZA;
                  let xe = s.slice(iA?.position || 0, f.position), Qe = YA[xe] != null ? YA[xe] : YA[xe] = this.wordWidth(xe);
                  if (Qe > this.lineWidth + this.continuedX) {
                    let ke = iA;
                    const lt = {};
                    for (; xe.length; ) {
                      var oe, pe;
                      Qe > this.spaceLeft ? (oe = Math.ceil(this.spaceLeft / (Qe / xe.length)), Qe = this.wordWidth(xe.slice(0, oe)), pe = Qe <= this.spaceLeft && oe < xe.length) : oe = xe.length;
                      let Xe = Qe > this.spaceLeft && oe > 0;
                      for (; Xe || pe; )
                        Xe ? (Qe = this.wordWidth(xe.slice(0, --oe)), Xe = Qe > this.spaceLeft && oe > 0) : (Qe = this.wordWidth(xe.slice(0, ++oe)), Xe = Qe > this.spaceLeft && oe > 0, pe = Qe <= this.spaceLeft && oe < xe.length);
                      if (oe === 0 && this.spaceLeft === this.lineWidth && (oe = 1), lt.required = f.required || oe < xe.length, ZA = I(xe.slice(0, oe), Qe, lt, ke), ke = {
                        required: !1
                      }, xe = xe.slice(oe), Qe = this.wordWidth(xe), ZA === !1)
                        break;
                    }
                  } else
                    ZA = I(xe, Qe, f, iA);
                  if (ZA === !1)
                    break;
                  iA = f;
                }
              }
              wrap(s, I) {
                this.horizontalScaling = I.horizontalScaling || 100, I.indent != null && (this.indent = I.indent * this.horizontalScaling / 100), I.characterSpacing != null && (this.characterSpacing = I.characterSpacing * this.horizontalScaling / 100), I.wordSpacing != null && (this.wordSpacing = I.wordSpacing * this.horizontalScaling / 100), I.ellipsis != null && (this.ellipsis = I.ellipsis);
                const f = this.document.y + this.document.currentLineHeight(!0);
                (this.document.y > this.maxY || f > this.maxY) && this.nextSection();
                let S = "", iA = 0, YA = 0, ZA = 0, {
                  y: oe
                } = this.document;
                const pe = () => (I.textWidth = iA + this.wordSpacing * (YA - 1), I.wordCount = YA, I.lineWidth = this.lineWidth, {
                  y: oe
                } = this.document, this.emit("line", S, I, this), ZA++);
                this.emit("sectionStart", I, this), this.eachWord(s, (xe, Qe, ke, lt) => {
                  if ((lt == null || lt.required) && (this.emit("firstLine", I, this), this.spaceLeft = this.lineWidth), this.canFit(xe, Qe) && (S += xe, iA += Qe, YA++), ke.required || !this.canFit(xe, Qe)) {
                    const Xe = this.document.currentLineHeight(!0);
                    if (this.height != null && this.ellipsis && cA(this.document.y + Xe * 2) > this.maxY && this.column >= this.columns) {
                      for (this.ellipsis === !0 && (this.ellipsis = "…"), S = S.replace(/\s+$/, ""), iA = this.wordWidth(S + this.ellipsis); S && iA > this.lineWidth; )
                        S = S.slice(0, -1).replace(/\s+$/, ""), iA = this.wordWidth(S + this.ellipsis);
                      iA <= this.lineWidth && (S = S + this.ellipsis), iA = this.wordWidth(S);
                    }
                    if (ke.required && (Qe > this.spaceLeft && (pe(), S = xe, iA = Qe, YA = 1), this.emit("lastLine", I, this)), S[S.length - 1] == ei && (S = S.slice(0, -1) + $t, this.spaceLeft -= this.wordWidth($t)), pe(), cA(this.document.y + Xe) > this.maxY) {
                      if (this.emit("sectionEnd", I, this), !this.nextSection())
                        return YA = 0, S = "", !1;
                      this.emit("sectionStart", I, this);
                    }
                    return ke.required ? (this.spaceLeft = this.lineWidth, S = "", iA = 0, YA = 0) : (this.spaceLeft = this.lineWidth - Qe, S = xe, iA = Qe, YA = 1);
                  } else
                    return this.spaceLeft -= Qe;
                }), YA > 0 && (this.emit("lastLine", I, this), pe()), this.emit("sectionEnd", I, this), I.continued === !0 ? (ZA > 1 && (this.continuedX = 0), this.continuedX += I.textWidth || 0, this.document.y = oe) : this.document.x = this.startX;
              }
              nextSection(s) {
                if (++this.column > this.columns) {
                  if (this.height != null)
                    return !1;
                  if (this.document.continueOnNewPage(), this.column = 1, this.startY = this.document.page.margins.top, this.maxY = this.document.page.maxY(), this.indentAllLines) {
                    const I = this.continuedX || this.indent;
                    this.document.x += I, this.lineWidth -= I;
                  } else
                    this.document.x = this.startX;
                  this.document._fillColor && this.document.fillColor(...this.document._fillColor), this.emit("pageBreak", s, this);
                } else
                  this.document.x += this.lineWidth + this.columnGap, this.document.y = this.startY, this.emit("columnBreak", s, this);
                return !0;
              }
            }
            const {
              number: ri
            } = v;
            function an(g, s) {
              if (s === "numbered")
                return `${g}.`;
              var I = String.fromCharCode((g - 1) % 26 + 65), f = Math.floor((g - 1) / 26 + 1), S = Array(f + 1).join(I);
              return `${S}.`;
            }
            var mi = {
              initText() {
                this._line = this._line.bind(this), this.x = 0, this.y = 0, this._lineGap = 0;
              },
              lineGap(g) {
                return this._lineGap = g, this;
              },
              moveDown(g) {
                return g == null && (g = 1), this.y += this.currentLineHeight(!0) * g + this._lineGap, this;
              },
              moveUp(g) {
                return g == null && (g = 1), this.y -= this.currentLineHeight(!0) * g + this._lineGap, this;
              },
              _text(g, s, I, f, S) {
                f = this._initOptions(s, I, f), g = g == null ? "" : `${g}`, f.wordSpacing && (g = g.replace(/\s{2,}/g, " "));
                const iA = () => {
                  f.structParent && f.structParent.add(this.struct(f.structType || "P", [this.markStructureContent(f.structType || "P")]));
                };
                if (f.rotation !== 0 && (this.save(), this.rotate(-f.rotation, {
                  origin: [this.x, this.y]
                })), f.width) {
                  let YA = this._wrapper;
                  YA || (YA = new St(this, f), YA.on("line", S), YA.on("firstLine", iA)), this._wrapper = f.continued ? YA : null, this._textOptions = f.continued ? f : null, YA.wrap(g, f);
                } else
                  for (let YA of g.split(`
`))
                    iA(), S(YA, f);
                return f.rotation !== 0 && this.restore(), this;
              },
              text(g, s, I, f) {
                return this._text(g, s, I, f, this._line);
              },
              widthOfString(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                const I = s.horizontalScaling || 100;
                return (this._font.widthOfString(g, this._fontSize, s.features) + (s.characterSpacing || 0) * (g.length - 1)) * I / 100;
              },
              boundsOfString(g, s, I, f) {
                f = this._initOptions(s, I, f), {
                  x: s,
                  y: I
                } = this;
                const S = f.lineGap ?? this._lineGap ?? 0, iA = this.currentLineHeight(!0) + S;
                let YA = 0;
                if (g = String(g ?? ""), f.wordSpacing && (g = g.replace(/\s{2,}/g, " ")), f.width) {
                  let Gt = new St(this, f);
                  Gt.on("line", (ct, jt) => {
                    if (this.y += iA, ct = ct.replace(/\n/g, ""), ct.length) {
                      let Pi = jt.wordSpacing ?? 0;
                      const Ci = jt.characterSpacing ?? 0;
                      if (jt.width && jt.align === "justify") {
                        const Xi = ct.trim().split(/\s+/), ki = this.widthOfString(ct.replace(/\s+/g, ""), jt), In = this.widthOfString(" ") + Ci;
                        Pi = Math.max(0, (jt.lineWidth - ki) / Math.max(1, Xi.length - 1) - In);
                      }
                      YA = Math.max(YA, jt.textWidth + Pi * (jt.wordCount - 1) + Ci * (ct.length - 1));
                    }
                  }), Gt.wrap(g, f);
                } else
                  for (let Gt of g.split(`
`)) {
                    const ct = this.widthOfString(Gt, f);
                    this.y += iA, YA = Math.max(YA, ct);
                  }
                let ZA = this.y - I;
                if (f.height && (ZA = Math.min(ZA, f.height)), this.x = s, this.y = I, f.rotation === 0)
                  return {
                    x: s,
                    y: I,
                    width: YA,
                    height: ZA
                  };
                if (f.rotation === 90)
                  return {
                    x: s,
                    y: I - YA,
                    width: ZA,
                    height: YA
                  };
                if (f.rotation === 180)
                  return {
                    x: s - YA,
                    y: I - ZA,
                    width: YA,
                    height: ZA
                  };
                if (f.rotation === 270)
                  return {
                    x: s - ZA,
                    y: I,
                    width: ZA,
                    height: YA
                  };
                const oe = xA(f.rotation), pe = LA(f.rotation), xe = s, Qe = I, ke = s + YA * oe, lt = I - YA * pe, Xe = s + YA * oe + ZA * pe, et = I - YA * pe + ZA * oe, Oe = s + ZA * pe, rt = I + ZA * oe, $e = Math.min(xe, ke, Xe, Oe), wt = Math.max(xe, ke, Xe, Oe), Vt = Math.min(Qe, lt, et, rt), Ai = Math.max(Qe, lt, et, rt);
                return {
                  x: $e,
                  y: Vt,
                  width: wt - $e,
                  height: Ai - Vt
                };
              },
              heightOfString(g, s) {
                const {
                  x: I,
                  y: f
                } = this;
                s = this._initOptions(s), s.height = 1 / 0;
                const S = s.lineGap || this._lineGap || 0;
                this._text(g, this.x, this.y, s, () => {
                  this.y += this.currentLineHeight(!0) + S;
                });
                const iA = this.y - f;
                return this.x = I, this.y = f, iA;
              },
              list(g, s, I, f) {
                f = this._initOptions(s, I, f);
                const S = f.listType || "bullet", iA = Math.round(this._font.ascender / 1e3 * this._fontSize), YA = iA / 2, ZA = f.bulletRadius || iA / 3, oe = f.textIndent || (S === "bullet" ? ZA * 5 : iA * 2), pe = f.bulletIndent || (S === "bullet" ? ZA * 8 : iA * 2);
                let xe = 1;
                const Qe = [], ke = [], lt = [];
                var Xe = function(Oe) {
                  let rt = 1;
                  for (let $e = 0; $e < Oe.length; $e++) {
                    const wt = Oe[$e];
                    Array.isArray(wt) ? (xe++, Xe(wt), xe--) : (Qe.push(wt), ke.push(xe), S !== "bullet" && lt.push(rt++));
                  }
                };
                Xe(g);
                const et = function(Oe, rt) {
                  const $e = new St(this, f);
                  $e.on("line", this._line), xe = 1, $e.once("firstLine", () => {
                    let wt, Vt, Ai, Gt;
                    f.structParent && (f.structTypes ? [Vt, Ai, Gt] = f.structTypes : [Vt, Ai, Gt] = ["LI", "Lbl", "LBody"]), Vt ? (wt = this.struct(Vt), f.structParent.add(wt)) : f.structParent && (wt = f.structParent);
                    let ct;
                    if ((ct = ke[rt++]) !== xe) {
                      const Pi = pe * (ct - xe);
                      this.x += Pi, $e.lineWidth -= Pi, xe = ct;
                    }
                    switch (wt && (Ai || Gt) && wt.add(this.struct(Ai || Gt, [this.markStructureContent(Ai || Gt)])), S) {
                      case "bullet":
                        this.circle(this.x - oe + ZA, this.y + YA, ZA), this.fill();
                        break;
                      case "numbered":
                      case "lettered":
                        var jt = an(lt[rt - 1], S);
                        this._fragment(jt, this.x - oe, this.y, f);
                        break;
                    }
                    wt && Ai && Gt && wt.add(this.struct(Gt, [this.markStructureContent(Gt)])), wt && wt !== f.structParent && wt.end();
                  }), $e.on("sectionStart", () => {
                    const wt = oe + pe * (xe - 1);
                    this.x += wt, $e.lineWidth -= wt;
                  }), $e.on("sectionEnd", () => {
                    const wt = oe + pe * (xe - 1);
                    this.x -= wt, $e.lineWidth += wt;
                  }), $e.wrap(Oe, f);
                };
                for (let Oe = 0; Oe < Qe.length; Oe++)
                  et.call(this, Qe[Oe], Oe);
                return this;
              },
              _initOptions() {
                let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0, I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
                typeof g == "object" && (I = g, g = null);
                const f = Object.assign({}, I);
                if (this._textOptions)
                  for (let S in this._textOptions) {
                    const iA = this._textOptions[S];
                    S !== "continued" && f[S] === void 0 && (f[S] = iA);
                  }
                return g != null && (this.x = g), s != null && (this.y = s), f.lineBreak !== !1 && (f.width == null && (f.width = this.page.width - this.x - this.page.margins.right), f.width = Math.max(f.width, 0)), f.columns || (f.columns = 0), f.columnGap == null && (f.columnGap = 18), f.rotation = Number(I.rotation ?? 0) % 360, f.rotation < 0 && (f.rotation += 360), f;
              },
              _line(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = arguments.length > 2 ? arguments[2] : void 0;
                if (this._fragment(g, this.x, this.y, s), I) {
                  const f = s.lineGap || this._lineGap || 0;
                  this.y += this.currentLineHeight(!0) + f;
                } else
                  this.x += this.widthOfString(g, s);
              },
              _fragment(g, s, I, f) {
                let S, iA, YA, ZA, oe, pe;
                if (g = `${g}`.replace(/\n/g, ""), g.length === 0)
                  return;
                const xe = f.align || "left";
                let Qe = f.wordSpacing || 0;
                const ke = f.characterSpacing || 0, lt = f.horizontalScaling || 100;
                if (f.width)
                  switch (xe) {
                    case "right":
                      oe = this.widthOfString(g.replace(/\s+$/, ""), f), s += f.lineWidth - oe;
                      break;
                    case "center":
                      s += f.lineWidth / 2 - f.textWidth / 2;
                      break;
                    case "justify":
                      pe = g.trim().split(/\s+/), oe = this.widthOfString(g.replace(/\s+/g, ""), f);
                      var Xe = this.widthOfString(" ") + ke;
                      Qe = Math.max(0, (f.lineWidth - oe) / Math.max(1, pe.length - 1) - Xe);
                      break;
                  }
                if (typeof f.baseline == "number")
                  S = -f.baseline;
                else {
                  switch (f.baseline) {
                    case "svg-middle":
                      S = 0.5 * this._font.xHeight;
                      break;
                    case "middle":
                    case "svg-central":
                      S = 0.5 * (this._font.descender + this._font.ascender);
                      break;
                    case "bottom":
                    case "ideographic":
                      S = this._font.descender;
                      break;
                    case "alphabetic":
                      S = 0;
                      break;
                    case "mathematical":
                      S = 0.5 * this._font.ascender;
                      break;
                    case "hanging":
                      S = 0.8 * this._font.ascender;
                      break;
                    case "top":
                      S = this._font.ascender;
                      break;
                    default:
                      S = this._font.ascender;
                  }
                  S = S / 1e3 * this._fontSize;
                }
                const et = f.textWidth + Qe * (f.wordCount - 1) + ke * (g.length - 1);
                if (f.link != null) {
                  const ct = {};
                  this._currentStructureElement && this._currentStructureElement.dictionary.data.S === "Link" && (ct.structParent = this._currentStructureElement), this.link(s, I, et, this.currentLineHeight(), f.link, ct);
                }
                if (f.goTo != null && this.goTo(s, I, et, this.currentLineHeight(), f.goTo), f.destination != null && this.addNamedDestination(f.destination, "XYZ", s, I, null), f.underline) {
                  this.save(), f.stroke || this.strokeColor(...this._fillColor || []);
                  const ct = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10);
                  this.lineWidth(ct);
                  let jt = I + this.currentLineHeight() - ct;
                  this.moveTo(s, jt), this.lineTo(s + et, jt), this.stroke(), this.restore();
                }
                if (f.strike) {
                  this.save(), f.stroke || this.strokeColor(...this._fillColor || []);
                  const ct = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10);
                  this.lineWidth(ct);
                  let jt = I + this.currentLineHeight() / 2;
                  this.moveTo(s, jt), this.lineTo(s + et, jt), this.stroke(), this.restore();
                }
                if (this.save(), f.oblique) {
                  let ct;
                  typeof f.oblique == "number" ? ct = -Math.tan(f.oblique * Math.PI / 180) : ct = -0.25, this.transform(1, 0, 0, 1, s, I), this.transform(1, 0, ct, 1, -ct * S, 0), this.transform(1, 0, 0, 1, -s, -I);
                }
                this.transform(1, 0, 0, -1, 0, this.page.height), I = this.page.height - I - S, this.page.fonts[this._font.id] == null && (this.page.fonts[this._font.id] = this._font.ref()), this.addContent("BT"), this.addContent(`1 0 0 1 ${ri(s)} ${ri(I)} Tm`), this.addContent(`/${this._font.id} ${ri(this._fontSize)} Tf`);
                const Oe = f.fill && f.stroke ? 2 : f.stroke ? 1 : 0;
                if (Oe && this.addContent(`${Oe} Tr`), ke && this.addContent(`${ri(ke)} Tc`), lt !== 100 && this.addContent(`${lt} Tz`), Qe) {
                  pe = g.trim().split(/\s+/), Qe += this.widthOfString(" ") + ke, Qe *= 1e3 / this._fontSize, iA = [], ZA = [];
                  for (let ct of pe) {
                    const [jt, Pi] = this._font.encode(ct, f.features);
                    iA = iA.concat(jt), ZA = ZA.concat(Pi);
                    const Ci = {}, Xi = ZA[ZA.length - 1];
                    for (let ki in Xi) {
                      const In = Xi[ki];
                      Ci[ki] = In;
                    }
                    Ci.xAdvance += Qe, ZA[ZA.length - 1] = Ci;
                  }
                } else
                  [iA, ZA] = this._font.encode(g, f.features);
                const rt = this._fontSize / 1e3, $e = [];
                let wt = 0, Vt = !1;
                const Ai = (ct) => {
                  if (wt < ct) {
                    const jt = iA.slice(wt, ct).join(""), Pi = ZA[ct - 1].xAdvance - ZA[ct - 1].advanceWidth;
                    $e.push(`<${jt}> ${ri(-Pi)}`);
                  }
                  wt = ct;
                }, Gt = (ct) => {
                  Ai(ct), $e.length > 0 && (this.addContent(`[${$e.join(" ")}] TJ`), $e.length = 0);
                };
                for (YA = 0; YA < ZA.length; YA++) {
                  const ct = ZA[YA];
                  ct.xOffset || ct.yOffset ? (Gt(YA), this.addContent(`1 0 0 1 ${ri(s + ct.xOffset * rt)} ${ri(I + ct.yOffset * rt)} Tm`), Gt(YA + 1), Vt = !0) : (Vt && (this.addContent(`1 0 0 1 ${ri(s)} ${ri(I)} Tm`), Vt = !1), ct.xAdvance - ct.advanceWidth !== 0 && Ai(YA + 1)), s += ct.xAdvance * rt;
                }
                Gt(YA), this.addContent("ET"), this.restore();
              }
            };
            const Ii = (g) => {
              if (!g || g.length < 20) return null;
              let s = 2;
              for (; s < g.length - 4; ) {
                for (; s < g.length && g[s] !== 255; ) s++;
                if (s >= g.length - 4) return null;
                const I = g.readUInt16BE(s);
                if (s += 2, I === 65498) return null;
                if (I >= 65488 && I <= 65497 || I === 65281) continue;
                if (s + 2 > g.length) return null;
                const f = g.readUInt16BE(s);
                if (I === 65505 && s + 8 <= g.length && g.subarray(s + 2, s + 8).toString("binary") === "Exif\0\0") {
                  const iA = s + 8;
                  if (iA + 8 > g.length) return null;
                  const YA = g.subarray(iA, iA + 2).toString("ascii"), ZA = YA === "II";
                  if (!ZA && YA !== "MM") return null;
                  const oe = ZA ? (ke) => g.readUInt16LE(ke) : (ke) => g.readUInt16BE(ke), pe = ZA ? (ke) => g.readUInt32LE(ke) : (ke) => g.readUInt32BE(ke);
                  if (oe(iA + 2) !== 42) return null;
                  const xe = iA + pe(iA + 4);
                  if (xe + 2 > g.length) return null;
                  const Qe = oe(xe);
                  for (let ke = 0; ke < Qe; ke++) {
                    const lt = xe + 2 + ke * 12;
                    if (lt + 12 > g.length) return null;
                    if (oe(lt) === 274) {
                      const Xe = oe(lt + 8);
                      return Xe >= 1 && Xe <= 8 ? Xe : null;
                    }
                  }
                  return null;
                }
                s += f;
              }
              return null;
            }, Hi = [65472, 65473, 65474, 65475, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487], Mi = {
              1: "DeviceGray",
              3: "DeviceRGB",
              4: "DeviceCMYK"
            };
            class Li {
              constructor(s, I) {
                let f;
                if (this.data = s, this.label = I, this.data.readUInt16BE(0) !== 65496)
                  throw "SOI not found in JPEG";
                this.orientation = Ii(this.data) || 1;
                let S = 2;
                for (; S < this.data.length; ) {
                  for (; S < this.data.length && this.data[S] !== 255; ) S++;
                  if (S >= this.data.length || (f = this.data.readUInt16BE(S), S += 2, Hi.includes(f)))
                    break;
                  S += this.data.readUInt16BE(S);
                }
                if (!Hi.includes(f))
                  throw "Invalid JPEG.";
                S += 2, this.bits = this.data[S++], this.height = this.data.readUInt16BE(S), S += 2, this.width = this.data.readUInt16BE(S), S += 2;
                const iA = this.data[S++];
                this.colorSpace = Mi[iA], this.obj = null;
              }
              embed(s) {
                if (!this.obj)
                  return this.obj = s.ref({
                    Type: "XObject",
                    Subtype: "Image",
                    BitsPerComponent: this.bits,
                    Width: this.width,
                    Height: this.height,
                    ColorSpace: this.colorSpace,
                    Filter: "DCTDecode"
                  }), this.colorSpace === "DeviceCMYK" && (this.obj.data.Decode = [1, 0, 1, 0, 1, 0, 1, 0]), this.obj.end(this.data), this.data = null;
              }
            }
            class Fi {
              constructor(s, I) {
                this.label = I, this.image = new z.default(s), this.width = this.image.width, this.height = this.image.height, this.imgData = this.image.imgData, this.obj = null;
              }
              embed(s) {
                let I = !1;
                if (this.document = s, this.obj)
                  return;
                const f = this.image.hasAlphaChannel, S = this.image.interlaceMethod === 1;
                if (this.obj = this.document.ref({
                  Type: "XObject",
                  Subtype: "Image",
                  BitsPerComponent: f ? 8 : this.image.bits,
                  Width: this.width,
                  Height: this.height,
                  Filter: "FlateDecode"
                }), !f) {
                  const iA = this.document.ref({
                    Predictor: S ? 1 : 15,
                    Colors: this.image.colors,
                    BitsPerComponent: this.image.bits,
                    Columns: this.width
                  });
                  this.obj.data.DecodeParms = iA, iA.end();
                }
                if (this.image.palette.length === 0)
                  this.obj.data.ColorSpace = this.image.colorSpace;
                else {
                  const iA = this.document.ref();
                  iA.end(a.from(this.image.palette)), this.obj.data.ColorSpace = ["Indexed", "DeviceRGB", this.image.palette.length / 3 - 1, iA];
                }
                if (this.image.transparency.grayscale != null) {
                  const iA = this.image.transparency.grayscale;
                  this.obj.data.Mask = [iA, iA];
                } else if (this.image.transparency.rgb) {
                  const {
                    rgb: iA
                  } = this.image.transparency, YA = [];
                  for (let ZA of iA)
                    YA.push(ZA, ZA);
                  this.obj.data.Mask = YA;
                } else {
                  if (this.image.transparency.indexed)
                    return I = !0, this.loadIndexedAlphaChannel();
                  if (f)
                    return I = !0, this.splitAlphaChannel();
                }
                if (S && !I)
                  return this.decodeData();
                this.finalize();
              }
              finalize() {
                if (this.alphaChannel) {
                  const s = this.document.ref({
                    Type: "XObject",
                    Subtype: "Image",
                    Height: this.height,
                    Width: this.width,
                    BitsPerComponent: 8,
                    Filter: "FlateDecode",
                    ColorSpace: "DeviceGray",
                    Decode: [0, 1]
                  });
                  s.end(this.alphaChannel), this.obj.data.SMask = s;
                }
                return this.obj.end(this.imgData), this.image = null, this.imgData = null;
              }
              splitAlphaChannel() {
                return this.image.decodePixels((s) => {
                  let I, f;
                  const S = this.image.colors, iA = this.width * this.height, YA = a.alloc(iA * S), ZA = a.alloc(iA);
                  let oe = f = I = 0;
                  const pe = s.length, xe = this.image.bits === 16 ? 1 : 0;
                  for (; oe < pe; ) {
                    for (let Qe = 0; Qe < S; Qe++)
                      YA[f++] = s[oe++], oe += xe;
                    ZA[I++] = s[oe++], oe += xe;
                  }
                  return this.imgData = x.default.deflateSync(YA), this.alphaChannel = x.default.deflateSync(ZA), this.finalize();
                });
              }
              loadIndexedAlphaChannel() {
                const s = this.image.transparency.indexed, I = this.image.interlaceMethod === 1;
                return this.image.decodePixels((f) => {
                  const S = a.alloc(this.width * this.height);
                  let iA = 0;
                  for (let YA = 0, ZA = f.length; YA < ZA; YA++)
                    S[iA++] = s[f[YA]];
                  return I && (this.imgData = x.default.deflateSync(a.from(f))), this.alphaChannel = x.default.deflateSync(S), this.finalize();
                });
              }
              decodeData() {
                this.image.decodePixels((s) => {
                  this.imgData = x.default.deflateSync(s), this.finalize();
                });
              }
            }
            class Ti {
              static open(s, I) {
                let f;
                if (a.isBuffer(s))
                  f = s;
                else if (s instanceof ArrayBuffer)
                  f = a.from(new Uint8Array(s));
                else {
                  const S = /^data:.+?;base64,(.*)$/.exec(s);
                  if (S)
                    f = a.from(S[1], "base64");
                  else if (f = eA.readFileSync(s), !f)
                    return;
                }
                if (f[0] === 255 && f[1] === 216)
                  return new Li(f, I);
                if (f[0] === 137 && f.toString("ascii", 1, 4) === "PNG")
                  return new Fi(f, I);
                throw new Error("Unknown image format.");
              }
            }
            var Yi = {
              initImages() {
                this._imageRegistry = {}, this._imageCount = 0;
              },
              image(g, s, I) {
                let f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, S, iA, YA, ZA, oe, pe, xe, Qe, ke;
                typeof s == "object" && (f = s, s = null);
                const lt = f.ignoreOrientation || f.ignoreOrientation !== !1 && this.options.ignoreOrientation, Xe = typeof I != "number";
                s = (pe = s ?? f.x) != null ? pe : this.x, I = (xe = I ?? f.y) != null ? xe : this.y, typeof g == "string" && (ZA = this._imageRegistry[g]), ZA || (g.width && g.height ? ZA = g : ZA = this.openImage(g)), ZA.obj || ZA.embed(this), this.page.xobjects[ZA.label] == null && (this.page.xobjects[ZA.label] = ZA.obj);
                let {
                  width: et,
                  height: Oe
                } = ZA;
                !lt && ZA.orientation > 4 && ([et, Oe] = [Oe, et]);
                let rt = f.width || et, $e = f.height || Oe;
                if (f.width && !f.height) {
                  const jt = rt / et;
                  rt = et * jt, $e = Oe * jt;
                } else if (f.height && !f.width) {
                  const jt = $e / Oe;
                  rt = et * jt, $e = Oe * jt;
                } else f.scale ? (rt = et * f.scale, $e = Oe * f.scale) : f.fit ? ([YA, S] = f.fit, iA = YA / S, oe = et / Oe, oe > iA ? (rt = YA, $e = YA / oe) : ($e = S, rt = S * oe)) : f.cover && ([YA, S] = f.cover, iA = YA / S, oe = et / Oe, oe > iA ? ($e = S, rt = S * oe) : (rt = YA, $e = YA / oe));
                (f.fit || f.cover) && (f.align === "center" ? s = s + YA / 2 - rt / 2 : f.align === "right" && (s = s + YA - rt), f.valign === "center" ? I = I + S / 2 - $e / 2 : f.valign === "bottom" && (I = I + S - $e));
                let wt = 0, Vt = s, Ai = I, Gt = $e, ct = rt;
                if (lt)
                  Gt = -$e, Ai += $e;
                else
                  switch (ZA.orientation) {
                    default:
                    case 1:
                      Gt = -$e, Ai += $e;
                      break;
                    case 2:
                      ct = -rt, Gt = -$e, Vt += rt, Ai += $e;
                      break;
                    case 3:
                      Qe = s, ke = I, Gt = -$e, Vt -= rt, wt = 180;
                      break;
                    case 4:
                      break;
                    case 5:
                      Qe = s, ke = I, ct = $e, Gt = rt, Ai -= Gt, wt = 90;
                      break;
                    case 6:
                      Qe = s, ke = I, ct = $e, Gt = -rt, wt = 90;
                      break;
                    case 7:
                      Qe = s, ke = I, Gt = -rt, ct = -$e, Vt += $e, wt = 90;
                      break;
                    case 8:
                      Qe = s, ke = I, ct = $e, Gt = -rt, Vt -= $e, Ai += rt, wt = -90;
                      break;
                  }
                return f.link != null && this.link(s, I, rt, $e, f.link), f.goTo != null && this.goTo(s, I, rt, $e, f.goTo), f.destination != null && this.addNamedDestination(f.destination, "XYZ", s, I, null), Xe && (this.y += $e), this.save(), wt && this.rotate(wt, {
                  origin: [Qe, ke]
                }), this.transform(ct, 0, 0, Gt, Vt, Ai), this.addContent(`/${ZA.label} Do`), this.restore(), this;
              },
              openImage(g) {
                let s;
                return typeof g == "string" && (s = this._imageRegistry[g]), s || (s = Ti.open(g, `I${++this._imageCount}`), typeof g == "string" && (this._imageRegistry[g] = s)), s;
              }
            };
            class Oi {
              constructor(s) {
                this.annotationRef = s;
              }
            }
            var Pn = {
              annotate(g, s, I, f, S) {
                S.Type = "Annot", S.Rect = this._convertRect(g, s, I, f), S.Border = [0, 0, 0], S.Subtype === "Link" && typeof S.F > "u" && (S.F = 4), S.Subtype !== "Link" && S.C == null && (S.C = this._normalizeColor(S.color || [0, 0, 0])), delete S.color, typeof S.Dest == "string" && (S.Dest = new String(S.Dest));
                const iA = S.structParent;
                delete S.structParent;
                for (let ZA in S) {
                  const oe = S[ZA];
                  S[ZA[0].toUpperCase() + ZA.slice(1)] = oe;
                }
                const YA = this.ref(S);
                if (this.page.annotations.push(YA), iA && typeof iA.add == "function") {
                  const ZA = new Oi(YA);
                  iA.add(ZA);
                }
                return YA.end(), this;
              },
              note(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return iA.Subtype = "Text", iA.Contents = new String(S), iA.Name == null && (iA.Name = "Comment"), iA.color == null && (iA.color = [243, 223, 92]), this.annotate(g, s, I, f, iA);
              },
              goTo(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return iA.Subtype = "Link", iA.A = this.ref({
                  S: "GoTo",
                  D: new String(S)
                }), iA.A.end(), this.annotate(g, s, I, f, iA);
              },
              link(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                if (iA.Subtype = "Link", typeof S == "number") {
                  const YA = this._root.data.Pages.data;
                  if (S >= 0 && S < YA.Kids.length)
                    iA.A = this.ref({
                      S: "GoTo",
                      D: [YA.Kids[S], "XYZ", null, null, null]
                    }), iA.A.end();
                  else
                    throw new Error(`The document has no page ${S}`);
                } else
                  iA.A = this.ref({
                    S: "URI",
                    URI: new String(S)
                  }), iA.A.end();
                return iA.structParent && !iA.Contents && (iA.Contents = new String("")), this.annotate(g, s, I, f, iA);
              },
              _markup(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                const [iA, YA, ZA, oe] = this._convertRect(g, s, I, f);
                return S.QuadPoints = [iA, oe, ZA, oe, iA, YA, ZA, YA], S.Contents = new String(), this.annotate(g, s, I, f, S);
              },
              highlight(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "Highlight", S.color == null && (S.color = [241, 238, 148]), this._markup(g, s, I, f, S);
              },
              underline(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "Underline", this._markup(g, s, I, f, S);
              },
              strike(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "StrikeOut", this._markup(g, s, I, f, S);
              },
              lineAnnotation(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "Line", S.Contents = new String(), S.L = [g, this.page.height - s, I, this.page.height - f], this.annotate(g, s, I, f, S);
              },
              rectAnnotation(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "Square", S.Contents = new String(), this.annotate(g, s, I, f, S);
              },
              ellipseAnnotation(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
                return S.Subtype = "Circle", S.Contents = new String(), this.annotate(g, s, I, f, S);
              },
              textAnnotation(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return iA.Subtype = "FreeText", iA.Contents = new String(S), iA.DA = new String(), this.annotate(g, s, I, f, iA);
              },
              fileAnnotation(g, s, I, f) {
                let S = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                const YA = this.file(S.src, Object.assign({
                  hidden: !0
                }, S));
                return iA.Subtype = "FileAttachment", iA.FS = YA, iA.Contents ? iA.Contents = new String(iA.Contents) : YA.data.Desc && (iA.Contents = YA.data.Desc), this.annotate(g, s, I, f, iA);
              },
              _convertRect(g, s, I, f) {
                let S = s;
                s += f;
                let iA = g + I;
                const [YA, ZA, oe, pe, xe, Qe] = this._ctm;
                return g = YA * g + oe * s + xe, s = ZA * g + pe * s + Qe, iA = YA * iA + oe * S + xe, S = ZA * iA + pe * S + Qe, [g, s, iA, S];
              }
            };
            const Ui = {
              top: 0,
              left: 0,
              zoom: 0,
              fit: !0,
              pageNumber: null,
              expanded: !1
            };
            class An {
              constructor(s, I, f, S) {
                let iA = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : Ui;
                if (this.document = s, this.options = iA, this.outlineData = {}, S !== null) {
                  const YA = S.data.MediaBox[2], oe = S.data.MediaBox[3] - (iA.top || 0), pe = YA - (iA.left || 0), xe = iA.zoom || 0;
                  this.outlineData.Dest = iA.fit ? [S, "Fit"] : [S, "XYZ", pe, oe, xe];
                }
                I !== null && (this.outlineData.Parent = I), f !== null && (this.outlineData.Title = new String(f)), this.dictionary = this.document.ref(this.outlineData), this.children = [];
              }
              addItem(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ui;
                const f = this.document._root.data.Pages.data.Kids, S = I.pageNumber != null ? f[I.pageNumber] : this.document.page.dictionary, iA = new An(this.document, this.dictionary, s, S, I);
                return this.children.push(iA), iA;
              }
              endOutline() {
                if (this.children.length > 0) {
                  this.options.expanded && (this.outlineData.Count = this.children.length);
                  const s = this.children[0], I = this.children[this.children.length - 1];
                  this.outlineData.First = s.dictionary, this.outlineData.Last = I.dictionary;
                  for (let f = 0, S = this.children.length; f < S; f++) {
                    const iA = this.children[f];
                    f > 0 && (iA.outlineData.Prev = this.children[f - 1].dictionary), f < this.children.length - 1 && (iA.outlineData.Next = this.children[f + 1].dictionary), iA.endOutline();
                  }
                }
                return this.dictionary.end();
              }
            }
            var vn = {
              initOutline() {
                this.outline = new An(this, null, null, null);
              },
              endOutline() {
                if (this.outline.endOutline(), this.outline.children.length > 0)
                  return this._root.data.Outlines = this.outline.dictionary, this._root.data.PageMode = this._root.data.PageMode || "UseOutlines";
              }
            };
            class en {
              constructor(s, I) {
                this.refs = [{
                  pageRef: s,
                  mcid: I
                }];
              }
              push(s) {
                s.refs.forEach((I) => this.refs.push(I));
              }
            }
            class hi {
              constructor(s, I) {
                let f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
                this.document = s, this._attached = !1, this._ended = !1, this._flushed = !1, this.dictionary = s.ref({
                  S: I
                });
                const iA = this.dictionary.data;
                (Array.isArray(f) || this._isValidChild(f)) && (S = f, f = {}), typeof f.title < "u" && (iA.T = new String(f.title)), typeof f.lang < "u" && (iA.Lang = new String(f.lang)), typeof f.alt < "u" && (iA.Alt = new String(f.alt)), typeof f.expanded < "u" && (iA.E = new String(f.expanded)), typeof f.actual < "u" && (iA.ActualText = new String(f.actual)), this._children = [], S && (Array.isArray(S) || (S = [S]), S.forEach((YA) => this.add(YA)), this.end());
              }
              add(s) {
                if (this._ended)
                  throw new Error("Cannot add child to already-ended structure element");
                if (!this._isValidChild(s))
                  throw new Error("Invalid structure element child");
                return s instanceof hi && (s.setParent(this.dictionary), this._attached && s.setAttached()), s instanceof en && this._addContentToParentTree(s), s instanceof Oi && this._addAnnotationToParentTree(s.annotationRef), typeof s == "function" && this._attached && (s = this._contentForClosure(s)), this._children.push(s), this;
              }
              _addContentToParentTree(s) {
                s.refs.forEach((I) => {
                  let {
                    pageRef: f,
                    mcid: S
                  } = I;
                  const iA = this.document.getStructParentTree().get(f.data.StructParents);
                  iA[S] = this.dictionary;
                });
              }
              _addAnnotationToParentTree(s) {
                const I = this.document.createStructParentTreeNextKey();
                s.data.StructParent = I, this.document.getStructParentTree().add(I, this.dictionary);
              }
              setParent(s) {
                if (this.dictionary.data.P)
                  throw new Error("Structure element added to more than one parent");
                this.dictionary.data.P = s, this._flush();
              }
              setAttached() {
                this._attached || (this._children.forEach((s, I) => {
                  s instanceof hi && s.setAttached(), typeof s == "function" && (this._children[I] = this._contentForClosure(s));
                }), this._attached = !0, this._flush());
              }
              end() {
                this._ended || (this._children.filter((s) => s instanceof hi).forEach((s) => s.end()), this._ended = !0, this._flush());
              }
              _isValidChild(s) {
                return s instanceof hi || s instanceof en || s instanceof Oi || typeof s == "function";
              }
              _contentForClosure(s) {
                const I = this.document.markStructureContent(this.dictionary.data.S), f = this.document._currentStructureElement;
                this.document._currentStructureElement = this;
                const S = this._ended;
                return this._ended = !1, s(), this._ended = S, this.document._currentStructureElement = f, this.document.endMarkedContent(), this._addContentToParentTree(I), I;
              }
              _isFlushable() {
                return !this.dictionary.data.P || !this._ended ? !1 : this._children.every((s) => typeof s == "function" ? !1 : s instanceof hi ? s._isFlushable() : !0);
              }
              _flush() {
                this._flushed || !this._isFlushable() || (this.dictionary.data.K = [], this._children.forEach((s) => this._flushChild(s)), this.dictionary.end(), this._children = [], this.dictionary.data.K = null, this._flushed = !0);
              }
              _flushChild(s) {
                if (s instanceof hi && this.dictionary.data.K.push(s.dictionary), s instanceof en && s.refs.forEach((I) => {
                  let {
                    pageRef: f,
                    mcid: S
                  } = I;
                  this.dictionary.data.Pg || (this.dictionary.data.Pg = f), this.dictionary.data.Pg === f ? this.dictionary.data.K.push(S) : this.dictionary.data.K.push({
                    Type: "MCR",
                    Pg: f,
                    MCID: S
                  });
                }), s instanceof Oi) {
                  const I = this.document.page.dictionary, f = {
                    Type: "OBJR",
                    Obj: s.annotationRef,
                    Pg: I
                  };
                  this.dictionary.data.K.push(f);
                }
              }
            }
            class Mn extends IA {
              _compareKeys(s, I) {
                return parseInt(s) - parseInt(I);
              }
              _keysName() {
                return "Nums";
              }
              _dataForKey(s) {
                return parseInt(s);
              }
            }
            var Pr = {
              initMarkings(g) {
                this.structChildren = [], g.tagged && (this.getMarkInfoDictionary().data.Marked = !0, this.getStructTreeRoot());
              },
              markContent(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
                if (g === "Artifact" || s && s.mcid) {
                  let f = 0;
                  for (this.page.markings.forEach((S) => {
                    (f || S.structContent || S.tag === "Artifact") && f++;
                  }); f--; )
                    this.endMarkedContent();
                }
                if (!s)
                  return this.page.markings.push({
                    tag: g
                  }), this.addContent(`/${g} BMC`), this;
                this.page.markings.push({
                  tag: g,
                  options: s
                });
                const I = {};
                return typeof s.mcid < "u" && (I.MCID = s.mcid), g === "Artifact" && (typeof s.type == "string" && (I.Type = s.type), Array.isArray(s.bbox) && (I.BBox = [s.bbox[0], this.page.height - s.bbox[3], s.bbox[2], this.page.height - s.bbox[1]]), Array.isArray(s.attached) && s.attached.every((f) => typeof f == "string") && (I.Attached = s.attached)), g === "Span" && (s.lang && (I.Lang = new String(s.lang)), s.alt && (I.Alt = new String(s.alt)), s.expanded && (I.E = new String(s.expanded)), s.actual && (I.ActualText = new String(s.actual))), this.addContent(`/${g} ${v.convert(I)} BDC`), this;
              },
              markStructureContent(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                const I = this.getStructParentTree().get(this.page.structParentTreeKey), f = I.length;
                I.push(null), this.markContent(g, {
                  ...s,
                  mcid: f
                });
                const S = new en(this.page.dictionary, f);
                return this.page.markings.slice(-1)[0].structContent = S, S;
              },
              endMarkedContent() {
                return this.page.markings.pop(), this.addContent("EMC"), this._textOptions && (delete this._textOptions.link, delete this._textOptions.goTo, delete this._textOptions.destination, delete this._textOptions.underline, delete this._textOptions.strike), this;
              },
              struct(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
                return new hi(this, g, s, I);
              },
              addStructure(g) {
                const s = this.getStructTreeRoot();
                return g.setParent(s), g.setAttached(), this.structChildren.push(g), s.data.K || (s.data.K = []), s.data.K.push(g.dictionary), this;
              },
              initPageMarkings(g) {
                g.forEach((s) => {
                  if (s.structContent) {
                    const I = s.structContent, f = this.markStructureContent(s.tag, s.options);
                    I.push(f), this.page.markings.slice(-1)[0].structContent = I;
                  } else
                    this.markContent(s.tag, s.options);
                });
              },
              endPageMarkings(g) {
                const s = g.markings;
                return s.forEach(() => g.write("EMC")), g.markings = [], s;
              },
              getMarkInfoDictionary() {
                return this._root.data.MarkInfo || (this._root.data.MarkInfo = this.ref({})), this._root.data.MarkInfo;
              },
              hasMarkInfoDictionary() {
                return !!this._root.data.MarkInfo;
              },
              getStructTreeRoot() {
                return this._root.data.StructTreeRoot || (this._root.data.StructTreeRoot = this.ref({
                  Type: "StructTreeRoot",
                  ParentTree: new Mn(),
                  ParentTreeNextKey: 0
                })), this._root.data.StructTreeRoot;
              },
              getStructParentTree() {
                return this.getStructTreeRoot().data.ParentTree;
              },
              createStructParentTreeNextKey() {
                this.getMarkInfoDictionary();
                const g = this.getStructTreeRoot(), s = g.data.ParentTreeNextKey++;
                return g.data.ParentTree.add(s, []), s;
              },
              endMarkings() {
                const g = this._root.data.StructTreeRoot;
                g && (g.end(), this.structChildren.forEach((s) => s.end())), this._root.data.MarkInfo && this._root.data.MarkInfo.end();
              }
            };
            const Ar = {
              readOnly: 1,
              required: 2,
              noExport: 4,
              multiline: 4096,
              password: 8192,
              toggleToOffButton: 16384,
              radioButton: 32768,
              pushButton: 65536,
              combo: 131072,
              edit: 262144,
              sort: 524288,
              multiSelect: 2097152,
              noSpell: 4194304
            }, er = {
              left: 0,
              center: 1,
              right: 2
            }, on = {
              value: "V",
              defaultValue: "DV"
            }, tr = {
              zip: "0",
              zipPlus4: "1",
              zip4: "1",
              phone: "2",
              ssn: "3"
            }, ir = {
              number: {
                nDec: 0,
                sepComma: !1,
                negStyle: "MinusBlack",
                currency: "",
                currencyPrepend: !0
              },
              percent: {
                nDec: 0,
                sepComma: !1
              }
            };
            var nr = {
              initForm() {
                if (!this._font)
                  throw new Error("Must set a font before calling initForm method");
                this._acroform = {
                  fonts: {},
                  defaultFont: this._font.name
                }, this._acroform.fonts[this._font.id] = this._font.ref();
                let g = {
                  Fields: [],
                  NeedAppearances: !0,
                  DA: new String(`/${this._font.id} 0 Tf 0 g`),
                  DR: {
                    Font: {}
                  }
                };
                g.DR.Font[this._font.id] = this._font.ref();
                const s = this.ref(g);
                return this._root.data.AcroForm = s, this;
              },
              endAcroForm() {
                if (this._root.data.AcroForm) {
                  if (!Object.keys(this._acroform.fonts).length && !this._acroform.defaultFont)
                    throw new Error("No fonts specified for PDF form");
                  let g = this._root.data.AcroForm.data.DR.Font;
                  Object.keys(this._acroform.fonts).forEach((s) => {
                    g[s] = this._acroform.fonts[s];
                  }), this._root.data.AcroForm.data.Fields.forEach((s) => {
                    this._endChild(s);
                  }), this._root.data.AcroForm.end();
                }
                return this;
              },
              _endChild(g) {
                return Array.isArray(g.data.Kids) && (g.data.Kids.forEach((s) => {
                  this._endChild(s);
                }), g.end()), this;
              },
              formField(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = this._fieldDict(g, null, s), f = this.ref(I);
                return this._addToParent(f), f;
              },
              formAnnotation(g, s, I, f, S, iA) {
                let YA = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : {}, ZA = this._fieldDict(g, s, YA);
                ZA.Subtype = "Widget", ZA.F === void 0 && (ZA.F = 4), this.annotate(I, f, S, iA, ZA);
                let oe = this.page.annotations[this.page.annotations.length - 1];
                return this._addToParent(oe);
              },
              formText(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "text", s, I, f, S, iA);
              },
              formPushButton(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "pushButton", s, I, f, S, iA);
              },
              formCombo(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "combo", s, I, f, S, iA);
              },
              formList(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "list", s, I, f, S, iA);
              },
              formRadioButton(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "radioButton", s, I, f, S, iA);
              },
              formCheckbox(g, s, I, f, S) {
                let iA = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
                return this.formAnnotation(g, "checkbox", s, I, f, S, iA);
              },
              _addToParent(g) {
                let s = g.data.Parent;
                return s ? (s.data.Kids || (s.data.Kids = []), s.data.Kids.push(g)) : this._root.data.AcroForm.data.Fields.push(g), this;
              },
              _fieldDict(g, s) {
                let I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
                if (!this._acroform)
                  throw new Error("Call document.initForm() method before adding form elements to document");
                let f = Object.assign({}, I);
                return s !== null && (f = this._resolveType(s, I)), f = this._resolveFlags(f), f = this._resolveJustify(f), f = this._resolveFont(f), f = this._resolveStrings(f), f = this._resolveColors(f), f = this._resolveFormat(f), f.T = new String(g), f.parent && (f.Parent = f.parent, delete f.parent), f;
              },
              _resolveType(g, s) {
                if (g === "text")
                  s.FT = "Tx";
                else if (g === "pushButton")
                  s.FT = "Btn", s.pushButton = !0;
                else if (g === "radioButton")
                  s.FT = "Btn", s.radioButton = !0;
                else if (g === "checkbox")
                  s.FT = "Btn";
                else if (g === "combo")
                  s.FT = "Ch", s.combo = !0;
                else if (g === "list")
                  s.FT = "Ch";
                else
                  throw new Error(`Invalid form annotation type '${g}'`);
                return s;
              },
              _resolveFormat(g) {
                const s = g.format;
                if (s && s.type) {
                  let I, f, S = "";
                  if (tr[s.type] !== void 0)
                    I = "AFSpecial_Keystroke", f = "AFSpecial_Format", S = tr[s.type];
                  else {
                    let iA = s.type.charAt(0).toUpperCase() + s.type.slice(1);
                    if (I = `AF${iA}_Keystroke`, f = `AF${iA}_Format`, s.type === "date")
                      I += "Ex", S = String(s.param);
                    else if (s.type === "time")
                      S = String(s.param);
                    else if (s.type === "number") {
                      let YA = Object.assign({}, ir.number, s);
                      S = String([String(YA.nDec), YA.sepComma ? "0" : "1", '"' + YA.negStyle + '"', "null", '"' + YA.currency + '"', String(YA.currencyPrepend)].join(","));
                    } else if (s.type === "percent") {
                      let YA = Object.assign({}, ir.percent, s);
                      S = String([String(YA.nDec), YA.sepComma ? "0" : "1"].join(","));
                    }
                  }
                  g.AA = g.AA ? g.AA : {}, g.AA.K = {
                    S: "JavaScript",
                    JS: new String(`${I}(${S});`)
                  }, g.AA.F = {
                    S: "JavaScript",
                    JS: new String(`${f}(${S});`)
                  };
                }
                return delete g.format, g;
              },
              _resolveColors(g) {
                let s = this._normalizeColor(g.backgroundColor);
                return s && (g.MK || (g.MK = {}), g.MK.BG = s), s = this._normalizeColor(g.borderColor), s && (g.MK || (g.MK = {}), g.MK.BC = s), delete g.backgroundColor, delete g.borderColor, g;
              },
              _resolveFlags(g) {
                let s = 0;
                return Object.keys(g).forEach((I) => {
                  Ar[I] && (g[I] && (s |= Ar[I]), delete g[I]);
                }), s !== 0 && (g.Ff = g.Ff ? g.Ff : 0, g.Ff |= s), g;
              },
              _resolveJustify(g) {
                let s = 0;
                return g.align !== void 0 && (typeof er[g.align] == "number" && (s = er[g.align]), delete g.align), s !== 0 && (g.Q = s), g;
              },
              _resolveFont(g) {
                if (this._acroform.fonts[this._font.id] == null && (this._acroform.fonts[this._font.id] = this._font.ref()), this._acroform.defaultFont !== this._font.name) {
                  g.DR = {
                    Font: {}
                  };
                  const s = g.fontSize || 0;
                  g.DR.Font[this._font.id] = this._font.ref(), g.DA = new String(`/${this._font.id} ${s} Tf 0 g`);
                }
                return g;
              },
              _resolveStrings(g) {
                let s = [];
                function I(f) {
                  if (Array.isArray(f))
                    for (let S = 0; S < f.length; S++)
                      typeof f[S] == "string" ? s.push(new String(f[S])) : s.push(f[S]);
                }
                return I(g.Opt), g.select && (I(g.select), delete g.select), s.length && (g.Opt = s), Object.keys(on).forEach((f) => {
                  g[f] !== void 0 && (g[on[f]] = g[f], delete g[f]);
                }), ["V", "DV"].forEach((f) => {
                  typeof g[f] == "string" && (g[f] = new String(g[f]));
                }), g.MK && g.MK.CA && (g.MK.CA = new String(g.MK.CA)), g.label && (g.MK = g.MK ? g.MK : {}, g.MK.CA = new String(g.label), delete g.label), g;
              }
            }, vr = {
              file(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                s.name = s.name || g, s.relationship = s.relationship || "Unspecified";
                const I = {
                  Type: "EmbeddedFile",
                  Params: {}
                };
                let f;
                if (!g)
                  throw new Error("No src specified");
                if (a.isBuffer(g))
                  f = g;
                else if (g instanceof ArrayBuffer)
                  f = a.from(new Uint8Array(g));
                else {
                  const pe = /^data:(.*?);base64,(.*)$/.exec(g);
                  if (pe)
                    pe[1] && (I.Subtype = pe[1].replace("/", "#2F")), f = a.from(pe[2], "base64");
                  else {
                    if (f = eA.readFileSync(g), !f)
                      throw new Error(`Could not read contents of file at filepath ${g}`);
                    const {
                      birthtime: xe,
                      ctime: Qe
                    } = eA.statSync(g);
                    I.Params.CreationDate = xe, I.Params.ModDate = Qe;
                  }
                }
                s.creationDate instanceof Date && (I.Params.CreationDate = s.creationDate), s.modifiedDate instanceof Date && (I.Params.ModDate = s.modifiedDate), s.type && (I.Subtype = s.type.replace("/", "#2F"));
                const S = o(new Uint8Array(f));
                I.Params.CheckSum = new String(S), I.Params.Size = f.byteLength;
                let iA;
                this._fileRegistry || (this._fileRegistry = {});
                let YA = this._fileRegistry[s.name];
                YA && br(I, YA) ? iA = YA.ref : (iA = this.ref(I), iA.end(f), this._fileRegistry[s.name] = {
                  ...I,
                  ref: iA
                });
                const ZA = {
                  Type: "Filespec",
                  AFRelationship: s.relationship,
                  F: new String(s.name),
                  EF: {
                    F: iA
                  },
                  UF: new String(s.name)
                };
                s.description && (ZA.Desc = new String(s.description));
                const oe = this.ref(ZA);
                return oe.end(), s.hidden || this.addNamedEmbeddedFile(s.name, oe), this._root.data.AF ? this._root.data.AF.push(oe) : this._root.data.AF = [oe], oe;
              }
            };
            function br(g, s) {
              return g.Subtype === s.Subtype && g.Params.CheckSum.toString() === s.Params.CheckSum.toString() && g.Params.Size === s.Params.Size && g.Params.CreationDate.getTime() === s.Params.CreationDate.getTime() && (g.Params.ModDate === void 0 && s.Params.ModDate === void 0 || g.Params.ModDate.getTime() === s.Params.ModDate.getTime());
            }
            var zr = {
              initPDFA(g) {
                g.charAt(g.length - 3) === "-" ? (this.subset_conformance = g.charAt(g.length - 1).toUpperCase(), this.subset = parseInt(g.charAt(g.length - 2))) : (this.subset_conformance = "B", this.subset = parseInt(g.charAt(g.length - 1)));
              },
              endSubset() {
                this._addPdfaMetadata(), this._addColorOutputIntent();
              },
              _addColorOutputIntent() {
                const g = a("AAAL0AAAAAACAAAAbW50clJHQiBYWVogB98AAgAPAAAAAAAAYWNzcAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAPbWAAEAAAAA0y0AAAAAPQ6y3q6Tl76bZybOjApDzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQZGVzYwAAAUQAAABjYlhZWgAAAagAAAAUYlRSQwAAAbwAAAgMZ1RSQwAAAbwAAAgMclRSQwAAAbwAAAgMZG1kZAAACcgAAACIZ1hZWgAAClAAAAAUbHVtaQAACmQAAAAUbWVhcwAACngAAAAkYmtwdAAACpwAAAAUclhZWgAACrAAAAAUdGVjaAAACsQAAAAMdnVlZAAACtAAAACHd3RwdAAAC1gAAAAUY3BydAAAC2wAAAA3Y2hhZAAAC6QAAAAsZGVzYwAAAAAAAAAJc1JHQjIwMTQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAQAAAAABQAKAA8AFAAZAB4AIwAoAC0AMgA3ADsAQABFAEoATwBUAFkAXgBjAGgAbQByAHcAfACBAIYAiwCQAJUAmgCfAKQAqQCuALIAtwC8AMEAxgDLANAA1QDbAOAA5QDrAPAA9gD7AQEBBwENARMBGQEfASUBKwEyATgBPgFFAUwBUgFZAWABZwFuAXUBfAGDAYsBkgGaAaEBqQGxAbkBwQHJAdEB2QHhAekB8gH6AgMCDAIUAh0CJgIvAjgCQQJLAlQCXQJnAnECegKEAo4CmAKiAqwCtgLBAssC1QLgAusC9QMAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+AD7AP5BAYEEwQgBC0EOwRIBFUEYwRxBH4EjASaBKgEtgTEBNME4QTwBP4FDQUcBSsFOgVJBVgFZwV3BYYFlgWmBbUFxQXVBeUF9gYGBhYGJwY3BkgGWQZqBnsGjAadBq8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+woRCicKPQpUCmoKgQqYCq4KxQrcCvMLCwsiCzkLUQtpC4ALmAuwC8gL4Qv5DBIMKgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+zD88P7BAJECYQQxBhEH4QmxC5ENcQ9RETETERTxFtEYwRqhHJEegSBxImEkUSZBKEEqMSwxLjEwMTIxNDE2MTgxOkE8UT5RQGFCcUSRRqFIsUrRTOFPAVEhU0FVYVeBWbFb0V4BYDFiYWSRZsFo8WshbWFvoXHRdBF2UXiReuF9IX9xgbGEAYZRiKGK8Y1Rj6GSAZRRlrGZEZtxndGgQaKhpRGncanhrFGuwbFBs7G2MbihuyG9ocAhwqHFIcexyjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/KHEooijUKQYpOClrKZ0p0CoCKjUqaCqbKs8rAis2K2krnSvRLAUsOSxuLKIs1y0MLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/TY3NnI2rjbpNyQ3YDecN9c4FDhQOIw4yDkFOUI5fzm8Ofk6Njp0OrI67zstO2s7qjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+JAI0BkQKZA50EpQWpBrEHuQjBCckK1QvdDOkN9Q8BEA0RHRIpEzkUSRVVFmkXeRiJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/dUCdQcVC7UQZRUFGbUeZSMVJ8UsdTE1NfU6pT9lRCVI9U21UoVXVVwlYPVlxWqVb3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/2xXbK9tCG1gbbluEm5rbsRvHm94b9FwK3CGcOBxOnGVcfByS3KmcwFzXXO4dBR0cHTMdSh1hXXhdj52m3b4d1Z3s3gReG54zHkqeYl553pGeqV7BHtje8J8IXyBfOF9QX2hfgF+Yn7CfyN/hH/lgEeAqIEKgWuBzYIwgpKC9INXg7qEHYSAhOOFR4Wrhg6GcobXhzuHn4gEiGmIzokziZmJ/opkisqLMIuWi/yMY4zKjTGNmI3/jmaOzo82j56QBpBukNaRP5GokhGSepLjk02TtpQglIqU9JVflcmWNJaflwqXdZfgmEyYuJkkmZCZ/JpomtWbQpuvnByciZz3nWSd0p5Anq6fHZ+Ln/qgaaDYoUehtqImopajBqN2o+akVqTHpTilqaYapoum/adup+CoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFq+LsACwdbDqsWCx1rJLssKzOLOutCW0nLUTtYq2AbZ5tvC3aLfguFm40blKucK6O7q1uy67p7whvJu9Fb2Pvgq+hL7/v3q/9cBwwOzBZ8Hjwl/C28NYw9TEUcTOxUvFyMZGxsPHQce/yD3IvMk6ybnKOMq3yzbLtsw1zLXNNc21zjbOts83z7jQOdC60TzRvtI/0sHTRNPG1EnUy9VO1dHWVdbY11zX4Nhk2OjZbNnx2nba+9uA3AXcit0Q3ZbeHN6i3ynfr+A24L3hROHM4lPi2+Nj4+vkc+T85YTmDeaW5x/nqegy6LzpRunQ6lvq5etw6/vshu0R7ZzuKO6070DvzPBY8OXxcvH/8ozzGfOn9DT0wvVQ9d72bfb794r4Gfio+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t//9kZXNjAAAAAAAAAC5JRUMgNjE5NjYtMi0xIERlZmF1bHQgUkdCIENvbG91ciBTcGFjZSAtIHNSR0IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAAAAAUAAAAAAAAG1lYXMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlhZWiAAAAAAAAAAngAAAKQAAACHWFlaIAAAAAAAAG+iAAA49QAAA5BzaWcgAAAAAENSVCBkZXNjAAAAAAAAAC1SZWZlcmVuY2UgVmlld2luZyBDb25kaXRpb24gaW4gSUVDIDYxOTY2LTItMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWFlaIAAAAAAAAPbWAAEAAAAA0y10ZXh0AAAAAENvcHlyaWdodCBJbnRlcm5hdGlvbmFsIENvbG9yIENvbnNvcnRpdW0sIDIwMTUAAHNmMzIAAAAAAAEMRAAABd////MmAAAHlAAA/Y////uh///9ogAAA9sAAMB1", "base64"), s = this.ref({
                  Length: g.length,
                  N: 3
                });
                s.write(g), s.end();
                const I = this.ref({
                  Type: "OutputIntent",
                  S: "GTS_PDFA1",
                  Info: new String("sRGB IEC61966-2.1"),
                  OutputConditionIdentifier: new String("sRGB IEC61966-2.1"),
                  DestOutputProfile: s
                });
                I.end(), this._root.data.OutputIntents = [I];
              },
              _getPdfaid() {
                return `
        <rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about="">
            <pdfaid:part>${this.subset}</pdfaid:part>
            <pdfaid:conformance>${this.subset_conformance}</pdfaid:conformance>
        </rdf:Description>
        `;
              },
              _addPdfaMetadata() {
                this.appendXML(this._getPdfaid());
              }
            }, Tr = {
              initPDFUA() {
                this.subset = 1;
              },
              endSubset() {
                this._addPdfuaMetadata();
              },
              _addPdfuaMetadata() {
                this.appendXML(this._getPdfuaid());
              },
              _getPdfuaid() {
                return `
        <rdf:Description xmlns:pdfuaid="http://www.aiim.org/pdfua/ns/id/" rdf:about="">
            <pdfuaid:part>${this.subset}</pdfuaid:part>
        </rdf:Description>
        `;
              }
            }, Ur = {
              _importSubset(g) {
                Object.assign(this, g);
              },
              initSubset(g) {
                switch (g.subset) {
                  case "PDF/A-1":
                  case "PDF/A-1a":
                  case "PDF/A-1b":
                  case "PDF/A-2":
                  case "PDF/A-2a":
                  case "PDF/A-2b":
                  case "PDF/A-3":
                  case "PDF/A-3a":
                  case "PDF/A-3b":
                    this._importSubset(zr), this.initPDFA(g.subset);
                    break;
                  case "PDF/UA":
                    this._importSubset(Tr), this.initPDFUA();
                    break;
                }
              }
            };
            const rr = ["height", "minHeight", "maxHeight"], Nr = ["width", "minWidth", "maxWidth"];
            function sr(g, s) {
              const I = /* @__PURE__ */ new Map();
              return function() {
                const f = arguments.length <= 0 ? void 0 : arguments[0];
                return I.has(f) || (I.set(f, g(...arguments)), I.size > s && I.delete(I.keys().next())), I.get(f);
              };
            }
            function bn(g) {
              return g && typeof g == "object" && !Array.isArray(g);
            }
            function Dn(g) {
              if (!bn(g)) return g;
              g = kn(g);
              for (var s = arguments.length, I = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
                I[f - 1] = arguments[f];
              for (const S of I)
                if (bn(S))
                  for (const iA in S)
                    bn(S[iA]) ? (iA in g || (g[iA] = {}), g[iA] = Dn(g[iA], S[iA])) : S[iA] !== void 0 && (g[iA] = kn(S[iA]));
              return g;
            }
            function kn(g) {
              let s = g;
              if (g && typeof g == "object") {
                s = Array.isArray(g) ? [] : {};
                for (const I in g) s[I] = kn(g[I]);
              }
              return s;
            }
            function Rr(g) {
              let s = g;
              typeof s != "object" && (s = {
                text: s
              });
              const I = Object.fromEntries(Object.entries(s).filter((S) => {
                let [iA] = S;
                return rr.includes(iA);
              })), f = Object.fromEntries(Object.entries(s).filter((S) => {
                let [iA] = S;
                return Nr.includes(iA);
              }));
              return s.padding = Ae(s.padding), s.border = Ae(s.border), s.borderColor = Ae(s.borderColor), s.align = Vi(s.align), {
                defaultStyle: s,
                defaultRowStyle: I,
                defaultColStyle: f
              };
            }
            function ar(g, s, I) {
              let f = s(I);
              (f == null || typeof f != "object") && (f = {
                height: f
              }), f.padding = Ae(f.padding), f.border = Ae(f.border), f.borderColor = Ae(f.borderColor), f.align = Vi(f.align), f = Dn(g, f);
              const S = this.document, iA = S.page, YA = iA.contentHeight;
              return f.height == null || f.height === "auto" ? f.height = "auto" : f.height = S.sizeToPoint(f.height, 0, iA, YA), f.minHeight = S.sizeToPoint(f.minHeight, 0, iA, YA), f.maxHeight = S.sizeToPoint(f.maxHeight, 0, iA, YA), f;
            }
            function Sr(g, s, I) {
              let f = s(I);
              return (f == null || typeof f != "object") && (f = {
                width: f
              }), f.padding = Ae(f.padding), f.border = Ae(f.border), f.borderColor = Ae(f.borderColor), f.align = Vi(f.align), f = Dn(g, f), f.width == null || f.width === "*" ? f.width = "*" : f.width = this.document.sizeToPoint(f.width, 0, this.document.page, this._maxWidth), f.minWidth = this.document.sizeToPoint(f.minWidth, 0, this.document.page, this._maxWidth), f.maxWidth = this.document.sizeToPoint(f.maxWidth, 0, this.document.page, this._maxWidth), f;
            }
            function Vi(g) {
              return g == null || typeof g == "string" ? {
                x: g,
                y: g
              } : g;
            }
            function Gr() {
              const g = this.document, s = this.opts;
              let I = g._tableIndex++;
              this._id = new String(s.id ?? `table-${I}`), this._position = {
                x: g.sizeToPoint(s.position?.x, g.x),
                y: g.sizeToPoint(s.position?.y, g.y)
              }, this._maxWidth = g.sizeToPoint(s.maxWidth, g.page.width - g.page.margins.right - this._position.x);
              const {
                defaultStyle: f,
                defaultColStyle: S,
                defaultRowStyle: iA
              } = Rr(s.defaultStyle);
              this._defaultStyle = f;
              let YA;
              s.columnStyles && (Array.isArray(s.columnStyles) ? YA = (oe) => s.columnStyles[oe] : typeof s.columnStyles == "function" ? YA = sr((oe) => s.columnStyles(oe), 1 / 0) : typeof s.columnStyles == "object" && (YA = () => s.columnStyles)), YA || (YA = () => ({})), this._colStyle = Sr.bind(this, S, YA);
              let ZA;
              s.rowStyles && (Array.isArray(s.rowStyles) ? ZA = (oe) => s.rowStyles[oe] : typeof s.rowStyles == "function" ? ZA = sr((oe) => s.rowStyles(oe), 10) : typeof s.rowStyles == "object" && (ZA = () => s.rowStyles)), ZA || (ZA = () => ({})), this._rowStyle = ar.bind(this, iA, ZA);
            }
            function Bn(g) {
              return g != null && (g = `${g}`), g;
            }
            function Hr(g, s, I) {
              const f = this._colStyle(I);
              let S = this._rowStyle(s);
              const iA = Dn({}, f.font, S.font, g.font), YA = Object.values(iA).filter((ke) => ke != null).length > 0, ZA = this.document, oe = ZA._fontSource, pe = ZA._fontSize, xe = ZA._fontFamily;
              YA && (iA.src && ZA.font(iA.src, iA.family), iA.size && ZA.fontSize(iA.size), S = this._rowStyle(s)), g.padding = Ae(g.padding), g.border = Ae(g.border), g.borderColor = Ae(g.borderColor);
              const Qe = Dn(this._defaultStyle, f, S, g);
              return Qe.rowIndex = s, Qe.colIndex = I, Qe.font = iA ?? {}, Qe.customFont = YA, Qe.text = Bn(Qe.text), Qe.rowSpan = Qe.rowSpan ?? 1, Qe.colSpan = Qe.colSpan ?? 1, Qe.padding = Ae(Qe.padding, "0.25em", (ke) => ZA.sizeToPoint(ke, "0.25em")), Qe.border = Ae(Qe.border, 1, (ke) => ZA.sizeToPoint(ke, 1)), Qe.borderColor = Ae(Qe.borderColor, "black", (ke) => ke ?? "black"), Qe.align = Vi(Qe.align), Qe.align.x = Qe.align.x ?? "left", Qe.align.y = Qe.align.y ?? "top", Qe.textStroke = ZA.sizeToPoint(Qe.textStroke, 0), Qe.textStrokeColor = Qe.textStrokeColor ?? "black", Qe.textColor = Qe.textColor ?? "black", Qe.textOptions = Qe.textOptions ?? {}, Qe.id = new String(Qe.id ?? `${this._id}-${s}-${I}`), Qe.type = Qe.type?.toUpperCase() === "TH" ? "TH" : "TD", Qe.scope && (Qe.scope = Qe.scope.toLowerCase(), Qe.scope === "row" ? Qe.scope = "Row" : Qe.scope === "both" ? Qe.scope = "Both" : Qe.scope === "column" && (Qe.scope = "Column")), typeof this.opts.debug == "boolean" && (Qe.debug = this.opts.debug), YA && ZA.font(oe, xe, pe), Qe;
            }
            function Lr(g, s) {
              this._cellClaim || (this._cellClaim = /* @__PURE__ */ new Set());
              let I = 0;
              return g.map((f) => {
                for ((f == null || typeof f != "object") && (f = {
                  text: f
                }); this._cellClaim.has(`${s},${I}`); )
                  I++;
                f = Hr.call(this, f, s, I);
                for (let S = 0; S < f.rowSpan; S++)
                  for (let iA = 0; iA < f.colSpan; iA++)
                    this._cellClaim.add(`${s + S},${I + iA}`);
                return I += f.colSpan, f;
              });
            }
            function kr(g) {
              this._columnWidths = [], dn.call(this, g.reduce((s, I) => s + I.colSpan, 0)), this._rowHeights = [], this._rowYPos = [this._position.y], this._rowBuffer = /* @__PURE__ */ new Set();
            }
            function dn(g) {
              let s = [], I = 0, f = this._maxWidth;
              for (let YA = 0; YA < g; YA++) {
                let ZA = this._colStyle(YA);
                ZA.width === "*" ? (s[YA] = ZA, I += ZA.minWidth) : (f -= ZA.width, this._columnWidths[YA] = ZA.width);
              }
              let S = s.reduce((YA) => YA + 1, 0);
              I >= f ? s.forEach((YA, ZA) => {
                this._columnWidths[ZA] = YA.minWidth;
              }) : S > 0 && s.forEach((YA, ZA) => {
                let oe = f / S;
                this._columnWidths[ZA] = Math.max(oe, YA.minWidth), YA.maxWidth > 0 && (this._columnWidths[ZA] = Math.min(this._columnWidths[ZA], YA.maxWidth)), f -= this._columnWidths[ZA], S--;
              });
              let iA = this._position.x;
              this._columnXPos = Array.from(this._columnWidths, (YA) => {
                const ZA = iA;
                return iA += YA, ZA;
              });
            }
            function jr(g, s) {
              g.forEach((YA) => this._rowBuffer.add(YA)), s > 0 && (this._rowYPos[s] = this._rowYPos[s - 1] + this._rowHeights[s - 1]);
              const I = this._rowStyle(s);
              let f = [];
              this._rowBuffer.forEach((YA) => {
                YA.rowIndex + YA.rowSpan - 1 === s && (f.push(or.call(this, YA, I.height)), this._rowBuffer.delete(YA));
              });
              let S = I.height;
              S === "auto" && (S = f.reduce((YA, ZA) => {
                let oe = ZA.textBounds.height + ZA.padding.top + ZA.padding.bottom;
                for (let pe = 0; pe < ZA.rowSpan - 1; pe++)
                  oe -= this._rowHeights[ZA.rowIndex + pe];
                return Math.max(YA, oe);
              }, 0)), S = Math.max(S, I.minHeight), I.maxHeight > 0 && (S = Math.min(S, I.maxHeight)), this._rowHeights[s] = S;
              let iA = !1;
              return S > this.document.page.contentHeight ? (console.warn(new Error(`Row ${s} requested more than the safe page height, row has been clamped`).stack.slice(7)), this._rowHeights[s] = this.document.page.maxY() - this._rowYPos[s]) : this._rowYPos[s] + S >= this.document.page.maxY() && (this._rowYPos[s] = this.document.page.margins.top, iA = !0), {
                newPage: iA,
                toRender: f.map((YA) => or.call(this, YA, S))
              };
            }
            function or(g, s) {
              let I = 0;
              for (let Qe = 0; Qe < g.colSpan; Qe++)
                I += this._columnWidths[g.colIndex + Qe];
              let f = s;
              if (f === "auto")
                f = this.document.page.contentHeight;
              else
                for (let Qe = 0; Qe < g.rowSpan - 1; Qe++)
                  f += this._rowHeights[g.rowIndex + Qe];
              const S = I - g.padding.left - g.padding.right, iA = f - g.padding.top - g.padding.bottom, YA = g.textOptions.rotation ?? 0, {
                width: ZA,
                height: oe
              } = jn(YA, S, iA), pe = {
                align: g.align.x,
                ellipsis: !0,
                stroke: g.textStroke > 0,
                fill: !0,
                width: ZA,
                height: oe,
                rotation: YA,
                ...g.textOptions
              };
              let xe = {
                x: 0,
                y: 0,
                width: 0,
                height: 0
              };
              if (g.text) {
                const Qe = this.document._fontSource, ke = this.document._fontSize, lt = this.document._fontFamily;
                g.font?.src && this.document.font(g.font.src, g.font?.family), g.font?.size && this.document.fontSize(g.font.size);
                const Xe = this.document.boundsOfString(g.text, 0, 0, {
                  ...pe,
                  rotation: 0
                });
                pe.width = Xe.width, pe.height = Xe.height, xe = this.document.boundsOfString(g.text, 0, 0, pe), this.document.font(Qe, lt, ke);
              }
              return {
                ...g,
                textOptions: pe,
                x: this._columnXPos[g.colIndex],
                y: this._rowYPos[g.rowIndex],
                textX: this._columnXPos[g.colIndex] + g.padding.left,
                textY: this._rowYPos[g.rowIndex] + g.padding.top,
                width: I,
                height: f,
                textAllocatedHeight: iA,
                textAllocatedWidth: S,
                textBounds: xe
              };
            }
            function jn(g, s, I) {
              let f, S;
              const iA = xA(g), YA = LA(g);
              g === 0 || g === 180 ? (f = s, S = I) : g === 90 || g === 270 ? (f = I, S = s) : g < 90 || g > 180 && g < 270 ? (f = s / (2 * iA), S = s / (2 * YA)) : (S = s / (2 * iA), f = s / (2 * YA));
              const ZA = YA * f, oe = iA * S;
              if (ZA + oe > I) {
                const pe = iA * iA - YA * YA;
                g === 0 || g === 180 ? (f = s, S = I) : g === 90 || g === 270 ? (f = I, S = s) : g < 90 || g > 180 && g < 270 ? (f = (s * iA - I * YA) / pe, S = (I * iA - s * YA) / pe) : (S = (s * iA - I * YA) / pe, f = (I * iA - s * YA) / pe);
              }
              return {
                width: Math.abs(f),
                height: Math.abs(S)
              };
            }
            function Or() {
              const g = this.opts.structParent;
              g && (this._tableStruct = this.document.struct("Table"), this._tableStruct.dictionary.data.ID = this._id, g instanceof hi ? g.add(this._tableStruct) : g instanceof ye && g.addStructure(this._tableStruct), this._headerRowLookup = {}, this._headerColumnLookup = {});
            }
            function NA() {
              this._tableStruct && this._tableStruct.end();
            }
            function t(g, s, I) {
              const f = this.document.struct("TR");
              f.dictionary.data.ID = new String(`${this._id}-${s}`), this._tableStruct.add(f), g.forEach((S) => I(S, f)), f.end();
            }
            function C(g, s, I) {
              const f = this.document, S = f.struct(g.type, {
                title: g.title
              });
              S.dictionary.data.ID = g.id, s.add(S);
              const iA = g.padding, YA = g.border, ZA = {
                O: "Table",
                Width: g.width,
                Height: g.height,
                Padding: [iA.top, iA.bottom, iA.left, iA.right],
                RowSpan: g.rowSpan > 1 ? g.rowSpan : void 0,
                ColSpan: g.colSpan > 1 ? g.colSpan : void 0,
                BorderThickness: [YA.top, YA.bottom, YA.left, YA.right]
              };
              if (g.type === "TH") {
                if (g.scope === "Row" || g.scope === "Both") {
                  for (let Qe = 0; Qe < g.rowSpan; Qe++)
                    this._headerRowLookup[g.rowIndex + Qe] || (this._headerRowLookup[g.rowIndex + Qe] = []), this._headerRowLookup[g.rowIndex + Qe].push(g.id);
                  ZA.Scope = g.scope;
                }
                if (g.scope === "Column" || g.scope === "Both") {
                  for (let Qe = 0; Qe < g.colSpan; Qe++)
                    this._headerColumnLookup[g.colIndex + Qe] || (this._headerColumnLookup[g.colIndex + Qe] = []), this._headerColumnLookup[g.colIndex + Qe].push(g.id);
                  ZA.Scope = g.scope;
                }
              }
              const oe = new Set([...Array.from({
                length: g.colSpan
              }, (Qe, ke) => this._headerColumnLookup[g.colIndex + ke]).flat(), ...Array.from({
                length: g.rowSpan
              }, (Qe, ke) => this._headerRowLookup[g.rowIndex + ke]).flat()].filter(Boolean));
              oe.size && (ZA.Headers = Array.from(oe));
              const pe = f._normalizeColor;
              g.backgroundColor != null && (ZA.BackgroundColor = pe(g.backgroundColor));
              const xe = [YA.top, YA.bottom, YA.left, YA.right];
              if (xe.some((Qe) => Qe)) {
                const Qe = g.borderColor;
                ZA.BorderColor = [xe[0] ? pe(Qe.top) : null, xe[1] ? pe(Qe.bottom) : null, xe[2] ? pe(Qe.left) : null, xe[3] ? pe(Qe.right) : null];
              }
              Object.keys(ZA).forEach((Qe) => ZA[Qe] === void 0 && delete ZA[Qe]), S.dictionary.data.A = f.ref(ZA), S.add(I), S.end(), S.dictionary.data.A.end();
            }
            function b(g, s) {
              return this._tableStruct ? t.call(this, g, s, nA.bind(this)) : g.forEach((I) => nA.call(this, I)), this._rowYPos[s] + this._rowHeights[s];
            }
            function nA(g, s) {
              const I = () => {
                g.backgroundColor != null && this.document.save().fillColor(g.backgroundColor).rect(g.x, g.y, g.width, g.height).fill().restore(), hA.call(this, g.border, g.borderColor, g.x, g.y, g.width, g.height), g.debug && (this.document.save(), this.document.dash(1, {
                  space: 1
                }).lineWidth(1).strokeOpacity(0.3), this.document.rect(g.x, g.y, g.width, g.height).stroke("green"), this.document.restore()), g.text && gA.call(this, g);
              };
              s ? C.call(this, g, s, I) : I();
            }
            function gA(g) {
              const s = this.document, I = s._fontSource, f = s._fontSize, S = s._fontFamily;
              g.customFont && (g.font.src && s.font(g.font.src, g.font.family), g.font.size && s.fontSize(g.font.size));
              const iA = g.textX, YA = g.textY, ZA = g.textAllocatedHeight, oe = g.textAllocatedWidth, pe = g.textBounds.width, xe = g.textBounds.height, Qe = -g.textBounds.x, ke = -g.textBounds.y, lt = g.align.x === "right" ? 1 : g.align.x === "center" ? 0.5 : 0, Xe = (oe - pe) * lt, et = g.align.y === "bottom" ? 1 : g.align.y === "center" ? 0.5 : 0, Oe = (ZA - xe) * et, rt = Xe + Qe, $e = Oe + ke;
              g.debug && (s.save(), s.dash(1, {
                space: 1
              }).lineWidth(1).strokeOpacity(0.3), g.text && s.moveTo(iA + Xe, YA).lineTo(iA + Xe, YA + ZA).moveTo(iA + Xe + pe, YA).lineTo(iA + Xe + pe, YA + ZA).stroke("blue").moveTo(iA, YA + Oe).lineTo(iA + oe, YA + Oe).moveTo(iA, YA + Oe + xe).lineTo(iA + oe, YA + Oe + xe).stroke("green"), s.rect(iA, YA, oe, ZA).stroke("orange"), s.restore()), s.save().rect(iA, YA, oe, ZA).clip(), s.fillColor(g.textColor).strokeColor(g.textStrokeColor), g.textStroke > 0 && s.lineWidth(g.textStroke), s.text(g.text, iA + rt, YA + $e, g.textOptions), s.restore(), g.font && s.font(I, S, f);
            }
            function hA(g, s, I, f, S, iA, YA) {
              g = Object.fromEntries(Object.entries(g).map((oe) => {
                let [pe, xe] = oe;
                return [pe, YA && !YA[pe] ? 0 : xe];
              }));
              const ZA = this.document;
              [g.right, g.bottom, g.left].every((oe) => oe === g.top) ? g.top > 0 && ZA.save().lineWidth(g.top).strokeColor(s.top).rect(I, f, S, iA).stroke().restore() : (g.top > 0 && ZA.save().lineWidth(g.top).moveTo(I, f).strokeColor(s.top).lineTo(I + S, f).stroke().restore(), g.right > 0 && ZA.save().lineWidth(g.right).moveTo(I + S, f).strokeColor(s.right).lineTo(I + S, f + iA).stroke().restore(), g.bottom > 0 && ZA.save().lineWidth(g.bottom).moveTo(I + S, f + iA).strokeColor(s.bottom).lineTo(I, f + iA).stroke().restore(), g.left > 0 && ZA.save().lineWidth(g.left).moveTo(I, f + iA).strokeColor(s.left).lineTo(I, f).stroke().restore());
            }
            class HA {
              constructor(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                if (this.document = s, this.opts = Object.freeze(I), Gr.call(this), Or.call(this), this._currRowIndex = 0, this._ended = !1, I.data) {
                  for (const f of I.data) this.row(f);
                  return this.end();
                }
              }
              row(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
                if (this._ended)
                  throw new Error(`Table was marked as ended on row ${this._currRowIndex}`);
                s = Array.from(s), s = Lr.call(this, s, this._currRowIndex), this._currRowIndex === 0 && kr.call(this, s);
                const {
                  newPage: f,
                  toRender: S
                } = jr.call(this, s, this._currRowIndex);
                f && this.document.continueOnNewPage();
                const iA = b.call(this, S, this._currRowIndex);
                return this.document.x = this._position.x, this.document.y = iA, I ? this.end() : (this._currRowIndex++, this);
              }
              end() {
                for (; this._rowBuffer?.size; ) this.row([]);
                return this._ended = !0, NA.call(this), this.document;
              }
            }
            var GA = {
              initTables() {
                this._tableIndex = 0;
              },
              table(g) {
                return new HA(this, g);
              }
            };
            class fe {
              constructor() {
                this._metadata = `
        <?xpacket begin="\uFEFF" id="W5M0MpCehiHzreSzNTczkc9d"?>
            <x:xmpmeta xmlns:x="adobe:ns:meta/">
                <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
        `;
              }
              _closeTags() {
                this._metadata = this._metadata.concat(`
                </rdf:RDF>
            </x:xmpmeta>
        <?xpacket end="w"?>
        `);
              }
              append(s) {
                let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
                this._metadata = this._metadata.concat(s), I && (this._metadata = this._metadata.concat(`
`));
              }
              getXML() {
                return this._metadata;
              }
              getLength() {
                return this._metadata.length;
              }
              end() {
                this._closeTags(), this._metadata = this._metadata.trim();
              }
            }
            var we = {
              initMetadata() {
                this.metadata = new fe();
              },
              appendXML(g) {
                let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
                this.metadata.append(g, s);
              },
              _addInfo() {
                this.appendXML(`
        <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
            <xmp:CreateDate>${this.info.CreationDate.toISOString().split(".")[0] + "Z"}</xmp:CreateDate>
            <xmp:CreatorTool>${this.info.Creator}</xmp:CreatorTool>
        </rdf:Description>
        `), (this.info.Title || this.info.Author || this.info.Subject) && (this.appendXML(`
            <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
            `), this.info.Title && this.appendXML(`
                <dc:title>
                    <rdf:Alt>
                        <rdf:li xml:lang="x-default">${this.info.Title}</rdf:li>
                    </rdf:Alt>
                </dc:title>
                `), this.info.Author && this.appendXML(`
                <dc:creator>
                    <rdf:Seq>
                        <rdf:li>${this.info.Author}</rdf:li>
                    </rdf:Seq>
                </dc:creator>
                `), this.info.Subject && this.appendXML(`
                <dc:description>
                    <rdf:Alt>
                        <rdf:li xml:lang="x-default">${this.info.Subject}</rdf:li>
                    </rdf:Alt>
                </dc:description>
                `), this.appendXML(`
            </rdf:Description>
            `)), this.appendXML(`
        <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
            <pdf:Producer>${this.info.Creator}</pdf:Producer>`, !1), this.info.Keywords && this.appendXML(`
            <pdf:Keywords>${this.info.Keywords}</pdf:Keywords>`, !1), this.appendXML(`
        </rdf:Description>
        `);
              },
              endMetadata() {
                this._addInfo(), this.metadata.end(), this.version != 1.3 && (this.metadataRef = this.ref({
                  length: this.metadata.getLength(),
                  Type: "Metadata",
                  Subtype: "XML"
                }), this.metadataRef.compress = !1, this.metadataRef.write(a.from(this.metadata.getXML(), "utf-8")), this.metadataRef.end(), this._root.data.Metadata = this.metadataRef);
              }
            };
            class ye extends D.default.Readable {
              constructor() {
                let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
                switch (super(s), this.options = s, s.pdfVersion) {
                  case "1.4":
                    this.version = 1.4;
                    break;
                  case "1.5":
                    this.version = 1.5;
                    break;
                  case "1.6":
                    this.version = 1.6;
                    break;
                  case "1.7":
                  case "1.7ext3":
                    this.version = 1.7;
                    break;
                  default:
                    this.version = 1.3;
                    break;
                }
                this.compress = this.options.compress != null ? this.options.compress : !0, this._pageBuffer = [], this._pageBufferStart = 0, this._offsets = [], this._waiting = 0, this._ended = !1, this._offset = 0;
                const I = this.ref({
                  Type: "Pages",
                  Count: 0,
                  Kids: []
                }), f = this.ref({
                  Dests: new sA()
                });
                if (this._root = this.ref({
                  Type: "Catalog",
                  Pages: I,
                  Names: f
                }), this.options.lang && (this._root.data.Lang = new String(this.options.lang)), this.options.pageLayout) {
                  const S = this.options.pageLayout;
                  this._root.data.PageLayout = S.charAt(0).toUpperCase() + S.slice(1);
                }
                if (this.page = null, this.initMetadata(), this.initColor(), this.initVector(), this.initFonts(s.font), this.initText(), this.initImages(), this.initOutline(), this.initMarkings(s), this.initTables(), this.initSubset(s), this.info = {
                  Producer: "PDFKit",
                  Creator: "PDFKit",
                  CreationDate: /* @__PURE__ */ new Date()
                }, this.options.info)
                  for (let S in this.options.info) {
                    const iA = this.options.info[S];
                    this.info[S] = iA;
                  }
                this.options.displayTitle && (this._root.data.ViewerPreferences = this.ref({
                  DisplayDocTitle: !0
                })), this._id = pA.generateFileID(this.info), this._security = pA.create(this, s), this._write(`%PDF-${this.version}`), this._write("%ÿÿÿÿ"), this.options.autoFirstPage !== !1 && this.addPage();
              }
              addPage(s) {
                s == null && ({
                  options: s
                } = this), this.options.bufferPages || this.flushPages(), this.page = new fA(this, s), this._pageBuffer.push(this.page);
                const I = this._root.data.Pages.data;
                return I.Kids.push(this.page.dictionary), I.Count++, this.x = this.page.margins.left, this.y = this.page.margins.top, this._ctm = [1, 0, 0, 1, 0, 0], this.transform(1, 0, 0, -1, 0, this.page.height), this.emit("pageAdded"), this;
              }
              continueOnNewPage(s) {
                const I = this.endPageMarkings(this.page);
                return this.addPage(s ?? this.page._options), this.initPageMarkings(I), this;
              }
              bufferedPageRange() {
                return {
                  start: this._pageBufferStart,
                  count: this._pageBuffer.length
                };
              }
              switchToPage(s) {
                let I;
                if (!(I = this._pageBuffer[s - this._pageBufferStart]))
                  throw new Error(`switchToPage(${s}) out of bounds, current buffer covers pages ${this._pageBufferStart} to ${this._pageBufferStart + this._pageBuffer.length - 1}`);
                return this.page = I;
              }
              flushPages() {
                const s = this._pageBuffer;
                this._pageBuffer = [], this._pageBufferStart += s.length;
                for (let I of s)
                  this.endPageMarkings(I), I.end();
              }
              addNamedDestination(s) {
                for (var I = arguments.length, f = new Array(I > 1 ? I - 1 : 0), S = 1; S < I; S++)
                  f[S - 1] = arguments[S];
                f.length === 0 && (f = ["XYZ", null, null, null]), f[0] === "XYZ" && f[2] !== null && (f[2] = this.page.height - f[2]), f.unshift(this.page.dictionary), this._root.data.Names.data.Dests.add(s, f);
              }
              addNamedEmbeddedFile(s, I) {
                this._root.data.Names.data.EmbeddedFiles || (this._root.data.Names.data.EmbeddedFiles = new sA({
                  limits: !1
                })), this._root.data.Names.data.EmbeddedFiles.add(s, I);
              }
              addNamedJavaScript(s, I) {
                this._root.data.Names.data.JavaScript || (this._root.data.Names.data.JavaScript = new sA());
                let f = {
                  JS: new String(I),
                  S: "JavaScript"
                };
                this._root.data.Names.data.JavaScript.add(s, f);
              }
              ref(s) {
                const I = new RA(this, this._offsets.length + 1, s);
                return this._offsets.push(null), this._waiting++, I;
              }
              _read() {
              }
              _write(s) {
                a.isBuffer(s) || (s = a.from(s + `
`, "binary")), this.push(s), this._offset += s.length;
              }
              addContent(s) {
                return this.page.write(s), this;
              }
              _refEnd(s) {
                this._offsets[s.id - 1] = s.offset, --this._waiting === 0 && this._ended && (this._finalize(), this._ended = !1);
              }
              end() {
                this.flushPages(), this._info = this.ref();
                for (let s in this.info) {
                  let I = this.info[s];
                  typeof I == "string" && (I = new String(I));
                  let f = this.ref(I);
                  f.end(), this._info.data[s] = f;
                }
                this._info.end();
                for (let s in this._fontFamilies)
                  this._fontFamilies[s].finalize();
                this.endOutline(), this.endMarkings(), this.subset && this.endSubset(), this.endMetadata(), this._root.end(), this._root.data.Pages.end(), this._root.data.Names.end(), this.endAcroForm(), this._root.data.ViewerPreferences && this._root.data.ViewerPreferences.end(), this._security && this._security.end(), this._waiting === 0 ? this._finalize() : this._ended = !0;
              }
              _finalize() {
                const s = this._offset;
                this._write("xref"), this._write(`0 ${this._offsets.length + 1}`), this._write("0000000000 65535 f ");
                for (let f of this._offsets)
                  f = `0000000000${f}`.slice(-10), this._write(f + " 00000 n ");
                const I = {
                  Size: this._offsets.length + 1,
                  Root: this._root,
                  Info: this._info,
                  ID: [this._id, this._id]
                };
                this._security && (I.Encrypt = this._security.dictionary), this._write("trailer"), this._write(v.convert(I)), this._write("startxref"), this._write(`${s}`), this._write("%%EOF"), this.push(null);
              }
              toString() {
                return "[object PDFDocument]";
              }
            }
            B.A = ye;
            const De = (g) => {
              Object.assign(ye.prototype, g);
            };
            De(we), De(qt), De(Bt), De(oi), De(mi), De(Yi), De(Pn), De(vn), De(Pr), De(nr), De(vr), De(Ur), De(GA), ye.LineWrapper = St;
          },
          /***/
          6092(Q, B, r) {
            var A = r(2736), a = r(2022), D = a;
            typeof D.pdfMake > "u" && (D.pdfMake = A), Q.exports = A;
          },
          /***/
          656(Q, B, r) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.polyval = B.ghash = void 0, B._toGHASHKey = J;
            const A = r(5181), a = 16, D = /* @__PURE__ */ new Uint8Array(16), x = (0, A.u32)(D), N = 225, P = (T, H, eA, CA) => {
              const IA = CA & 1;
              return {
                s3: eA << 31 | CA >>> 1,
                s2: H << 31 | eA >>> 1,
                s1: T << 31 | H >>> 1,
                s0: T >>> 1 ^ N << 24 & -(IA & 1)
                // reduce % poly
              };
            }, d = (T) => (T >>> 0 & 255) << 24 | (T >>> 8 & 255) << 16 | (T >>> 16 & 255) << 8 | T >>> 24 & 255 | 0;
            function J(T) {
              T.reverse();
              const H = T[15] & 1;
              let eA = 0;
              for (let CA = 0; CA < T.length; CA++) {
                const IA = T[CA];
                T[CA] = IA >>> 1 | eA, eA = (IA & 1) << 7;
              }
              return T[0] ^= -H & 225, T;
            }
            const q = (T) => T > 64 * 1024 ? 8 : T > 1024 ? 4 : 2;
            class AA {
              // We select bits per window adaptively based on expectedLength
              constructor(H, eA) {
                this.blockLen = a, this.outputLen = a, this.s0 = 0, this.s1 = 0, this.s2 = 0, this.s3 = 0, this.finished = !1, H = (0, A.toBytes)(H), (0, A.abytes)(H, 16);
                const CA = (0, A.createView)(H);
                let IA = CA.getUint32(0, !1), k = CA.getUint32(4, !1), tA = CA.getUint32(8, !1), lA = CA.getUint32(12, !1);
                const uA = [];
                for (let cA = 0; cA < 128; cA++)
                  uA.push({ s0: d(IA), s1: d(k), s2: d(tA), s3: d(lA) }), { s0: IA, s1: k, s2: tA, s3: lA } = P(IA, k, tA, lA);
                const w = q(eA || 1024);
                if (![1, 2, 4, 8].includes(w))
                  throw new Error("ghash: invalid window size, expected 2, 4 or 8");
                this.W = w;
                const RA = 128 / w, DA = this.windowSize = 2 ** w, $ = [];
                for (let cA = 0; cA < RA; cA++)
                  for (let Ae = 0; Ae < DA; Ae++) {
                    let kA = 0, VA = 0, EA = 0, zA = 0;
                    for (let OA = 0; OA < w; OA++) {
                      if (!(Ae >>> w - OA - 1 & 1))
                        continue;
                      const { s0: LA, s1: yA, s2: TA, s3: fA } = uA[w * cA + OA];
                      kA ^= LA, VA ^= yA, EA ^= TA, zA ^= fA;
                    }
                    $.push({ s0: kA, s1: VA, s2: EA, s3: zA });
                  }
                this.t = $;
              }
              _updateBlock(H, eA, CA, IA) {
                H ^= this.s0, eA ^= this.s1, CA ^= this.s2, IA ^= this.s3;
                const { W: k, t: tA, windowSize: lA } = this;
                let uA = 0, w = 0, v = 0, RA = 0;
                const DA = (1 << k) - 1;
                let $ = 0;
                for (const cA of [H, eA, CA, IA])
                  for (let Ae = 0; Ae < 4; Ae++) {
                    const kA = cA >>> 8 * Ae & 255;
                    for (let VA = 8 / k - 1; VA >= 0; VA--) {
                      const EA = kA >>> k * VA & DA, { s0: zA, s1: OA, s2: xA, s3: LA } = tA[$ * lA + EA];
                      uA ^= zA, w ^= OA, v ^= xA, RA ^= LA, $ += 1;
                    }
                  }
                this.s0 = uA, this.s1 = w, this.s2 = v, this.s3 = RA;
              }
              update(H) {
                (0, A.aexists)(this), H = (0, A.toBytes)(H), (0, A.abytes)(H);
                const eA = (0, A.u32)(H), CA = Math.floor(H.length / a), IA = H.length % a;
                for (let k = 0; k < CA; k++)
                  this._updateBlock(eA[k * 4 + 0], eA[k * 4 + 1], eA[k * 4 + 2], eA[k * 4 + 3]);
                return IA && (D.set(H.subarray(CA * a)), this._updateBlock(x[0], x[1], x[2], x[3]), (0, A.clean)(x)), this;
              }
              destroy() {
                const { t: H } = this;
                for (const eA of H)
                  eA.s0 = 0, eA.s1 = 0, eA.s2 = 0, eA.s3 = 0;
              }
              digestInto(H) {
                (0, A.aexists)(this), (0, A.aoutput)(H, this), this.finished = !0;
                const { s0: eA, s1: CA, s2: IA, s3: k } = this, tA = (0, A.u32)(H);
                return tA[0] = eA, tA[1] = CA, tA[2] = IA, tA[3] = k, H;
              }
              digest() {
                const H = new Uint8Array(a);
                return this.digestInto(H), this.destroy(), H;
              }
            }
            class K extends AA {
              constructor(H, eA) {
                H = (0, A.toBytes)(H), (0, A.abytes)(H);
                const CA = J((0, A.copyBytes)(H));
                super(CA, eA), (0, A.clean)(CA);
              }
              update(H) {
                H = (0, A.toBytes)(H), (0, A.aexists)(this);
                const eA = (0, A.u32)(H), CA = H.length % a, IA = Math.floor(H.length / a);
                for (let k = 0; k < IA; k++)
                  this._updateBlock(d(eA[k * 4 + 3]), d(eA[k * 4 + 2]), d(eA[k * 4 + 1]), d(eA[k * 4 + 0]));
                return CA && (D.set(H.subarray(IA * a)), this._updateBlock(d(x[3]), d(x[2]), d(x[1]), d(x[0])), (0, A.clean)(x)), this;
              }
              digestInto(H) {
                (0, A.aexists)(this), (0, A.aoutput)(H, this), this.finished = !0;
                const { s0: eA, s1: CA, s2: IA, s3: k } = this, tA = (0, A.u32)(H);
                return tA[0] = eA, tA[1] = CA, tA[2] = IA, tA[3] = k, H.reverse();
              }
            }
            function z(T) {
              const H = (CA, IA) => T(IA, CA.length).update((0, A.toBytes)(CA)).digest(), eA = T(new Uint8Array(16), 0);
              return H.outputLen = eA.outputLen, H.blockLen = eA.blockLen, H.create = (CA, IA) => T(CA, IA), H;
            }
            B.ghash = z((T, H) => new AA(T, H)), B.polyval = z((T, H) => new K(T, H));
          },
          /***/
          2651(Q, B, r) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.unsafe = B.aeskwp = B.aeskw = B.siv = B.gcmsiv = B.gcm = B.cfb = B.cbc = B.ecb = B.ctr = void 0;
            const A = r(656), a = r(5181), D = 16, x = 4, N = /* @__PURE__ */ new Uint8Array(D), P = 283;
            function d(fA) {
              return fA << 1 ^ P & -(fA >> 7);
            }
            function J(fA, sA) {
              let F = 0;
              for (; sA > 0; sA >>= 1)
                F ^= fA & -(sA & 1), fA = d(fA);
              return F;
            }
            const q = /* @__PURE__ */ (() => {
              const fA = new Uint8Array(256);
              for (let F = 0, o = 1; F < 256; F++, o ^= d(o))
                fA[F] = o;
              const sA = new Uint8Array(256);
              sA[0] = 99;
              for (let F = 0; F < 255; F++) {
                let o = fA[255 - F];
                o |= o << 8, sA[fA[F]] = (o ^ o >> 4 ^ o >> 5 ^ o >> 6 ^ o >> 7 ^ 99) & 255;
              }
              return (0, a.clean)(fA), sA;
            })(), AA = /* @__PURE__ */ q.map((fA, sA) => q.indexOf(sA)), K = (fA) => fA << 24 | fA >>> 8, z = (fA) => fA << 8 | fA >>> 24, T = (fA) => fA << 24 & 4278190080 | fA << 8 & 16711680 | fA >>> 8 & 65280 | fA >>> 24 & 255;
            function H(fA, sA) {
              if (fA.length !== 256)
                throw new Error("Wrong sbox length");
              const F = new Uint32Array(256).map((QA, bA) => sA(fA[bA])), o = F.map(z), h = o.map(z), _ = h.map(z), oA = new Uint32Array(256 * 256), p = new Uint32Array(256 * 256), rA = new Uint16Array(256 * 256);
              for (let QA = 0; QA < 256; QA++)
                for (let bA = 0; bA < 256; bA++) {
                  const y = QA * 256 + bA;
                  oA[y] = F[QA] ^ o[bA], p[y] = h[QA] ^ _[bA], rA[y] = fA[QA] << 8 | fA[bA];
                }
              return { sbox: fA, sbox2: rA, T0: F, T1: o, T2: h, T3: _, T01: oA, T23: p };
            }
            const eA = /* @__PURE__ */ H(q, (fA) => J(fA, 3) << 24 | fA << 16 | fA << 8 | J(fA, 2)), CA = /* @__PURE__ */ H(AA, (fA) => J(fA, 11) << 24 | J(fA, 13) << 16 | J(fA, 9) << 8 | J(fA, 14)), IA = /* @__PURE__ */ (() => {
              const fA = new Uint8Array(16);
              for (let sA = 0, F = 1; sA < 16; sA++, F = d(F))
                fA[sA] = F;
              return fA;
            })();
            function k(fA) {
              (0, a.abytes)(fA);
              const sA = fA.length;
              if (![16, 24, 32].includes(sA))
                throw new Error("aes: invalid key size, should be 16, 24 or 32, got " + sA);
              const { sbox2: F } = eA, o = [];
              (0, a.isAligned32)(fA) || o.push(fA = (0, a.copyBytes)(fA));
              const h = (0, a.u32)(fA), _ = h.length, oA = (rA) => uA(F, rA, rA, rA, rA), p = new Uint32Array(sA + 28);
              p.set(h);
              for (let rA = _; rA < p.length; rA++) {
                let QA = p[rA - 1];
                rA % _ === 0 ? QA = oA(K(QA)) ^ IA[rA / _ - 1] : _ > 6 && rA % _ === 4 && (QA = oA(QA)), p[rA] = p[rA - _] ^ QA;
              }
              return (0, a.clean)(...o), p;
            }
            function tA(fA) {
              const sA = k(fA), F = sA.slice(), o = sA.length, { sbox2: h } = eA, { T0: _, T1: oA, T2: p, T3: rA } = CA;
              for (let QA = 0; QA < o; QA += 4)
                for (let bA = 0; bA < 4; bA++)
                  F[QA + bA] = sA[o - QA - 4 + bA];
              (0, a.clean)(sA);
              for (let QA = 4; QA < o - 4; QA++) {
                const bA = F[QA], y = uA(h, bA, bA, bA, bA);
                F[QA] = _[y & 255] ^ oA[y >>> 8 & 255] ^ p[y >>> 16 & 255] ^ rA[y >>> 24];
              }
              return F;
            }
            function lA(fA, sA, F, o, h, _) {
              return fA[F << 8 & 65280 | o >>> 8 & 255] ^ sA[h >>> 8 & 65280 | _ >>> 24 & 255];
            }
            function uA(fA, sA, F, o, h) {
              return fA[sA & 255 | F & 65280] | fA[o >>> 16 & 255 | h >>> 16 & 65280] << 16;
            }
            function w(fA, sA, F, o, h) {
              const { sbox2: _, T01: oA, T23: p } = eA;
              let rA = 0;
              sA ^= fA[rA++], F ^= fA[rA++], o ^= fA[rA++], h ^= fA[rA++];
              const QA = fA.length / 4 - 2;
              for (let dA = 0; dA < QA; dA++) {
                const he = fA[rA++] ^ lA(oA, p, sA, F, o, h), ie = fA[rA++] ^ lA(oA, p, F, o, h, sA), KA = fA[rA++] ^ lA(oA, p, o, h, sA, F), Pe = fA[rA++] ^ lA(oA, p, h, sA, F, o);
                sA = he, F = ie, o = KA, h = Pe;
              }
              const bA = fA[rA++] ^ uA(_, sA, F, o, h), y = fA[rA++] ^ uA(_, F, o, h, sA), M = fA[rA++] ^ uA(_, o, h, sA, F), FA = fA[rA++] ^ uA(_, h, sA, F, o);
              return { s0: bA, s1: y, s2: M, s3: FA };
            }
            function v(fA, sA, F, o, h) {
              const { sbox2: _, T01: oA, T23: p } = CA;
              let rA = 0;
              sA ^= fA[rA++], F ^= fA[rA++], o ^= fA[rA++], h ^= fA[rA++];
              const QA = fA.length / 4 - 2;
              for (let dA = 0; dA < QA; dA++) {
                const he = fA[rA++] ^ lA(oA, p, sA, h, o, F), ie = fA[rA++] ^ lA(oA, p, F, sA, h, o), KA = fA[rA++] ^ lA(oA, p, o, F, sA, h), Pe = fA[rA++] ^ lA(oA, p, h, o, F, sA);
                sA = he, F = ie, o = KA, h = Pe;
              }
              const bA = fA[rA++] ^ uA(_, sA, h, o, F), y = fA[rA++] ^ uA(_, F, sA, h, o), M = fA[rA++] ^ uA(_, o, F, sA, h), FA = fA[rA++] ^ uA(_, h, o, F, sA);
              return { s0: bA, s1: y, s2: M, s3: FA };
            }
            function RA(fA, sA, F, o) {
              (0, a.abytes)(sA, D), (0, a.abytes)(F);
              const h = F.length;
              o = (0, a.getOutput)(h, o), (0, a.complexOverlapBytes)(F, o);
              const _ = sA, oA = (0, a.u32)(_);
              let { s0: p, s1: rA, s2: QA, s3: bA } = w(fA, oA[0], oA[1], oA[2], oA[3]);
              const y = (0, a.u32)(F), M = (0, a.u32)(o);
              for (let dA = 0; dA + 4 <= y.length; dA += 4) {
                M[dA + 0] = y[dA + 0] ^ p, M[dA + 1] = y[dA + 1] ^ rA, M[dA + 2] = y[dA + 2] ^ QA, M[dA + 3] = y[dA + 3] ^ bA;
                let he = 1;
                for (let ie = _.length - 1; ie >= 0; ie--)
                  he = he + (_[ie] & 255) | 0, _[ie] = he & 255, he >>>= 8;
                ({ s0: p, s1: rA, s2: QA, s3: bA } = w(fA, oA[0], oA[1], oA[2], oA[3]));
              }
              const FA = D * Math.floor(y.length / x);
              if (FA < h) {
                const dA = new Uint32Array([p, rA, QA, bA]), he = (0, a.u8)(dA);
                for (let ie = FA, KA = 0; ie < h; ie++, KA++)
                  o[ie] = F[ie] ^ he[KA];
                (0, a.clean)(dA);
              }
              return o;
            }
            function DA(fA, sA, F, o, h) {
              (0, a.abytes)(F, D), (0, a.abytes)(o), h = (0, a.getOutput)(o.length, h);
              const _ = F, oA = (0, a.u32)(_), p = (0, a.createView)(_), rA = (0, a.u32)(o), QA = (0, a.u32)(h), bA = sA ? 0 : 12, y = o.length;
              let M = p.getUint32(bA, sA), { s0: FA, s1: dA, s2: he, s3: ie } = w(fA, oA[0], oA[1], oA[2], oA[3]);
              for (let Pe = 0; Pe + 4 <= rA.length; Pe += 4)
                QA[Pe + 0] = rA[Pe + 0] ^ FA, QA[Pe + 1] = rA[Pe + 1] ^ dA, QA[Pe + 2] = rA[Pe + 2] ^ he, QA[Pe + 3] = rA[Pe + 3] ^ ie, M = M + 1 >>> 0, p.setUint32(bA, M, sA), { s0: FA, s1: dA, s2: he, s3: ie } = w(fA, oA[0], oA[1], oA[2], oA[3]);
              const KA = D * Math.floor(rA.length / x);
              if (KA < y) {
                const Pe = new Uint32Array([FA, dA, he, ie]), Je = (0, a.u8)(Pe);
                for (let Le = KA, Re = 0; Le < y; Le++, Re++)
                  h[Le] = o[Le] ^ Je[Re];
                (0, a.clean)(Pe);
              }
              return h;
            }
            B.ctr = (0, a.wrapCipher)({ blockSize: 16, nonceLength: 16 }, function(sA, F) {
              function o(h, _) {
                if ((0, a.abytes)(h), _ !== void 0 && ((0, a.abytes)(_), !(0, a.isAligned32)(_)))
                  throw new Error("unaligned destination");
                const oA = k(sA), p = (0, a.copyBytes)(F), rA = [oA, p];
                (0, a.isAligned32)(h) || rA.push(h = (0, a.copyBytes)(h));
                const QA = RA(oA, p, h, _);
                return (0, a.clean)(...rA), QA;
              }
              return {
                encrypt: (h, _) => o(h, _),
                decrypt: (h, _) => o(h, _)
              };
            });
            function $(fA) {
              if ((0, a.abytes)(fA), fA.length % D !== 0)
                throw new Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size " + D);
            }
            function cA(fA, sA, F) {
              (0, a.abytes)(fA);
              let o = fA.length;
              const h = o % D;
              if (!sA && h !== 0)
                throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");
              (0, a.isAligned32)(fA) || (fA = (0, a.copyBytes)(fA));
              const _ = (0, a.u32)(fA);
              if (sA) {
                let p = D - h;
                p || (p = D), o = o + p;
              }
              F = (0, a.getOutput)(o, F), (0, a.complexOverlapBytes)(fA, F);
              const oA = (0, a.u32)(F);
              return { b: _, o: oA, out: F };
            }
            function Ae(fA, sA) {
              if (!sA)
                return fA;
              const F = fA.length;
              if (!F)
                throw new Error("aes/pcks5: empty ciphertext not allowed");
              const o = fA[F - 1];
              if (o <= 0 || o > 16)
                throw new Error("aes/pcks5: wrong padding");
              const h = fA.subarray(0, -o);
              for (let _ = 0; _ < o; _++)
                if (fA[F - _ - 1] !== o)
                  throw new Error("aes/pcks5: wrong padding");
              return h;
            }
            function kA(fA) {
              const sA = new Uint8Array(16), F = (0, a.u32)(sA);
              sA.set(fA);
              const o = D - fA.length;
              for (let h = D - o; h < D; h++)
                sA[h] = o;
              return F;
            }
            B.ecb = (0, a.wrapCipher)({ blockSize: 16 }, function(sA, F = {}) {
              const o = !F.disablePadding;
              return {
                encrypt(h, _) {
                  const { b: oA, o: p, out: rA } = cA(h, o, _), QA = k(sA);
                  let bA = 0;
                  for (; bA + 4 <= oA.length; ) {
                    const { s0: y, s1: M, s2: FA, s3: dA } = w(QA, oA[bA + 0], oA[bA + 1], oA[bA + 2], oA[bA + 3]);
                    p[bA++] = y, p[bA++] = M, p[bA++] = FA, p[bA++] = dA;
                  }
                  if (o) {
                    const y = kA(h.subarray(bA * 4)), { s0: M, s1: FA, s2: dA, s3: he } = w(QA, y[0], y[1], y[2], y[3]);
                    p[bA++] = M, p[bA++] = FA, p[bA++] = dA, p[bA++] = he;
                  }
                  return (0, a.clean)(QA), rA;
                },
                decrypt(h, _) {
                  $(h);
                  const oA = tA(sA);
                  _ = (0, a.getOutput)(h.length, _);
                  const p = [oA];
                  (0, a.isAligned32)(h) || p.push(h = (0, a.copyBytes)(h)), (0, a.complexOverlapBytes)(h, _);
                  const rA = (0, a.u32)(h), QA = (0, a.u32)(_);
                  for (let bA = 0; bA + 4 <= rA.length; ) {
                    const { s0: y, s1: M, s2: FA, s3: dA } = v(oA, rA[bA + 0], rA[bA + 1], rA[bA + 2], rA[bA + 3]);
                    QA[bA++] = y, QA[bA++] = M, QA[bA++] = FA, QA[bA++] = dA;
                  }
                  return (0, a.clean)(...p), Ae(_, o);
                }
              };
            }), B.cbc = (0, a.wrapCipher)({ blockSize: 16, nonceLength: 16 }, function(sA, F, o = {}) {
              const h = !o.disablePadding;
              return {
                encrypt(_, oA) {
                  const p = k(sA), { b: rA, o: QA, out: bA } = cA(_, h, oA);
                  let y = F;
                  const M = [p];
                  (0, a.isAligned32)(y) || M.push(y = (0, a.copyBytes)(y));
                  const FA = (0, a.u32)(y);
                  let dA = FA[0], he = FA[1], ie = FA[2], KA = FA[3], Pe = 0;
                  for (; Pe + 4 <= rA.length; )
                    dA ^= rA[Pe + 0], he ^= rA[Pe + 1], ie ^= rA[Pe + 2], KA ^= rA[Pe + 3], { s0: dA, s1: he, s2: ie, s3: KA } = w(p, dA, he, ie, KA), QA[Pe++] = dA, QA[Pe++] = he, QA[Pe++] = ie, QA[Pe++] = KA;
                  if (h) {
                    const Je = kA(_.subarray(Pe * 4));
                    dA ^= Je[0], he ^= Je[1], ie ^= Je[2], KA ^= Je[3], { s0: dA, s1: he, s2: ie, s3: KA } = w(p, dA, he, ie, KA), QA[Pe++] = dA, QA[Pe++] = he, QA[Pe++] = ie, QA[Pe++] = KA;
                  }
                  return (0, a.clean)(...M), bA;
                },
                decrypt(_, oA) {
                  $(_);
                  const p = tA(sA);
                  let rA = F;
                  const QA = [p];
                  (0, a.isAligned32)(rA) || QA.push(rA = (0, a.copyBytes)(rA));
                  const bA = (0, a.u32)(rA);
                  oA = (0, a.getOutput)(_.length, oA), (0, a.isAligned32)(_) || QA.push(_ = (0, a.copyBytes)(_)), (0, a.complexOverlapBytes)(_, oA);
                  const y = (0, a.u32)(_), M = (0, a.u32)(oA);
                  let FA = bA[0], dA = bA[1], he = bA[2], ie = bA[3];
                  for (let KA = 0; KA + 4 <= y.length; ) {
                    const Pe = FA, Je = dA, Le = he, Re = ie;
                    FA = y[KA + 0], dA = y[KA + 1], he = y[KA + 2], ie = y[KA + 3];
                    const { s0: _e, s1: se, s2: Ee, s3: wA } = v(p, FA, dA, he, ie);
                    M[KA++] = _e ^ Pe, M[KA++] = se ^ Je, M[KA++] = Ee ^ Le, M[KA++] = wA ^ Re;
                  }
                  return (0, a.clean)(...QA), Ae(oA, h);
                }
              };
            }), B.cfb = (0, a.wrapCipher)({ blockSize: 16, nonceLength: 16 }, function(sA, F) {
              function o(h, _, oA) {
                (0, a.abytes)(h);
                const p = h.length;
                if (oA = (0, a.getOutput)(p, oA), (0, a.overlapBytes)(h, oA))
                  throw new Error("overlapping src and dst not supported.");
                const rA = k(sA);
                let QA = F;
                const bA = [rA];
                (0, a.isAligned32)(QA) || bA.push(QA = (0, a.copyBytes)(QA)), (0, a.isAligned32)(h) || bA.push(h = (0, a.copyBytes)(h));
                const y = (0, a.u32)(h), M = (0, a.u32)(oA), FA = _ ? M : y, dA = (0, a.u32)(QA);
                let he = dA[0], ie = dA[1], KA = dA[2], Pe = dA[3];
                for (let Le = 0; Le + 4 <= y.length; ) {
                  const { s0: Re, s1: _e, s2: se, s3: Ee } = w(rA, he, ie, KA, Pe);
                  M[Le + 0] = y[Le + 0] ^ Re, M[Le + 1] = y[Le + 1] ^ _e, M[Le + 2] = y[Le + 2] ^ se, M[Le + 3] = y[Le + 3] ^ Ee, he = FA[Le++], ie = FA[Le++], KA = FA[Le++], Pe = FA[Le++];
                }
                const Je = D * Math.floor(y.length / x);
                if (Je < p) {
                  ({ s0: he, s1: ie, s2: KA, s3: Pe } = w(rA, he, ie, KA, Pe));
                  const Le = (0, a.u8)(new Uint32Array([he, ie, KA, Pe]));
                  for (let Re = Je, _e = 0; Re < p; Re++, _e++)
                    oA[Re] = h[Re] ^ Le[_e];
                  (0, a.clean)(Le);
                }
                return (0, a.clean)(...bA), oA;
              }
              return {
                encrypt: (h, _) => o(h, !0, _),
                decrypt: (h, _) => o(h, !1, _)
              };
            });
            function VA(fA, sA, F, o, h) {
              const _ = h ? h.length : 0, oA = fA.create(F, o.length + _);
              h && oA.update(h);
              const p = (0, a.u64Lengths)(8 * o.length, 8 * _, sA);
              oA.update(o), oA.update(p);
              const rA = oA.digest();
              return (0, a.clean)(p), rA;
            }
            B.gcm = (0, a.wrapCipher)({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(sA, F, o) {
              if (F.length < 8)
                throw new Error("aes/gcm: invalid nonce length");
              const h = 16;
              function _(p, rA, QA) {
                const bA = VA(A.ghash, !1, p, QA, o);
                for (let y = 0; y < rA.length; y++)
                  bA[y] ^= rA[y];
                return bA;
              }
              function oA() {
                const p = k(sA), rA = N.slice(), QA = N.slice();
                if (DA(p, !1, QA, QA, rA), F.length === 12)
                  QA.set(F);
                else {
                  const y = N.slice(), M = (0, a.createView)(y);
                  (0, a.setBigUint64)(M, 8, BigInt(F.length * 8), !1);
                  const FA = A.ghash.create(rA).update(F).update(y);
                  FA.digestInto(QA), FA.destroy();
                }
                const bA = DA(p, !1, QA, N);
                return { xk: p, authKey: rA, counter: QA, tagMask: bA };
              }
              return {
                encrypt(p) {
                  const { xk: rA, authKey: QA, counter: bA, tagMask: y } = oA(), M = new Uint8Array(p.length + h), FA = [rA, QA, bA, y];
                  (0, a.isAligned32)(p) || FA.push(p = (0, a.copyBytes)(p)), DA(rA, !1, bA, p, M.subarray(0, p.length));
                  const dA = _(QA, y, M.subarray(0, M.length - h));
                  return FA.push(dA), M.set(dA, p.length), (0, a.clean)(...FA), M;
                },
                decrypt(p) {
                  const { xk: rA, authKey: QA, counter: bA, tagMask: y } = oA(), M = [rA, QA, y, bA];
                  (0, a.isAligned32)(p) || M.push(p = (0, a.copyBytes)(p));
                  const FA = p.subarray(0, -h), dA = p.subarray(-h), he = _(QA, y, FA);
                  if (M.push(he), !(0, a.equalBytes)(he, dA))
                    throw new Error("aes/gcm: invalid ghash tag");
                  const ie = DA(rA, !1, bA, FA);
                  return (0, a.clean)(...M), ie;
                }
              };
            });
            const EA = (fA, sA, F) => (o) => {
              if (!Number.isSafeInteger(o) || sA > o || o > F) {
                const h = "[" + sA + ".." + F + "]";
                throw new Error("" + fA + ": expected value in range " + h + ", got " + o);
              }
            };
            B.gcmsiv = (0, a.wrapCipher)({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(sA, F, o) {
              const _ = EA("AAD", 0, 68719476736), oA = EA("plaintext", 0, 2 ** 36), p = EA("nonce", 12, 12), rA = EA("ciphertext", 16, 2 ** 36 + 16);
              (0, a.abytes)(sA, 16, 24, 32), p(F.length), o !== void 0 && _(o.length);
              function QA() {
                const M = k(sA), FA = new Uint8Array(sA.length), dA = new Uint8Array(16), he = [M, FA];
                let ie = F;
                (0, a.isAligned32)(ie) || he.push(ie = (0, a.copyBytes)(ie));
                const KA = (0, a.u32)(ie);
                let Pe = 0, Je = KA[0], Le = KA[1], Re = KA[2], _e = 0;
                for (const Ee of [dA, FA].map(a.u32)) {
                  const wA = (0, a.u32)(Ee);
                  for (let R = 0; R < wA.length; R += 2) {
                    const { s0: G, s1: W } = w(M, Pe, Je, Le, Re);
                    wA[R + 0] = G, wA[R + 1] = W, Pe = ++_e;
                  }
                }
                const se = { authKey: dA, encKey: k(FA) };
                return (0, a.clean)(...he), se;
              }
              function bA(M, FA, dA) {
                const he = VA(A.polyval, !0, FA, dA, o);
                for (let Re = 0; Re < 12; Re++)
                  he[Re] ^= F[Re];
                he[15] &= 127;
                const ie = (0, a.u32)(he);
                let KA = ie[0], Pe = ie[1], Je = ie[2], Le = ie[3];
                return { s0: KA, s1: Pe, s2: Je, s3: Le } = w(M, KA, Pe, Je, Le), ie[0] = KA, ie[1] = Pe, ie[2] = Je, ie[3] = Le, he;
              }
              function y(M, FA, dA) {
                let he = (0, a.copyBytes)(FA);
                he[15] |= 128;
                const ie = DA(M, !0, he, dA);
                return (0, a.clean)(he), ie;
              }
              return {
                encrypt(M) {
                  oA(M.length);
                  const { encKey: FA, authKey: dA } = QA(), he = bA(FA, dA, M), ie = [FA, dA, he];
                  (0, a.isAligned32)(M) || ie.push(M = (0, a.copyBytes)(M));
                  const KA = new Uint8Array(M.length + 16);
                  return KA.set(he, M.length), KA.set(y(FA, he, M)), (0, a.clean)(...ie), KA;
                },
                decrypt(M) {
                  rA(M.length);
                  const FA = M.subarray(-16), { encKey: dA, authKey: he } = QA(), ie = [dA, he];
                  (0, a.isAligned32)(M) || ie.push(M = (0, a.copyBytes)(M));
                  const KA = y(dA, FA, M.subarray(0, -16)), Pe = bA(dA, he, KA);
                  if (ie.push(Pe), !(0, a.equalBytes)(FA, Pe))
                    throw (0, a.clean)(...ie), new Error("invalid polyval tag");
                  return (0, a.clean)(...ie), KA;
                }
              };
            }), B.siv = B.gcmsiv;
            function zA(fA) {
              return fA instanceof Uint32Array || ArrayBuffer.isView(fA) && fA.constructor.name === "Uint32Array";
            }
            function OA(fA, sA) {
              if ((0, a.abytes)(sA, 16), !zA(fA))
                throw new Error("_encryptBlock accepts result of expandKeyLE");
              const F = (0, a.u32)(sA);
              let { s0: o, s1: h, s2: _, s3: oA } = w(fA, F[0], F[1], F[2], F[3]);
              return F[0] = o, F[1] = h, F[2] = _, F[3] = oA, sA;
            }
            function xA(fA, sA) {
              if ((0, a.abytes)(sA, 16), !zA(fA))
                throw new Error("_decryptBlock accepts result of expandKeyLE");
              const F = (0, a.u32)(sA);
              let { s0: o, s1: h, s2: _, s3: oA } = v(fA, F[0], F[1], F[2], F[3]);
              return F[0] = o, F[1] = h, F[2] = _, F[3] = oA, sA;
            }
            const LA = {
              /*
              High-level pseudocode:
              ```
              A: u64 = IV
              out = []
              for (let i=0, ctr = 0; i<6; i++) {
                for (const chunk of chunks(plaintext, 8)) {
                  A ^= swapEndianess(ctr++)
                  [A, res] = chunks(encrypt(A || chunk), 8);
                  out ||= res
                }
              }
              out = A || out
              ```
              Decrypt is the same, but reversed.
              */
              encrypt(fA, sA) {
                if (sA.length >= 2 ** 32)
                  throw new Error("plaintext should be less than 4gb");
                const F = k(fA);
                if (sA.length === 16)
                  OA(F, sA);
                else {
                  const o = (0, a.u32)(sA);
                  let h = o[0], _ = o[1];
                  for (let oA = 0, p = 1; oA < 6; oA++)
                    for (let rA = 2; rA < o.length; rA += 2, p++) {
                      const { s0: QA, s1: bA, s2: y, s3: M } = w(F, h, _, o[rA], o[rA + 1]);
                      h = QA, _ = bA ^ T(p), o[rA] = y, o[rA + 1] = M;
                    }
                  o[0] = h, o[1] = _;
                }
                F.fill(0);
              },
              decrypt(fA, sA) {
                if (sA.length - 8 >= 2 ** 32)
                  throw new Error("ciphertext should be less than 4gb");
                const F = tA(fA), o = sA.length / 8 - 1;
                if (o === 1)
                  xA(F, sA);
                else {
                  const h = (0, a.u32)(sA);
                  let _ = h[0], oA = h[1];
                  for (let p = 0, rA = o * 6; p < 6; p++)
                    for (let QA = o * 2; QA >= 1; QA -= 2, rA--) {
                      oA ^= T(rA);
                      const { s0: bA, s1: y, s2: M, s3: FA } = v(F, _, oA, h[QA], h[QA + 1]);
                      _ = bA, oA = y, h[QA] = M, h[QA + 1] = FA;
                    }
                  h[0] = _, h[1] = oA;
                }
                F.fill(0);
              }
            }, yA = /* @__PURE__ */ new Uint8Array(8).fill(166);
            B.aeskw = (0, a.wrapCipher)({ blockSize: 8 }, (fA) => ({
              encrypt(sA) {
                if (!sA.length || sA.length % 8 !== 0)
                  throw new Error("invalid plaintext length");
                if (sA.length === 8)
                  throw new Error("8-byte keys not allowed in AESKW, use AESKWP instead");
                const F = (0, a.concatBytes)(yA, sA);
                return LA.encrypt(fA, F), F;
              },
              decrypt(sA) {
                if (sA.length % 8 !== 0 || sA.length < 24)
                  throw new Error("invalid ciphertext length");
                const F = (0, a.copyBytes)(sA);
                if (LA.decrypt(fA, F), !(0, a.equalBytes)(F.subarray(0, 8), yA))
                  throw new Error("integrity check failed");
                return F.subarray(0, 8).fill(0), F.subarray(8);
              }
            }));
            const TA = 2790873510;
            B.aeskwp = (0, a.wrapCipher)({ blockSize: 8 }, (fA) => ({
              encrypt(sA) {
                if (!sA.length)
                  throw new Error("invalid plaintext length");
                const F = Math.ceil(sA.length / 8) * 8, o = new Uint8Array(8 + F);
                o.set(sA, 8);
                const h = (0, a.u32)(o);
                return h[0] = TA, h[1] = T(sA.length), LA.encrypt(fA, o), o;
              },
              decrypt(sA) {
                if (sA.length < 16)
                  throw new Error("invalid ciphertext length");
                const F = (0, a.copyBytes)(sA), o = (0, a.u32)(F);
                LA.decrypt(fA, F);
                const h = T(o[1]) >>> 0, _ = Math.ceil(h / 8) * 8;
                if (o[0] !== TA || F.length - 8 !== _)
                  throw new Error("integrity check failed");
                for (let oA = h; oA < _; oA++)
                  if (F[8 + oA] !== 0)
                    throw new Error("integrity check failed");
                return F.subarray(0, 8).fill(0), F.subarray(8, 8 + h);
              }
            })), B.unsafe = {
              expandKeyLE: k,
              expandKeyDecLE: tA,
              encrypt: w,
              decrypt: v,
              encryptBlock: OA,
              decryptBlock: xA,
              ctrCounter: RA,
              ctr32: DA
            };
          },
          /***/
          5181(Q, B) {
            /*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
            Object.defineProperty(B, "__esModule", { value: !0 }), B.wrapCipher = B.Hash = B.nextTick = B.isLE = void 0, B.isBytes = r, B.abool = A, B.anumber = a, B.abytes = D, B.ahash = x, B.aexists = N, B.aoutput = P, B.u8 = d, B.u32 = J, B.clean = q, B.createView = AA, B.bytesToHex = T, B.hexToBytes = CA, B.hexToNumber = IA, B.bytesToNumberBE = k, B.numberToBytesBE = tA, B.utf8ToBytes = uA, B.bytesToUtf8 = w, B.toBytes = v, B.overlapBytes = RA, B.complexOverlapBytes = DA, B.concatBytes = $, B.checkOpts = cA, B.equalBytes = Ae, B.getOutput = EA, B.setBigUint64 = zA, B.u64Lengths = OA, B.isAligned32 = xA, B.copyBytes = LA;
            function r(yA) {
              return yA instanceof Uint8Array || ArrayBuffer.isView(yA) && yA.constructor.name === "Uint8Array";
            }
            function A(yA) {
              if (typeof yA != "boolean")
                throw new Error(`boolean expected, not ${yA}`);
            }
            function a(yA) {
              if (!Number.isSafeInteger(yA) || yA < 0)
                throw new Error("positive integer expected, got " + yA);
            }
            function D(yA, ...TA) {
              if (!r(yA))
                throw new Error("Uint8Array expected");
              if (TA.length > 0 && !TA.includes(yA.length))
                throw new Error("Uint8Array expected of length " + TA + ", got length=" + yA.length);
            }
            function x(yA) {
              if (typeof yA != "function" || typeof yA.create != "function")
                throw new Error("Hash should be wrapped by utils.createHasher");
              a(yA.outputLen), a(yA.blockLen);
            }
            function N(yA, TA = !0) {
              if (yA.destroyed)
                throw new Error("Hash instance has been destroyed");
              if (TA && yA.finished)
                throw new Error("Hash#digest() has already been called");
            }
            function P(yA, TA) {
              D(yA);
              const fA = TA.outputLen;
              if (yA.length < fA)
                throw new Error("digestInto() expects output buffer of length at least " + fA);
            }
            function d(yA) {
              return new Uint8Array(yA.buffer, yA.byteOffset, yA.byteLength);
            }
            function J(yA) {
              return new Uint32Array(yA.buffer, yA.byteOffset, Math.floor(yA.byteLength / 4));
            }
            function q(...yA) {
              for (let TA = 0; TA < yA.length; TA++)
                yA[TA].fill(0);
            }
            function AA(yA) {
              return new DataView(yA.buffer, yA.byteOffset, yA.byteLength);
            }
            B.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
            const K = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", z = /* @__PURE__ */ Array.from({ length: 256 }, (yA, TA) => TA.toString(16).padStart(2, "0"));
            function T(yA) {
              if (D(yA), K)
                return yA.toHex();
              let TA = "";
              for (let fA = 0; fA < yA.length; fA++)
                TA += z[yA[fA]];
              return TA;
            }
            const H = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
            function eA(yA) {
              if (yA >= H._0 && yA <= H._9)
                return yA - H._0;
              if (yA >= H.A && yA <= H.F)
                return yA - (H.A - 10);
              if (yA >= H.a && yA <= H.f)
                return yA - (H.a - 10);
            }
            function CA(yA) {
              if (typeof yA != "string")
                throw new Error("hex string expected, got " + typeof yA);
              if (K)
                return Uint8Array.fromHex(yA);
              const TA = yA.length, fA = TA / 2;
              if (TA % 2)
                throw new Error("hex string expected, got unpadded hex of length " + TA);
              const sA = new Uint8Array(fA);
              for (let F = 0, o = 0; F < fA; F++, o += 2) {
                const h = eA(yA.charCodeAt(o)), _ = eA(yA.charCodeAt(o + 1));
                if (h === void 0 || _ === void 0) {
                  const oA = yA[o] + yA[o + 1];
                  throw new Error('hex string expected, got non-hex character "' + oA + '" at index ' + o);
                }
                sA[F] = h * 16 + _;
              }
              return sA;
            }
            function IA(yA) {
              if (typeof yA != "string")
                throw new Error("hex string expected, got " + typeof yA);
              return BigInt(yA === "" ? "0" : "0x" + yA);
            }
            function k(yA) {
              return IA(T(yA));
            }
            function tA(yA, TA) {
              return CA(yA.toString(16).padStart(TA * 2, "0"));
            }
            const lA = async () => {
            };
            B.nextTick = lA;
            function uA(yA) {
              if (typeof yA != "string")
                throw new Error("string expected");
              return new Uint8Array(new TextEncoder().encode(yA));
            }
            function w(yA) {
              return new TextDecoder().decode(yA);
            }
            function v(yA) {
              if (typeof yA == "string")
                yA = uA(yA);
              else if (r(yA))
                yA = LA(yA);
              else
                throw new Error("Uint8Array expected, got " + typeof yA);
              return yA;
            }
            function RA(yA, TA) {
              return yA.buffer === TA.buffer && // best we can do, may fail with an obscure Proxy
              yA.byteOffset < TA.byteOffset + TA.byteLength && // a starts before b end
              TA.byteOffset < yA.byteOffset + yA.byteLength;
            }
            function DA(yA, TA) {
              if (RA(yA, TA) && yA.byteOffset < TA.byteOffset)
                throw new Error("complex overlap of input and output is not supported");
            }
            function $(...yA) {
              let TA = 0;
              for (let sA = 0; sA < yA.length; sA++) {
                const F = yA[sA];
                D(F), TA += F.length;
              }
              const fA = new Uint8Array(TA);
              for (let sA = 0, F = 0; sA < yA.length; sA++) {
                const o = yA[sA];
                fA.set(o, F), F += o.length;
              }
              return fA;
            }
            function cA(yA, TA) {
              if (TA == null || typeof TA != "object")
                throw new Error("options must be defined");
              return Object.assign(yA, TA);
            }
            function Ae(yA, TA) {
              if (yA.length !== TA.length)
                return !1;
              let fA = 0;
              for (let sA = 0; sA < yA.length; sA++)
                fA |= yA[sA] ^ TA[sA];
              return fA === 0;
            }
            class kA {
            }
            B.Hash = kA;
            const VA = /* @__NO_SIDE_EFFECTS__ */ (yA, TA) => {
              function fA(sA, ...F) {
                if (D(sA), !B.isLE)
                  throw new Error("Non little-endian hardware is not yet supported");
                if (yA.nonceLength !== void 0) {
                  const rA = F[0];
                  if (!rA)
                    throw new Error("nonce / iv required");
                  yA.varSizeNonce ? D(rA) : D(rA, yA.nonceLength);
                }
                const o = yA.tagLength;
                o && F[1] !== void 0 && D(F[1]);
                const h = TA(sA, ...F), _ = (rA, QA) => {
                  if (QA !== void 0) {
                    if (rA !== 2)
                      throw new Error("cipher output not supported");
                    D(QA);
                  }
                };
                let oA = !1;
                return {
                  encrypt(rA, QA) {
                    if (oA)
                      throw new Error("cannot encrypt() twice with same key + nonce");
                    return oA = !0, D(rA), _(h.encrypt.length, QA), h.encrypt(rA, QA);
                  },
                  decrypt(rA, QA) {
                    if (D(rA), o && rA.length < o)
                      throw new Error("invalid ciphertext length: smaller than tagLength=" + o);
                    return _(h.decrypt.length, QA), h.decrypt(rA, QA);
                  }
                };
              }
              return Object.assign(fA, yA), fA;
            };
            B.wrapCipher = VA;
            function EA(yA, TA, fA = !0) {
              if (TA === void 0)
                return new Uint8Array(yA);
              if (TA.length !== yA)
                throw new Error("invalid output length, expected " + yA + ", got: " + TA.length);
              if (fA && !xA(TA))
                throw new Error("invalid output, must be aligned");
              return TA;
            }
            function zA(yA, TA, fA, sA) {
              if (typeof yA.setBigUint64 == "function")
                return yA.setBigUint64(TA, fA, sA);
              const F = BigInt(32), o = BigInt(4294967295), h = Number(fA >> F & o), _ = Number(fA & o), oA = sA ? 4 : 0, p = sA ? 0 : 4;
              yA.setUint32(TA + oA, h, sA), yA.setUint32(TA + p, _, sA);
            }
            function OA(yA, TA, fA) {
              A(fA);
              const sA = new Uint8Array(16), F = AA(sA);
              return zA(F, 0, BigInt(TA), fA), zA(F, 8, BigInt(yA), fA), sA;
            }
            function xA(yA) {
              return yA.byteOffset % 4 === 0;
            }
            function LA(yA) {
              return Uint8Array.from(yA);
            }
          },
          /***/
          6784(Q, B, r) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.SHA512_IV = B.SHA384_IV = B.SHA224_IV = B.SHA256_IV = B.HashMD = void 0, B.setBigUint64 = a, B.Chi = D, B.Maj = x;
            const A = r(3973);
            function a(P, d, J, q) {
              if (typeof P.setBigUint64 == "function")
                return P.setBigUint64(d, J, q);
              const AA = BigInt(32), K = BigInt(4294967295), z = Number(J >> AA & K), T = Number(J & K), H = q ? 4 : 0, eA = q ? 0 : 4;
              P.setUint32(d + H, z, q), P.setUint32(d + eA, T, q);
            }
            function D(P, d, J) {
              return P & d ^ ~P & J;
            }
            function x(P, d, J) {
              return P & d ^ P & J ^ d & J;
            }
            class N extends A.Hash {
              constructor(d, J, q, AA) {
                super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = d, this.outputLen = J, this.padOffset = q, this.isLE = AA, this.buffer = new Uint8Array(d), this.view = (0, A.createView)(this.buffer);
              }
              update(d) {
                (0, A.aexists)(this), d = (0, A.toBytes)(d), (0, A.abytes)(d);
                const { view: J, buffer: q, blockLen: AA } = this, K = d.length;
                for (let z = 0; z < K; ) {
                  const T = Math.min(AA - this.pos, K - z);
                  if (T === AA) {
                    const H = (0, A.createView)(d);
                    for (; AA <= K - z; z += AA)
                      this.process(H, z);
                    continue;
                  }
                  q.set(d.subarray(z, z + T), this.pos), this.pos += T, z += T, this.pos === AA && (this.process(J, 0), this.pos = 0);
                }
                return this.length += d.length, this.roundClean(), this;
              }
              digestInto(d) {
                (0, A.aexists)(this), (0, A.aoutput)(d, this), this.finished = !0;
                const { buffer: J, view: q, blockLen: AA, isLE: K } = this;
                let { pos: z } = this;
                J[z++] = 128, (0, A.clean)(this.buffer.subarray(z)), this.padOffset > AA - z && (this.process(q, 0), z = 0);
                for (let IA = z; IA < AA; IA++)
                  J[IA] = 0;
                a(q, AA - 8, BigInt(this.length * 8), K), this.process(q, 0);
                const T = (0, A.createView)(d), H = this.outputLen;
                if (H % 4)
                  throw new Error("_sha2: outputLen should be aligned to 32bit");
                const eA = H / 4, CA = this.get();
                if (eA > CA.length)
                  throw new Error("_sha2: outputLen bigger than state");
                for (let IA = 0; IA < eA; IA++)
                  T.setUint32(4 * IA, CA[IA], K);
              }
              digest() {
                const { buffer: d, outputLen: J } = this;
                this.digestInto(d);
                const q = d.slice(0, J);
                return this.destroy(), q;
              }
              _cloneInto(d) {
                d || (d = new this.constructor()), d.set(...this.get());
                const { blockLen: J, buffer: q, length: AA, finished: K, destroyed: z, pos: T } = this;
                return d.destroyed = z, d.finished = K, d.length = AA, d.pos = T, AA % J && d.buffer.set(q), d;
              }
              clone() {
                return this._cloneInto();
              }
            }
            B.HashMD = N, B.SHA256_IV = Uint32Array.from([
              1779033703,
              3144134277,
              1013904242,
              2773480762,
              1359893119,
              2600822924,
              528734635,
              1541459225
            ]), B.SHA224_IV = Uint32Array.from([
              3238371032,
              914150663,
              812702999,
              4144912697,
              4290775857,
              1750603025,
              1694076839,
              3204075428
            ]), B.SHA384_IV = Uint32Array.from([
              3418070365,
              3238371032,
              1654270250,
              914150663,
              2438529370,
              812702999,
              355462360,
              4144912697,
              1731405415,
              4290775857,
              2394180231,
              1750603025,
              3675008525,
              1694076839,
              1203062813,
              3204075428
            ]), B.SHA512_IV = Uint32Array.from([
              1779033703,
              4089235720,
              3144134277,
              2227873595,
              1013904242,
              4271175723,
              2773480762,
              1595750129,
              1359893119,
              2917565137,
              2600822924,
              725511199,
              528734635,
              4215389547,
              1541459225,
              327033209
            ]);
          },
          /***/
          4996(Q, B) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.toBig = B.shrSL = B.shrSH = B.rotrSL = B.rotrSH = B.rotrBL = B.rotrBH = B.rotr32L = B.rotr32H = B.rotlSL = B.rotlSH = B.rotlBL = B.rotlBH = B.add5L = B.add5H = B.add4L = B.add4H = B.add3L = B.add3H = void 0, B.add = IA, B.fromBig = a, B.split = D;
            const r = /* @__PURE__ */ BigInt(2 ** 32 - 1), A = /* @__PURE__ */ BigInt(32);
            function a(DA, $ = !1) {
              return $ ? { h: Number(DA & r), l: Number(DA >> A & r) } : { h: Number(DA >> A & r) | 0, l: Number(DA & r) | 0 };
            }
            function D(DA, $ = !1) {
              const cA = DA.length;
              let Ae = new Uint32Array(cA), kA = new Uint32Array(cA);
              for (let VA = 0; VA < cA; VA++) {
                const { h: EA, l: zA } = a(DA[VA], $);
                [Ae[VA], kA[VA]] = [EA, zA];
              }
              return [Ae, kA];
            }
            const x = (DA, $) => BigInt(DA >>> 0) << A | BigInt($ >>> 0);
            B.toBig = x;
            const N = (DA, $, cA) => DA >>> cA;
            B.shrSH = N;
            const P = (DA, $, cA) => DA << 32 - cA | $ >>> cA;
            B.shrSL = P;
            const d = (DA, $, cA) => DA >>> cA | $ << 32 - cA;
            B.rotrSH = d;
            const J = (DA, $, cA) => DA << 32 - cA | $ >>> cA;
            B.rotrSL = J;
            const q = (DA, $, cA) => DA << 64 - cA | $ >>> cA - 32;
            B.rotrBH = q;
            const AA = (DA, $, cA) => DA >>> cA - 32 | $ << 64 - cA;
            B.rotrBL = AA;
            const K = (DA, $) => $;
            B.rotr32H = K;
            const z = (DA, $) => DA;
            B.rotr32L = z;
            const T = (DA, $, cA) => DA << cA | $ >>> 32 - cA;
            B.rotlSH = T;
            const H = (DA, $, cA) => $ << cA | DA >>> 32 - cA;
            B.rotlSL = H;
            const eA = (DA, $, cA) => $ << cA - 32 | DA >>> 64 - cA;
            B.rotlBH = eA;
            const CA = (DA, $, cA) => DA << cA - 32 | $ >>> 64 - cA;
            B.rotlBL = CA;
            function IA(DA, $, cA, Ae) {
              const kA = ($ >>> 0) + (Ae >>> 0);
              return { h: DA + cA + (kA / 4294967296 | 0) | 0, l: kA | 0 };
            }
            const k = (DA, $, cA) => (DA >>> 0) + ($ >>> 0) + (cA >>> 0);
            B.add3L = k;
            const tA = (DA, $, cA, Ae) => $ + cA + Ae + (DA / 2 ** 32 | 0) | 0;
            B.add3H = tA;
            const lA = (DA, $, cA, Ae) => (DA >>> 0) + ($ >>> 0) + (cA >>> 0) + (Ae >>> 0);
            B.add4L = lA;
            const uA = (DA, $, cA, Ae, kA) => $ + cA + Ae + kA + (DA / 2 ** 32 | 0) | 0;
            B.add4H = uA;
            const w = (DA, $, cA, Ae, kA) => (DA >>> 0) + ($ >>> 0) + (cA >>> 0) + (Ae >>> 0) + (kA >>> 0);
            B.add5L = w;
            const v = (DA, $, cA, Ae, kA, VA) => $ + cA + Ae + kA + VA + (DA / 2 ** 32 | 0) | 0;
            B.add5H = v;
            const RA = {
              fromBig: a,
              split: D,
              toBig: x,
              shrSH: N,
              shrSL: P,
              rotrSH: d,
              rotrSL: J,
              rotrBH: q,
              rotrBL: AA,
              rotr32H: K,
              rotr32L: z,
              rotlSH: T,
              rotlSL: H,
              rotlBH: eA,
              rotlBL: CA,
              add: IA,
              add3L: k,
              add3H: tA,
              add4L: lA,
              add4H: uA,
              add5H: v,
              add5L: w
            };
            B.default = RA;
          },
          /***/
          2491(Q, B) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.crypto = void 0, B.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
          },
          /***/
          2650(Q, B, r) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.sha512_224 = B.sha512_256 = B.sha384 = B.sha512 = B.sha224 = B.sha256 = B.SHA512_256 = B.SHA512_224 = B.SHA384 = B.SHA512 = B.SHA224 = B.SHA256 = void 0;
            const A = r(6784), a = r(4996), D = r(3973), x = /* @__PURE__ */ Uint32Array.from([
              1116352408,
              1899447441,
              3049323471,
              3921009573,
              961987163,
              1508970993,
              2453635748,
              2870763221,
              3624381080,
              310598401,
              607225278,
              1426881987,
              1925078388,
              2162078206,
              2614888103,
              3248222580,
              3835390401,
              4022224774,
              264347078,
              604807628,
              770255983,
              1249150122,
              1555081692,
              1996064986,
              2554220882,
              2821834349,
              2952996808,
              3210313671,
              3336571891,
              3584528711,
              113926993,
              338241895,
              666307205,
              773529912,
              1294757372,
              1396182291,
              1695183700,
              1986661051,
              2177026350,
              2456956037,
              2730485921,
              2820302411,
              3259730800,
              3345764771,
              3516065817,
              3600352804,
              4094571909,
              275423344,
              430227734,
              506948616,
              659060556,
              883997877,
              958139571,
              1322822218,
              1537002063,
              1747873779,
              1955562222,
              2024104815,
              2227730452,
              2361852424,
              2428436474,
              2756734187,
              3204031479,
              3329325298
            ]), N = /* @__PURE__ */ new Uint32Array(64);
            class P extends A.HashMD {
              constructor(lA = 32) {
                super(64, lA, 8, !1), this.A = A.SHA256_IV[0] | 0, this.B = A.SHA256_IV[1] | 0, this.C = A.SHA256_IV[2] | 0, this.D = A.SHA256_IV[3] | 0, this.E = A.SHA256_IV[4] | 0, this.F = A.SHA256_IV[5] | 0, this.G = A.SHA256_IV[6] | 0, this.H = A.SHA256_IV[7] | 0;
              }
              get() {
                const { A: lA, B: uA, C: w, D: v, E: RA, F: DA, G: $, H: cA } = this;
                return [lA, uA, w, v, RA, DA, $, cA];
              }
              // prettier-ignore
              set(lA, uA, w, v, RA, DA, $, cA) {
                this.A = lA | 0, this.B = uA | 0, this.C = w | 0, this.D = v | 0, this.E = RA | 0, this.F = DA | 0, this.G = $ | 0, this.H = cA | 0;
              }
              process(lA, uA) {
                for (let VA = 0; VA < 16; VA++, uA += 4)
                  N[VA] = lA.getUint32(uA, !1);
                for (let VA = 16; VA < 64; VA++) {
                  const EA = N[VA - 15], zA = N[VA - 2], OA = (0, D.rotr)(EA, 7) ^ (0, D.rotr)(EA, 18) ^ EA >>> 3, xA = (0, D.rotr)(zA, 17) ^ (0, D.rotr)(zA, 19) ^ zA >>> 10;
                  N[VA] = xA + N[VA - 7] + OA + N[VA - 16] | 0;
                }
                let { A: w, B: v, C: RA, D: DA, E: $, F: cA, G: Ae, H: kA } = this;
                for (let VA = 0; VA < 64; VA++) {
                  const EA = (0, D.rotr)($, 6) ^ (0, D.rotr)($, 11) ^ (0, D.rotr)($, 25), zA = kA + EA + (0, A.Chi)($, cA, Ae) + x[VA] + N[VA] | 0, xA = ((0, D.rotr)(w, 2) ^ (0, D.rotr)(w, 13) ^ (0, D.rotr)(w, 22)) + (0, A.Maj)(w, v, RA) | 0;
                  kA = Ae, Ae = cA, cA = $, $ = DA + zA | 0, DA = RA, RA = v, v = w, w = zA + xA | 0;
                }
                w = w + this.A | 0, v = v + this.B | 0, RA = RA + this.C | 0, DA = DA + this.D | 0, $ = $ + this.E | 0, cA = cA + this.F | 0, Ae = Ae + this.G | 0, kA = kA + this.H | 0, this.set(w, v, RA, DA, $, cA, Ae, kA);
              }
              roundClean() {
                (0, D.clean)(N);
              }
              destroy() {
                this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, D.clean)(this.buffer);
              }
            }
            B.SHA256 = P;
            class d extends P {
              constructor() {
                super(28), this.A = A.SHA224_IV[0] | 0, this.B = A.SHA224_IV[1] | 0, this.C = A.SHA224_IV[2] | 0, this.D = A.SHA224_IV[3] | 0, this.E = A.SHA224_IV[4] | 0, this.F = A.SHA224_IV[5] | 0, this.G = A.SHA224_IV[6] | 0, this.H = A.SHA224_IV[7] | 0;
              }
            }
            B.SHA224 = d;
            const J = a.split([
              "0x428a2f98d728ae22",
              "0x7137449123ef65cd",
              "0xb5c0fbcfec4d3b2f",
              "0xe9b5dba58189dbbc",
              "0x3956c25bf348b538",
              "0x59f111f1b605d019",
              "0x923f82a4af194f9b",
              "0xab1c5ed5da6d8118",
              "0xd807aa98a3030242",
              "0x12835b0145706fbe",
              "0x243185be4ee4b28c",
              "0x550c7dc3d5ffb4e2",
              "0x72be5d74f27b896f",
              "0x80deb1fe3b1696b1",
              "0x9bdc06a725c71235",
              "0xc19bf174cf692694",
              "0xe49b69c19ef14ad2",
              "0xefbe4786384f25e3",
              "0x0fc19dc68b8cd5b5",
              "0x240ca1cc77ac9c65",
              "0x2de92c6f592b0275",
              "0x4a7484aa6ea6e483",
              "0x5cb0a9dcbd41fbd4",
              "0x76f988da831153b5",
              "0x983e5152ee66dfab",
              "0xa831c66d2db43210",
              "0xb00327c898fb213f",
              "0xbf597fc7beef0ee4",
              "0xc6e00bf33da88fc2",
              "0xd5a79147930aa725",
              "0x06ca6351e003826f",
              "0x142929670a0e6e70",
              "0x27b70a8546d22ffc",
              "0x2e1b21385c26c926",
              "0x4d2c6dfc5ac42aed",
              "0x53380d139d95b3df",
              "0x650a73548baf63de",
              "0x766a0abb3c77b2a8",
              "0x81c2c92e47edaee6",
              "0x92722c851482353b",
              "0xa2bfe8a14cf10364",
              "0xa81a664bbc423001",
              "0xc24b8b70d0f89791",
              "0xc76c51a30654be30",
              "0xd192e819d6ef5218",
              "0xd69906245565a910",
              "0xf40e35855771202a",
              "0x106aa07032bbd1b8",
              "0x19a4c116b8d2d0c8",
              "0x1e376c085141ab53",
              "0x2748774cdf8eeb99",
              "0x34b0bcb5e19b48a8",
              "0x391c0cb3c5c95a63",
              "0x4ed8aa4ae3418acb",
              "0x5b9cca4f7763e373",
              "0x682e6ff3d6b2b8a3",
              "0x748f82ee5defb2fc",
              "0x78a5636f43172f60",
              "0x84c87814a1f0ab72",
              "0x8cc702081a6439ec",
              "0x90befffa23631e28",
              "0xa4506cebde82bde9",
              "0xbef9a3f7b2c67915",
              "0xc67178f2e372532b",
              "0xca273eceea26619c",
              "0xd186b8c721c0c207",
              "0xeada7dd6cde0eb1e",
              "0xf57d4f7fee6ed178",
              "0x06f067aa72176fba",
              "0x0a637dc5a2c898a6",
              "0x113f9804bef90dae",
              "0x1b710b35131c471b",
              "0x28db77f523047d84",
              "0x32caab7b40c72493",
              "0x3c9ebe0a15c9bebc",
              "0x431d67c49c100d4c",
              "0x4cc5d4becb3e42b6",
              "0x597f299cfc657e2a",
              "0x5fcb6fab3ad6faec",
              "0x6c44198c4a475817"
            ].map((tA) => BigInt(tA))), q = J[0], AA = J[1], K = /* @__PURE__ */ new Uint32Array(80), z = /* @__PURE__ */ new Uint32Array(80);
            class T extends A.HashMD {
              constructor(lA = 64) {
                super(128, lA, 16, !1), this.Ah = A.SHA512_IV[0] | 0, this.Al = A.SHA512_IV[1] | 0, this.Bh = A.SHA512_IV[2] | 0, this.Bl = A.SHA512_IV[3] | 0, this.Ch = A.SHA512_IV[4] | 0, this.Cl = A.SHA512_IV[5] | 0, this.Dh = A.SHA512_IV[6] | 0, this.Dl = A.SHA512_IV[7] | 0, this.Eh = A.SHA512_IV[8] | 0, this.El = A.SHA512_IV[9] | 0, this.Fh = A.SHA512_IV[10] | 0, this.Fl = A.SHA512_IV[11] | 0, this.Gh = A.SHA512_IV[12] | 0, this.Gl = A.SHA512_IV[13] | 0, this.Hh = A.SHA512_IV[14] | 0, this.Hl = A.SHA512_IV[15] | 0;
              }
              // prettier-ignore
              get() {
                const { Ah: lA, Al: uA, Bh: w, Bl: v, Ch: RA, Cl: DA, Dh: $, Dl: cA, Eh: Ae, El: kA, Fh: VA, Fl: EA, Gh: zA, Gl: OA, Hh: xA, Hl: LA } = this;
                return [lA, uA, w, v, RA, DA, $, cA, Ae, kA, VA, EA, zA, OA, xA, LA];
              }
              // prettier-ignore
              set(lA, uA, w, v, RA, DA, $, cA, Ae, kA, VA, EA, zA, OA, xA, LA) {
                this.Ah = lA | 0, this.Al = uA | 0, this.Bh = w | 0, this.Bl = v | 0, this.Ch = RA | 0, this.Cl = DA | 0, this.Dh = $ | 0, this.Dl = cA | 0, this.Eh = Ae | 0, this.El = kA | 0, this.Fh = VA | 0, this.Fl = EA | 0, this.Gh = zA | 0, this.Gl = OA | 0, this.Hh = xA | 0, this.Hl = LA | 0;
              }
              process(lA, uA) {
                for (let fA = 0; fA < 16; fA++, uA += 4)
                  K[fA] = lA.getUint32(uA), z[fA] = lA.getUint32(uA += 4);
                for (let fA = 16; fA < 80; fA++) {
                  const sA = K[fA - 15] | 0, F = z[fA - 15] | 0, o = a.rotrSH(sA, F, 1) ^ a.rotrSH(sA, F, 8) ^ a.shrSH(sA, F, 7), h = a.rotrSL(sA, F, 1) ^ a.rotrSL(sA, F, 8) ^ a.shrSL(sA, F, 7), _ = K[fA - 2] | 0, oA = z[fA - 2] | 0, p = a.rotrSH(_, oA, 19) ^ a.rotrBH(_, oA, 61) ^ a.shrSH(_, oA, 6), rA = a.rotrSL(_, oA, 19) ^ a.rotrBL(_, oA, 61) ^ a.shrSL(_, oA, 6), QA = a.add4L(h, rA, z[fA - 7], z[fA - 16]), bA = a.add4H(QA, o, p, K[fA - 7], K[fA - 16]);
                  K[fA] = bA | 0, z[fA] = QA | 0;
                }
                let { Ah: w, Al: v, Bh: RA, Bl: DA, Ch: $, Cl: cA, Dh: Ae, Dl: kA, Eh: VA, El: EA, Fh: zA, Fl: OA, Gh: xA, Gl: LA, Hh: yA, Hl: TA } = this;
                for (let fA = 0; fA < 80; fA++) {
                  const sA = a.rotrSH(VA, EA, 14) ^ a.rotrSH(VA, EA, 18) ^ a.rotrBH(VA, EA, 41), F = a.rotrSL(VA, EA, 14) ^ a.rotrSL(VA, EA, 18) ^ a.rotrBL(VA, EA, 41), o = VA & zA ^ ~VA & xA, h = EA & OA ^ ~EA & LA, _ = a.add5L(TA, F, h, AA[fA], z[fA]), oA = a.add5H(_, yA, sA, o, q[fA], K[fA]), p = _ | 0, rA = a.rotrSH(w, v, 28) ^ a.rotrBH(w, v, 34) ^ a.rotrBH(w, v, 39), QA = a.rotrSL(w, v, 28) ^ a.rotrBL(w, v, 34) ^ a.rotrBL(w, v, 39), bA = w & RA ^ w & $ ^ RA & $, y = v & DA ^ v & cA ^ DA & cA;
                  yA = xA | 0, TA = LA | 0, xA = zA | 0, LA = OA | 0, zA = VA | 0, OA = EA | 0, { h: VA, l: EA } = a.add(Ae | 0, kA | 0, oA | 0, p | 0), Ae = $ | 0, kA = cA | 0, $ = RA | 0, cA = DA | 0, RA = w | 0, DA = v | 0;
                  const M = a.add3L(p, QA, y);
                  w = a.add3H(M, oA, rA, bA), v = M | 0;
                }
                ({ h: w, l: v } = a.add(this.Ah | 0, this.Al | 0, w | 0, v | 0)), { h: RA, l: DA } = a.add(this.Bh | 0, this.Bl | 0, RA | 0, DA | 0), { h: $, l: cA } = a.add(this.Ch | 0, this.Cl | 0, $ | 0, cA | 0), { h: Ae, l: kA } = a.add(this.Dh | 0, this.Dl | 0, Ae | 0, kA | 0), { h: VA, l: EA } = a.add(this.Eh | 0, this.El | 0, VA | 0, EA | 0), { h: zA, l: OA } = a.add(this.Fh | 0, this.Fl | 0, zA | 0, OA | 0), { h: xA, l: LA } = a.add(this.Gh | 0, this.Gl | 0, xA | 0, LA | 0), { h: yA, l: TA } = a.add(this.Hh | 0, this.Hl | 0, yA | 0, TA | 0), this.set(w, v, RA, DA, $, cA, Ae, kA, VA, EA, zA, OA, xA, LA, yA, TA);
              }
              roundClean() {
                (0, D.clean)(K, z);
              }
              destroy() {
                (0, D.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
              }
            }
            B.SHA512 = T;
            class H extends T {
              constructor() {
                super(48), this.Ah = A.SHA384_IV[0] | 0, this.Al = A.SHA384_IV[1] | 0, this.Bh = A.SHA384_IV[2] | 0, this.Bl = A.SHA384_IV[3] | 0, this.Ch = A.SHA384_IV[4] | 0, this.Cl = A.SHA384_IV[5] | 0, this.Dh = A.SHA384_IV[6] | 0, this.Dl = A.SHA384_IV[7] | 0, this.Eh = A.SHA384_IV[8] | 0, this.El = A.SHA384_IV[9] | 0, this.Fh = A.SHA384_IV[10] | 0, this.Fl = A.SHA384_IV[11] | 0, this.Gh = A.SHA384_IV[12] | 0, this.Gl = A.SHA384_IV[13] | 0, this.Hh = A.SHA384_IV[14] | 0, this.Hl = A.SHA384_IV[15] | 0;
              }
            }
            B.SHA384 = H;
            const eA = /* @__PURE__ */ Uint32Array.from([
              2352822216,
              424955298,
              1944164710,
              2312950998,
              502970286,
              855612546,
              1738396948,
              1479516111,
              258812777,
              2077511080,
              2011393907,
              79989058,
              1067287976,
              1780299464,
              286451373,
              2446758561
            ]), CA = /* @__PURE__ */ Uint32Array.from([
              573645204,
              4230739756,
              2673172387,
              3360449730,
              596883563,
              1867755857,
              2520282905,
              1497426621,
              2519219938,
              2827943907,
              3193839141,
              1401305490,
              721525244,
              746961066,
              246885852,
              2177182882
            ]);
            class IA extends T {
              constructor() {
                super(28), this.Ah = eA[0] | 0, this.Al = eA[1] | 0, this.Bh = eA[2] | 0, this.Bl = eA[3] | 0, this.Ch = eA[4] | 0, this.Cl = eA[5] | 0, this.Dh = eA[6] | 0, this.Dl = eA[7] | 0, this.Eh = eA[8] | 0, this.El = eA[9] | 0, this.Fh = eA[10] | 0, this.Fl = eA[11] | 0, this.Gh = eA[12] | 0, this.Gl = eA[13] | 0, this.Hh = eA[14] | 0, this.Hl = eA[15] | 0;
              }
            }
            B.SHA512_224 = IA;
            class k extends T {
              constructor() {
                super(32), this.Ah = CA[0] | 0, this.Al = CA[1] | 0, this.Bh = CA[2] | 0, this.Bl = CA[3] | 0, this.Ch = CA[4] | 0, this.Cl = CA[5] | 0, this.Dh = CA[6] | 0, this.Dl = CA[7] | 0, this.Eh = CA[8] | 0, this.El = CA[9] | 0, this.Fh = CA[10] | 0, this.Fl = CA[11] | 0, this.Gh = CA[12] | 0, this.Gl = CA[13] | 0, this.Hh = CA[14] | 0, this.Hl = CA[15] | 0;
              }
            }
            B.SHA512_256 = k, B.sha256 = (0, D.createHasher)(() => new P()), B.sha224 = (0, D.createHasher)(() => new d()), B.sha512 = (0, D.createHasher)(() => new T()), B.sha384 = (0, D.createHasher)(() => new H()), B.sha512_256 = (0, D.createHasher)(() => new k()), B.sha512_224 = (0, D.createHasher)(() => new IA());
          },
          /***/
          7785(Q, B, r) {
            Object.defineProperty(B, "__esModule", { value: !0 }), B.sha224 = B.SHA224 = B.sha256 = B.SHA256 = void 0;
            const A = r(2650);
            B.SHA256 = A.SHA256, B.sha256 = A.sha256, B.SHA224 = A.SHA224, B.sha224 = A.sha224;
          },
          /***/
          3973(Q, B, r) {
            /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
            Object.defineProperty(B, "__esModule", { value: !0 }), B.wrapXOFConstructorWithOpts = B.wrapConstructorWithOpts = B.wrapConstructor = B.Hash = B.nextTick = B.swap32IfBE = B.byteSwapIfBE = B.swap8IfBE = B.isLE = void 0, B.isBytes = a, B.anumber = D, B.abytes = x, B.ahash = N, B.aexists = P, B.aoutput = d, B.u8 = J, B.u32 = q, B.clean = AA, B.createView = K, B.rotr = z, B.rotl = T, B.byteSwap = H, B.byteSwap32 = eA, B.bytesToHex = k, B.hexToBytes = uA, B.asyncLoop = v, B.utf8ToBytes = RA, B.bytesToUtf8 = DA, B.toBytes = $, B.kdfInputToBytes = cA, B.concatBytes = Ae, B.checkOpts = kA, B.createHasher = EA, B.createOptHasher = zA, B.createXOFer = OA, B.randomBytes = xA;
            const A = r(2491);
            function a(LA) {
              return LA instanceof Uint8Array || ArrayBuffer.isView(LA) && LA.constructor.name === "Uint8Array";
            }
            function D(LA) {
              if (!Number.isSafeInteger(LA) || LA < 0)
                throw new Error("positive integer expected, got " + LA);
            }
            function x(LA, ...yA) {
              if (!a(LA))
                throw new Error("Uint8Array expected");
              if (yA.length > 0 && !yA.includes(LA.length))
                throw new Error("Uint8Array expected of length " + yA + ", got length=" + LA.length);
            }
            function N(LA) {
              if (typeof LA != "function" || typeof LA.create != "function")
                throw new Error("Hash should be wrapped by utils.createHasher");
              D(LA.outputLen), D(LA.blockLen);
            }
            function P(LA, yA = !0) {
              if (LA.destroyed)
                throw new Error("Hash instance has been destroyed");
              if (yA && LA.finished)
                throw new Error("Hash#digest() has already been called");
            }
            function d(LA, yA) {
              x(LA);
              const TA = yA.outputLen;
              if (LA.length < TA)
                throw new Error("digestInto() expects output buffer of length at least " + TA);
            }
            function J(LA) {
              return new Uint8Array(LA.buffer, LA.byteOffset, LA.byteLength);
            }
            function q(LA) {
              return new Uint32Array(LA.buffer, LA.byteOffset, Math.floor(LA.byteLength / 4));
            }
            function AA(...LA) {
              for (let yA = 0; yA < LA.length; yA++)
                LA[yA].fill(0);
            }
            function K(LA) {
              return new DataView(LA.buffer, LA.byteOffset, LA.byteLength);
            }
            function z(LA, yA) {
              return LA << 32 - yA | LA >>> yA;
            }
            function T(LA, yA) {
              return LA << yA | LA >>> 32 - yA >>> 0;
            }
            B.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
            function H(LA) {
              return LA << 24 & 4278190080 | LA << 8 & 16711680 | LA >>> 8 & 65280 | LA >>> 24 & 255;
            }
            B.swap8IfBE = B.isLE ? (LA) => LA : (LA) => H(LA), B.byteSwapIfBE = B.swap8IfBE;
            function eA(LA) {
              for (let yA = 0; yA < LA.length; yA++)
                LA[yA] = H(LA[yA]);
              return LA;
            }
            B.swap32IfBE = B.isLE ? (LA) => LA : eA;
            const CA = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", IA = /* @__PURE__ */ Array.from({ length: 256 }, (LA, yA) => yA.toString(16).padStart(2, "0"));
            function k(LA) {
              if (x(LA), CA)
                return LA.toHex();
              let yA = "";
              for (let TA = 0; TA < LA.length; TA++)
                yA += IA[LA[TA]];
              return yA;
            }
            const tA = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
            function lA(LA) {
              if (LA >= tA._0 && LA <= tA._9)
                return LA - tA._0;
              if (LA >= tA.A && LA <= tA.F)
                return LA - (tA.A - 10);
              if (LA >= tA.a && LA <= tA.f)
                return LA - (tA.a - 10);
            }
            function uA(LA) {
              if (typeof LA != "string")
                throw new Error("hex string expected, got " + typeof LA);
              if (CA)
                return Uint8Array.fromHex(LA);
              const yA = LA.length, TA = yA / 2;
              if (yA % 2)
                throw new Error("hex string expected, got unpadded hex of length " + yA);
              const fA = new Uint8Array(TA);
              for (let sA = 0, F = 0; sA < TA; sA++, F += 2) {
                const o = lA(LA.charCodeAt(F)), h = lA(LA.charCodeAt(F + 1));
                if (o === void 0 || h === void 0) {
                  const _ = LA[F] + LA[F + 1];
                  throw new Error('hex string expected, got non-hex character "' + _ + '" at index ' + F);
                }
                fA[sA] = o * 16 + h;
              }
              return fA;
            }
            const w = async () => {
            };
            B.nextTick = w;
            async function v(LA, yA, TA) {
              let fA = Date.now();
              for (let sA = 0; sA < LA; sA++) {
                TA(sA);
                const F = Date.now() - fA;
                F >= 0 && F < yA || (await (0, B.nextTick)(), fA += F);
              }
            }
            function RA(LA) {
              if (typeof LA != "string")
                throw new Error("string expected");
              return new Uint8Array(new TextEncoder().encode(LA));
            }
            function DA(LA) {
              return new TextDecoder().decode(LA);
            }
            function $(LA) {
              return typeof LA == "string" && (LA = RA(LA)), x(LA), LA;
            }
            function cA(LA) {
              return typeof LA == "string" && (LA = RA(LA)), x(LA), LA;
            }
            function Ae(...LA) {
              let yA = 0;
              for (let fA = 0; fA < LA.length; fA++) {
                const sA = LA[fA];
                x(sA), yA += sA.length;
              }
              const TA = new Uint8Array(yA);
              for (let fA = 0, sA = 0; fA < LA.length; fA++) {
                const F = LA[fA];
                TA.set(F, sA), sA += F.length;
              }
              return TA;
            }
            function kA(LA, yA) {
              if (yA !== void 0 && {}.toString.call(yA) !== "[object Object]")
                throw new Error("options should be object or undefined");
              return Object.assign(LA, yA);
            }
            class VA {
            }
            B.Hash = VA;
            function EA(LA) {
              const yA = (fA) => LA().update($(fA)).digest(), TA = LA();
              return yA.outputLen = TA.outputLen, yA.blockLen = TA.blockLen, yA.create = () => LA(), yA;
            }
            function zA(LA) {
              const yA = (fA, sA) => LA(sA).update($(fA)).digest(), TA = LA({});
              return yA.outputLen = TA.outputLen, yA.blockLen = TA.blockLen, yA.create = (fA) => LA(fA), yA;
            }
            function OA(LA) {
              const yA = (fA, sA) => LA(sA).update($(fA)).digest(), TA = LA({});
              return yA.outputLen = TA.outputLen, yA.blockLen = TA.blockLen, yA.create = (fA) => LA(fA), yA;
            }
            B.wrapConstructor = EA, B.wrapConstructorWithOpts = zA, B.wrapXOFConstructorWithOpts = OA;
            function xA(LA = 32) {
              if (A.crypto && typeof A.crypto.getRandomValues == "function")
                return A.crypto.getRandomValues(new Uint8Array(LA));
              if (A.crypto && typeof A.crypto.randomBytes == "function")
                return Uint8Array.from(A.crypto.randomBytes(LA));
              throw new Error("crypto.getRandomValues must be defined");
            }
          },
          /***/
          7801(Q, B, r) {
            var A = r(9964);
            function a(h) {
              "@babel/helpers - typeof";
              return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_) {
                return typeof _;
              } : function(_) {
                return _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;
              }, a(h);
            }
            function D(h, _, oA) {
              return Object.defineProperty(h, "prototype", { writable: !1 }), h;
            }
            function x(h, _) {
              if (!(h instanceof _))
                throw new TypeError("Cannot call a class as a function");
            }
            var N = r(5403), P = N.codes, d = P.ERR_AMBIGUOUS_ARGUMENT, J = P.ERR_INVALID_ARG_TYPE, q = P.ERR_INVALID_ARG_VALUE, AA = P.ERR_INVALID_RETURN_VALUE, K = P.ERR_MISSING_ARGS, z = r(5416), T = r(7187), H = T.inspect, eA = r(7187).types, CA = eA.isPromise, IA = eA.isRegExp, k = r(7596)(), tA = r(9636)(), lA = r(7913)("RegExp.prototype.test"), uA, w;
            function v() {
              var h = r(6781);
              uA = h.isDeepEqual, w = h.isDeepStrictEqual;
            }
            var RA = !1, DA = Q.exports = VA, $ = {};
            function cA(h) {
              throw h.message instanceof Error ? h.message : new z(h);
            }
            function Ae(h, _, oA, p, rA) {
              var QA = arguments.length, bA;
              if (QA === 0)
                bA = "Failed";
              else if (QA === 1)
                oA = h, h = void 0;
              else {
                if (RA === !1) {
                  RA = !0;
                  var y = A.emitWarning ? A.emitWarning : console.warn.bind(console);
                  y("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
                }
                QA === 2 && (p = "!=");
              }
              if (oA instanceof Error) throw oA;
              var M = {
                actual: h,
                expected: _,
                operator: p === void 0 ? "fail" : p,
                stackStartFn: rA || Ae
              };
              oA !== void 0 && (M.message = oA);
              var FA = new z(M);
              throw bA && (FA.message = bA, FA.generatedMessage = !0), FA;
            }
            DA.fail = Ae, DA.AssertionError = z;
            function kA(h, _, oA, p) {
              if (!oA) {
                var rA = !1;
                if (_ === 0)
                  rA = !0, p = "No value argument passed to `assert.ok()`";
                else if (p instanceof Error)
                  throw p;
                var QA = new z({
                  actual: oA,
                  expected: !0,
                  message: p,
                  operator: "==",
                  stackStartFn: h
                });
                throw QA.generatedMessage = rA, QA;
              }
            }
            function VA() {
              for (var h = arguments.length, _ = new Array(h), oA = 0; oA < h; oA++)
                _[oA] = arguments[oA];
              kA.apply(void 0, [VA, _.length].concat(_));
            }
            DA.ok = VA, DA.equal = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              _ != oA && cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "==",
                stackStartFn: h
              });
            }, DA.notEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              _ == oA && cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "!=",
                stackStartFn: h
              });
            }, DA.deepEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              uA === void 0 && v(), uA(_, oA) || cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "deepEqual",
                stackStartFn: h
              });
            }, DA.notDeepEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              uA === void 0 && v(), uA(_, oA) && cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "notDeepEqual",
                stackStartFn: h
              });
            }, DA.deepStrictEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              uA === void 0 && v(), w(_, oA) || cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "deepStrictEqual",
                stackStartFn: h
              });
            }, DA.notDeepStrictEqual = EA;
            function EA(h, _, oA) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              uA === void 0 && v(), w(h, _) && cA({
                actual: h,
                expected: _,
                message: oA,
                operator: "notDeepStrictEqual",
                stackStartFn: EA
              });
            }
            DA.strictEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              tA(_, oA) || cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "strictEqual",
                stackStartFn: h
              });
            }, DA.notStrictEqual = function h(_, oA, p) {
              if (arguments.length < 2)
                throw new K("actual", "expected");
              tA(_, oA) && cA({
                actual: _,
                expected: oA,
                message: p,
                operator: "notStrictEqual",
                stackStartFn: h
              });
            };
            var zA = /* @__PURE__ */ D(function h(_, oA, p) {
              var rA = this;
              x(this, h), oA.forEach(function(QA) {
                QA in _ && (p !== void 0 && typeof p[QA] == "string" && IA(_[QA]) && lA(_[QA], p[QA]) ? rA[QA] = p[QA] : rA[QA] = _[QA]);
              });
            });
            function OA(h, _, oA, p, rA, QA) {
              if (!(oA in h) || !w(h[oA], _[oA])) {
                if (!p) {
                  var bA = new zA(h, rA), y = new zA(_, rA, h), M = new z({
                    actual: bA,
                    expected: y,
                    operator: "deepStrictEqual",
                    stackStartFn: QA
                  });
                  throw M.actual = h, M.expected = _, M.operator = QA.name, M;
                }
                cA({
                  actual: h,
                  expected: _,
                  message: p,
                  operator: QA.name,
                  stackStartFn: QA
                });
              }
            }
            function xA(h, _, oA, p) {
              if (typeof _ != "function") {
                if (IA(_)) return lA(_, h);
                if (arguments.length === 2)
                  throw new J("expected", ["Function", "RegExp"], _);
                if (a(h) !== "object" || h === null) {
                  var rA = new z({
                    actual: h,
                    expected: _,
                    message: oA,
                    operator: "deepStrictEqual",
                    stackStartFn: p
                  });
                  throw rA.operator = p.name, rA;
                }
                var QA = Object.keys(_);
                if (_ instanceof Error)
                  QA.push("name", "message");
                else if (QA.length === 0)
                  throw new q("error", _, "may not be an empty object");
                return uA === void 0 && v(), QA.forEach(function(bA) {
                  typeof h[bA] == "string" && IA(_[bA]) && lA(_[bA], h[bA]) || OA(h, _, bA, oA, QA, p);
                }), !0;
              }
              return _.prototype !== void 0 && h instanceof _ ? !0 : Error.isPrototypeOf(_) ? !1 : _.call({}, h) === !0;
            }
            function LA(h) {
              if (typeof h != "function")
                throw new J("fn", "Function", h);
              try {
                h();
              } catch (_) {
                return _;
              }
              return $;
            }
            function yA(h) {
              return CA(h) || h !== null && a(h) === "object" && typeof h.then == "function" && typeof h.catch == "function";
            }
            function TA(h) {
              return Promise.resolve().then(function() {
                var _;
                if (typeof h == "function") {
                  if (_ = h(), !yA(_))
                    throw new AA("instance of Promise", "promiseFn", _);
                } else if (yA(h))
                  _ = h;
                else
                  throw new J("promiseFn", ["Function", "Promise"], h);
                return Promise.resolve().then(function() {
                  return _;
                }).then(function() {
                  return $;
                }).catch(function(oA) {
                  return oA;
                });
              });
            }
            function fA(h, _, oA, p) {
              if (typeof oA == "string") {
                if (arguments.length === 4)
                  throw new J("error", ["Object", "Error", "Function", "RegExp"], oA);
                if (a(_) === "object" && _ !== null) {
                  if (_.message === oA)
                    throw new d("error/message", 'The error message "'.concat(_.message, '" is identical to the message.'));
                } else if (_ === oA)
                  throw new d("error/message", 'The error "'.concat(_, '" is identical to the message.'));
                p = oA, oA = void 0;
              } else if (oA != null && a(oA) !== "object" && typeof oA != "function")
                throw new J("error", ["Object", "Error", "Function", "RegExp"], oA);
              if (_ === $) {
                var rA = "";
                oA && oA.name && (rA += " (".concat(oA.name, ")")), rA += p ? ": ".concat(p) : ".";
                var QA = h.name === "rejects" ? "rejection" : "exception";
                cA({
                  actual: void 0,
                  expected: oA,
                  operator: h.name,
                  message: "Missing expected ".concat(QA).concat(rA),
                  stackStartFn: h
                });
              }
              if (oA && !xA(_, oA, p, h))
                throw _;
            }
            function sA(h, _, oA, p) {
              if (_ !== $) {
                if (typeof oA == "string" && (p = oA, oA = void 0), !oA || xA(_, oA)) {
                  var rA = p ? ": ".concat(p) : ".", QA = h.name === "doesNotReject" ? "rejection" : "exception";
                  cA({
                    actual: _,
                    expected: oA,
                    operator: h.name,
                    message: "Got unwanted ".concat(QA).concat(rA, `
`) + 'Actual message: "'.concat(_ && _.message, '"'),
                    stackStartFn: h
                  });
                }
                throw _;
              }
            }
            DA.throws = function h(_) {
              for (var oA = arguments.length, p = new Array(oA > 1 ? oA - 1 : 0), rA = 1; rA < oA; rA++)
                p[rA - 1] = arguments[rA];
              fA.apply(void 0, [h, LA(_)].concat(p));
            }, DA.rejects = function h(_) {
              for (var oA = arguments.length, p = new Array(oA > 1 ? oA - 1 : 0), rA = 1; rA < oA; rA++)
                p[rA - 1] = arguments[rA];
              return TA(_).then(function(QA) {
                return fA.apply(void 0, [h, QA].concat(p));
              });
            }, DA.doesNotThrow = function h(_) {
              for (var oA = arguments.length, p = new Array(oA > 1 ? oA - 1 : 0), rA = 1; rA < oA; rA++)
                p[rA - 1] = arguments[rA];
              sA.apply(void 0, [h, LA(_)].concat(p));
            }, DA.doesNotReject = function h(_) {
              for (var oA = arguments.length, p = new Array(oA > 1 ? oA - 1 : 0), rA = 1; rA < oA; rA++)
                p[rA - 1] = arguments[rA];
              return TA(_).then(function(QA) {
                return sA.apply(void 0, [h, QA].concat(p));
              });
            }, DA.ifError = function h(_) {
              if (_ != null) {
                var oA = "ifError got unwanted exception: ";
                a(_) === "object" && typeof _.message == "string" ? _.message.length === 0 && _.constructor ? oA += _.constructor.name : oA += _.message : oA += H(_);
                var p = new z({
                  actual: _,
                  expected: null,
                  operator: "ifError",
                  message: oA,
                  stackStartFn: h
                }), rA = _.stack;
                if (typeof rA == "string") {
                  var QA = rA.split(`
`);
                  QA.shift();
                  for (var bA = p.stack.split(`
`), y = 0; y < QA.length; y++) {
                    var M = bA.indexOf(QA[y]);
                    if (M !== -1) {
                      bA = bA.slice(0, M);
                      break;
                    }
                  }
                  p.stack = "".concat(bA.join(`
`), `
`).concat(QA.join(`
`));
                }
                throw p;
              }
            };
            function F(h, _, oA, p, rA) {
              if (!IA(_))
                throw new J("regexp", "RegExp", _);
              var QA = rA === "match";
              if (typeof h != "string" || lA(_, h) !== QA) {
                if (oA instanceof Error)
                  throw oA;
                var bA = !oA;
                oA = oA || (typeof h != "string" ? 'The "string" argument must be of type string. Received type ' + "".concat(a(h), " (").concat(H(h), ")") : (QA ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + "".concat(H(_), `. Input:

`).concat(H(h), `
`));
                var y = new z({
                  actual: h,
                  expected: _,
                  message: oA,
                  operator: rA,
                  stackStartFn: p
                });
                throw y.generatedMessage = bA, y;
              }
            }
            DA.match = function h(_, oA, p) {
              F(_, oA, p, h, "match");
            }, DA.doesNotMatch = function h(_, oA, p) {
              F(_, oA, p, h, "doesNotMatch");
            };
            function o() {
              for (var h = arguments.length, _ = new Array(h), oA = 0; oA < h; oA++)
                _[oA] = arguments[oA];
              kA.apply(void 0, [o, _.length].concat(_));
            }
            DA.strict = k(o, DA, {
              equal: DA.strictEqual,
              deepEqual: DA.deepStrictEqual,
              notEqual: DA.notStrictEqual,
              notDeepEqual: DA.notDeepStrictEqual
            }), DA.strict.strict = DA.strict;
          },
          /***/
          5416(Q, B, r) {
            var A = r(9964);
            function a(TA, fA) {
              var sA = Object.keys(TA);
              if (Object.getOwnPropertySymbols) {
                var F = Object.getOwnPropertySymbols(TA);
                fA && (F = F.filter(function(o) {
                  return Object.getOwnPropertyDescriptor(TA, o).enumerable;
                })), sA.push.apply(sA, F);
              }
              return sA;
            }
            function D(TA) {
              for (var fA = 1; fA < arguments.length; fA++) {
                var sA = arguments[fA] != null ? arguments[fA] : {};
                fA % 2 ? a(Object(sA), !0).forEach(function(F) {
                  x(TA, F, sA[F]);
                }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(TA, Object.getOwnPropertyDescriptors(sA)) : a(Object(sA)).forEach(function(F) {
                  Object.defineProperty(TA, F, Object.getOwnPropertyDescriptor(sA, F));
                });
              }
              return TA;
            }
            function x(TA, fA, sA) {
              return fA = J(fA), fA in TA ? Object.defineProperty(TA, fA, { value: sA, enumerable: !0, configurable: !0, writable: !0 }) : TA[fA] = sA, TA;
            }
            function N(TA, fA) {
              if (!(TA instanceof fA))
                throw new TypeError("Cannot call a class as a function");
            }
            function P(TA, fA) {
              for (var sA = 0; sA < fA.length; sA++) {
                var F = fA[sA];
                F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(TA, J(F.key), F);
              }
            }
            function d(TA, fA, sA) {
              return fA && P(TA.prototype, fA), Object.defineProperty(TA, "prototype", { writable: !1 }), TA;
            }
            function J(TA) {
              var fA = q(TA, "string");
              return lA(fA) === "symbol" ? fA : String(fA);
            }
            function q(TA, fA) {
              if (lA(TA) !== "object" || TA === null) return TA;
              var sA = TA[Symbol.toPrimitive];
              if (sA !== void 0) {
                var F = sA.call(TA, fA);
                if (lA(F) !== "object") return F;
                throw new TypeError("@@toPrimitive must return a primitive value.");
              }
              return String(TA);
            }
            function AA(TA, fA) {
              if (typeof fA != "function" && fA !== null)
                throw new TypeError("Super expression must either be null or a function");
              TA.prototype = Object.create(fA && fA.prototype, { constructor: { value: TA, writable: !0, configurable: !0 } }), Object.defineProperty(TA, "prototype", { writable: !1 }), fA && k(TA, fA);
            }
            function K(TA) {
              var fA = CA();
              return function() {
                var F = tA(TA), o;
                if (fA) {
                  var h = tA(this).constructor;
                  o = Reflect.construct(F, arguments, h);
                } else
                  o = F.apply(this, arguments);
                return z(this, o);
              };
            }
            function z(TA, fA) {
              if (fA && (lA(fA) === "object" || typeof fA == "function"))
                return fA;
              if (fA !== void 0)
                throw new TypeError("Derived constructors may only return object or undefined");
              return T(TA);
            }
            function T(TA) {
              if (TA === void 0)
                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
              return TA;
            }
            function H(TA) {
              var fA = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
              return H = function(F) {
                if (F === null || !IA(F)) return F;
                if (typeof F != "function")
                  throw new TypeError("Super expression must either be null or a function");
                if (typeof fA < "u") {
                  if (fA.has(F)) return fA.get(F);
                  fA.set(F, o);
                }
                function o() {
                  return eA(F, arguments, tA(this).constructor);
                }
                return o.prototype = Object.create(F.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), k(o, F);
              }, H(TA);
            }
            function eA(TA, fA, sA) {
              return CA() ? eA = Reflect.construct.bind() : eA = function(o, h, _) {
                var oA = [null];
                oA.push.apply(oA, h);
                var p = Function.bind.apply(o, oA), rA = new p();
                return _ && k(rA, _.prototype), rA;
              }, eA.apply(null, arguments);
            }
            function CA() {
              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;
              }
            }
            function IA(TA) {
              return Function.toString.call(TA).indexOf("[native code]") !== -1;
            }
            function k(TA, fA) {
              return k = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(F, o) {
                return F.__proto__ = o, F;
              }, k(TA, fA);
            }
            function tA(TA) {
              return tA = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(sA) {
                return sA.__proto__ || Object.getPrototypeOf(sA);
              }, tA(TA);
            }
            function lA(TA) {
              "@babel/helpers - typeof";
              return lA = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(fA) {
                return typeof fA;
              } : function(fA) {
                return fA && typeof Symbol == "function" && fA.constructor === Symbol && fA !== Symbol.prototype ? "symbol" : typeof fA;
              }, lA(TA);
            }
            var uA = r(7187), w = uA.inspect, v = r(5403), RA = v.codes.ERR_INVALID_ARG_TYPE;
            function DA(TA, fA, sA) {
              return (sA === void 0 || sA > TA.length) && (sA = TA.length), TA.substring(sA - fA.length, sA) === fA;
            }
            function $(TA, fA) {
              if (fA = Math.floor(fA), TA.length == 0 || fA == 0) return "";
              var sA = TA.length * fA;
              for (fA = Math.floor(Math.log(fA) / Math.log(2)); fA; )
                TA += TA, fA--;
              return TA += TA.substring(0, sA - TA.length), TA;
            }
            var cA = "", Ae = "", kA = "", VA = "", EA = {
              deepStrictEqual: "Expected values to be strictly deep-equal:",
              strictEqual: "Expected values to be strictly equal:",
              strictEqualObject: 'Expected "actual" to be reference-equal to "expected":',
              deepEqual: "Expected values to be loosely deep-equal:",
              equal: "Expected values to be loosely equal:",
              notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:',
              notStrictEqual: 'Expected "actual" to be strictly unequal to:',
              notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":',
              notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:',
              notEqual: 'Expected "actual" to be loosely unequal to:',
              notIdentical: "Values identical but not reference-equal:"
            }, zA = 10;
            function OA(TA) {
              var fA = Object.keys(TA), sA = Object.create(Object.getPrototypeOf(TA));
              return fA.forEach(function(F) {
                sA[F] = TA[F];
              }), Object.defineProperty(sA, "message", {
                value: TA.message
              }), sA;
            }
            function xA(TA) {
              return w(TA, {
                compact: !1,
                customInspect: !1,
                depth: 1e3,
                maxArrayLength: 1 / 0,
                // Assert compares only enumerable properties (with a few exceptions).
                showHidden: !1,
                // Having a long line as error is better than wrapping the line for
                // comparison for now.
                // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we
                // have meta information about the inspected properties (i.e., know where
                // in what line the property starts and ends).
                breakLength: 1 / 0,
                // Assert does not detect proxies currently.
                showProxy: !1,
                sorted: !0,
                // Inspect getters as we also check them when comparing entries.
                getters: !0
              });
            }
            function LA(TA, fA, sA) {
              var F = "", o = "", h = 0, _ = "", oA = !1, p = xA(TA), rA = p.split(`
`), QA = xA(fA).split(`
`), bA = 0, y = "";
              if (sA === "strictEqual" && lA(TA) === "object" && lA(fA) === "object" && TA !== null && fA !== null && (sA = "strictEqualObject"), rA.length === 1 && QA.length === 1 && rA[0] !== QA[0]) {
                var M = rA[0].length + QA[0].length;
                if (M <= zA) {
                  if ((lA(TA) !== "object" || TA === null) && (lA(fA) !== "object" || fA === null) && (TA !== 0 || fA !== 0))
                    return "".concat(EA[sA], `

`) + "".concat(rA[0], " !== ").concat(QA[0], `
`);
                } else if (sA !== "strictEqualObject") {
                  var FA = A.stderr && A.stderr.isTTY ? A.stderr.columns : 80;
                  if (M < FA) {
                    for (; rA[0][bA] === QA[0][bA]; )
                      bA++;
                    bA > 2 && (y = `
  `.concat($(" ", bA), "^"), bA = 0);
                  }
                }
              }
              for (var dA = rA[rA.length - 1], he = QA[QA.length - 1]; dA === he && (bA++ < 2 ? _ = `
  `.concat(dA).concat(_) : F = dA, rA.pop(), QA.pop(), !(rA.length === 0 || QA.length === 0)); )
                dA = rA[rA.length - 1], he = QA[QA.length - 1];
              var ie = Math.max(rA.length, QA.length);
              if (ie === 0) {
                var KA = p.split(`
`);
                if (KA.length > 30)
                  for (KA[26] = "".concat(cA, "...").concat(VA); KA.length > 27; )
                    KA.pop();
                return "".concat(EA.notIdentical, `

`).concat(KA.join(`
`), `
`);
              }
              bA > 3 && (_ = `
`.concat(cA, "...").concat(VA).concat(_), oA = !0), F !== "" && (_ = `
  `.concat(F).concat(_), F = "");
              var Pe = 0, Je = EA[sA] + `
`.concat(Ae, "+ actual").concat(VA, " ").concat(kA, "- expected").concat(VA), Le = " ".concat(cA, "...").concat(VA, " Lines skipped");
              for (bA = 0; bA < ie; bA++) {
                var Re = bA - h;
                if (rA.length < bA + 1)
                  Re > 1 && bA > 2 && (Re > 4 ? (o += `
`.concat(cA, "...").concat(VA), oA = !0) : Re > 3 && (o += `
  `.concat(QA[bA - 2]), Pe++), o += `
  `.concat(QA[bA - 1]), Pe++), h = bA, F += `
`.concat(kA, "-").concat(VA, " ").concat(QA[bA]), Pe++;
                else if (QA.length < bA + 1)
                  Re > 1 && bA > 2 && (Re > 4 ? (o += `
`.concat(cA, "...").concat(VA), oA = !0) : Re > 3 && (o += `
  `.concat(rA[bA - 2]), Pe++), o += `
  `.concat(rA[bA - 1]), Pe++), h = bA, o += `
`.concat(Ae, "+").concat(VA, " ").concat(rA[bA]), Pe++;
                else {
                  var _e = QA[bA], se = rA[bA], Ee = se !== _e && (!DA(se, ",") || se.slice(0, -1) !== _e);
                  Ee && DA(_e, ",") && _e.slice(0, -1) === se && (Ee = !1, se += ","), Ee ? (Re > 1 && bA > 2 && (Re > 4 ? (o += `
`.concat(cA, "...").concat(VA), oA = !0) : Re > 3 && (o += `
  `.concat(rA[bA - 2]), Pe++), o += `
  `.concat(rA[bA - 1]), Pe++), h = bA, o += `
`.concat(Ae, "+").concat(VA, " ").concat(se), F += `
`.concat(kA, "-").concat(VA, " ").concat(_e), Pe += 2) : (o += F, F = "", (Re === 1 || bA === 0) && (o += `
  `.concat(se), Pe++));
                }
                if (Pe > 20 && bA < ie - 2)
                  return "".concat(Je).concat(Le, `
`).concat(o, `
`).concat(cA, "...").concat(VA).concat(F, `
`) + "".concat(cA, "...").concat(VA);
              }
              return "".concat(Je).concat(oA ? Le : "", `
`).concat(o).concat(F).concat(_).concat(y);
            }
            var yA = /* @__PURE__ */ (function(TA, fA) {
              AA(F, TA);
              var sA = K(F);
              function F(o) {
                var h;
                if (N(this, F), lA(o) !== "object" || o === null)
                  throw new RA("options", "Object", o);
                var _ = o.message, oA = o.operator, p = o.stackStartFn, rA = o.actual, QA = o.expected, bA = Error.stackTraceLimit;
                if (Error.stackTraceLimit = 0, _ != null)
                  h = sA.call(this, String(_));
                else if (A.stderr && A.stderr.isTTY && (A.stderr && A.stderr.getColorDepth && A.stderr.getColorDepth() !== 1 ? (cA = "\x1B[34m", Ae = "\x1B[32m", VA = "\x1B[39m", kA = "\x1B[31m") : (cA = "", Ae = "", VA = "", kA = "")), lA(rA) === "object" && rA !== null && lA(QA) === "object" && QA !== null && "stack" in rA && rA instanceof Error && "stack" in QA && QA instanceof Error && (rA = OA(rA), QA = OA(QA)), oA === "deepStrictEqual" || oA === "strictEqual")
                  h = sA.call(this, LA(rA, QA, oA));
                else if (oA === "notDeepStrictEqual" || oA === "notStrictEqual") {
                  var y = EA[oA], M = xA(rA).split(`
`);
                  if (oA === "notStrictEqual" && lA(rA) === "object" && rA !== null && (y = EA.notStrictEqualObject), M.length > 30)
                    for (M[26] = "".concat(cA, "...").concat(VA); M.length > 27; )
                      M.pop();
                  M.length === 1 ? h = sA.call(this, "".concat(y, " ").concat(M[0])) : h = sA.call(this, "".concat(y, `

`).concat(M.join(`
`), `
`));
                } else {
                  var FA = xA(rA), dA = "", he = EA[oA];
                  oA === "notDeepEqual" || oA === "notEqual" ? (FA = "".concat(EA[oA], `

`).concat(FA), FA.length > 1024 && (FA = "".concat(FA.slice(0, 1021), "..."))) : (dA = "".concat(xA(QA)), FA.length > 512 && (FA = "".concat(FA.slice(0, 509), "...")), dA.length > 512 && (dA = "".concat(dA.slice(0, 509), "...")), oA === "deepEqual" || oA === "equal" ? FA = "".concat(he, `

`).concat(FA, `

should equal

`) : dA = " ".concat(oA, " ").concat(dA)), h = sA.call(this, "".concat(FA).concat(dA));
                }
                return Error.stackTraceLimit = bA, h.generatedMessage = !_, Object.defineProperty(T(h), "name", {
                  value: "AssertionError [ERR_ASSERTION]",
                  enumerable: !1,
                  writable: !0,
                  configurable: !0
                }), h.code = "ERR_ASSERTION", h.actual = rA, h.expected = QA, h.operator = oA, Error.captureStackTrace && Error.captureStackTrace(T(h), p), h.stack, h.name = "AssertionError", z(h);
              }
              return d(F, [{
                key: "toString",
                value: function() {
                  return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
                }
              }, {
                key: fA,
                value: function(h, _) {
                  return w(this, D(D({}, _), {}, {
                    customInspect: !1,
                    depth: 0
                  }));
                }
              }]), F;
            })(/* @__PURE__ */ H(Error), w.custom);
            Q.exports = yA;
          },
          /***/
          5403(Q, B, r) {
            function A(tA) {
              "@babel/helpers - typeof";
              return A = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(lA) {
                return typeof lA;
              } : function(lA) {
                return lA && typeof Symbol == "function" && lA.constructor === Symbol && lA !== Symbol.prototype ? "symbol" : typeof lA;
              }, A(tA);
            }
            function a(tA, lA, uA) {
              return Object.defineProperty(tA, "prototype", { writable: !1 }), tA;
            }
            function D(tA, lA) {
              if (!(tA instanceof lA))
                throw new TypeError("Cannot call a class as a function");
            }
            function x(tA, lA) {
              if (typeof lA != "function" && lA !== null)
                throw new TypeError("Super expression must either be null or a function");
              tA.prototype = Object.create(lA && lA.prototype, { constructor: { value: tA, writable: !0, configurable: !0 } }), Object.defineProperty(tA, "prototype", { writable: !1 }), lA && N(tA, lA);
            }
            function N(tA, lA) {
              return N = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(w, v) {
                return w.__proto__ = v, w;
              }, N(tA, lA);
            }
            function P(tA) {
              var lA = q();
              return function() {
                var w = AA(tA), v;
                if (lA) {
                  var RA = AA(this).constructor;
                  v = Reflect.construct(w, arguments, RA);
                } else
                  v = w.apply(this, arguments);
                return d(this, v);
              };
            }
            function d(tA, lA) {
              if (lA && (A(lA) === "object" || typeof lA == "function"))
                return lA;
              if (lA !== void 0)
                throw new TypeError("Derived constructors may only return object or undefined");
              return J(tA);
            }
            function J(tA) {
              if (tA === void 0)
                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
              return tA;
            }
            function q() {
              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;
              }
            }
            function AA(tA) {
              return AA = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(uA) {
                return uA.__proto__ || Object.getPrototypeOf(uA);
              }, AA(tA);
            }
            var K = {}, z, T;
            function H(tA, lA, uA) {
              uA || (uA = Error);
              function w(RA, DA, $) {
                return typeof lA == "string" ? lA : lA(RA, DA, $);
              }
              var v = /* @__PURE__ */ (function(RA) {
                x($, RA);
                var DA = P($);
                function $(cA, Ae, kA) {
                  var VA;
                  return D(this, $), VA = DA.call(this, w(cA, Ae, kA)), VA.code = tA, VA;
                }
                return a($);
              })(uA);
              K[tA] = v;
            }
            function eA(tA, lA) {
              if (Array.isArray(tA)) {
                var uA = tA.length;
                return tA = tA.map(function(w) {
                  return String(w);
                }), uA > 2 ? "one of ".concat(lA, " ").concat(tA.slice(0, uA - 1).join(", "), ", or ") + tA[uA - 1] : uA === 2 ? "one of ".concat(lA, " ").concat(tA[0], " or ").concat(tA[1]) : "of ".concat(lA, " ").concat(tA[0]);
              } else
                return "of ".concat(lA, " ").concat(String(tA));
            }
            function CA(tA, lA, uA) {
              return tA.substr(0, lA.length) === lA;
            }
            function IA(tA, lA, uA) {
              return (uA === void 0 || uA > tA.length) && (uA = tA.length), tA.substring(uA - lA.length, uA) === lA;
            }
            function k(tA, lA, uA) {
              return typeof uA != "number" && (uA = 0), uA + lA.length > tA.length ? !1 : tA.indexOf(lA, uA) !== -1;
            }
            H("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError), H("ERR_INVALID_ARG_TYPE", function(tA, lA, uA) {
              z === void 0 && (z = r(7801)), z(typeof tA == "string", "'name' must be a string");
              var w;
              typeof lA == "string" && CA(lA, "not ") ? (w = "must not be", lA = lA.replace(/^not /, "")) : w = "must be";
              var v;
              if (IA(tA, " argument"))
                v = "The ".concat(tA, " ").concat(w, " ").concat(eA(lA, "type"));
              else {
                var RA = k(tA, ".") ? "property" : "argument";
                v = 'The "'.concat(tA, '" ').concat(RA, " ").concat(w, " ").concat(eA(lA, "type"));
              }
              return v += ". Received type ".concat(A(uA)), v;
            }, TypeError), H("ERR_INVALID_ARG_VALUE", function(tA, lA) {
              var uA = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
              T === void 0 && (T = r(7187));
              var w = T.inspect(lA);
              return w.length > 128 && (w = "".concat(w.slice(0, 128), "...")), "The argument '".concat(tA, "' ").concat(uA, ". Received ").concat(w);
            }, TypeError), H("ERR_INVALID_RETURN_VALUE", function(tA, lA, uA) {
              var w;
              return uA && uA.constructor && uA.constructor.name ? w = "instance of ".concat(uA.constructor.name) : w = "type ".concat(A(uA)), "Expected ".concat(tA, ' to be returned from the "').concat(lA, '"') + " function but got ".concat(w, ".");
            }, TypeError), H("ERR_MISSING_ARGS", function() {
              for (var tA = arguments.length, lA = new Array(tA), uA = 0; uA < tA; uA++)
                lA[uA] = arguments[uA];
              z === void 0 && (z = r(7801)), z(lA.length > 0, "At least one arg needs to be specified");
              var w = "The ", v = lA.length;
              switch (lA = lA.map(function(RA) {
                return '"'.concat(RA, '"');
              }), v) {
                case 1:
                  w += "".concat(lA[0], " argument");
                  break;
                case 2:
                  w += "".concat(lA[0], " and ").concat(lA[1], " arguments");
                  break;
                default:
                  w += lA.slice(0, v - 1).join(", "), w += ", and ".concat(lA[v - 1], " arguments");
                  break;
              }
              return "".concat(w, " must be specified");
            }, TypeError), Q.exports.codes = K;
          },
          /***/
          6781(Q, B, r) {
            function A(se, Ee) {
              return P(se) || N(se, Ee) || D(se, Ee) || a();
            }
            function a() {
              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 D(se, Ee) {
              if (se) {
                if (typeof se == "string") return x(se, Ee);
                var wA = Object.prototype.toString.call(se).slice(8, -1);
                if (wA === "Object" && se.constructor && (wA = se.constructor.name), wA === "Map" || wA === "Set") return Array.from(se);
                if (wA === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wA)) return x(se, Ee);
              }
            }
            function x(se, Ee) {
              (Ee == null || Ee > se.length) && (Ee = se.length);
              for (var wA = 0, R = new Array(Ee); wA < Ee; wA++) R[wA] = se[wA];
              return R;
            }
            function N(se, Ee) {
              var wA = se == null ? null : typeof Symbol < "u" && se[Symbol.iterator] || se["@@iterator"];
              if (wA != null) {
                var R, G, W, aA, j = [], pA = !0, Be = !1;
                try {
                  if (W = (wA = wA.call(se)).next, Ee !== 0) for (; !(pA = (R = W.call(wA)).done) && (j.push(R.value), j.length !== Ee); pA = !0) ;
                } catch (Ie) {
                  Be = !0, G = Ie;
                } finally {
                  try {
                    if (!pA && wA.return != null && (aA = wA.return(), Object(aA) !== aA)) return;
                  } finally {
                    if (Be) throw G;
                  }
                }
                return j;
              }
            }
            function P(se) {
              if (Array.isArray(se)) return se;
            }
            function d(se) {
              "@babel/helpers - typeof";
              return d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ee) {
                return typeof Ee;
              } : function(Ee) {
                return Ee && typeof Symbol == "function" && Ee.constructor === Symbol && Ee !== Symbol.prototype ? "symbol" : typeof Ee;
              }, d(se);
            }
            var J = /a/g.flags !== void 0, q = function(Ee) {
              var wA = [];
              return Ee.forEach(function(R) {
                return wA.push(R);
              }), wA;
            }, AA = function(Ee) {
              var wA = [];
              return Ee.forEach(function(R, G) {
                return wA.push([G, R]);
              }), wA;
            }, K = Object.is ? Object.is : r(8527), z = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
              return [];
            }, T = Number.isNaN ? Number.isNaN : r(7051);
            function H(se) {
              return se.call.bind(se);
            }
            var eA = H(Object.prototype.hasOwnProperty), CA = H(Object.prototype.propertyIsEnumerable), IA = H(Object.prototype.toString), k = r(7187).types, tA = k.isAnyArrayBuffer, lA = k.isArrayBufferView, uA = k.isDate, w = k.isMap, v = k.isRegExp, RA = k.isSet, DA = k.isNativeError, $ = k.isBoxedPrimitive, cA = k.isNumberObject, Ae = k.isStringObject, kA = k.isBooleanObject, VA = k.isBigIntObject, EA = k.isSymbolObject, zA = k.isFloat32Array, OA = k.isFloat64Array;
            function xA(se) {
              if (se.length === 0 || se.length > 10) return !0;
              for (var Ee = 0; Ee < se.length; Ee++) {
                var wA = se.charCodeAt(Ee);
                if (wA < 48 || wA > 57) return !0;
              }
              return se.length === 10 && se >= Math.pow(2, 32);
            }
            function LA(se) {
              return Object.keys(se).filter(xA).concat(z(se).filter(Object.prototype.propertyIsEnumerable.bind(se)));
            }
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
             * @license  MIT
             */
            function yA(se, Ee) {
              if (se === Ee)
                return 0;
              for (var wA = se.length, R = Ee.length, G = 0, W = Math.min(wA, R); G < W; ++G)
                if (se[G] !== Ee[G]) {
                  wA = se[G], R = Ee[G];
                  break;
                }
              return wA < R ? -1 : R < wA ? 1 : 0;
            }
            var TA = !0, fA = !1, sA = 0, F = 1, o = 2, h = 3;
            function _(se, Ee) {
              return J ? se.source === Ee.source && se.flags === Ee.flags : RegExp.prototype.toString.call(se) === RegExp.prototype.toString.call(Ee);
            }
            function oA(se, Ee) {
              if (se.byteLength !== Ee.byteLength)
                return !1;
              for (var wA = 0; wA < se.byteLength; wA++)
                if (se[wA] !== Ee[wA])
                  return !1;
              return !0;
            }
            function p(se, Ee) {
              return se.byteLength !== Ee.byteLength ? !1 : yA(new Uint8Array(se.buffer, se.byteOffset, se.byteLength), new Uint8Array(Ee.buffer, Ee.byteOffset, Ee.byteLength)) === 0;
            }
            function rA(se, Ee) {
              return se.byteLength === Ee.byteLength && yA(new Uint8Array(se), new Uint8Array(Ee)) === 0;
            }
            function QA(se, Ee) {
              return cA(se) ? cA(Ee) && K(Number.prototype.valueOf.call(se), Number.prototype.valueOf.call(Ee)) : Ae(se) ? Ae(Ee) && String.prototype.valueOf.call(se) === String.prototype.valueOf.call(Ee) : kA(se) ? kA(Ee) && Boolean.prototype.valueOf.call(se) === Boolean.prototype.valueOf.call(Ee) : VA(se) ? VA(Ee) && BigInt.prototype.valueOf.call(se) === BigInt.prototype.valueOf.call(Ee) : EA(Ee) && Symbol.prototype.valueOf.call(se) === Symbol.prototype.valueOf.call(Ee);
            }
            function bA(se, Ee, wA, R) {
              if (se === Ee)
                return se !== 0 ? !0 : wA ? K(se, Ee) : !0;
              if (wA) {
                if (d(se) !== "object")
                  return typeof se == "number" && T(se) && T(Ee);
                if (d(Ee) !== "object" || se === null || Ee === null || Object.getPrototypeOf(se) !== Object.getPrototypeOf(Ee))
                  return !1;
              } else {
                if (se === null || d(se) !== "object")
                  return Ee === null || d(Ee) !== "object" ? se == Ee : !1;
                if (Ee === null || d(Ee) !== "object")
                  return !1;
              }
              var G = IA(se), W = IA(Ee);
              if (G !== W)
                return !1;
              if (Array.isArray(se)) {
                if (se.length !== Ee.length)
                  return !1;
                var aA = LA(se), j = LA(Ee);
                return aA.length !== j.length ? !1 : M(se, Ee, wA, R, F, aA);
              }
              if (G === "[object Object]" && (!w(se) && w(Ee) || !RA(se) && RA(Ee)))
                return !1;
              if (uA(se)) {
                if (!uA(Ee) || Date.prototype.getTime.call(se) !== Date.prototype.getTime.call(Ee))
                  return !1;
              } else if (v(se)) {
                if (!v(Ee) || !_(se, Ee))
                  return !1;
              } else if (DA(se) || se instanceof Error) {
                if (se.message !== Ee.message || se.name !== Ee.name)
                  return !1;
              } else if (lA(se)) {
                if (!wA && (zA(se) || OA(se))) {
                  if (!oA(se, Ee))
                    return !1;
                } else if (!p(se, Ee))
                  return !1;
                var pA = LA(se), Be = LA(Ee);
                return pA.length !== Be.length ? !1 : M(se, Ee, wA, R, sA, pA);
              } else {
                if (RA(se))
                  return !RA(Ee) || se.size !== Ee.size ? !1 : M(se, Ee, wA, R, o);
                if (w(se))
                  return !w(Ee) || se.size !== Ee.size ? !1 : M(se, Ee, wA, R, h);
                if (tA(se)) {
                  if (!rA(se, Ee))
                    return !1;
                } else if ($(se) && !QA(se, Ee))
                  return !1;
              }
              return M(se, Ee, wA, R, sA);
            }
            function y(se, Ee) {
              return Ee.filter(function(wA) {
                return CA(se, wA);
              });
            }
            function M(se, Ee, wA, R, G, W) {
              if (arguments.length === 5) {
                W = Object.keys(se);
                var aA = Object.keys(Ee);
                if (W.length !== aA.length)
                  return !1;
              }
              for (var j = 0; j < W.length; j++)
                if (!eA(Ee, W[j]))
                  return !1;
              if (wA && arguments.length === 5) {
                var pA = z(se);
                if (pA.length !== 0) {
                  var Be = 0;
                  for (j = 0; j < pA.length; j++) {
                    var Ie = pA[j];
                    if (CA(se, Ie)) {
                      if (!CA(Ee, Ie))
                        return !1;
                      W.push(Ie), Be++;
                    } else if (CA(Ee, Ie))
                      return !1;
                  }
                  var ee = z(Ee);
                  if (pA.length !== ee.length && y(Ee, ee).length !== Be)
                    return !1;
                } else {
                  var Me = z(Ee);
                  if (Me.length !== 0 && y(Ee, Me).length !== 0)
                    return !1;
                }
              }
              if (W.length === 0 && (G === sA || G === F && se.length === 0 || se.size === 0))
                return !0;
              if (R === void 0)
                R = {
                  val1: /* @__PURE__ */ new Map(),
                  val2: /* @__PURE__ */ new Map(),
                  position: 0
                };
              else {
                var MA = R.val1.get(se);
                if (MA !== void 0) {
                  var be = R.val2.get(Ee);
                  if (be !== void 0)
                    return MA === be;
                }
                R.position++;
              }
              R.val1.set(se, R.position), R.val2.set(Ee, R.position);
              var at = Le(se, Ee, wA, W, R, G);
              return R.val1.delete(se), R.val2.delete(Ee), at;
            }
            function FA(se, Ee, wA, R) {
              for (var G = q(se), W = 0; W < G.length; W++) {
                var aA = G[W];
                if (bA(Ee, aA, wA, R))
                  return se.delete(aA), !0;
              }
              return !1;
            }
            function dA(se) {
              switch (d(se)) {
                case "undefined":
                  return null;
                case "object":
                  return;
                case "symbol":
                  return !1;
                case "string":
                  se = +se;
                // Loose equal entries exist only if the string is possible to convert to
                // a regular number and not NaN.
                // Fall through
                case "number":
                  if (T(se))
                    return !1;
              }
              return !0;
            }
            function he(se, Ee, wA) {
              var R = dA(wA);
              return R ?? (Ee.has(R) && !se.has(R));
            }
            function ie(se, Ee, wA, R, G) {
              var W = dA(wA);
              if (W != null)
                return W;
              var aA = Ee.get(W);
              return aA === void 0 && !Ee.has(W) || !bA(R, aA, !1, G) ? !1 : !se.has(W) && bA(R, aA, !1, G);
            }
            function KA(se, Ee, wA, R) {
              for (var G = null, W = q(se), aA = 0; aA < W.length; aA++) {
                var j = W[aA];
                if (d(j) === "object" && j !== null)
                  G === null && (G = /* @__PURE__ */ new Set()), G.add(j);
                else if (!Ee.has(j)) {
                  if (wA || !he(se, Ee, j))
                    return !1;
                  G === null && (G = /* @__PURE__ */ new Set()), G.add(j);
                }
              }
              if (G !== null) {
                for (var pA = q(Ee), Be = 0; Be < pA.length; Be++) {
                  var Ie = pA[Be];
                  if (d(Ie) === "object" && Ie !== null) {
                    if (!FA(G, Ie, wA, R)) return !1;
                  } else if (!wA && !se.has(Ie) && !FA(G, Ie, wA, R))
                    return !1;
                }
                return G.size === 0;
              }
              return !0;
            }
            function Pe(se, Ee, wA, R, G, W) {
              for (var aA = q(se), j = 0; j < aA.length; j++) {
                var pA = aA[j];
                if (bA(wA, pA, G, W) && bA(R, Ee.get(pA), G, W))
                  return se.delete(pA), !0;
              }
              return !1;
            }
            function Je(se, Ee, wA, R) {
              for (var G = null, W = AA(se), aA = 0; aA < W.length; aA++) {
                var j = A(W[aA], 2), pA = j[0], Be = j[1];
                if (d(pA) === "object" && pA !== null)
                  G === null && (G = /* @__PURE__ */ new Set()), G.add(pA);
                else {
                  var Ie = Ee.get(pA);
                  if (Ie === void 0 && !Ee.has(pA) || !bA(Be, Ie, wA, R)) {
                    if (wA || !ie(se, Ee, pA, Be, R)) return !1;
                    G === null && (G = /* @__PURE__ */ new Set()), G.add(pA);
                  }
                }
              }
              if (G !== null) {
                for (var ee = AA(Ee), Me = 0; Me < ee.length; Me++) {
                  var MA = A(ee[Me], 2), be = MA[0], at = MA[1];
                  if (d(be) === "object" && be !== null) {
                    if (!Pe(G, se, be, at, wA, R)) return !1;
                  } else if (!wA && (!se.has(be) || !bA(se.get(be), at, !1, R)) && !Pe(G, se, be, at, !1, R))
                    return !1;
                }
                return G.size === 0;
              }
              return !0;
            }
            function Le(se, Ee, wA, R, G, W) {
              var aA = 0;
              if (W === o) {
                if (!KA(se, Ee, wA, G))
                  return !1;
              } else if (W === h) {
                if (!Je(se, Ee, wA, G))
                  return !1;
              } else if (W === F)
                for (; aA < se.length; aA++)
                  if (eA(se, aA)) {
                    if (!eA(Ee, aA) || !bA(se[aA], Ee[aA], wA, G))
                      return !1;
                  } else {
                    if (eA(Ee, aA))
                      return !1;
                    for (var j = Object.keys(se); aA < j.length; aA++) {
                      var pA = j[aA];
                      if (!eA(Ee, pA) || !bA(se[pA], Ee[pA], wA, G))
                        return !1;
                    }
                    return j.length === Object.keys(Ee).length;
                  }
              for (aA = 0; aA < R.length; aA++) {
                var Be = R[aA];
                if (!bA(se[Be], Ee[Be], wA, G))
                  return !1;
              }
              return !0;
            }
            function Re(se, Ee) {
              return bA(se, Ee, fA);
            }
            function _e(se, Ee) {
              return bA(se, Ee, TA);
            }
            Q.exports = {
              isDeepEqual: Re,
              isDeepStrictEqual: _e
            };
          },
          /***/
          2504(Q, B) {
            B.byteLength = d, B.toByteArray = q, B.fromByteArray = z;
            for (var r = [], A = [], a = typeof Uint8Array < "u" ? Uint8Array : Array, D = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", x = 0, N = D.length; x < N; ++x)
              r[x] = D[x], A[D.charCodeAt(x)] = x;
            A[45] = 62, A[95] = 63;
            function P(T) {
              var H = T.length;
              if (H % 4 > 0)
                throw new Error("Invalid string. Length must be a multiple of 4");
              var eA = T.indexOf("=");
              eA === -1 && (eA = H);
              var CA = eA === H ? 0 : 4 - eA % 4;
              return [eA, CA];
            }
            function d(T) {
              var H = P(T), eA = H[0], CA = H[1];
              return (eA + CA) * 3 / 4 - CA;
            }
            function J(T, H, eA) {
              return (H + eA) * 3 / 4 - eA;
            }
            function q(T) {
              var H, eA = P(T), CA = eA[0], IA = eA[1], k = new a(J(T, CA, IA)), tA = 0, lA = IA > 0 ? CA - 4 : CA, uA;
              for (uA = 0; uA < lA; uA += 4)
                H = A[T.charCodeAt(uA)] << 18 | A[T.charCodeAt(uA + 1)] << 12 | A[T.charCodeAt(uA + 2)] << 6 | A[T.charCodeAt(uA + 3)], k[tA++] = H >> 16 & 255, k[tA++] = H >> 8 & 255, k[tA++] = H & 255;
              return IA === 2 && (H = A[T.charCodeAt(uA)] << 2 | A[T.charCodeAt(uA + 1)] >> 4, k[tA++] = H & 255), IA === 1 && (H = A[T.charCodeAt(uA)] << 10 | A[T.charCodeAt(uA + 1)] << 4 | A[T.charCodeAt(uA + 2)] >> 2, k[tA++] = H >> 8 & 255, k[tA++] = H & 255), k;
            }
            function AA(T) {
              return r[T >> 18 & 63] + r[T >> 12 & 63] + r[T >> 6 & 63] + r[T & 63];
            }
            function K(T, H, eA) {
              for (var CA, IA = [], k = H; k < eA; k += 3)
                CA = (T[k] << 16 & 16711680) + (T[k + 1] << 8 & 65280) + (T[k + 2] & 255), IA.push(AA(CA));
              return IA.join("");
            }
            function z(T) {
              for (var H, eA = T.length, CA = eA % 3, IA = [], k = 16383, tA = 0, lA = eA - CA; tA < lA; tA += k)
                IA.push(K(T, tA, tA + k > lA ? lA : tA + k));
              return CA === 1 ? (H = T[eA - 1], IA.push(
                r[H >> 2] + r[H << 4 & 63] + "=="
              )) : CA === 2 && (H = (T[eA - 2] << 8) + T[eA - 1], IA.push(
                r[H >> 10] + r[H >> 4 & 63] + r[H << 2 & 63] + "="
              )), IA.join("");
            }
          },
          /***/
          4097(Q) {
            var B = 4096, r = 2 * B + 32, A = 2 * B - 1, a = new Uint32Array([
              0,
              1,
              3,
              7,
              15,
              31,
              63,
              127,
              255,
              511,
              1023,
              2047,
              4095,
              8191,
              16383,
              32767,
              65535,
              131071,
              262143,
              524287,
              1048575,
              2097151,
              4194303,
              8388607,
              16777215
            ]);
            function D(x) {
              this.buf_ = new Uint8Array(r), this.input_ = x, this.reset();
            }
            D.READ_SIZE = B, D.IBUF_MASK = A, D.prototype.reset = function() {
              this.buf_ptr_ = 0, this.val_ = 0, this.pos_ = 0, this.bit_pos_ = 0, this.bit_end_pos_ = 0, this.eos_ = 0, this.readMoreInput();
              for (var x = 0; x < 4; x++)
                this.val_ |= this.buf_[this.pos_] << 8 * x, ++this.pos_;
              return this.bit_end_pos_ > 0;
            }, D.prototype.readMoreInput = function() {
              if (!(this.bit_end_pos_ > 256))
                if (this.eos_) {
                  if (this.bit_pos_ > this.bit_end_pos_)
                    throw new Error("Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_);
                } else {
                  var x = this.buf_ptr_, N = this.input_.read(this.buf_, x, B);
                  if (N < 0)
                    throw new Error("Unexpected end of input");
                  if (N < B) {
                    this.eos_ = 1;
                    for (var P = 0; P < 32; P++)
                      this.buf_[x + N + P] = 0;
                  }
                  if (x === 0) {
                    for (var P = 0; P < 32; P++)
                      this.buf_[(B << 1) + P] = this.buf_[P];
                    this.buf_ptr_ = B;
                  } else
                    this.buf_ptr_ = 0;
                  this.bit_end_pos_ += N << 3;
                }
            }, D.prototype.fillBitWindow = function() {
              for (; this.bit_pos_ >= 8; )
                this.val_ >>>= 8, this.val_ |= this.buf_[this.pos_ & A] << 24, ++this.pos_, this.bit_pos_ = this.bit_pos_ - 8 >>> 0, this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
            }, D.prototype.readBits = function(x) {
              32 - this.bit_pos_ < x && this.fillBitWindow();
              var N = this.val_ >>> this.bit_pos_ & a[x];
              return this.bit_pos_ += x, N;
            }, Q.exports = D;
          },
          /***/
          7043(Q, B) {
            B.lookup = new Uint8Array([
              /* CONTEXT_UTF8, last byte. */
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              4,
              4,
              0,
              0,
              4,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              8,
              12,
              16,
              12,
              12,
              20,
              12,
              16,
              24,
              28,
              12,
              12,
              32,
              12,
              36,
              12,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              32,
              32,
              24,
              40,
              28,
              12,
              12,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              24,
              12,
              28,
              12,
              12,
              12,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              24,
              12,
              28,
              12,
              0,
              /* UTF8 continuation byte range. */
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              /* UTF8 lead byte range. */
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              /* CONTEXT_UTF8 second last byte. */
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              1,
              1,
              1,
              1,
              0,
              /* UTF8 continuation byte range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              /* UTF8 lead byte range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              /* CONTEXT_SIGNED, second last byte. */
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              7,
              /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
              0,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              56,
              /* CONTEXT_LSB6, last byte. */
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              /* CONTEXT_MSB6, last byte. */
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              7,
              7,
              7,
              7,
              8,
              8,
              8,
              8,
              9,
              9,
              9,
              9,
              10,
              10,
              10,
              10,
              11,
              11,
              11,
              11,
              12,
              12,
              12,
              12,
              13,
              13,
              13,
              13,
              14,
              14,
              14,
              14,
              15,
              15,
              15,
              15,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              22,
              22,
              22,
              22,
              23,
              23,
              23,
              23,
              24,
              24,
              24,
              24,
              25,
              25,
              25,
              25,
              26,
              26,
              26,
              26,
              27,
              27,
              27,
              27,
              28,
              28,
              28,
              28,
              29,
              29,
              29,
              29,
              30,
              30,
              30,
              30,
              31,
              31,
              31,
              31,
              32,
              32,
              32,
              32,
              33,
              33,
              33,
              33,
              34,
              34,
              34,
              34,
              35,
              35,
              35,
              35,
              36,
              36,
              36,
              36,
              37,
              37,
              37,
              37,
              38,
              38,
              38,
              38,
              39,
              39,
              39,
              39,
              40,
              40,
              40,
              40,
              41,
              41,
              41,
              41,
              42,
              42,
              42,
              42,
              43,
              43,
              43,
              43,
              44,
              44,
              44,
              44,
              45,
              45,
              45,
              45,
              46,
              46,
              46,
              46,
              47,
              47,
              47,
              47,
              48,
              48,
              48,
              48,
              49,
              49,
              49,
              49,
              50,
              50,
              50,
              50,
              51,
              51,
              51,
              51,
              52,
              52,
              52,
              52,
              53,
              53,
              53,
              53,
              54,
              54,
              54,
              54,
              55,
              55,
              55,
              55,
              56,
              56,
              56,
              56,
              57,
              57,
              57,
              57,
              58,
              58,
              58,
              58,
              59,
              59,
              59,
              59,
              60,
              60,
              60,
              60,
              61,
              61,
              61,
              61,
              62,
              62,
              62,
              62,
              63,
              63,
              63,
              63,
              /* CONTEXT_{M,L}SB6, second last byte, */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ]), B.lookupOffsets = new Uint16Array([
              /* CONTEXT_LSB6 */
              1024,
              1536,
              /* CONTEXT_MSB6 */
              1280,
              1536,
              /* CONTEXT_UTF8 */
              0,
              256,
              /* CONTEXT_SIGNED */
              768,
              512
            ]);
          },
          /***/
          980(Q, B, r) {
            var A = r(8197).z, a = r(8197).y, D = r(4097), x = r(614), N = r(1561).z, P = r(1561).u, d = r(7043), J = r(2210), q = r(7984), AA = 8, K = 16, z = 256, T = 704, H = 26, eA = 6, CA = 2, IA = 8, k = 255, tA = 1080, lA = 18, uA = new Uint8Array([
              1,
              2,
              3,
              4,
              0,
              5,
              17,
              6,
              16,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15
            ]), w = 16, v = new Uint8Array([
              3,
              2,
              1,
              0,
              3,
              3,
              3,
              3,
              3,
              3,
              2,
              2,
              2,
              2,
              2,
              2
            ]), RA = new Int8Array([
              0,
              0,
              0,
              0,
              -1,
              1,
              -2,
              2,
              -3,
              3,
              -1,
              1,
              -2,
              2,
              -3,
              3
            ]), DA = new Uint16Array([
              256,
              402,
              436,
              468,
              500,
              534,
              566,
              598,
              630,
              662,
              694,
              726,
              758,
              790,
              822,
              854,
              886,
              920,
              952,
              984,
              1016,
              1048,
              1080
            ]);
            function $(p) {
              var rA;
              return p.readBits(1) === 0 ? 16 : (rA = p.readBits(3), rA > 0 ? 17 + rA : (rA = p.readBits(3), rA > 0 ? 8 + rA : 17));
            }
            function cA(p) {
              if (p.readBits(1)) {
                var rA = p.readBits(3);
                return rA === 0 ? 1 : p.readBits(rA) + (1 << rA);
              }
              return 0;
            }
            function Ae() {
              this.meta_block_length = 0, this.input_end = 0, this.is_uncompressed = 0, this.is_metadata = !1;
            }
            function kA(p) {
              var rA = new Ae(), QA, bA, y;
              if (rA.input_end = p.readBits(1), rA.input_end && p.readBits(1))
                return rA;
              if (QA = p.readBits(2) + 4, QA === 7) {
                if (rA.is_metadata = !0, p.readBits(1) !== 0)
                  throw new Error("Invalid reserved bit");
                if (bA = p.readBits(2), bA === 0)
                  return rA;
                for (y = 0; y < bA; y++) {
                  var M = p.readBits(8);
                  if (y + 1 === bA && bA > 1 && M === 0)
                    throw new Error("Invalid size byte");
                  rA.meta_block_length |= M << y * 8;
                }
              } else
                for (y = 0; y < QA; ++y) {
                  var FA = p.readBits(4);
                  if (y + 1 === QA && QA > 4 && FA === 0)
                    throw new Error("Invalid size nibble");
                  rA.meta_block_length |= FA << y * 4;
                }
              return ++rA.meta_block_length, !rA.input_end && !rA.is_metadata && (rA.is_uncompressed = p.readBits(1)), rA;
            }
            function VA(p, rA, QA) {
              var bA;
              return QA.fillBitWindow(), rA += QA.val_ >>> QA.bit_pos_ & k, bA = p[rA].bits - IA, bA > 0 && (QA.bit_pos_ += IA, rA += p[rA].value, rA += QA.val_ >>> QA.bit_pos_ & (1 << bA) - 1), QA.bit_pos_ += p[rA].bits, p[rA].value;
            }
            function EA(p, rA, QA, bA) {
              for (var y = 0, M = AA, FA = 0, dA = 0, he = 32768, ie = [], KA = 0; KA < 32; KA++)
                ie.push(new N(0, 0));
              for (P(ie, 0, 5, p, lA); y < rA && he > 0; ) {
                var Pe = 0, Je;
                if (bA.readMoreInput(), bA.fillBitWindow(), Pe += bA.val_ >>> bA.bit_pos_ & 31, bA.bit_pos_ += ie[Pe].bits, Je = ie[Pe].value & 255, Je < K)
                  FA = 0, QA[y++] = Je, Je !== 0 && (M = Je, he -= 32768 >> Je);
                else {
                  var Le = Je - 14, Re, _e, se = 0;
                  if (Je === K && (se = M), dA !== se && (FA = 0, dA = se), Re = FA, FA > 0 && (FA -= 2, FA <<= Le), FA += bA.readBits(Le) + 3, _e = FA - Re, y + _e > rA)
                    throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");
                  for (var Ee = 0; Ee < _e; Ee++)
                    QA[y + Ee] = dA;
                  y += _e, dA !== 0 && (he -= _e << 15 - dA);
                }
              }
              if (he !== 0)
                throw new Error("[ReadHuffmanCodeLengths] space = " + he);
              for (; y < rA; y++)
                QA[y] = 0;
            }
            function zA(p, rA, QA, bA) {
              var y = 0, M, FA = new Uint8Array(p);
              if (bA.readMoreInput(), M = bA.readBits(2), M === 1) {
                for (var dA, he = p - 1, ie = 0, KA = new Int32Array(4), Pe = bA.readBits(2) + 1; he; )
                  he >>= 1, ++ie;
                for (dA = 0; dA < Pe; ++dA)
                  KA[dA] = bA.readBits(ie) % p, FA[KA[dA]] = 2;
                switch (FA[KA[0]] = 1, Pe) {
                  case 1:
                    break;
                  case 3:
                    if (KA[0] === KA[1] || KA[0] === KA[2] || KA[1] === KA[2])
                      throw new Error("[ReadHuffmanCode] invalid symbols");
                    break;
                  case 2:
                    if (KA[0] === KA[1])
                      throw new Error("[ReadHuffmanCode] invalid symbols");
                    FA[KA[1]] = 1;
                    break;
                  case 4:
                    if (KA[0] === KA[1] || KA[0] === KA[2] || KA[0] === KA[3] || KA[1] === KA[2] || KA[1] === KA[3] || KA[2] === KA[3])
                      throw new Error("[ReadHuffmanCode] invalid symbols");
                    bA.readBits(1) ? (FA[KA[2]] = 3, FA[KA[3]] = 3) : FA[KA[0]] = 2;
                    break;
                }
              } else {
                var dA, Je = new Uint8Array(lA), Le = 32, Re = 0, _e = [
                  new N(2, 0),
                  new N(2, 4),
                  new N(2, 3),
                  new N(3, 2),
                  new N(2, 0),
                  new N(2, 4),
                  new N(2, 3),
                  new N(4, 1),
                  new N(2, 0),
                  new N(2, 4),
                  new N(2, 3),
                  new N(3, 2),
                  new N(2, 0),
                  new N(2, 4),
                  new N(2, 3),
                  new N(4, 5)
                ];
                for (dA = M; dA < lA && Le > 0; ++dA) {
                  var se = uA[dA], Ee = 0, wA;
                  bA.fillBitWindow(), Ee += bA.val_ >>> bA.bit_pos_ & 15, bA.bit_pos_ += _e[Ee].bits, wA = _e[Ee].value, Je[se] = wA, wA !== 0 && (Le -= 32 >> wA, ++Re);
                }
                if (!(Re === 1 || Le === 0))
                  throw new Error("[ReadHuffmanCode] invalid num_codes or space");
                EA(Je, p, FA, bA);
              }
              if (y = P(rA, QA, IA, FA, p), y === 0)
                throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");
              return y;
            }
            function OA(p, rA, QA) {
              var bA, y;
              return bA = VA(p, rA, QA), y = J.kBlockLengthPrefixCode[bA].nbits, J.kBlockLengthPrefixCode[bA].offset + QA.readBits(y);
            }
            function xA(p, rA, QA) {
              var bA;
              return p < w ? (QA += v[p], QA &= 3, bA = rA[QA] + RA[p]) : bA = p - w + 1, bA;
            }
            function LA(p, rA) {
              for (var QA = p[rA], bA = rA; bA; --bA) p[bA] = p[bA - 1];
              p[0] = QA;
            }
            function yA(p, rA) {
              var QA = new Uint8Array(256), bA;
              for (bA = 0; bA < 256; ++bA)
                QA[bA] = bA;
              for (bA = 0; bA < rA; ++bA) {
                var y = p[bA];
                p[bA] = QA[y], y && LA(QA, y);
              }
            }
            function TA(p, rA) {
              this.alphabet_size = p, this.num_htrees = rA, this.codes = new Array(rA + rA * DA[p + 31 >>> 5]), this.htrees = new Uint32Array(rA);
            }
            TA.prototype.decode = function(p) {
              var rA, QA, bA = 0;
              for (rA = 0; rA < this.num_htrees; ++rA)
                this.htrees[rA] = bA, QA = zA(this.alphabet_size, this.codes, bA, p), bA += QA;
            };
            function fA(p, rA) {
              var QA = { num_htrees: null, context_map: null }, bA, y = 0, M, FA;
              rA.readMoreInput();
              var dA = QA.num_htrees = cA(rA) + 1, he = QA.context_map = new Uint8Array(p);
              if (dA <= 1)
                return QA;
              for (bA = rA.readBits(1), bA && (y = rA.readBits(4) + 1), M = [], FA = 0; FA < tA; FA++)
                M[FA] = new N(0, 0);
              for (zA(dA + y, M, 0, rA), FA = 0; FA < p; ) {
                var ie;
                if (rA.readMoreInput(), ie = VA(M, 0, rA), ie === 0)
                  he[FA] = 0, ++FA;
                else if (ie <= y)
                  for (var KA = 1 + (1 << ie) + rA.readBits(ie); --KA; ) {
                    if (FA >= p)
                      throw new Error("[DecodeContextMap] i >= context_map_size");
                    he[FA] = 0, ++FA;
                  }
                else
                  he[FA] = ie - y, ++FA;
              }
              return rA.readBits(1) && yA(he, p), QA;
            }
            function sA(p, rA, QA, bA, y, M, FA) {
              var dA = QA * 2, he = QA, ie = VA(rA, QA * tA, FA), KA;
              ie === 0 ? KA = y[dA + (M[he] & 1)] : ie === 1 ? KA = y[dA + (M[he] - 1 & 1)] + 1 : KA = ie - 2, KA >= p && (KA -= p), bA[QA] = KA, y[dA + (M[he] & 1)] = KA, ++M[he];
            }
            function F(p, rA, QA, bA, y, M) {
              var FA = y + 1, dA = QA & y, he = M.pos_ & D.IBUF_MASK, ie;
              if (rA < 8 || M.bit_pos_ + (rA << 3) < M.bit_end_pos_) {
                for (; rA-- > 0; )
                  M.readMoreInput(), bA[dA++] = M.readBits(8), dA === FA && (p.write(bA, FA), dA = 0);
                return;
              }
              if (M.bit_end_pos_ < 32)
                throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");
              for (; M.bit_pos_ < 32; )
                bA[dA] = M.val_ >>> M.bit_pos_, M.bit_pos_ += 8, ++dA, --rA;
              if (ie = M.bit_end_pos_ - M.bit_pos_ >> 3, he + ie > D.IBUF_MASK) {
                for (var KA = D.IBUF_MASK + 1 - he, Pe = 0; Pe < KA; Pe++)
                  bA[dA + Pe] = M.buf_[he + Pe];
                ie -= KA, dA += KA, rA -= KA, he = 0;
              }
              for (var Pe = 0; Pe < ie; Pe++)
                bA[dA + Pe] = M.buf_[he + Pe];
              if (dA += ie, rA -= ie, dA >= FA) {
                p.write(bA, FA), dA -= FA;
                for (var Pe = 0; Pe < dA; Pe++)
                  bA[Pe] = bA[FA + Pe];
              }
              for (; dA + rA >= FA; ) {
                if (ie = FA - dA, M.input_.read(bA, dA, ie) < ie)
                  throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");
                p.write(bA, FA), rA -= ie, dA = 0;
              }
              if (M.input_.read(bA, dA, rA) < rA)
                throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");
              M.reset();
            }
            function o(p) {
              var rA = p.bit_pos_ + 7 & -8, QA = p.readBits(rA - p.bit_pos_);
              return QA == 0;
            }
            function h(p) {
              var rA = new A(p), QA = new D(rA);
              $(QA);
              var bA = kA(QA);
              return bA.meta_block_length;
            }
            function _(p, rA) {
              var QA = new A(p);
              rA == null && (rA = h(p));
              var bA = new Uint8Array(rA), y = new a(bA);
              return oA(QA, y), y.pos < y.buffer.length && (y.buffer = y.buffer.subarray(0, y.pos)), y.buffer;
            }
            B.BrotliDecompressBuffer = _;
            function oA(p, rA) {
              var QA, bA = 0, y = 0, M = 0, FA, dA = 0, he, ie, KA, Pe, Je = [16, 15, 11, 4], Le = 0, Re = 0, _e = 0, se = [new TA(0, 0), new TA(0, 0), new TA(0, 0)], Ee, wA, R, G = 128 + D.READ_SIZE;
              R = new D(p), M = $(R), FA = (1 << M) - 16, he = 1 << M, ie = he - 1, KA = new Uint8Array(he + G + x.maxDictionaryWordLength), Pe = he, Ee = [], wA = [];
              for (var W = 0; W < 3 * tA; W++)
                Ee[W] = new N(0, 0), wA[W] = new N(0, 0);
              for (; !y; ) {
                var aA = 0, j, pA = [1 << 28, 1 << 28, 1 << 28], Be = [0], Ie = [1, 1, 1], ee = [0, 1, 0, 1, 0, 1], Me = [0], MA, be, at, V, me = null, Ye = null, SA, ue = null, Fe, tt = 0, We = null, Ze = 0, Ct = 0, fi = null, st = 0, pt = 0, Mt = 0, Tt, Zt;
                for (QA = 0; QA < 3; ++QA)
                  se[QA].codes = null, se[QA].htrees = null;
                R.readMoreInput();
                var yi = kA(R);
                if (aA = yi.meta_block_length, bA + aA > rA.buffer.length) {
                  var xi = new Uint8Array(bA + aA);
                  xi.set(rA.buffer), rA.buffer = xi;
                }
                if (y = yi.input_end, j = yi.is_uncompressed, yi.is_metadata) {
                  for (o(R); aA > 0; --aA)
                    R.readMoreInput(), R.readBits(8);
                  continue;
                }
                if (aA !== 0) {
                  if (j) {
                    R.bit_pos_ = R.bit_pos_ + 7 & -8, F(
                      rA,
                      aA,
                      bA,
                      KA,
                      ie,
                      R
                    ), bA += aA;
                    continue;
                  }
                  for (QA = 0; QA < 3; ++QA)
                    Ie[QA] = cA(R) + 1, Ie[QA] >= 2 && (zA(Ie[QA] + 2, Ee, QA * tA, R), zA(H, wA, QA * tA, R), pA[QA] = OA(wA, QA * tA, R), Me[QA] = 1);
                  for (R.readMoreInput(), MA = R.readBits(2), be = w + (R.readBits(4) << MA), at = (1 << MA) - 1, V = be + (48 << MA), Ye = new Uint8Array(Ie[0]), QA = 0; QA < Ie[0]; ++QA)
                    R.readMoreInput(), Ye[QA] = R.readBits(2) << 1;
                  var Ot = fA(Ie[0] << eA, R);
                  SA = Ot.num_htrees, me = Ot.context_map;
                  var bt = fA(Ie[2] << CA, R);
                  for (Fe = bt.num_htrees, ue = bt.context_map, se[0] = new TA(z, SA), se[1] = new TA(T, Ie[1]), se[2] = new TA(V, Fe), QA = 0; QA < 3; ++QA)
                    se[QA].decode(R);
                  for (We = 0, fi = 0, Tt = Ye[Be[0]], pt = d.lookupOffsets[Tt], Mt = d.lookupOffsets[Tt + 1], Zt = se[1].htrees[0]; aA > 0; ) {
                    var qt, ti, Ke, qe, Dt, ut, ni, wi, pi, vA, UA;
                    for (R.readMoreInput(), pA[1] === 0 && (sA(
                      Ie[1],
                      Ee,
                      1,
                      Be,
                      ee,
                      Me,
                      R
                    ), pA[1] = OA(wA, tA, R), Zt = se[1].htrees[Be[1]]), --pA[1], qt = VA(se[1].codes, Zt, R), ti = qt >> 6, ti >= 2 ? (ti -= 2, ni = -1) : ni = 0, Ke = J.kInsertRangeLut[ti] + (qt >> 3 & 7), qe = J.kCopyRangeLut[ti] + (qt & 7), Dt = J.kInsertLengthPrefixCode[Ke].offset + R.readBits(J.kInsertLengthPrefixCode[Ke].nbits), ut = J.kCopyLengthPrefixCode[qe].offset + R.readBits(J.kCopyLengthPrefixCode[qe].nbits), Re = KA[bA - 1 & ie], _e = KA[bA - 2 & ie], vA = 0; vA < Dt; ++vA)
                      R.readMoreInput(), pA[0] === 0 && (sA(
                        Ie[0],
                        Ee,
                        0,
                        Be,
                        ee,
                        Me,
                        R
                      ), pA[0] = OA(wA, 0, R), tt = Be[0] << eA, We = tt, Tt = Ye[Be[0]], pt = d.lookupOffsets[Tt], Mt = d.lookupOffsets[Tt + 1]), pi = d.lookup[pt + Re] | d.lookup[Mt + _e], Ze = me[We + pi], --pA[0], _e = Re, Re = VA(se[0].codes, se[0].htrees[Ze], R), KA[bA & ie] = Re, (bA & ie) === ie && rA.write(KA, he), ++bA;
                    if (aA -= Dt, aA <= 0) break;
                    if (ni < 0) {
                      var pi;
                      if (R.readMoreInput(), pA[2] === 0 && (sA(
                        Ie[2],
                        Ee,
                        2,
                        Be,
                        ee,
                        Me,
                        R
                      ), pA[2] = OA(wA, 2 * tA, R), Ct = Be[2] << CA, fi = Ct), --pA[2], pi = (ut > 4 ? 3 : ut - 2) & 255, st = ue[fi + pi], ni = VA(se[2].codes, se[2].htrees[st], R), ni >= be) {
                        var mA, _A, $A;
                        ni -= be, _A = ni & at, ni >>= MA, mA = (ni >> 1) + 1, $A = (2 + (ni & 1) << mA) - 4, ni = be + ($A + R.readBits(mA) << MA) + _A;
                      }
                    }
                    if (wi = xA(ni, Je, Le), wi < 0)
                      throw new Error("[BrotliDecompress] invalid distance");
                    if (bA < FA && dA !== FA ? dA = bA : dA = FA, UA = bA & ie, wi > dA)
                      if (ut >= x.minDictionaryWordLength && ut <= x.maxDictionaryWordLength) {
                        var $A = x.offsetsByLength[ut], jA = wi - dA - 1, le = x.sizeBitsByLength[ut], JA = (1 << le) - 1, ne = jA & JA, ae = jA >> le;
                        if ($A += ne * ut, ae < q.kNumTransforms) {
                          var ve = q.transformDictionaryWord(KA, UA, $A, ut, ae);
                          if (UA += ve, bA += ve, aA -= ve, UA >= Pe) {
                            rA.write(KA, he);
                            for (var ze = 0; ze < UA - Pe; ze++)
                              KA[ze] = KA[Pe + ze];
                          }
                        } else
                          throw new Error("Invalid backward reference. pos: " + bA + " distance: " + wi + " len: " + ut + " bytes left: " + aA);
                      } else
                        throw new Error("Invalid backward reference. pos: " + bA + " distance: " + wi + " len: " + ut + " bytes left: " + aA);
                    else {
                      if (ni > 0 && (Je[Le & 3] = wi, ++Le), ut > aA)
                        throw new Error("Invalid backward reference. pos: " + bA + " distance: " + wi + " len: " + ut + " bytes left: " + aA);
                      for (vA = 0; vA < ut; ++vA)
                        KA[bA & ie] = KA[bA - wi & ie], (bA & ie) === ie && rA.write(KA, he), ++bA, --aA;
                    }
                    Re = KA[bA - 1 & ie], _e = KA[bA - 2 & ie];
                  }
                  bA &= 1073741823;
                }
              }
              rA.write(KA, bA & ie);
            }
            x.init();
          },
          /***/
          4543(Q, B, r) {
            var A = r(2504);
            B.init = function() {
              var a = r(980).BrotliDecompressBuffer, D = A.toByteArray(r(3501));
              return a(D);
            };
          },
          /***/
          3501(Q) {
            Q.exports = " ";
          },
          /***/
          614(Q, B, r) {
            var A = r(4543);
            B.init = function() {
              B.dictionary = A.init();
            }, B.offsetsByLength = new Uint32Array([
              0,
              0,
              0,
              0,
              0,
              4096,
              9216,
              21504,
              35840,
              44032,
              53248,
              63488,
              74752,
              87040,
              93696,
              100864,
              104704,
              106752,
              108928,
              113536,
              115968,
              118528,
              119872,
              121280,
              122016
            ]), B.sizeBitsByLength = new Uint8Array([
              0,
              0,
              0,
              0,
              10,
              10,
              11,
              11,
              10,
              10,
              10,
              10,
              10,
              9,
              9,
              8,
              7,
              7,
              8,
              7,
              7,
              6,
              6,
              5,
              5
            ]), B.minDictionaryWordLength = 4, B.maxDictionaryWordLength = 24;
          },
          /***/
          1561(Q, B) {
            function r(N, P) {
              this.bits = N, this.value = P;
            }
            B.z = r;
            var A = 15;
            function a(N, P) {
              for (var d = 1 << P - 1; N & d; )
                d >>= 1;
              return (N & d - 1) + d;
            }
            function D(N, P, d, J, q) {
              do
                J -= d, N[P + J] = new r(q.bits, q.value);
              while (J > 0);
            }
            function x(N, P, d) {
              for (var J = 1 << P - d; P < A && (J -= N[P], !(J <= 0)); )
                ++P, J <<= 1;
              return P - d;
            }
            B.u = function(N, P, d, J, q) {
              var AA = P, K, z, T, H, eA, CA, IA, k, tA, lA, uA, w = new Int32Array(A + 1), v = new Int32Array(A + 1);
              for (uA = new Int32Array(q), T = 0; T < q; T++)
                w[J[T]]++;
              for (v[1] = 0, z = 1; z < A; z++)
                v[z + 1] = v[z] + w[z];
              for (T = 0; T < q; T++)
                J[T] !== 0 && (uA[v[J[T]]++] = T);
              if (k = d, tA = 1 << k, lA = tA, v[A] === 1) {
                for (H = 0; H < lA; ++H)
                  N[P + H] = new r(0, uA[0] & 65535);
                return lA;
              }
              for (H = 0, T = 0, z = 1, eA = 2; z <= d; ++z, eA <<= 1)
                for (; w[z] > 0; --w[z])
                  K = new r(z & 255, uA[T++] & 65535), D(N, P + H, eA, tA, K), H = a(H, z);
              for (IA = lA - 1, CA = -1, z = d + 1, eA = 2; z <= A; ++z, eA <<= 1)
                for (; w[z] > 0; --w[z])
                  (H & IA) !== CA && (P += tA, k = x(w, z, d), tA = 1 << k, lA += tA, CA = H & IA, N[AA + CA] = new r(k + d & 255, P - AA - CA & 65535)), K = new r(z - d & 255, uA[T++] & 65535), D(N, P + (H >> d), eA, tA, K), H = a(H, z);
              return lA;
            };
          },
          /***/
          2210(Q, B) {
            function r(A, a) {
              this.offset = A, this.nbits = a;
            }
            B.kBlockLengthPrefixCode = [
              new r(1, 2),
              new r(5, 2),
              new r(9, 2),
              new r(13, 2),
              new r(17, 3),
              new r(25, 3),
              new r(33, 3),
              new r(41, 3),
              new r(49, 4),
              new r(65, 4),
              new r(81, 4),
              new r(97, 4),
              new r(113, 5),
              new r(145, 5),
              new r(177, 5),
              new r(209, 5),
              new r(241, 6),
              new r(305, 6),
              new r(369, 7),
              new r(497, 8),
              new r(753, 9),
              new r(1265, 10),
              new r(2289, 11),
              new r(4337, 12),
              new r(8433, 13),
              new r(16625, 24)
            ], B.kInsertLengthPrefixCode = [
              new r(0, 0),
              new r(1, 0),
              new r(2, 0),
              new r(3, 0),
              new r(4, 0),
              new r(5, 0),
              new r(6, 1),
              new r(8, 1),
              new r(10, 2),
              new r(14, 2),
              new r(18, 3),
              new r(26, 3),
              new r(34, 4),
              new r(50, 4),
              new r(66, 5),
              new r(98, 5),
              new r(130, 6),
              new r(194, 7),
              new r(322, 8),
              new r(578, 9),
              new r(1090, 10),
              new r(2114, 12),
              new r(6210, 14),
              new r(22594, 24)
            ], B.kCopyLengthPrefixCode = [
              new r(2, 0),
              new r(3, 0),
              new r(4, 0),
              new r(5, 0),
              new r(6, 0),
              new r(7, 0),
              new r(8, 0),
              new r(9, 0),
              new r(10, 1),
              new r(12, 1),
              new r(14, 2),
              new r(18, 2),
              new r(22, 3),
              new r(30, 3),
              new r(38, 4),
              new r(54, 4),
              new r(70, 5),
              new r(102, 5),
              new r(134, 6),
              new r(198, 7),
              new r(326, 8),
              new r(582, 9),
              new r(1094, 10),
              new r(2118, 24)
            ], B.kInsertRangeLut = [
              0,
              0,
              8,
              8,
              0,
              16,
              8,
              16,
              16
            ], B.kCopyRangeLut = [
              0,
              8,
              0,
              8,
              16,
              0,
              16,
              8,
              16
            ];
          },
          /***/
          8197(Q, B) {
            function r(a) {
              this.buffer = a, this.pos = 0;
            }
            r.prototype.read = function(a, D, x) {
              this.pos + x > this.buffer.length && (x = this.buffer.length - this.pos);
              for (var N = 0; N < x; N++)
                a[D + N] = this.buffer[this.pos + N];
              return this.pos += x, x;
            }, B.z = r;
            function A(a) {
              this.buffer = a, this.pos = 0;
            }
            A.prototype.write = function(a, D) {
              if (this.pos + D > this.buffer.length)
                throw new Error("Output buffer is not large enough");
              return this.buffer.set(a.subarray(0, D), this.pos), this.pos += D, D;
            }, B.y = A;
          },
          /***/
          7984(Q, B, r) {
            var A = r(614), a = 0, D = 1, x = 2, N = 3, P = 4, d = 5, J = 6, q = 7, AA = 8, K = 9, z = 10, T = 11, H = 12, eA = 13, CA = 14, IA = 15, k = 16, tA = 17, lA = 18, uA = 20;
            function w(DA, $, cA) {
              this.prefix = new Uint8Array(DA.length), this.transform = $, this.suffix = new Uint8Array(cA.length);
              for (var Ae = 0; Ae < DA.length; Ae++)
                this.prefix[Ae] = DA.charCodeAt(Ae);
              for (var Ae = 0; Ae < cA.length; Ae++)
                this.suffix[Ae] = cA.charCodeAt(Ae);
            }
            var v = [
              new w("", a, ""),
              new w("", a, " "),
              new w(" ", a, " "),
              new w("", H, ""),
              new w("", z, " "),
              new w("", a, " the "),
              new w(" ", a, ""),
              new w("s ", a, " "),
              new w("", a, " of "),
              new w("", z, ""),
              new w("", a, " and "),
              new w("", eA, ""),
              new w("", D, ""),
              new w(", ", a, " "),
              new w("", a, ", "),
              new w(" ", z, " "),
              new w("", a, " in "),
              new w("", a, " to "),
              new w("e ", a, " "),
              new w("", a, '"'),
              new w("", a, "."),
              new w("", a, '">'),
              new w("", a, `
`),
              new w("", N, ""),
              new w("", a, "]"),
              new w("", a, " for "),
              new w("", CA, ""),
              new w("", x, ""),
              new w("", a, " a "),
              new w("", a, " that "),
              new w(" ", z, ""),
              new w("", a, ". "),
              new w(".", a, ""),
              new w(" ", a, ", "),
              new w("", IA, ""),
              new w("", a, " with "),
              new w("", a, "'"),
              new w("", a, " from "),
              new w("", a, " by "),
              new w("", k, ""),
              new w("", tA, ""),
              new w(" the ", a, ""),
              new w("", P, ""),
              new w("", a, ". The "),
              new w("", T, ""),
              new w("", a, " on "),
              new w("", a, " as "),
              new w("", a, " is "),
              new w("", q, ""),
              new w("", D, "ing "),
              new w("", a, `
	`),
              new w("", a, ":"),
              new w(" ", a, ". "),
              new w("", a, "ed "),
              new w("", uA, ""),
              new w("", lA, ""),
              new w("", J, ""),
              new w("", a, "("),
              new w("", z, ", "),
              new w("", AA, ""),
              new w("", a, " at "),
              new w("", a, "ly "),
              new w(" the ", a, " of "),
              new w("", d, ""),
              new w("", K, ""),
              new w(" ", z, ", "),
              new w("", z, '"'),
              new w(".", a, "("),
              new w("", T, " "),
              new w("", z, '">'),
              new w("", a, '="'),
              new w(" ", a, "."),
              new w(".com/", a, ""),
              new w(" the ", a, " of the "),
              new w("", z, "'"),
              new w("", a, ". This "),
              new w("", a, ","),
              new w(".", a, " "),
              new w("", z, "("),
              new w("", z, "."),
              new w("", a, " not "),
              new w(" ", a, '="'),
              new w("", a, "er "),
              new w(" ", T, " "),
              new w("", a, "al "),
              new w(" ", T, ""),
              new w("", a, "='"),
              new w("", T, '"'),
              new w("", z, ". "),
              new w(" ", a, "("),
              new w("", a, "ful "),
              new w(" ", z, ". "),
              new w("", a, "ive "),
              new w("", a, "less "),
              new w("", T, "'"),
              new w("", a, "est "),
              new w(" ", z, "."),
              new w("", T, '">'),
              new w(" ", a, "='"),
              new w("", z, ","),
              new w("", a, "ize "),
              new w("", T, "."),
              new w("Â ", a, ""),
              new w(" ", a, ","),
              new w("", z, '="'),
              new w("", T, '="'),
              new w("", a, "ous "),
              new w("", T, ", "),
              new w("", z, "='"),
              new w(" ", z, ","),
              new w(" ", T, '="'),
              new w(" ", T, ", "),
              new w("", T, ","),
              new w("", T, "("),
              new w("", T, ". "),
              new w(" ", T, "."),
              new w("", T, "='"),
              new w(" ", T, ". "),
              new w(" ", z, '="'),
              new w(" ", T, "='"),
              new w(" ", z, "='")
            ];
            B.kTransforms = v, B.kNumTransforms = v.length;
            function RA(DA, $) {
              return DA[$] < 192 ? (DA[$] >= 97 && DA[$] <= 122 && (DA[$] ^= 32), 1) : DA[$] < 224 ? (DA[$ + 1] ^= 32, 2) : (DA[$ + 2] ^= 5, 3);
            }
            B.transformDictionaryWord = function(DA, $, cA, Ae, kA) {
              var VA = v[kA].prefix, EA = v[kA].suffix, zA = v[kA].transform, OA = zA < H ? 0 : zA - (H - 1), xA = 0, LA = $, yA;
              OA > Ae && (OA = Ae);
              for (var TA = 0; TA < VA.length; )
                DA[$++] = VA[TA++];
              for (cA += OA, Ae -= OA, zA <= K && (Ae -= zA), xA = 0; xA < Ae; xA++)
                DA[$++] = A.dictionary[cA + xA];
              if (yA = $ - Ae, zA === z)
                RA(DA, yA);
              else if (zA === T)
                for (; Ae > 0; ) {
                  var fA = RA(DA, yA);
                  yA += fA, Ae -= fA;
                }
              for (var sA = 0; sA < EA.length; )
                DA[$++] = EA[sA++];
              return $ - LA;
            };
          },
          /***/
          4460(Q, B, r) {
            Q.exports = r(980).BrotliDecompressBuffer;
          },
          /***/
          2908(Q, B, r) {
            var A = r(783).Buffer, a = r(9964), D = r(7801), x = r(7468), N = r(2925), P = r(2269), d = r(1607);
            for (var J in d)
              B[J] = d[J];
            B.NONE = 0, B.DEFLATE = 1, B.INFLATE = 2, B.GZIP = 3, B.GUNZIP = 4, B.DEFLATERAW = 5, B.INFLATERAW = 6, B.UNZIP = 7;
            var q = 31, AA = 139;
            function K(z) {
              if (typeof z != "number" || z < B.DEFLATE || z > B.UNZIP)
                throw new TypeError("Bad argument");
              this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = z, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;
            }
            K.prototype.close = function() {
              if (this.write_in_progress) {
                this.pending_close = !0;
                return;
              }
              this.pending_close = !1, D(this.init_done, "close before init"), D(this.mode <= B.UNZIP), this.mode === B.DEFLATE || this.mode === B.GZIP || this.mode === B.DEFLATERAW ? N.deflateEnd(this.strm) : (this.mode === B.INFLATE || this.mode === B.GUNZIP || this.mode === B.INFLATERAW || this.mode === B.UNZIP) && P.inflateEnd(this.strm), this.mode = B.NONE, this.dictionary = null;
            }, K.prototype.write = function(z, T, H, eA, CA, IA, k) {
              return this._write(!0, z, T, H, eA, CA, IA, k);
            }, K.prototype.writeSync = function(z, T, H, eA, CA, IA, k) {
              return this._write(!1, z, T, H, eA, CA, IA, k);
            }, K.prototype._write = function(z, T, H, eA, CA, IA, k, tA) {
              if (D.equal(arguments.length, 8), D(this.init_done, "write before init"), D(this.mode !== B.NONE, "already finalized"), D.equal(!1, this.write_in_progress, "write already in progress"), D.equal(!1, this.pending_close, "close is pending"), this.write_in_progress = !0, D.equal(!1, T === void 0, "must provide flush value"), this.write_in_progress = !0, T !== B.Z_NO_FLUSH && T !== B.Z_PARTIAL_FLUSH && T !== B.Z_SYNC_FLUSH && T !== B.Z_FULL_FLUSH && T !== B.Z_FINISH && T !== B.Z_BLOCK)
                throw new Error("Invalid flush value");
              if (H == null && (H = A.alloc(0), CA = 0, eA = 0), this.strm.avail_in = CA, this.strm.input = H, this.strm.next_in = eA, this.strm.avail_out = tA, this.strm.output = IA, this.strm.next_out = k, this.flush = T, !z)
                return this._process(), this._checkError() ? this._afterSync() : void 0;
              var lA = this;
              return a.nextTick(function() {
                lA._process(), lA._after();
              }), this;
            }, K.prototype._afterSync = function() {
              var z = this.strm.avail_out, T = this.strm.avail_in;
              return this.write_in_progress = !1, [T, z];
            }, K.prototype._process = function() {
              var z = null;
              switch (this.mode) {
                case B.DEFLATE:
                case B.GZIP:
                case B.DEFLATERAW:
                  this.err = N.deflate(this.strm, this.flush);
                  break;
                case B.UNZIP:
                  switch (this.strm.avail_in > 0 && (z = this.strm.next_in), this.gzip_id_bytes_read) {
                    case 0:
                      if (z === null)
                        break;
                      if (this.strm.input[z] === q) {
                        if (this.gzip_id_bytes_read = 1, z++, this.strm.avail_in === 1)
                          break;
                      } else {
                        this.mode = B.INFLATE;
                        break;
                      }
                    // fallthrough
                    case 1:
                      if (z === null)
                        break;
                      this.strm.input[z] === AA ? (this.gzip_id_bytes_read = 2, this.mode = B.GUNZIP) : this.mode = B.INFLATE;
                      break;
                    default:
                      throw new Error("invalid number of gzip magic number bytes read");
                  }
                // fallthrough
                case B.INFLATE:
                case B.GUNZIP:
                case B.INFLATERAW:
                  for (this.err = P.inflate(
                    this.strm,
                    this.flush
                    // If data was encoded with dictionary
                  ), this.err === B.Z_NEED_DICT && this.dictionary && (this.err = P.inflateSetDictionary(this.strm, this.dictionary), this.err === B.Z_OK ? this.err = P.inflate(this.strm, this.flush) : this.err === B.Z_DATA_ERROR && (this.err = B.Z_NEED_DICT)); this.strm.avail_in > 0 && this.mode === B.GUNZIP && this.err === B.Z_STREAM_END && this.strm.next_in[0] !== 0; )
                    this.reset(), this.err = P.inflate(this.strm, this.flush);
                  break;
                default:
                  throw new Error("Unknown mode " + this.mode);
              }
            }, K.prototype._checkError = function() {
              switch (this.err) {
                case B.Z_OK:
                case B.Z_BUF_ERROR:
                  if (this.strm.avail_out !== 0 && this.flush === B.Z_FINISH)
                    return this._error("unexpected end of file"), !1;
                  break;
                case B.Z_STREAM_END:
                  break;
                case B.Z_NEED_DICT:
                  return this.dictionary == null ? this._error("Missing dictionary") : this._error("Bad dictionary"), !1;
                default:
                  return this._error("Zlib error"), !1;
              }
              return !0;
            }, K.prototype._after = function() {
              if (this._checkError()) {
                var z = this.strm.avail_out, T = this.strm.avail_in;
                this.write_in_progress = !1, this.callback(T, z), this.pending_close && this.close();
              }
            }, K.prototype._error = function(z) {
              this.strm.msg && (z = this.strm.msg), this.onerror(
                z,
                this.err
                // no hope of rescue.
              ), this.write_in_progress = !1, this.pending_close && this.close();
            }, K.prototype.init = function(z, T, H, eA, CA) {
              D(arguments.length === 4 || arguments.length === 5, "init(windowBits, level, memLevel, strategy, [dictionary])"), D(z >= 8 && z <= 15, "invalid windowBits"), D(T >= -1 && T <= 9, "invalid compression level"), D(H >= 1 && H <= 9, "invalid memlevel"), D(eA === B.Z_FILTERED || eA === B.Z_HUFFMAN_ONLY || eA === B.Z_RLE || eA === B.Z_FIXED || eA === B.Z_DEFAULT_STRATEGY, "invalid strategy"), this._init(T, z, H, eA, CA), this._setDictionary();
            }, K.prototype.params = function() {
              throw new Error("deflateParams Not supported");
            }, K.prototype.reset = function() {
              this._reset(), this._setDictionary();
            }, K.prototype._init = function(z, T, H, eA, CA) {
              switch (this.level = z, this.windowBits = T, this.memLevel = H, this.strategy = eA, this.flush = B.Z_NO_FLUSH, this.err = B.Z_OK, (this.mode === B.GZIP || this.mode === B.GUNZIP) && (this.windowBits += 16), this.mode === B.UNZIP && (this.windowBits += 32), (this.mode === B.DEFLATERAW || this.mode === B.INFLATERAW) && (this.windowBits = -1 * this.windowBits), this.strm = new x(), this.mode) {
                case B.DEFLATE:
                case B.GZIP:
                case B.DEFLATERAW:
                  this.err = N.deflateInit2(this.strm, this.level, B.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);
                  break;
                case B.INFLATE:
                case B.GUNZIP:
                case B.INFLATERAW:
                case B.UNZIP:
                  this.err = P.inflateInit2(this.strm, this.windowBits);
                  break;
                default:
                  throw new Error("Unknown mode " + this.mode);
              }
              this.err !== B.Z_OK && this._error("Init error"), this.dictionary = CA, this.write_in_progress = !1, this.init_done = !0;
            }, K.prototype._setDictionary = function() {
              if (this.dictionary != null) {
                switch (this.err = B.Z_OK, this.mode) {
                  case B.DEFLATE:
                  case B.DEFLATERAW:
                    this.err = N.deflateSetDictionary(this.strm, this.dictionary);
                    break;
                }
                this.err !== B.Z_OK && this._error("Failed to set dictionary");
              }
            }, K.prototype._reset = function() {
              switch (this.err = B.Z_OK, this.mode) {
                case B.DEFLATE:
                case B.DEFLATERAW:
                case B.GZIP:
                  this.err = N.deflateReset(this.strm);
                  break;
                case B.INFLATE:
                case B.INFLATERAW:
                case B.GUNZIP:
                  this.err = P.inflateReset(this.strm);
                  break;
              }
              this.err !== B.Z_OK && this._error("Failed to reset stream");
            }, B.Zlib = K;
          },
          /***/
          6729(Q, B, r) {
            var A = r(9964), a = r(783).Buffer, D = r(9760).Transform, x = r(2908), N = r(7187), P = r(7801).ok, d = r(783).kMaxLength, J = "Cannot create final Buffer. It would be larger than 0x" + d.toString(16) + " bytes";
            x.Z_MIN_WINDOWBITS = 8, x.Z_MAX_WINDOWBITS = 15, x.Z_DEFAULT_WINDOWBITS = 15, x.Z_MIN_CHUNK = 64, x.Z_MAX_CHUNK = 1 / 0, x.Z_DEFAULT_CHUNK = 16384, x.Z_MIN_MEMLEVEL = 1, x.Z_MAX_MEMLEVEL = 9, x.Z_DEFAULT_MEMLEVEL = 8, x.Z_MIN_LEVEL = -1, x.Z_MAX_LEVEL = 9, x.Z_DEFAULT_LEVEL = x.Z_DEFAULT_COMPRESSION;
            for (var q = Object.keys(x), AA = 0; AA < q.length; AA++) {
              var K = q[AA];
              K.match(/^Z/) && Object.defineProperty(B, K, {
                enumerable: !0,
                value: x[K],
                writable: !1
              });
            }
            for (var z = {
              Z_OK: x.Z_OK,
              Z_STREAM_END: x.Z_STREAM_END,
              Z_NEED_DICT: x.Z_NEED_DICT,
              Z_ERRNO: x.Z_ERRNO,
              Z_STREAM_ERROR: x.Z_STREAM_ERROR,
              Z_DATA_ERROR: x.Z_DATA_ERROR,
              Z_MEM_ERROR: x.Z_MEM_ERROR,
              Z_BUF_ERROR: x.Z_BUF_ERROR,
              Z_VERSION_ERROR: x.Z_VERSION_ERROR
            }, T = Object.keys(z), H = 0; H < T.length; H++) {
              var eA = T[H];
              z[z[eA]] = eA;
            }
            Object.defineProperty(B, "codes", {
              enumerable: !0,
              value: Object.freeze(z),
              writable: !1
            }), B.Deflate = k, B.Inflate = tA, B.Gzip = lA, B.Gunzip = uA, B.DeflateRaw = w, B.InflateRaw = v, B.Unzip = RA, B.createDeflate = function(kA) {
              return new k(kA);
            }, B.createInflate = function(kA) {
              return new tA(kA);
            }, B.createDeflateRaw = function(kA) {
              return new w(kA);
            }, B.createInflateRaw = function(kA) {
              return new v(kA);
            }, B.createGzip = function(kA) {
              return new lA(kA);
            }, B.createGunzip = function(kA) {
              return new uA(kA);
            }, B.createUnzip = function(kA) {
              return new RA(kA);
            }, B.deflate = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new k(VA), kA, EA);
            }, B.deflateSync = function(kA, VA) {
              return IA(new k(VA), kA);
            }, B.gzip = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new lA(VA), kA, EA);
            }, B.gzipSync = function(kA, VA) {
              return IA(new lA(VA), kA);
            }, B.deflateRaw = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new w(VA), kA, EA);
            }, B.deflateRawSync = function(kA, VA) {
              return IA(new w(VA), kA);
            }, B.unzip = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new RA(VA), kA, EA);
            }, B.unzipSync = function(kA, VA) {
              return IA(new RA(VA), kA);
            }, B.inflate = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new tA(VA), kA, EA);
            }, B.inflateSync = function(kA, VA) {
              return IA(new tA(VA), kA);
            }, B.gunzip = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new uA(VA), kA, EA);
            }, B.gunzipSync = function(kA, VA) {
              return IA(new uA(VA), kA);
            }, B.inflateRaw = function(kA, VA, EA) {
              return typeof VA == "function" && (EA = VA, VA = {}), CA(new v(VA), kA, EA);
            }, B.inflateRawSync = function(kA, VA) {
              return IA(new v(VA), kA);
            };
            function CA(kA, VA, EA) {
              var zA = [], OA = 0;
              kA.on("error", LA), kA.on("end", yA), kA.end(VA), xA();
              function xA() {
                for (var TA; (TA = kA.read()) !== null; )
                  zA.push(TA), OA += TA.length;
                kA.once("readable", xA);
              }
              function LA(TA) {
                kA.removeListener("end", yA), kA.removeListener("readable", xA), EA(TA);
              }
              function yA() {
                var TA, fA = null;
                OA >= d ? fA = new RangeError(J) : TA = a.concat(zA, OA), zA = [], kA.close(), EA(fA, TA);
              }
            }
            function IA(kA, VA) {
              if (typeof VA == "string" && (VA = a.from(VA)), !a.isBuffer(VA)) throw new TypeError("Not a string or buffer");
              var EA = kA._finishFlushFlag;
              return kA._processChunk(VA, EA);
            }
            function k(kA) {
              if (!(this instanceof k)) return new k(kA);
              $.call(this, kA, x.DEFLATE);
            }
            function tA(kA) {
              if (!(this instanceof tA)) return new tA(kA);
              $.call(this, kA, x.INFLATE);
            }
            function lA(kA) {
              if (!(this instanceof lA)) return new lA(kA);
              $.call(this, kA, x.GZIP);
            }
            function uA(kA) {
              if (!(this instanceof uA)) return new uA(kA);
              $.call(this, kA, x.GUNZIP);
            }
            function w(kA) {
              if (!(this instanceof w)) return new w(kA);
              $.call(this, kA, x.DEFLATERAW);
            }
            function v(kA) {
              if (!(this instanceof v)) return new v(kA);
              $.call(this, kA, x.INFLATERAW);
            }
            function RA(kA) {
              if (!(this instanceof RA)) return new RA(kA);
              $.call(this, kA, x.UNZIP);
            }
            function DA(kA) {
              return kA === x.Z_NO_FLUSH || kA === x.Z_PARTIAL_FLUSH || kA === x.Z_SYNC_FLUSH || kA === x.Z_FULL_FLUSH || kA === x.Z_FINISH || kA === x.Z_BLOCK;
            }
            function $(kA, VA) {
              var EA = this;
              if (this._opts = kA = kA || {}, this._chunkSize = kA.chunkSize || B.Z_DEFAULT_CHUNK, D.call(this, kA), kA.flush && !DA(kA.flush))
                throw new Error("Invalid flush flag: " + kA.flush);
              if (kA.finishFlush && !DA(kA.finishFlush))
                throw new Error("Invalid flush flag: " + kA.finishFlush);
              if (this._flushFlag = kA.flush || x.Z_NO_FLUSH, this._finishFlushFlag = typeof kA.finishFlush < "u" ? kA.finishFlush : x.Z_FINISH, kA.chunkSize && (kA.chunkSize < B.Z_MIN_CHUNK || kA.chunkSize > B.Z_MAX_CHUNK))
                throw new Error("Invalid chunk size: " + kA.chunkSize);
              if (kA.windowBits && (kA.windowBits < B.Z_MIN_WINDOWBITS || kA.windowBits > B.Z_MAX_WINDOWBITS))
                throw new Error("Invalid windowBits: " + kA.windowBits);
              if (kA.level && (kA.level < B.Z_MIN_LEVEL || kA.level > B.Z_MAX_LEVEL))
                throw new Error("Invalid compression level: " + kA.level);
              if (kA.memLevel && (kA.memLevel < B.Z_MIN_MEMLEVEL || kA.memLevel > B.Z_MAX_MEMLEVEL))
                throw new Error("Invalid memLevel: " + kA.memLevel);
              if (kA.strategy && kA.strategy != B.Z_FILTERED && kA.strategy != B.Z_HUFFMAN_ONLY && kA.strategy != B.Z_RLE && kA.strategy != B.Z_FIXED && kA.strategy != B.Z_DEFAULT_STRATEGY)
                throw new Error("Invalid strategy: " + kA.strategy);
              if (kA.dictionary && !a.isBuffer(kA.dictionary))
                throw new Error("Invalid dictionary: it should be a Buffer instance");
              this._handle = new x.Zlib(VA);
              var zA = this;
              this._hadError = !1, this._handle.onerror = function(LA, yA) {
                cA(zA), zA._hadError = !0;
                var TA = new Error(LA);
                TA.errno = yA, TA.code = B.codes[yA], zA.emit("error", TA);
              };
              var OA = B.Z_DEFAULT_COMPRESSION;
              typeof kA.level == "number" && (OA = kA.level);
              var xA = B.Z_DEFAULT_STRATEGY;
              typeof kA.strategy == "number" && (xA = kA.strategy), this._handle.init(kA.windowBits || B.Z_DEFAULT_WINDOWBITS, OA, kA.memLevel || B.Z_DEFAULT_MEMLEVEL, xA, kA.dictionary), this._buffer = a.allocUnsafe(this._chunkSize), this._offset = 0, this._level = OA, this._strategy = xA, this.once("end", this.close), Object.defineProperty(this, "_closed", {
                get: function() {
                  return !EA._handle;
                },
                configurable: !0,
                enumerable: !0
              });
            }
            N.inherits($, D), $.prototype.params = function(kA, VA, EA) {
              if (kA < B.Z_MIN_LEVEL || kA > B.Z_MAX_LEVEL)
                throw new RangeError("Invalid compression level: " + kA);
              if (VA != B.Z_FILTERED && VA != B.Z_HUFFMAN_ONLY && VA != B.Z_RLE && VA != B.Z_FIXED && VA != B.Z_DEFAULT_STRATEGY)
                throw new TypeError("Invalid strategy: " + VA);
              if (this._level !== kA || this._strategy !== VA) {
                var zA = this;
                this.flush(x.Z_SYNC_FLUSH, function() {
                  P(zA._handle, "zlib binding closed"), zA._handle.params(kA, VA), zA._hadError || (zA._level = kA, zA._strategy = VA, EA && EA());
                });
              } else
                A.nextTick(EA);
            }, $.prototype.reset = function() {
              return P(this._handle, "zlib binding closed"), this._handle.reset();
            }, $.prototype._flush = function(kA) {
              this._transform(a.alloc(0), "", kA);
            }, $.prototype.flush = function(kA, VA) {
              var EA = this, zA = this._writableState;
              (typeof kA == "function" || kA === void 0 && !VA) && (VA = kA, kA = x.Z_FULL_FLUSH), zA.ended ? VA && A.nextTick(VA) : zA.ending ? VA && this.once("end", VA) : zA.needDrain ? VA && this.once("drain", function() {
                return EA.flush(kA, VA);
              }) : (this._flushFlag = kA, this.write(a.alloc(0), "", VA));
            }, $.prototype.close = function(kA) {
              cA(this, kA), A.nextTick(Ae, this);
            };
            function cA(kA, VA) {
              VA && A.nextTick(VA), kA._handle && (kA._handle.close(), kA._handle = null);
            }
            function Ae(kA) {
              kA.emit("close");
            }
            $.prototype._transform = function(kA, VA, EA) {
              var zA, OA = this._writableState, xA = OA.ending || OA.ended, LA = xA && (!kA || OA.length === kA.length);
              if (kA !== null && !a.isBuffer(kA)) return EA(new Error("invalid input"));
              if (!this._handle) return EA(new Error("zlib binding closed"));
              LA ? zA = this._finishFlushFlag : (zA = this._flushFlag, kA.length >= OA.length && (this._flushFlag = this._opts.flush || x.Z_NO_FLUSH)), this._processChunk(kA, zA, EA);
            }, $.prototype._processChunk = function(kA, VA, EA) {
              var zA = kA && kA.length, OA = this._chunkSize - this._offset, xA = 0, LA = this, yA = typeof EA == "function";
              if (!yA) {
                var TA = [], fA = 0, sA;
                this.on("error", function(oA) {
                  sA = oA;
                }), P(this._handle, "zlib binding closed");
                do
                  var F = this._handle.writeSync(
                    VA,
                    kA,
                    // in
                    xA,
                    // in_off
                    zA,
                    // in_len
                    this._buffer,
                    // out
                    this._offset,
                    //out_off
                    OA
                  );
                while (!this._hadError && _(F[0], F[1]));
                if (this._hadError)
                  throw sA;
                if (fA >= d)
                  throw cA(this), new RangeError(J);
                var o = a.concat(TA, fA);
                return cA(this), o;
              }
              P(this._handle, "zlib binding closed");
              var h = this._handle.write(
                VA,
                kA,
                // in
                xA,
                // in_off
                zA,
                // in_len
                this._buffer,
                // out
                this._offset,
                //out_off
                OA
              );
              h.buffer = kA, h.callback = _;
              function _(oA, p) {
                if (this && (this.buffer = null, this.callback = null), !LA._hadError) {
                  var rA = OA - p;
                  if (P(rA >= 0, "have should not go down"), rA > 0) {
                    var QA = LA._buffer.slice(LA._offset, LA._offset + rA);
                    LA._offset += rA, yA ? LA.push(QA) : (TA.push(QA), fA += QA.length);
                  }
                  if ((p === 0 || LA._offset >= LA._chunkSize) && (OA = LA._chunkSize, LA._offset = 0, LA._buffer = a.allocUnsafe(LA._chunkSize)), p === 0) {
                    if (xA += zA - oA, zA = oA, !yA) return !0;
                    var bA = LA._handle.write(VA, kA, xA, zA, LA._buffer, LA._offset, LA._chunkSize);
                    bA.callback = _, bA.buffer = kA;
                    return;
                  }
                  if (!yA) return !1;
                  EA();
                }
              }
            }, N.inherits(k, $), N.inherits(tA, $), N.inherits(lA, $), N.inherits(uA, $), N.inherits(w, $), N.inherits(v, $), N.inherits(RA, $);
          },
          /***/
          7802(Q, B, r) {
            var A = r(5049), a = r(3036), D = r(78), x = r(1909);
            Q.exports = x || A.call(D, a);
          },
          /***/
          8619(Q, B, r) {
            var A = r(5049), a = r(3036), D = r(7802);
            Q.exports = function() {
              return D(A, a, arguments);
            };
          },
          /***/
          3036(Q) {
            Q.exports = Function.prototype.apply;
          },
          /***/
          78(Q) {
            Q.exports = Function.prototype.call;
          },
          /***/
          6688(Q, B, r) {
            var A = r(5049), a = r(6785), D = r(78), x = r(7802);
            Q.exports = function(P) {
              if (P.length < 1 || typeof P[0] != "function")
                throw new a("a function is required");
              return x(A, D, P);
            };
          },
          /***/
          1909(Q) {
            Q.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
          },
          /***/
          7913(Q, B, r) {
            var A = r(8651), a = r(6601), D = a(A("String.prototype.indexOf"));
            Q.exports = function(N, P) {
              var d = A(N, !!P);
              return typeof d == "function" && D(N, ".prototype.") > -1 ? a(d) : d;
            };
          },
          /***/
          6601(Q, B, r) {
            var A = r(6255), a = r(6649), D = r(6688), x = r(8619);
            Q.exports = function(P) {
              var d = D(arguments), J = P.length - (arguments.length - 1);
              return A(
                d,
                1 + (J > 0 ? J : 0),
                !0
              );
            }, a ? a(Q.exports, "apply", { value: x }) : Q.exports.apply = x;
          },
          /***/
          2774(Q, B, r) {
            var A = r(8651), a = r(6688), D = a([A("%String.prototype.indexOf%")]);
            Q.exports = function(N, P) {
              var d = (
                /** @type {(this: unknown, ...args: unknown[]) => unknown} */
                A(N, !!P)
              );
              return typeof d == "function" && D(N, ".prototype.") > -1 ? a(
                /** @type {const} */
                [d]
              ) : d;
            };
          },
          /***/
          1613(Q, B, r) {
            var A = r(783).Buffer, a = (function() {
              function D(T, H) {
                return H != null && T instanceof H;
              }
              var x;
              try {
                x = Map;
              } catch {
                x = function() {
                };
              }
              var N;
              try {
                N = Set;
              } catch {
                N = function() {
                };
              }
              var P;
              try {
                P = Promise;
              } catch {
                P = function() {
                };
              }
              function d(T, H, eA, CA, IA) {
                typeof H == "object" && (eA = H.depth, CA = H.prototype, IA = H.includeNonEnumerable, H = H.circular);
                var k = [], tA = [], lA = typeof A < "u";
                typeof H > "u" && (H = !0), typeof eA > "u" && (eA = 1 / 0);
                function uA(w, v) {
                  if (w === null)
                    return null;
                  if (v === 0)
                    return w;
                  var RA, DA;
                  if (typeof w != "object")
                    return w;
                  if (D(w, x))
                    RA = new x();
                  else if (D(w, N))
                    RA = new N();
                  else if (D(w, P))
                    RA = new P(function(xA, LA) {
                      w.then(function(yA) {
                        xA(uA(yA, v - 1));
                      }, function(yA) {
                        LA(uA(yA, v - 1));
                      });
                    });
                  else if (d.__isArray(w))
                    RA = [];
                  else if (d.__isRegExp(w))
                    RA = new RegExp(w.source, z(w)), w.lastIndex && (RA.lastIndex = w.lastIndex);
                  else if (d.__isDate(w))
                    RA = new Date(w.getTime());
                  else {
                    if (lA && A.isBuffer(w))
                      return A.allocUnsafe ? RA = A.allocUnsafe(w.length) : RA = new A(w.length), w.copy(RA), RA;
                    D(w, Error) ? RA = Object.create(w) : typeof CA > "u" ? (DA = Object.getPrototypeOf(w), RA = Object.create(DA)) : (RA = Object.create(CA), DA = CA);
                  }
                  if (H) {
                    var $ = k.indexOf(w);
                    if ($ != -1)
                      return tA[$];
                    k.push(w), tA.push(RA);
                  }
                  D(w, x) && w.forEach(function(xA, LA) {
                    var yA = uA(LA, v - 1), TA = uA(xA, v - 1);
                    RA.set(yA, TA);
                  }), D(w, N) && w.forEach(function(xA) {
                    var LA = uA(xA, v - 1);
                    RA.add(LA);
                  });
                  for (var cA in w) {
                    var Ae;
                    DA && (Ae = Object.getOwnPropertyDescriptor(DA, cA)), !(Ae && Ae.set == null) && (RA[cA] = uA(w[cA], v - 1));
                  }
                  if (Object.getOwnPropertySymbols)
                    for (var kA = Object.getOwnPropertySymbols(w), cA = 0; cA < kA.length; cA++) {
                      var VA = kA[cA], EA = Object.getOwnPropertyDescriptor(w, VA);
                      EA && !EA.enumerable && !IA || (RA[VA] = uA(w[VA], v - 1), EA.enumerable || Object.defineProperty(RA, VA, {
                        enumerable: !1
                      }));
                    }
                  if (IA)
                    for (var zA = Object.getOwnPropertyNames(w), cA = 0; cA < zA.length; cA++) {
                      var OA = zA[cA], EA = Object.getOwnPropertyDescriptor(w, OA);
                      EA && EA.enumerable || (RA[OA] = uA(w[OA], v - 1), Object.defineProperty(RA, OA, {
                        enumerable: !1
                      }));
                    }
                  return RA;
                }
                return uA(T, eA);
              }
              d.clonePrototype = function(H) {
                if (H === null)
                  return null;
                var eA = function() {
                };
                return eA.prototype = H, new eA();
              };
              function J(T) {
                return Object.prototype.toString.call(T);
              }
              d.__objToStr = J;
              function q(T) {
                return typeof T == "object" && J(T) === "[object Date]";
              }
              d.__isDate = q;
              function AA(T) {
                return typeof T == "object" && J(T) === "[object Array]";
              }
              d.__isArray = AA;
              function K(T) {
                return typeof T == "object" && J(T) === "[object RegExp]";
              }
              d.__isRegExp = K;
              function z(T) {
                var H = "";
                return T.global && (H += "g"), T.ignoreCase && (H += "i"), T.multiline && (H += "m"), H;
              }
              return d.__getRegExpFlags = z, d;
            })();
            Q.exports && (Q.exports = a);
          },
          /***/
          9295(Q, B, r) {
            var A = r(6649), a = r(7770), D = r(6785), x = r(8109);
            Q.exports = function(P, d, J) {
              if (!P || typeof P != "object" && typeof P != "function")
                throw new D("`obj` must be an object or a function`");
              if (typeof d != "string" && typeof d != "symbol")
                throw new D("`property` must be a string or a symbol`");
              if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
                throw new D("`nonEnumerable`, if provided, must be a boolean or null");
              if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
                throw new D("`nonWritable`, if provided, must be a boolean or null");
              if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
                throw new D("`nonConfigurable`, if provided, must be a boolean or null");
              if (arguments.length > 6 && typeof arguments[6] != "boolean")
                throw new D("`loose`, if provided, must be a boolean");
              var q = arguments.length > 3 ? arguments[3] : null, AA = arguments.length > 4 ? arguments[4] : null, K = arguments.length > 5 ? arguments[5] : null, z = arguments.length > 6 ? arguments[6] : !1, T = !!x && x(P, d);
              if (A)
                A(P, d, {
                  configurable: K === null && T ? T.configurable : !K,
                  enumerable: q === null && T ? T.enumerable : !q,
                  value: J,
                  writable: AA === null && T ? T.writable : !AA
                });
              else if (z || !q && !AA && !K)
                P[d] = J;
              else
                throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
            };
          },
          /***/
          5421(Q, B, r) {
            var A = r(5643), a = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", D = Object.prototype.toString, x = Array.prototype.concat, N = r(9295), P = function(AA) {
              return typeof AA == "function" && D.call(AA) === "[object Function]";
            }, d = r(8890)(), J = function(AA, K, z, T) {
              if (K in AA) {
                if (T === !0) {
                  if (AA[K] === z)
                    return;
                } else if (!P(T) || !T())
                  return;
              }
              d ? N(AA, K, z, !0) : N(AA, K, z);
            }, q = function(AA, K) {
              var z = arguments.length > 2 ? arguments[2] : {}, T = A(K);
              a && (T = x.call(T, Object.getOwnPropertySymbols(K)));
              for (var H = 0; H < T.length; H += 1)
                J(AA, T[H], K[T[H]], z[T[H]]);
            };
            q.supportsDescriptors = !!d, Q.exports = q;
          },
          /***/
          9302(Q, B, r) {
            var A = r(6688), a = r(8109), D;
            try {
              D = /** @type {{ __proto__?: typeof Array.prototype }} */
              [].__proto__ === Array.prototype;
            } catch (d) {
              if (!d || typeof d != "object" || !("code" in d) || d.code !== "ERR_PROTO_ACCESS")
                throw d;
            }
            var x = !!D && a && a(
              Object.prototype,
              /** @type {keyof typeof Object.prototype} */
              "__proto__"
            ), N = Object, P = N.getPrototypeOf;
            Q.exports = x && typeof x.get == "function" ? A([x.get]) : typeof P == "function" ? (
              /** @type {import('./get')} */
              function(J) {
                return P(J == null ? J : N(J));
              }
            ) : !1;
          },
          /***/
          6649(Q) {
            var B = Object.defineProperty || !1;
            if (B)
              try {
                B({}, "a", { value: 1 });
              } catch {
                B = !1;
              }
            Q.exports = B;
          },
          /***/
          9055(Q) {
            Q.exports = EvalError;
          },
          /***/
          5293(Q) {
            Q.exports = Error;
          },
          /***/
          8888(Q) {
            Q.exports = RangeError;
          },
          /***/
          7900(Q) {
            Q.exports = ReferenceError;
          },
          /***/
          7770(Q) {
            Q.exports = SyntaxError;
          },
          /***/
          6785(Q) {
            Q.exports = TypeError;
          },
          /***/
          4055(Q) {
            Q.exports = URIError;
          },
          /***/
          5846(Q) {
            Q.exports = Object;
          },
          /***/
          4785(Q) {
            var B = typeof Reflect == "object" ? Reflect : null, r = B && typeof B.apply == "function" ? B.apply : function(lA, uA, w) {
              return Function.prototype.apply.call(lA, uA, w);
            }, A;
            B && typeof B.ownKeys == "function" ? A = B.ownKeys : Object.getOwnPropertySymbols ? A = function(lA) {
              return Object.getOwnPropertyNames(lA).concat(Object.getOwnPropertySymbols(lA));
            } : A = function(lA) {
              return Object.getOwnPropertyNames(lA);
            };
            function a(tA) {
              console && console.warn && console.warn(tA);
            }
            var D = Number.isNaN || function(lA) {
              return lA !== lA;
            };
            function x() {
              x.init.call(this);
            }
            Q.exports = x, Q.exports.once = CA, x.EventEmitter = x, x.prototype._events = void 0, x.prototype._eventsCount = 0, x.prototype._maxListeners = void 0;
            var N = 10;
            function P(tA) {
              if (typeof tA != "function")
                throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof tA);
            }
            Object.defineProperty(x, "defaultMaxListeners", {
              enumerable: !0,
              get: function() {
                return N;
              },
              set: function(tA) {
                if (typeof tA != "number" || tA < 0 || D(tA))
                  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + tA + ".");
                N = tA;
              }
            }), x.init = function() {
              (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
            }, x.prototype.setMaxListeners = function(lA) {
              if (typeof lA != "number" || lA < 0 || D(lA))
                throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + lA + ".");
              return this._maxListeners = lA, this;
            };
            function d(tA) {
              return tA._maxListeners === void 0 ? x.defaultMaxListeners : tA._maxListeners;
            }
            x.prototype.getMaxListeners = function() {
              return d(this);
            }, x.prototype.emit = function(lA) {
              for (var uA = [], w = 1; w < arguments.length; w++) uA.push(arguments[w]);
              var v = lA === "error", RA = this._events;
              if (RA !== void 0)
                v = v && RA.error === void 0;
              else if (!v)
                return !1;
              if (v) {
                var DA;
                if (uA.length > 0 && (DA = uA[0]), DA instanceof Error)
                  throw DA;
                var $ = new Error("Unhandled error." + (DA ? " (" + DA.message + ")" : ""));
                throw $.context = DA, $;
              }
              var cA = RA[lA];
              if (cA === void 0)
                return !1;
              if (typeof cA == "function")
                r(cA, this, uA);
              else
                for (var Ae = cA.length, kA = T(cA, Ae), w = 0; w < Ae; ++w)
                  r(kA[w], this, uA);
              return !0;
            };
            function J(tA, lA, uA, w) {
              var v, RA, DA;
              if (P(uA), RA = tA._events, RA === void 0 ? (RA = tA._events = /* @__PURE__ */ Object.create(null), tA._eventsCount = 0) : (RA.newListener !== void 0 && (tA.emit(
                "newListener",
                lA,
                uA.listener ? uA.listener : uA
              ), RA = tA._events), DA = RA[lA]), DA === void 0)
                DA = RA[lA] = uA, ++tA._eventsCount;
              else if (typeof DA == "function" ? DA = RA[lA] = w ? [uA, DA] : [DA, uA] : w ? DA.unshift(uA) : DA.push(uA), v = d(tA), v > 0 && DA.length > v && !DA.warned) {
                DA.warned = !0;
                var $ = new Error("Possible EventEmitter memory leak detected. " + DA.length + " " + String(lA) + " listeners added. Use emitter.setMaxListeners() to increase limit");
                $.name = "MaxListenersExceededWarning", $.emitter = tA, $.type = lA, $.count = DA.length, a($);
              }
              return tA;
            }
            x.prototype.addListener = function(lA, uA) {
              return J(this, lA, uA, !1);
            }, x.prototype.on = x.prototype.addListener, x.prototype.prependListener = function(lA, uA) {
              return J(this, lA, uA, !0);
            };
            function q() {
              if (!this.fired)
                return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
            }
            function AA(tA, lA, uA) {
              var w = { fired: !1, wrapFn: void 0, target: tA, type: lA, listener: uA }, v = q.bind(w);
              return v.listener = uA, w.wrapFn = v, v;
            }
            x.prototype.once = function(lA, uA) {
              return P(uA), this.on(lA, AA(this, lA, uA)), this;
            }, x.prototype.prependOnceListener = function(lA, uA) {
              return P(uA), this.prependListener(lA, AA(this, lA, uA)), this;
            }, x.prototype.removeListener = function(lA, uA) {
              var w, v, RA, DA, $;
              if (P(uA), v = this._events, v === void 0)
                return this;
              if (w = v[lA], w === void 0)
                return this;
              if (w === uA || w.listener === uA)
                --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete v[lA], v.removeListener && this.emit("removeListener", lA, w.listener || uA));
              else if (typeof w != "function") {
                for (RA = -1, DA = w.length - 1; DA >= 0; DA--)
                  if (w[DA] === uA || w[DA].listener === uA) {
                    $ = w[DA].listener, RA = DA;
                    break;
                  }
                if (RA < 0)
                  return this;
                RA === 0 ? w.shift() : H(w, RA), w.length === 1 && (v[lA] = w[0]), v.removeListener !== void 0 && this.emit("removeListener", lA, $ || uA);
              }
              return this;
            }, x.prototype.off = x.prototype.removeListener, x.prototype.removeAllListeners = function(lA) {
              var uA, w, v;
              if (w = this._events, w === void 0)
                return this;
              if (w.removeListener === void 0)
                return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : w[lA] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete w[lA]), this;
              if (arguments.length === 0) {
                var RA = Object.keys(w), DA;
                for (v = 0; v < RA.length; ++v)
                  DA = RA[v], DA !== "removeListener" && this.removeAllListeners(DA);
                return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
              }
              if (uA = w[lA], typeof uA == "function")
                this.removeListener(lA, uA);
              else if (uA !== void 0)
                for (v = uA.length - 1; v >= 0; v--)
                  this.removeListener(lA, uA[v]);
              return this;
            };
            function K(tA, lA, uA) {
              var w = tA._events;
              if (w === void 0)
                return [];
              var v = w[lA];
              return v === void 0 ? [] : typeof v == "function" ? uA ? [v.listener || v] : [v] : uA ? eA(v) : T(v, v.length);
            }
            x.prototype.listeners = function(lA) {
              return K(this, lA, !0);
            }, x.prototype.rawListeners = function(lA) {
              return K(this, lA, !1);
            }, x.listenerCount = function(tA, lA) {
              return typeof tA.listenerCount == "function" ? tA.listenerCount(lA) : z.call(tA, lA);
            }, x.prototype.listenerCount = z;
            function z(tA) {
              var lA = this._events;
              if (lA !== void 0) {
                var uA = lA[tA];
                if (typeof uA == "function")
                  return 1;
                if (uA !== void 0)
                  return uA.length;
              }
              return 0;
            }
            x.prototype.eventNames = function() {
              return this._eventsCount > 0 ? A(this._events) : [];
            };
            function T(tA, lA) {
              for (var uA = new Array(lA), w = 0; w < lA; ++w)
                uA[w] = tA[w];
              return uA;
            }
            function H(tA, lA) {
              for (; lA + 1 < tA.length; lA++)
                tA[lA] = tA[lA + 1];
              tA.pop();
            }
            function eA(tA) {
              for (var lA = new Array(tA.length), uA = 0; uA < lA.length; ++uA)
                lA[uA] = tA[uA].listener || tA[uA];
              return lA;
            }
            function CA(tA, lA) {
              return new Promise(function(uA, w) {
                function v(DA) {
                  tA.removeListener(lA, RA), w(DA);
                }
                function RA() {
                  typeof tA.removeListener == "function" && tA.removeListener("error", v), uA([].slice.call(arguments));
                }
                k(tA, lA, RA, { once: !0 }), lA !== "error" && IA(tA, v, { once: !0 });
              });
            }
            function IA(tA, lA, uA) {
              typeof tA.on == "function" && k(tA, "error", lA, uA);
            }
            function k(tA, lA, uA, w) {
              if (typeof tA.on == "function")
                w.once ? tA.once(lA, uA) : tA.on(lA, uA);
              else if (typeof tA.addEventListener == "function")
                tA.addEventListener(lA, function v(RA) {
                  w.once && tA.removeEventListener(lA, v), uA(RA);
                });
              else
                throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof tA);
            }
          },
          /***/
          2022(Q, B, r) {
            Q.exports = (function() {
              if (typeof globalThis == "object")
                return globalThis;
              var A;
              try {
                A = this || new Function("return this")();
              } catch {
                if (typeof window == "object")
                  return window;
                if (typeof self == "object")
                  return self;
                if (typeof r.g < "u")
                  return r.g;
              }
              return A;
            })();
          },
          /***/
          453(Q) {
            Q.exports = function B(r, A) {
              if (r === A) return !0;
              if (r && A && typeof r == "object" && typeof A == "object") {
                if (r.constructor !== A.constructor) return !1;
                var a, D, x;
                if (Array.isArray(r)) {
                  if (a = r.length, a != A.length) return !1;
                  for (D = a; D-- !== 0; )
                    if (!B(r[D], A[D])) return !1;
                  return !0;
                }
                if (r.constructor === RegExp) return r.source === A.source && r.flags === A.flags;
                if (r.valueOf !== Object.prototype.valueOf) return r.valueOf() === A.valueOf();
                if (r.toString !== Object.prototype.toString) return r.toString() === A.toString();
                if (x = Object.keys(r), a = x.length, a !== Object.keys(A).length) return !1;
                for (D = a; D-- !== 0; )
                  if (!Object.prototype.hasOwnProperty.call(A, x[D])) return !1;
                for (D = a; D-- !== 0; ) {
                  var N = x[D];
                  if (!B(r[N], A[N])) return !1;
                }
                return !0;
              }
              return r !== r && A !== A;
            };
          },
          /***/
          8404(Q, B, r) {
            var A = r(3746), a = Object.prototype.toString, D = Object.prototype.hasOwnProperty, x = function(q, AA, K) {
              for (var z = 0, T = q.length; z < T; z++)
                D.call(q, z) && (K == null ? AA(q[z], z, q) : AA.call(K, q[z], z, q));
            }, N = function(q, AA, K) {
              for (var z = 0, T = q.length; z < T; z++)
                K == null ? AA(q.charAt(z), z, q) : AA.call(K, q.charAt(z), z, q);
            }, P = function(q, AA, K) {
              for (var z in q)
                D.call(q, z) && (K == null ? AA(q[z], z, q) : AA.call(K, q[z], z, q));
            };
            function d(J) {
              return a.call(J) === "[object Array]";
            }
            Q.exports = function(q, AA, K) {
              if (!A(AA))
                throw new TypeError("iterator must be a function");
              var z;
              arguments.length >= 3 && (z = K), d(q) ? x(q, AA, z) : typeof q == "string" ? N(q, AA, z) : P(q, AA, z);
            };
          },
          /***/
          2719(Q) {
            var B = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, A = Math.max, a = "[object Function]", D = function(d, J) {
              for (var q = [], AA = 0; AA < d.length; AA += 1)
                q[AA] = d[AA];
              for (var K = 0; K < J.length; K += 1)
                q[K + d.length] = J[K];
              return q;
            }, x = function(d, J) {
              for (var q = [], AA = J, K = 0; AA < d.length; AA += 1, K += 1)
                q[K] = d[AA];
              return q;
            }, N = function(P, d) {
              for (var J = "", q = 0; q < P.length; q += 1)
                J += P[q], q + 1 < P.length && (J += d);
              return J;
            };
            Q.exports = function(d) {
              var J = this;
              if (typeof J != "function" || r.apply(J) !== a)
                throw new TypeError(B + J);
              for (var q = x(arguments, 1), AA, K = function() {
                if (this instanceof AA) {
                  var CA = J.apply(
                    this,
                    D(q, arguments)
                  );
                  return Object(CA) === CA ? CA : this;
                }
                return J.apply(
                  d,
                  D(q, arguments)
                );
              }, z = A(0, J.length - q.length), T = [], H = 0; H < z; H++)
                T[H] = "$" + H;
              if (AA = Function("binder", "return function (" + N(T, ",") + "){ return binder.apply(this,arguments); }")(K), J.prototype) {
                var eA = function() {
                };
                eA.prototype = J.prototype, AA.prototype = new eA(), eA.prototype = null;
              }
              return AA;
            };
          },
          /***/
          5049(Q, B, r) {
            var A = r(2719);
            Q.exports = Function.prototype.bind || A;
          },
          /***/
          3011(Q) {
            const B = (
              /** @type {GeneratorFunctionConstructor} */
              (function* () {
              }).constructor
            );
            Q.exports = () => B;
          },
          /***/
          8651(Q, B, r) {
            var A, a = r(5846), D = r(5293), x = r(9055), N = r(8888), P = r(7900), d = r(7770), J = r(6785), q = r(4055), AA = r(716), K = r(7450), z = r(3774), T = r(7552), H = r(5874), eA = r(9292), CA = r(6071), IA = Function, k = function(rA) {
              try {
                return IA('"use strict"; return (' + rA + ").constructor;")();
              } catch {
              }
            }, tA = r(8109), lA = r(6649), uA = function() {
              throw new J();
            }, w = tA ? (function() {
              try {
                return arguments.callee, uA;
              } catch {
                try {
                  return tA(arguments, "callee").get;
                } catch {
                  return uA;
                }
              }
            })() : uA, v = r(3257)(), RA = r(7106), DA = r(3766), $ = r(6822), cA = r(3036), Ae = r(78), kA = {}, VA = typeof Uint8Array > "u" || !RA ? A : RA(Uint8Array), EA = {
              __proto__: null,
              "%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
              "%Array%": Array,
              "%ArrayBuffer%": typeof ArrayBuffer > "u" ? A : ArrayBuffer,
              "%ArrayIteratorPrototype%": v && RA ? RA([][Symbol.iterator]()) : A,
              "%AsyncFromSyncIteratorPrototype%": A,
              "%AsyncFunction%": kA,
              "%AsyncGenerator%": kA,
              "%AsyncGeneratorFunction%": kA,
              "%AsyncIteratorPrototype%": kA,
              "%Atomics%": typeof Atomics > "u" ? A : Atomics,
              "%BigInt%": typeof BigInt > "u" ? A : BigInt,
              "%BigInt64Array%": typeof BigInt64Array > "u" ? A : BigInt64Array,
              "%BigUint64Array%": typeof BigUint64Array > "u" ? A : BigUint64Array,
              "%Boolean%": Boolean,
              "%DataView%": typeof DataView > "u" ? A : DataView,
              "%Date%": Date,
              "%decodeURI%": decodeURI,
              "%decodeURIComponent%": decodeURIComponent,
              "%encodeURI%": encodeURI,
              "%encodeURIComponent%": encodeURIComponent,
              "%Error%": D,
              "%eval%": eval,
              // eslint-disable-line no-eval
              "%EvalError%": x,
              "%Float16Array%": typeof Float16Array > "u" ? A : Float16Array,
              "%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
              "%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
              "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
              "%Function%": IA,
              "%GeneratorFunction%": kA,
              "%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
              "%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
              "%Int32Array%": typeof Int32Array > "u" ? A : Int32Array,
              "%isFinite%": isFinite,
              "%isNaN%": isNaN,
              "%IteratorPrototype%": v && RA ? RA(RA([][Symbol.iterator]())) : A,
              "%JSON%": typeof JSON == "object" ? JSON : A,
              "%Map%": typeof Map > "u" ? A : Map,
              "%MapIteratorPrototype%": typeof Map > "u" || !v || !RA ? A : RA((/* @__PURE__ */ new Map())[Symbol.iterator]()),
              "%Math%": Math,
              "%Number%": Number,
              "%Object%": a,
              "%Object.getOwnPropertyDescriptor%": tA,
              "%parseFloat%": parseFloat,
              "%parseInt%": parseInt,
              "%Promise%": typeof Promise > "u" ? A : Promise,
              "%Proxy%": typeof Proxy > "u" ? A : Proxy,
              "%RangeError%": N,
              "%ReferenceError%": P,
              "%Reflect%": typeof Reflect > "u" ? A : Reflect,
              "%RegExp%": RegExp,
              "%Set%": typeof Set > "u" ? A : Set,
              "%SetIteratorPrototype%": typeof Set > "u" || !v || !RA ? A : RA((/* @__PURE__ */ new Set())[Symbol.iterator]()),
              "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? A : SharedArrayBuffer,
              "%String%": String,
              "%StringIteratorPrototype%": v && RA ? RA(""[Symbol.iterator]()) : A,
              "%Symbol%": v ? Symbol : A,
              "%SyntaxError%": d,
              "%ThrowTypeError%": w,
              "%TypedArray%": VA,
              "%TypeError%": J,
              "%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
              "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
              "%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
              "%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
              "%URIError%": q,
              "%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
              "%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
              "%WeakSet%": typeof WeakSet > "u" ? A : WeakSet,
              "%Function.prototype.call%": Ae,
              "%Function.prototype.apply%": cA,
              "%Object.defineProperty%": lA,
              "%Object.getPrototypeOf%": DA,
              "%Math.abs%": AA,
              "%Math.floor%": K,
              "%Math.max%": z,
              "%Math.min%": T,
              "%Math.pow%": H,
              "%Math.round%": eA,
              "%Math.sign%": CA,
              "%Reflect.getPrototypeOf%": $
            };
            if (RA)
              try {
                null.error;
              } catch (rA) {
                var zA = RA(RA(rA));
                EA["%Error.prototype%"] = zA;
              }
            var OA = function rA(QA) {
              var bA;
              if (QA === "%AsyncFunction%")
                bA = k("async function () {}");
              else if (QA === "%GeneratorFunction%")
                bA = k("function* () {}");
              else if (QA === "%AsyncGeneratorFunction%")
                bA = k("async function* () {}");
              else if (QA === "%AsyncGenerator%") {
                var y = rA("%AsyncGeneratorFunction%");
                y && (bA = y.prototype);
              } else if (QA === "%AsyncIteratorPrototype%") {
                var M = rA("%AsyncGenerator%");
                M && RA && (bA = RA(M.prototype));
              }
              return EA[QA] = bA, bA;
            }, xA = {
              __proto__: null,
              "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
              "%ArrayPrototype%": ["Array", "prototype"],
              "%ArrayProto_entries%": ["Array", "prototype", "entries"],
              "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
              "%ArrayProto_keys%": ["Array", "prototype", "keys"],
              "%ArrayProto_values%": ["Array", "prototype", "values"],
              "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
              "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
              "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
              "%BooleanPrototype%": ["Boolean", "prototype"],
              "%DataViewPrototype%": ["DataView", "prototype"],
              "%DatePrototype%": ["Date", "prototype"],
              "%ErrorPrototype%": ["Error", "prototype"],
              "%EvalErrorPrototype%": ["EvalError", "prototype"],
              "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
              "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
              "%FunctionPrototype%": ["Function", "prototype"],
              "%Generator%": ["GeneratorFunction", "prototype"],
              "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
              "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
              "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
              "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
              "%JSONParse%": ["JSON", "parse"],
              "%JSONStringify%": ["JSON", "stringify"],
              "%MapPrototype%": ["Map", "prototype"],
              "%NumberPrototype%": ["Number", "prototype"],
              "%ObjectPrototype%": ["Object", "prototype"],
              "%ObjProto_toString%": ["Object", "prototype", "toString"],
              "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
              "%PromisePrototype%": ["Promise", "prototype"],
              "%PromiseProto_then%": ["Promise", "prototype", "then"],
              "%Promise_all%": ["Promise", "all"],
              "%Promise_reject%": ["Promise", "reject"],
              "%Promise_resolve%": ["Promise", "resolve"],
              "%RangeErrorPrototype%": ["RangeError", "prototype"],
              "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
              "%RegExpPrototype%": ["RegExp", "prototype"],
              "%SetPrototype%": ["Set", "prototype"],
              "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
              "%StringPrototype%": ["String", "prototype"],
              "%SymbolPrototype%": ["Symbol", "prototype"],
              "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
              "%TypedArrayPrototype%": ["TypedArray", "prototype"],
              "%TypeErrorPrototype%": ["TypeError", "prototype"],
              "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
              "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
              "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
              "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
              "%URIErrorPrototype%": ["URIError", "prototype"],
              "%WeakMapPrototype%": ["WeakMap", "prototype"],
              "%WeakSetPrototype%": ["WeakSet", "prototype"]
            }, LA = r(5049), yA = r(5215), TA = LA.call(Ae, Array.prototype.concat), fA = LA.call(cA, Array.prototype.splice), sA = LA.call(Ae, String.prototype.replace), F = LA.call(Ae, String.prototype.slice), o = LA.call(Ae, RegExp.prototype.exec), h = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, _ = /\\(\\)?/g, oA = function(QA) {
              var bA = F(QA, 0, 1), y = F(QA, -1);
              if (bA === "%" && y !== "%")
                throw new d("invalid intrinsic syntax, expected closing `%`");
              if (y === "%" && bA !== "%")
                throw new d("invalid intrinsic syntax, expected opening `%`");
              var M = [];
              return sA(QA, h, function(FA, dA, he, ie) {
                M[M.length] = he ? sA(ie, _, "$1") : dA || FA;
              }), M;
            }, p = function(QA, bA) {
              var y = QA, M;
              if (yA(xA, y) && (M = xA[y], y = "%" + M[0] + "%"), yA(EA, y)) {
                var FA = EA[y];
                if (FA === kA && (FA = OA(y)), typeof FA > "u" && !bA)
                  throw new J("intrinsic " + QA + " exists, but is not available. Please file an issue!");
                return {
                  alias: M,
                  name: y,
                  value: FA
                };
              }
              throw new d("intrinsic " + QA + " does not exist!");
            };
            Q.exports = function(QA, bA) {
              if (typeof QA != "string" || QA.length === 0)
                throw new J("intrinsic name must be a non-empty string");
              if (arguments.length > 1 && typeof bA != "boolean")
                throw new J('"allowMissing" argument must be a boolean');
              if (o(/^%?[^%]*%?$/, QA) === null)
                throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
              var y = oA(QA), M = y.length > 0 ? y[0] : "", FA = p("%" + M + "%", bA), dA = FA.name, he = FA.value, ie = !1, KA = FA.alias;
              KA && (M = KA[0], fA(y, TA([0, 1], KA)));
              for (var Pe = 1, Je = !0; Pe < y.length; Pe += 1) {
                var Le = y[Pe], Re = F(Le, 0, 1), _e = F(Le, -1);
                if ((Re === '"' || Re === "'" || Re === "`" || _e === '"' || _e === "'" || _e === "`") && Re !== _e)
                  throw new d("property names with quotes must have matching quotes");
                if ((Le === "constructor" || !Je) && (ie = !0), M += "." + Le, dA = "%" + M + "%", yA(EA, dA))
                  he = EA[dA];
                else if (he != null) {
                  if (!(Le in he)) {
                    if (!bA)
                      throw new J("base intrinsic for " + QA + " exists, but the property is not available.");
                    return;
                  }
                  if (tA && Pe + 1 >= y.length) {
                    var se = tA(he, Le);
                    Je = !!se, Je && "get" in se && !("originalValue" in se.get) ? he = se.get : he = he[Le];
                  } else
                    Je = yA(he, Le), he = he[Le];
                  Je && !ie && (EA[dA] = he);
                }
              }
              return he;
            };
          },
          /***/
          3766(Q, B, r) {
            var A = r(5846);
            Q.exports = A.getPrototypeOf || null;
          },
          /***/
          6822(Q) {
            Q.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
          },
          /***/
          7106(Q, B, r) {
            var A = r(6822), a = r(3766), D = r(9302);
            Q.exports = A ? function(N) {
              return A(N);
            } : a ? function(N) {
              if (!N || typeof N != "object" && typeof N != "function")
                throw new TypeError("getProto: not an object");
              return a(N);
            } : D ? function(N) {
              return D(N);
            } : null;
          },
          /***/
          5567(Q) {
            Q.exports = Object.getOwnPropertyDescriptor;
          },
          /***/
          8109(Q, B, r) {
            var A = r(5567);
            if (A)
              try {
                A([], "length");
              } catch {
                A = null;
              }
            Q.exports = A;
          },
          /***/
          8890(Q, B, r) {
            var A = r(6649), a = function() {
              return !!A;
            };
            a.hasArrayLengthDefineBug = function() {
              if (!A)
                return null;
              try {
                return A([], "length", { value: 1 }).length !== 1;
              } catch {
                return !0;
              }
            }, Q.exports = a;
          },
          /***/
          3257(Q, B, r) {
            var A = typeof Symbol < "u" && Symbol, a = r(2843);
            Q.exports = function() {
              return typeof A != "function" || typeof Symbol != "function" || typeof A("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : a();
            };
          },
          /***/
          2843(Q) {
            Q.exports = function() {
              if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
                return !1;
              if (typeof Symbol.iterator == "symbol")
                return !0;
              var r = {}, A = Symbol("test"), a = Object(A);
              if (typeof A == "string" || Object.prototype.toString.call(A) !== "[object Symbol]" || Object.prototype.toString.call(a) !== "[object Symbol]")
                return !1;
              var D = 42;
              r[A] = D;
              for (var x in r)
                return !1;
              if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
                return !1;
              var N = Object.getOwnPropertySymbols(r);
              if (N.length !== 1 || N[0] !== A || !Object.prototype.propertyIsEnumerable.call(r, A))
                return !1;
              if (typeof Object.getOwnPropertyDescriptor == "function") {
                var P = (
                  /** @type {PropertyDescriptor} */
                  Object.getOwnPropertyDescriptor(r, A)
                );
                if (P.value !== D || P.enumerable !== !0)
                  return !1;
              }
              return !0;
            };
          },
          /***/
          6626(Q, B, r) {
            var A = r(2843);
            Q.exports = function() {
              return A() && !!Symbol.toStringTag;
            };
          },
          /***/
          5215(Q, B, r) {
            var A = Function.prototype.call, a = Object.prototype.hasOwnProperty, D = r(5049);
            Q.exports = D.call(A, a);
          },
          /***/
          9029(Q, B) {
            /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
            B.read = function(r, A, a, D, x) {
              var N, P, d = x * 8 - D - 1, J = (1 << d) - 1, q = J >> 1, AA = -7, K = a ? x - 1 : 0, z = a ? -1 : 1, T = r[A + K];
              for (K += z, N = T & (1 << -AA) - 1, T >>= -AA, AA += d; AA > 0; N = N * 256 + r[A + K], K += z, AA -= 8)
                ;
              for (P = N & (1 << -AA) - 1, N >>= -AA, AA += D; AA > 0; P = P * 256 + r[A + K], K += z, AA -= 8)
                ;
              if (N === 0)
                N = 1 - q;
              else {
                if (N === J)
                  return P ? NaN : (T ? -1 : 1) * (1 / 0);
                P = P + Math.pow(2, D), N = N - q;
              }
              return (T ? -1 : 1) * P * Math.pow(2, N - D);
            }, B.write = function(r, A, a, D, x, N) {
              var P, d, J, q = N * 8 - x - 1, AA = (1 << q) - 1, K = AA >> 1, z = x === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = D ? 0 : N - 1, H = D ? 1 : -1, eA = A < 0 || A === 0 && 1 / A < 0 ? 1 : 0;
              for (A = Math.abs(A), isNaN(A) || A === 1 / 0 ? (d = isNaN(A) ? 1 : 0, P = AA) : (P = Math.floor(Math.log(A) / Math.LN2), A * (J = Math.pow(2, -P)) < 1 && (P--, J *= 2), P + K >= 1 ? A += z / J : A += z * Math.pow(2, 1 - K), A * J >= 2 && (P++, J /= 2), P + K >= AA ? (d = 0, P = AA) : P + K >= 1 ? (d = (A * J - 1) * Math.pow(2, x), P = P + K) : (d = A * Math.pow(2, K - 1) * Math.pow(2, x), P = 0)); x >= 8; r[a + T] = d & 255, T += H, d /= 256, x -= 8)
                ;
              for (P = P << x | d, q += x; q > 0; r[a + T] = P & 255, T += H, P /= 256, q -= 8)
                ;
              r[a + T - H] |= eA * 128;
            };
          },
          /***/
          9784(Q) {
            typeof Object.create == "function" ? Q.exports = function(r, A) {
              A && (r.super_ = A, r.prototype = Object.create(A.prototype, {
                constructor: {
                  value: r,
                  enumerable: !1,
                  writable: !0,
                  configurable: !0
                }
              }));
            } : Q.exports = function(r, A) {
              if (A) {
                r.super_ = A;
                var a = function() {
                };
                a.prototype = A.prototype, r.prototype = new a(), r.prototype.constructor = r;
              }
            };
          },
          /***/
          7906(Q, B, r) {
            var A = r(6626)(), a = r(2774), D = a("Object.prototype.toString"), x = function(J) {
              return A && J && typeof J == "object" && Symbol.toStringTag in J ? !1 : D(J) === "[object Arguments]";
            }, N = function(J) {
              return x(J) ? !0 : J !== null && typeof J == "object" && "length" in J && typeof J.length == "number" && J.length >= 0 && D(J) !== "[object Array]" && "callee" in J && D(J.callee) === "[object Function]";
            }, P = (function() {
              return x(arguments);
            })();
            x.isLegacyArguments = N, Q.exports = P ? x : N;
          },
          /***/
          3746(Q) {
            var B = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, A, a;
            if (typeof r == "function" && typeof Object.defineProperty == "function")
              try {
                A = Object.defineProperty({}, "length", {
                  get: function() {
                    throw a;
                  }
                }), a = {}, r(function() {
                  throw 42;
                }, null, A);
              } catch (IA) {
                IA !== a && (r = null);
              }
            else
              r = null;
            var D = /^\s*class\b/, x = function(k) {
              try {
                var tA = B.call(k);
                return D.test(tA);
              } catch {
                return !1;
              }
            }, N = function(k) {
              try {
                return x(k) ? !1 : (B.call(k), !0);
              } catch {
                return !1;
              }
            }, P = Object.prototype.toString, d = "[object Object]", J = "[object Function]", q = "[object GeneratorFunction]", AA = "[object HTMLAllCollection]", K = "[object HTML document.all class]", z = "[object HTMLCollection]", T = typeof Symbol == "function" && !!Symbol.toStringTag, H = !(0 in [,]), eA = function() {
              return !1;
            };
            if (typeof document == "object") {
              var CA = document.all;
              P.call(CA) === P.call(document.all) && (eA = function(k) {
                if ((H || !k) && (typeof k > "u" || typeof k == "object"))
                  try {
                    var tA = P.call(k);
                    return (tA === AA || tA === K || tA === z || tA === d) && k("") == null;
                  } catch {
                  }
                return !1;
              });
            }
            Q.exports = r ? function(k) {
              if (eA(k))
                return !0;
              if (!k || typeof k != "function" && typeof k != "object")
                return !1;
              try {
                r(k, null, A);
              } catch (tA) {
                if (tA !== a)
                  return !1;
              }
              return !x(k) && N(k);
            } : function(k) {
              if (eA(k))
                return !0;
              if (!k || typeof k != "function" && typeof k != "object")
                return !1;
              if (T)
                return N(k);
              if (x(k))
                return !1;
              var tA = P.call(k);
              return tA !== J && tA !== q && !/^\[object HTML/.test(tA) ? !1 : N(k);
            };
          },
          /***/
          4610(Q, B, r) {
            var A = r(2774), a = r(8843), D = a(/^\s*(?:function)?\*/), x = r(6626)(), N = r(7106), P = A("Object.prototype.toString"), d = A("Function.prototype.toString"), J = r(3011);
            Q.exports = function(AA) {
              if (typeof AA != "function")
                return !1;
              if (D(d(AA)))
                return !0;
              if (!x) {
                var K = P(AA);
                return K === "[object GeneratorFunction]";
              }
              if (!N)
                return !1;
              var z = J();
              return z && N(AA) === z.prototype;
            };
          },
          /***/
          2621(Q) {
            Q.exports = function(r) {
              return r !== r;
            };
          },
          /***/
          7051(Q, B, r) {
            var A = r(6601), a = r(5421), D = r(2621), x = r(1320), N = r(5074), P = A(x(), Number);
            a(P, {
              getPolyfill: x,
              implementation: D,
              shim: N
            }), Q.exports = P;
          },
          /***/
          1320(Q, B, r) {
            var A = r(2621);
            Q.exports = function() {
              return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ? Number.isNaN : A;
            };
          },
          /***/
          5074(Q, B, r) {
            var A = r(5421), a = r(1320);
            Q.exports = function() {
              var x = a();
              return A(Number, { isNaN: x }, {
                isNaN: function() {
                  return Number.isNaN !== x;
                }
              }), x;
            };
          },
          /***/
          1689(Q, B, r) {
            var A = r(2774), a = r(6626)(), D = r(5215), x = r(8109), N;
            if (a) {
              var P = A("RegExp.prototype.exec"), d = {}, J = function() {
                throw d;
              }, q = {
                toString: J,
                valueOf: J
              };
              typeof Symbol.toPrimitive == "symbol" && (q[Symbol.toPrimitive] = J), N = function(T) {
                if (!T || typeof T != "object")
                  return !1;
                var H = (
                  /** @type {NonNullable<typeof gOPD>} */
                  x(
                    /** @type {{ lastIndex?: unknown }} */
                    T,
                    "lastIndex"
                  )
                ), eA = H && D(H, "value");
                if (!eA)
                  return !1;
                try {
                  P(
                    T,
                    /** @type {string} */
                    /** @type {unknown} */
                    q
                  );
                } catch (CA) {
                  return CA === d;
                }
              };
            } else {
              var AA = A("Object.prototype.toString"), K = "[object RegExp]";
              N = function(T) {
                return !T || typeof T != "object" && typeof T != "function" ? !1 : AA(T) === K;
              };
            }
            Q.exports = N;
          },
          /***/
          6094(Q, B, r) {
            var A = r(3381);
            Q.exports = function(D) {
              return !!A(D);
            };
          },
          /***/
          1632(Q, B, r) {
            var A = r(9964), a;
            /**
            * [js-md5]{@link https://github.com/emn178/js-md5}
            *
            * @namespace md5
            * @version 0.8.3
            * @author Chen, Yi-Cyuan [emn178@gmail.com]
            * @copyright Chen, Yi-Cyuan 2014-2023
            * @license MIT
            */
            (function() {
              var D = "input is invalid type", x = "finalize already called", N = typeof window == "object", P = N ? window : {};
              P.JS_MD5_NO_WINDOW && (N = !1);
              var d = !N && typeof self == "object", J = !P.JS_MD5_NO_NODE_JS && typeof A == "object" && A.versions && A.versions.node;
              J ? P = r.g : d && (P = self);
              var q = !P.JS_MD5_NO_COMMON_JS && !0 && Q.exports, AA = r.amdO, K = !P.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", z = "0123456789abcdef".split(""), T = [128, 32768, 8388608, -2147483648], H = [0, 8, 16, 24], eA = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"], CA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), IA = [], k;
              if (K) {
                var tA = new ArrayBuffer(68);
                k = new Uint8Array(tA), IA = new Uint32Array(tA);
              }
              var lA = Array.isArray;
              (P.JS_MD5_NO_NODE_JS || !lA) && (lA = function(EA) {
                return Object.prototype.toString.call(EA) === "[object Array]";
              });
              var uA = ArrayBuffer.isView;
              K && (P.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !uA) && (uA = function(EA) {
                return typeof EA == "object" && EA.buffer && EA.buffer.constructor === ArrayBuffer;
              });
              var w = function(EA) {
                var zA = typeof EA;
                if (zA === "string")
                  return [EA, !0];
                if (zA !== "object" || EA === null)
                  throw new Error(D);
                if (K && EA.constructor === ArrayBuffer)
                  return [new Uint8Array(EA), !1];
                if (!lA(EA) && !uA(EA))
                  throw new Error(D);
                return [EA, !1];
              }, v = function(EA) {
                return function(zA) {
                  return new Ae(!0).update(zA)[EA]();
                };
              }, RA = function() {
                var EA = v("hex");
                J && (EA = DA(EA)), EA.create = function() {
                  return new Ae();
                }, EA.update = function(xA) {
                  return EA.create().update(xA);
                };
                for (var zA = 0; zA < eA.length; ++zA) {
                  var OA = eA[zA];
                  EA[OA] = v(OA);
                }
                return EA;
              }, DA = function(EA) {
                var zA = r(8535), OA = r(6274).Buffer, xA;
                OA.from && !P.JS_MD5_NO_BUFFER_FROM ? xA = OA.from : xA = function(yA) {
                  return new OA(yA);
                };
                var LA = function(yA) {
                  if (typeof yA == "string")
                    return zA.createHash("md5").update(yA, "utf8").digest("hex");
                  if (yA == null)
                    throw new Error(D);
                  return yA.constructor === ArrayBuffer && (yA = new Uint8Array(yA)), lA(yA) || uA(yA) || yA.constructor === OA ? zA.createHash("md5").update(xA(yA)).digest("hex") : EA(yA);
                };
                return LA;
              }, $ = function(EA) {
                return function(zA, OA) {
                  return new kA(zA, !0).update(OA)[EA]();
                };
              }, cA = function() {
                var EA = $("hex");
                EA.create = function(xA) {
                  return new kA(xA);
                }, EA.update = function(xA, LA) {
                  return EA.create(xA).update(LA);
                };
                for (var zA = 0; zA < eA.length; ++zA) {
                  var OA = eA[zA];
                  EA[OA] = $(OA);
                }
                return EA;
              };
              function Ae(EA) {
                if (EA)
                  IA[0] = IA[16] = IA[1] = IA[2] = IA[3] = IA[4] = IA[5] = IA[6] = IA[7] = IA[8] = IA[9] = IA[10] = IA[11] = IA[12] = IA[13] = IA[14] = IA[15] = 0, this.blocks = IA, this.buffer8 = k;
                else if (K) {
                  var zA = new ArrayBuffer(68);
                  this.buffer8 = new Uint8Array(zA), this.blocks = new Uint32Array(zA);
                } else
                  this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0;
              }
              Ae.prototype.update = function(EA) {
                if (this.finalized)
                  throw new Error(x);
                var zA = w(EA);
                EA = zA[0];
                for (var OA = zA[1], xA, LA = 0, yA, TA = EA.length, fA = this.blocks, sA = this.buffer8; LA < TA; ) {
                  if (this.hashed && (this.hashed = !1, fA[0] = fA[16], fA[16] = fA[1] = fA[2] = fA[3] = fA[4] = fA[5] = fA[6] = fA[7] = fA[8] = fA[9] = fA[10] = fA[11] = fA[12] = fA[13] = fA[14] = fA[15] = 0), OA)
                    if (K)
                      for (yA = this.start; LA < TA && yA < 64; ++LA)
                        xA = EA.charCodeAt(LA), xA < 128 ? sA[yA++] = xA : xA < 2048 ? (sA[yA++] = 192 | xA >>> 6, sA[yA++] = 128 | xA & 63) : xA < 55296 || xA >= 57344 ? (sA[yA++] = 224 | xA >>> 12, sA[yA++] = 128 | xA >>> 6 & 63, sA[yA++] = 128 | xA & 63) : (xA = 65536 + ((xA & 1023) << 10 | EA.charCodeAt(++LA) & 1023), sA[yA++] = 240 | xA >>> 18, sA[yA++] = 128 | xA >>> 12 & 63, sA[yA++] = 128 | xA >>> 6 & 63, sA[yA++] = 128 | xA & 63);
                    else
                      for (yA = this.start; LA < TA && yA < 64; ++LA)
                        xA = EA.charCodeAt(LA), xA < 128 ? fA[yA >>> 2] |= xA << H[yA++ & 3] : xA < 2048 ? (fA[yA >>> 2] |= (192 | xA >>> 6) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA & 63) << H[yA++ & 3]) : xA < 55296 || xA >= 57344 ? (fA[yA >>> 2] |= (224 | xA >>> 12) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA >>> 6 & 63) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA & 63) << H[yA++ & 3]) : (xA = 65536 + ((xA & 1023) << 10 | EA.charCodeAt(++LA) & 1023), fA[yA >>> 2] |= (240 | xA >>> 18) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA >>> 12 & 63) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA >>> 6 & 63) << H[yA++ & 3], fA[yA >>> 2] |= (128 | xA & 63) << H[yA++ & 3]);
                  else if (K)
                    for (yA = this.start; LA < TA && yA < 64; ++LA)
                      sA[yA++] = EA[LA];
                  else
                    for (yA = this.start; LA < TA && yA < 64; ++LA)
                      fA[yA >>> 2] |= EA[LA] << H[yA++ & 3];
                  this.lastByteIndex = yA, this.bytes += yA - this.start, yA >= 64 ? (this.start = yA - 64, this.hash(), this.hashed = !0) : this.start = yA;
                }
                return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;
              }, Ae.prototype.finalize = function() {
                if (!this.finalized) {
                  this.finalized = !0;
                  var EA = this.blocks, zA = this.lastByteIndex;
                  EA[zA >>> 2] |= T[zA & 3], zA >= 56 && (this.hashed || this.hash(), EA[0] = EA[16], EA[16] = EA[1] = EA[2] = EA[3] = EA[4] = EA[5] = EA[6] = EA[7] = EA[8] = EA[9] = EA[10] = EA[11] = EA[12] = EA[13] = EA[14] = EA[15] = 0), EA[14] = this.bytes << 3, EA[15] = this.hBytes << 3 | this.bytes >>> 29, this.hash();
                }
              }, Ae.prototype.hash = function() {
                var EA, zA, OA, xA, LA, yA, TA = this.blocks;
                this.first ? (EA = TA[0] - 680876937, EA = (EA << 7 | EA >>> 25) - 271733879 << 0, xA = (-1732584194 ^ EA & 2004318071) + TA[1] - 117830708, xA = (xA << 12 | xA >>> 20) + EA << 0, OA = (-271733879 ^ xA & (EA ^ -271733879)) + TA[2] - 1126478375, OA = (OA << 17 | OA >>> 15) + xA << 0, zA = (EA ^ OA & (xA ^ EA)) + TA[3] - 1316259209, zA = (zA << 22 | zA >>> 10) + OA << 0) : (EA = this.h0, zA = this.h1, OA = this.h2, xA = this.h3, EA += (xA ^ zA & (OA ^ xA)) + TA[0] - 680876936, EA = (EA << 7 | EA >>> 25) + zA << 0, xA += (OA ^ EA & (zA ^ OA)) + TA[1] - 389564586, xA = (xA << 12 | xA >>> 20) + EA << 0, OA += (zA ^ xA & (EA ^ zA)) + TA[2] + 606105819, OA = (OA << 17 | OA >>> 15) + xA << 0, zA += (EA ^ OA & (xA ^ EA)) + TA[3] - 1044525330, zA = (zA << 22 | zA >>> 10) + OA << 0), EA += (xA ^ zA & (OA ^ xA)) + TA[4] - 176418897, EA = (EA << 7 | EA >>> 25) + zA << 0, xA += (OA ^ EA & (zA ^ OA)) + TA[5] + 1200080426, xA = (xA << 12 | xA >>> 20) + EA << 0, OA += (zA ^ xA & (EA ^ zA)) + TA[6] - 1473231341, OA = (OA << 17 | OA >>> 15) + xA << 0, zA += (EA ^ OA & (xA ^ EA)) + TA[7] - 45705983, zA = (zA << 22 | zA >>> 10) + OA << 0, EA += (xA ^ zA & (OA ^ xA)) + TA[8] + 1770035416, EA = (EA << 7 | EA >>> 25) + zA << 0, xA += (OA ^ EA & (zA ^ OA)) + TA[9] - 1958414417, xA = (xA << 12 | xA >>> 20) + EA << 0, OA += (zA ^ xA & (EA ^ zA)) + TA[10] - 42063, OA = (OA << 17 | OA >>> 15) + xA << 0, zA += (EA ^ OA & (xA ^ EA)) + TA[11] - 1990404162, zA = (zA << 22 | zA >>> 10) + OA << 0, EA += (xA ^ zA & (OA ^ xA)) + TA[12] + 1804603682, EA = (EA << 7 | EA >>> 25) + zA << 0, xA += (OA ^ EA & (zA ^ OA)) + TA[13] - 40341101, xA = (xA << 12 | xA >>> 20) + EA << 0, OA += (zA ^ xA & (EA ^ zA)) + TA[14] - 1502002290, OA = (OA << 17 | OA >>> 15) + xA << 0, zA += (EA ^ OA & (xA ^ EA)) + TA[15] + 1236535329, zA = (zA << 22 | zA >>> 10) + OA << 0, EA += (OA ^ xA & (zA ^ OA)) + TA[1] - 165796510, EA = (EA << 5 | EA >>> 27) + zA << 0, xA += (zA ^ OA & (EA ^ zA)) + TA[6] - 1069501632, xA = (xA << 9 | xA >>> 23) + EA << 0, OA += (EA ^ zA & (xA ^ EA)) + TA[11] + 643717713, OA = (OA << 14 | OA >>> 18) + xA << 0, zA += (xA ^ EA & (OA ^ xA)) + TA[0] - 373897302, zA = (zA << 20 | zA >>> 12) + OA << 0, EA += (OA ^ xA & (zA ^ OA)) + TA[5] - 701558691, EA = (EA << 5 | EA >>> 27) + zA << 0, xA += (zA ^ OA & (EA ^ zA)) + TA[10] + 38016083, xA = (xA << 9 | xA >>> 23) + EA << 0, OA += (EA ^ zA & (xA ^ EA)) + TA[15] - 660478335, OA = (OA << 14 | OA >>> 18) + xA << 0, zA += (xA ^ EA & (OA ^ xA)) + TA[4] - 405537848, zA = (zA << 20 | zA >>> 12) + OA << 0, EA += (OA ^ xA & (zA ^ OA)) + TA[9] + 568446438, EA = (EA << 5 | EA >>> 27) + zA << 0, xA += (zA ^ OA & (EA ^ zA)) + TA[14] - 1019803690, xA = (xA << 9 | xA >>> 23) + EA << 0, OA += (EA ^ zA & (xA ^ EA)) + TA[3] - 187363961, OA = (OA << 14 | OA >>> 18) + xA << 0, zA += (xA ^ EA & (OA ^ xA)) + TA[8] + 1163531501, zA = (zA << 20 | zA >>> 12) + OA << 0, EA += (OA ^ xA & (zA ^ OA)) + TA[13] - 1444681467, EA = (EA << 5 | EA >>> 27) + zA << 0, xA += (zA ^ OA & (EA ^ zA)) + TA[2] - 51403784, xA = (xA << 9 | xA >>> 23) + EA << 0, OA += (EA ^ zA & (xA ^ EA)) + TA[7] + 1735328473, OA = (OA << 14 | OA >>> 18) + xA << 0, zA += (xA ^ EA & (OA ^ xA)) + TA[12] - 1926607734, zA = (zA << 20 | zA >>> 12) + OA << 0, LA = zA ^ OA, EA += (LA ^ xA) + TA[5] - 378558, EA = (EA << 4 | EA >>> 28) + zA << 0, xA += (LA ^ EA) + TA[8] - 2022574463, xA = (xA << 11 | xA >>> 21) + EA << 0, yA = xA ^ EA, OA += (yA ^ zA) + TA[11] + 1839030562, OA = (OA << 16 | OA >>> 16) + xA << 0, zA += (yA ^ OA) + TA[14] - 35309556, zA = (zA << 23 | zA >>> 9) + OA << 0, LA = zA ^ OA, EA += (LA ^ xA) + TA[1] - 1530992060, EA = (EA << 4 | EA >>> 28) + zA << 0, xA += (LA ^ EA) + TA[4] + 1272893353, xA = (xA << 11 | xA >>> 21) + EA << 0, yA = xA ^ EA, OA += (yA ^ zA) + TA[7] - 155497632, OA = (OA << 16 | OA >>> 16) + xA << 0, zA += (yA ^ OA) + TA[10] - 1094730640, zA = (zA << 23 | zA >>> 9) + OA << 0, LA = zA ^ OA, EA += (LA ^ xA) + TA[13] + 681279174, EA = (EA << 4 | EA >>> 28) + zA << 0, xA += (LA ^ EA) + TA[0] - 358537222, xA = (xA << 11 | xA >>> 21) + EA << 0, yA = xA ^ EA, OA += (yA ^ zA) + TA[3] - 722521979, OA = (OA << 16 | OA >>> 16) + xA << 0, zA += (yA ^ OA) + TA[6] + 76029189, zA = (zA << 23 | zA >>> 9) + OA << 0, LA = zA ^ OA, EA += (LA ^ xA) + TA[9] - 640364487, EA = (EA << 4 | EA >>> 28) + zA << 0, xA += (LA ^ EA) + TA[12] - 421815835, xA = (xA << 11 | xA >>> 21) + EA << 0, yA = xA ^ EA, OA += (yA ^ zA) + TA[15] + 530742520, OA = (OA << 16 | OA >>> 16) + xA << 0, zA += (yA ^ OA) + TA[2] - 995338651, zA = (zA << 23 | zA >>> 9) + OA << 0, EA += (OA ^ (zA | ~xA)) + TA[0] - 198630844, EA = (EA << 6 | EA >>> 26) + zA << 0, xA += (zA ^ (EA | ~OA)) + TA[7] + 1126891415, xA = (xA << 10 | xA >>> 22) + EA << 0, OA += (EA ^ (xA | ~zA)) + TA[14] - 1416354905, OA = (OA << 15 | OA >>> 17) + xA << 0, zA += (xA ^ (OA | ~EA)) + TA[5] - 57434055, zA = (zA << 21 | zA >>> 11) + OA << 0, EA += (OA ^ (zA | ~xA)) + TA[12] + 1700485571, EA = (EA << 6 | EA >>> 26) + zA << 0, xA += (zA ^ (EA | ~OA)) + TA[3] - 1894986606, xA = (xA << 10 | xA >>> 22) + EA << 0, OA += (EA ^ (xA | ~zA)) + TA[10] - 1051523, OA = (OA << 15 | OA >>> 17) + xA << 0, zA += (xA ^ (OA | ~EA)) + TA[1] - 2054922799, zA = (zA << 21 | zA >>> 11) + OA << 0, EA += (OA ^ (zA | ~xA)) + TA[8] + 1873313359, EA = (EA << 6 | EA >>> 26) + zA << 0, xA += (zA ^ (EA | ~OA)) + TA[15] - 30611744, xA = (xA << 10 | xA >>> 22) + EA << 0, OA += (EA ^ (xA | ~zA)) + TA[6] - 1560198380, OA = (OA << 15 | OA >>> 17) + xA << 0, zA += (xA ^ (OA | ~EA)) + TA[13] + 1309151649, zA = (zA << 21 | zA >>> 11) + OA << 0, EA += (OA ^ (zA | ~xA)) + TA[4] - 145523070, EA = (EA << 6 | EA >>> 26) + zA << 0, xA += (zA ^ (EA | ~OA)) + TA[11] - 1120210379, xA = (xA << 10 | xA >>> 22) + EA << 0, OA += (EA ^ (xA | ~zA)) + TA[2] + 718787259, OA = (OA << 15 | OA >>> 17) + xA << 0, zA += (xA ^ (OA | ~EA)) + TA[9] - 343485551, zA = (zA << 21 | zA >>> 11) + OA << 0, this.first ? (this.h0 = EA + 1732584193 << 0, this.h1 = zA - 271733879 << 0, this.h2 = OA - 1732584194 << 0, this.h3 = xA + 271733878 << 0, this.first = !1) : (this.h0 = this.h0 + EA << 0, this.h1 = this.h1 + zA << 0, this.h2 = this.h2 + OA << 0, this.h3 = this.h3 + xA << 0);
              }, Ae.prototype.hex = function() {
                this.finalize();
                var EA = this.h0, zA = this.h1, OA = this.h2, xA = this.h3;
                return z[EA >>> 4 & 15] + z[EA & 15] + z[EA >>> 12 & 15] + z[EA >>> 8 & 15] + z[EA >>> 20 & 15] + z[EA >>> 16 & 15] + z[EA >>> 28 & 15] + z[EA >>> 24 & 15] + z[zA >>> 4 & 15] + z[zA & 15] + z[zA >>> 12 & 15] + z[zA >>> 8 & 15] + z[zA >>> 20 & 15] + z[zA >>> 16 & 15] + z[zA >>> 28 & 15] + z[zA >>> 24 & 15] + z[OA >>> 4 & 15] + z[OA & 15] + z[OA >>> 12 & 15] + z[OA >>> 8 & 15] + z[OA >>> 20 & 15] + z[OA >>> 16 & 15] + z[OA >>> 28 & 15] + z[OA >>> 24 & 15] + z[xA >>> 4 & 15] + z[xA & 15] + z[xA >>> 12 & 15] + z[xA >>> 8 & 15] + z[xA >>> 20 & 15] + z[xA >>> 16 & 15] + z[xA >>> 28 & 15] + z[xA >>> 24 & 15];
              }, Ae.prototype.toString = Ae.prototype.hex, Ae.prototype.digest = function() {
                this.finalize();
                var EA = this.h0, zA = this.h1, OA = this.h2, xA = this.h3;
                return [
                  EA & 255,
                  EA >>> 8 & 255,
                  EA >>> 16 & 255,
                  EA >>> 24 & 255,
                  zA & 255,
                  zA >>> 8 & 255,
                  zA >>> 16 & 255,
                  zA >>> 24 & 255,
                  OA & 255,
                  OA >>> 8 & 255,
                  OA >>> 16 & 255,
                  OA >>> 24 & 255,
                  xA & 255,
                  xA >>> 8 & 255,
                  xA >>> 16 & 255,
                  xA >>> 24 & 255
                ];
              }, Ae.prototype.array = Ae.prototype.digest, Ae.prototype.arrayBuffer = function() {
                this.finalize();
                var EA = new ArrayBuffer(16), zA = new Uint32Array(EA);
                return zA[0] = this.h0, zA[1] = this.h1, zA[2] = this.h2, zA[3] = this.h3, EA;
              }, Ae.prototype.buffer = Ae.prototype.arrayBuffer, Ae.prototype.base64 = function() {
                for (var EA, zA, OA, xA = "", LA = this.array(), yA = 0; yA < 15; )
                  EA = LA[yA++], zA = LA[yA++], OA = LA[yA++], xA += CA[EA >>> 2] + CA[(EA << 4 | zA >>> 4) & 63] + CA[(zA << 2 | OA >>> 6) & 63] + CA[OA & 63];
                return EA = LA[yA], xA += CA[EA >>> 2] + CA[EA << 4 & 63] + "==", xA;
              };
              function kA(EA, zA) {
                var OA, xA = w(EA);
                if (EA = xA[0], xA[1]) {
                  var LA = [], yA = EA.length, TA = 0, fA;
                  for (OA = 0; OA < yA; ++OA)
                    fA = EA.charCodeAt(OA), fA < 128 ? LA[TA++] = fA : fA < 2048 ? (LA[TA++] = 192 | fA >>> 6, LA[TA++] = 128 | fA & 63) : fA < 55296 || fA >= 57344 ? (LA[TA++] = 224 | fA >>> 12, LA[TA++] = 128 | fA >>> 6 & 63, LA[TA++] = 128 | fA & 63) : (fA = 65536 + ((fA & 1023) << 10 | EA.charCodeAt(++OA) & 1023), LA[TA++] = 240 | fA >>> 18, LA[TA++] = 128 | fA >>> 12 & 63, LA[TA++] = 128 | fA >>> 6 & 63, LA[TA++] = 128 | fA & 63);
                  EA = LA;
                }
                EA.length > 64 && (EA = new Ae(!0).update(EA).array());
                var sA = [], F = [];
                for (OA = 0; OA < 64; ++OA) {
                  var o = EA[OA] || 0;
                  sA[OA] = 92 ^ o, F[OA] = 54 ^ o;
                }
                Ae.call(this, zA), this.update(F), this.oKeyPad = sA, this.inner = !0, this.sharedMemory = zA;
              }
              kA.prototype = new Ae(), kA.prototype.finalize = function() {
                if (Ae.prototype.finalize.call(this), this.inner) {
                  this.inner = !1;
                  var EA = this.array();
                  Ae.call(this, this.sharedMemory), this.update(this.oKeyPad), this.update(EA), Ae.prototype.finalize.call(this);
                }
              };
              var VA = RA();
              VA.md5 = VA, VA.md5.hmac = cA(), q ? Q.exports = VA : (P.md5 = VA, AA && (a = (function() {
                return VA;
              }).call(VA, r, VA, Q), a !== void 0 && (Q.exports = a)));
            })();
          },
          /***/
          716(Q) {
            Q.exports = Math.abs;
          },
          /***/
          7450(Q) {
            Q.exports = Math.floor;
          },
          /***/
          713(Q) {
            Q.exports = Number.isNaN || function(r) {
              return r !== r;
            };
          },
          /***/
          3774(Q) {
            Q.exports = Math.max;
          },
          /***/
          7552(Q) {
            Q.exports = Math.min;
          },
          /***/
          5874(Q) {
            Q.exports = Math.pow;
          },
          /***/
          9292(Q) {
            Q.exports = Math.round;
          },
          /***/
          6071(Q, B, r) {
            var A = r(713);
            Q.exports = function(D) {
              return A(D) || D === 0 ? D : D < 0 ? -1 : 1;
            };
          },
          /***/
          3249(Q) {
            var B = function(r) {
              return r !== r;
            };
            Q.exports = function(A, a) {
              return A === 0 && a === 0 ? 1 / A === 1 / a : !!(A === a || B(A) && B(a));
            };
          },
          /***/
          8527(Q, B, r) {
            var A = r(5421), a = r(6601), D = r(3249), x = r(9636), N = r(3534), P = a(x(), Object);
            A(P, {
              getPolyfill: x,
              implementation: D,
              shim: N
            }), Q.exports = P;
          },
          /***/
          9636(Q, B, r) {
            var A = r(3249);
            Q.exports = function() {
              return typeof Object.is == "function" ? Object.is : A;
            };
          },
          /***/
          3534(Q, B, r) {
            var A = r(9636), a = r(5421);
            Q.exports = function() {
              var x = A();
              return a(Object, { is: x }, {
                is: function() {
                  return Object.is !== x;
                }
              }), x;
            };
          },
          /***/
          8461(Q, B, r) {
            var A;
            if (!Object.keys) {
              var a = Object.prototype.hasOwnProperty, D = Object.prototype.toString, x = r(6515), N = Object.prototype.propertyIsEnumerable, P = !N.call({ toString: null }, "toString"), d = N.call(function() {
              }, "prototype"), J = [
                "toString",
                "toLocaleString",
                "valueOf",
                "hasOwnProperty",
                "isPrototypeOf",
                "propertyIsEnumerable",
                "constructor"
              ], q = function(T) {
                var H = T.constructor;
                return H && H.prototype === T;
              }, AA = {
                $applicationCache: !0,
                $console: !0,
                $external: !0,
                $frame: !0,
                $frameElement: !0,
                $frames: !0,
                $innerHeight: !0,
                $innerWidth: !0,
                $onmozfullscreenchange: !0,
                $onmozfullscreenerror: !0,
                $outerHeight: !0,
                $outerWidth: !0,
                $pageXOffset: !0,
                $pageYOffset: !0,
                $parent: !0,
                $scrollLeft: !0,
                $scrollTop: !0,
                $scrollX: !0,
                $scrollY: !0,
                $self: !0,
                $webkitIndexedDB: !0,
                $webkitStorageInfo: !0,
                $window: !0
              }, K = (function() {
                if (typeof window > "u")
                  return !1;
                for (var T in window)
                  try {
                    if (!AA["$" + T] && a.call(window, T) && window[T] !== null && typeof window[T] == "object")
                      try {
                        q(window[T]);
                      } catch {
                        return !0;
                      }
                  } catch {
                    return !0;
                  }
                return !1;
              })(), z = function(T) {
                if (typeof window > "u" || !K)
                  return q(T);
                try {
                  return q(T);
                } catch {
                  return !1;
                }
              };
              A = function(H) {
                var eA = H !== null && typeof H == "object", CA = D.call(H) === "[object Function]", IA = x(H), k = eA && D.call(H) === "[object String]", tA = [];
                if (!eA && !CA && !IA)
                  throw new TypeError("Object.keys called on a non-object");
                var lA = d && CA;
                if (k && H.length > 0 && !a.call(H, 0))
                  for (var uA = 0; uA < H.length; ++uA)
                    tA.push(String(uA));
                if (IA && H.length > 0)
                  for (var w = 0; w < H.length; ++w)
                    tA.push(String(w));
                else
                  for (var v in H)
                    !(lA && v === "prototype") && a.call(H, v) && tA.push(String(v));
                if (P)
                  for (var RA = z(H), DA = 0; DA < J.length; ++DA)
                    !(RA && J[DA] === "constructor") && a.call(H, J[DA]) && tA.push(J[DA]);
                return tA;
              };
            }
            Q.exports = A;
          },
          /***/
          5643(Q, B, r) {
            var A = Array.prototype.slice, a = r(6515), D = Object.keys, x = D ? function(d) {
              return D(d);
            } : r(8461), N = Object.keys;
            x.shim = function() {
              if (Object.keys) {
                var d = (function() {
                  var J = Object.keys(arguments);
                  return J && J.length === arguments.length;
                })(1, 2);
                d || (Object.keys = function(q) {
                  return a(q) ? N(A.call(q)) : N(q);
                });
              } else
                Object.keys = x;
              return Object.keys || x;
            }, Q.exports = x;
          },
          /***/
          6515(Q) {
            var B = Object.prototype.toString;
            Q.exports = function(A) {
              var a = B.call(A), D = a === "[object Arguments]";
              return D || (D = a !== "[object Array]" && A !== null && typeof A == "object" && typeof A.length == "number" && A.length >= 0 && B.call(A.callee) === "[object Function]"), D;
            };
          },
          /***/
          6521(Q, B, r) {
            var A = r(5643), a = r(2843)(), D = r(2774), x = r(5846), N = D("Array.prototype.push"), P = D("Object.prototype.propertyIsEnumerable"), d = a ? x.getOwnPropertySymbols : null;
            Q.exports = function(q, AA) {
              if (q == null)
                throw new TypeError("target must be an object");
              var K = x(q);
              if (arguments.length === 1)
                return K;
              for (var z = 1; z < arguments.length; ++z) {
                var T = x(arguments[z]), H = A(T), eA = a && (x.getOwnPropertySymbols || d);
                if (eA)
                  for (var CA = eA(T), IA = 0; IA < CA.length; ++IA) {
                    var k = CA[IA];
                    P(T, k) && N(H, k);
                  }
                for (var tA = 0; tA < H.length; ++tA) {
                  var lA = H[tA];
                  if (P(T, lA)) {
                    var uA = T[lA];
                    K[lA] = uA;
                  }
                }
              }
              return K;
            };
          },
          /***/
          7596(Q, B, r) {
            var A = r(6521), a = function() {
              if (!Object.assign)
                return !1;
              for (var x = "abcdefghijklmnopqrst", N = x.split(""), P = {}, d = 0; d < N.length; ++d)
                P[N[d]] = N[d];
              var J = Object.assign({}, P), q = "";
              for (var AA in J)
                q += AA;
              return x !== q;
            }, D = function() {
              if (!Object.assign || !Object.preventExtensions)
                return !1;
              var x = Object.preventExtensions({ 1: 2 });
              try {
                Object.assign(x, "xy");
              } catch {
                return x[1] === "y";
              }
              return !1;
            };
            Q.exports = function() {
              return !Object.assign || a() || D() ? A : Object.assign;
            };
          },
          /***/
          2519(Q, B) {
            var r = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
            function A(x, N) {
              return Object.prototype.hasOwnProperty.call(x, N);
            }
            B.assign = function(x) {
              for (var N = Array.prototype.slice.call(arguments, 1); N.length; ) {
                var P = N.shift();
                if (P) {
                  if (typeof P != "object")
                    throw new TypeError(P + "must be non-object");
                  for (var d in P)
                    A(P, d) && (x[d] = P[d]);
                }
              }
              return x;
            }, B.shrinkBuf = function(x, N) {
              return x.length === N ? x : x.subarray ? x.subarray(0, N) : (x.length = N, x);
            };
            var a = {
              arraySet: function(x, N, P, d, J) {
                if (N.subarray && x.subarray) {
                  x.set(N.subarray(P, P + d), J);
                  return;
                }
                for (var q = 0; q < d; q++)
                  x[J + q] = N[P + q];
              },
              // Join array of chunks to single array.
              flattenChunks: function(x) {
                var N, P, d, J, q, AA;
                for (d = 0, N = 0, P = x.length; N < P; N++)
                  d += x[N].length;
                for (AA = new Uint8Array(d), J = 0, N = 0, P = x.length; N < P; N++)
                  q = x[N], AA.set(q, J), J += q.length;
                return AA;
              }
            }, D = {
              arraySet: function(x, N, P, d, J) {
                for (var q = 0; q < d; q++)
                  x[J + q] = N[P + q];
              },
              // Join array of chunks to single array.
              flattenChunks: function(x) {
                return [].concat.apply([], x);
              }
            };
            B.setTyped = function(x) {
              x ? (B.Buf8 = Uint8Array, B.Buf16 = Uint16Array, B.Buf32 = Int32Array, B.assign(B, a)) : (B.Buf8 = Array, B.Buf16 = Array, B.Buf32 = Array, B.assign(B, D));
            }, B.setTyped(r);
          },
          /***/
          6911(Q) {
            function B(r, A, a, D) {
              for (var x = r & 65535 | 0, N = r >>> 16 & 65535 | 0, P = 0; a !== 0; ) {
                P = a > 2e3 ? 2e3 : a, a -= P;
                do
                  x = x + A[D++] | 0, N = N + x | 0;
                while (--P);
                x %= 65521, N %= 65521;
              }
              return x | N << 16 | 0;
            }
            Q.exports = B;
          },
          /***/
          1607(Q) {
            Q.exports = {
              /* Allowed flush values; see deflate() and inflate() below for details */
              Z_NO_FLUSH: 0,
              Z_PARTIAL_FLUSH: 1,
              Z_SYNC_FLUSH: 2,
              Z_FULL_FLUSH: 3,
              Z_FINISH: 4,
              Z_BLOCK: 5,
              Z_TREES: 6,
              /* Return codes for the compression/decompression functions. Negative values
              * are errors, positive values are used for special but normal events.
              */
              Z_OK: 0,
              Z_STREAM_END: 1,
              Z_NEED_DICT: 2,
              Z_ERRNO: -1,
              Z_STREAM_ERROR: -2,
              Z_DATA_ERROR: -3,
              //Z_MEM_ERROR:     -4,
              Z_BUF_ERROR: -5,
              //Z_VERSION_ERROR: -6,
              /* compression levels */
              Z_NO_COMPRESSION: 0,
              Z_BEST_SPEED: 1,
              Z_BEST_COMPRESSION: 9,
              Z_DEFAULT_COMPRESSION: -1,
              Z_FILTERED: 1,
              Z_HUFFMAN_ONLY: 2,
              Z_RLE: 3,
              Z_FIXED: 4,
              Z_DEFAULT_STRATEGY: 0,
              /* Possible values of the data_type field (though see inflate()) */
              Z_BINARY: 0,
              Z_TEXT: 1,
              //Z_ASCII:                1, // = Z_TEXT (deprecated)
              Z_UNKNOWN: 2,
              /* The deflate compression method */
              Z_DEFLATED: 8
              //Z_NULL:                 null // Use -1 or null inline, depending on var type
            };
          },
          /***/
          9049(Q) {
            function B() {
              for (var a, D = [], x = 0; x < 256; x++) {
                a = x;
                for (var N = 0; N < 8; N++)
                  a = a & 1 ? 3988292384 ^ a >>> 1 : a >>> 1;
                D[x] = a;
              }
              return D;
            }
            var r = B();
            function A(a, D, x, N) {
              var P = r, d = N + x;
              a ^= -1;
              for (var J = N; J < d; J++)
                a = a >>> 8 ^ P[(a ^ D[J]) & 255];
              return a ^ -1;
            }
            Q.exports = A;
          },
          /***/
          2925(Q, B, r) {
            var A = r(2519), a = r(2367), D = r(6911), x = r(9049), N = r(6228), P = 0, d = 1, J = 3, q = 4, AA = 5, K = 0, z = 1, T = -2, H = -3, eA = -5, CA = -1, IA = 1, k = 2, tA = 3, lA = 4, uA = 0, w = 2, v = 8, RA = 9, DA = 15, $ = 8, cA = 29, Ae = 256, kA = Ae + 1 + cA, VA = 30, EA = 19, zA = 2 * kA + 1, OA = 15, xA = 3, LA = 258, yA = LA + xA + 1, TA = 32, fA = 42, sA = 69, F = 73, o = 91, h = 103, _ = 113, oA = 666, p = 1, rA = 2, QA = 3, bA = 4, y = 3;
            function M(V, me) {
              return V.msg = N[me], me;
            }
            function FA(V) {
              return (V << 1) - (V > 4 ? 9 : 0);
            }
            function dA(V) {
              for (var me = V.length; --me >= 0; )
                V[me] = 0;
            }
            function he(V) {
              var me = V.state, Ye = me.pending;
              Ye > V.avail_out && (Ye = V.avail_out), Ye !== 0 && (A.arraySet(V.output, me.pending_buf, me.pending_out, Ye, V.next_out), V.next_out += Ye, me.pending_out += Ye, V.total_out += Ye, V.avail_out -= Ye, me.pending -= Ye, me.pending === 0 && (me.pending_out = 0));
            }
            function ie(V, me) {
              a._tr_flush_block(V, V.block_start >= 0 ? V.block_start : -1, V.strstart - V.block_start, me), V.block_start = V.strstart, he(V.strm);
            }
            function KA(V, me) {
              V.pending_buf[V.pending++] = me;
            }
            function Pe(V, me) {
              V.pending_buf[V.pending++] = me >>> 8 & 255, V.pending_buf[V.pending++] = me & 255;
            }
            function Je(V, me, Ye, SA) {
              var ue = V.avail_in;
              return ue > SA && (ue = SA), ue === 0 ? 0 : (V.avail_in -= ue, A.arraySet(me, V.input, V.next_in, ue, Ye), V.state.wrap === 1 ? V.adler = D(V.adler, me, ue, Ye) : V.state.wrap === 2 && (V.adler = x(V.adler, me, ue, Ye)), V.next_in += ue, V.total_in += ue, ue);
            }
            function Le(V, me) {
              var Ye = V.max_chain_length, SA = V.strstart, ue, Fe, tt = V.prev_length, We = V.nice_match, Ze = V.strstart > V.w_size - yA ? V.strstart - (V.w_size - yA) : 0, Ct = V.window, fi = V.w_mask, st = V.prev, pt = V.strstart + LA, Mt = Ct[SA + tt - 1], Tt = Ct[SA + tt];
              V.prev_length >= V.good_match && (Ye >>= 2), We > V.lookahead && (We = V.lookahead);
              do
                if (ue = me, !(Ct[ue + tt] !== Tt || Ct[ue + tt - 1] !== Mt || Ct[ue] !== Ct[SA] || Ct[++ue] !== Ct[SA + 1])) {
                  SA += 2, ue++;
                  do
                    ;
                  while (Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && Ct[++SA] === Ct[++ue] && SA < pt);
                  if (Fe = LA - (pt - SA), SA = pt - LA, Fe > tt) {
                    if (V.match_start = me, tt = Fe, Fe >= We)
                      break;
                    Mt = Ct[SA + tt - 1], Tt = Ct[SA + tt];
                  }
                }
              while ((me = st[me & fi]) > Ze && --Ye !== 0);
              return tt <= V.lookahead ? tt : V.lookahead;
            }
            function Re(V) {
              var me = V.w_size, Ye, SA, ue, Fe, tt;
              do {
                if (Fe = V.window_size - V.lookahead - V.strstart, V.strstart >= me + (me - yA)) {
                  A.arraySet(V.window, V.window, me, me, 0), V.match_start -= me, V.strstart -= me, V.block_start -= me, SA = V.hash_size, Ye = SA;
                  do
                    ue = V.head[--Ye], V.head[Ye] = ue >= me ? ue - me : 0;
                  while (--SA);
                  SA = me, Ye = SA;
                  do
                    ue = V.prev[--Ye], V.prev[Ye] = ue >= me ? ue - me : 0;
                  while (--SA);
                  Fe += me;
                }
                if (V.strm.avail_in === 0)
                  break;
                if (SA = Je(V.strm, V.window, V.strstart + V.lookahead, Fe), V.lookahead += SA, V.lookahead + V.insert >= xA)
                  for (tt = V.strstart - V.insert, V.ins_h = V.window[tt], V.ins_h = (V.ins_h << V.hash_shift ^ V.window[tt + 1]) & V.hash_mask; V.insert && (V.ins_h = (V.ins_h << V.hash_shift ^ V.window[tt + xA - 1]) & V.hash_mask, V.prev[tt & V.w_mask] = V.head[V.ins_h], V.head[V.ins_h] = tt, tt++, V.insert--, !(V.lookahead + V.insert < xA)); )
                    ;
              } while (V.lookahead < yA && V.strm.avail_in !== 0);
            }
            function _e(V, me) {
              var Ye = 65535;
              for (Ye > V.pending_buf_size - 5 && (Ye = V.pending_buf_size - 5); ; ) {
                if (V.lookahead <= 1) {
                  if (Re(V), V.lookahead === 0 && me === P)
                    return p;
                  if (V.lookahead === 0)
                    break;
                }
                V.strstart += V.lookahead, V.lookahead = 0;
                var SA = V.block_start + Ye;
                if ((V.strstart === 0 || V.strstart >= SA) && (V.lookahead = V.strstart - SA, V.strstart = SA, ie(V, !1), V.strm.avail_out === 0) || V.strstart - V.block_start >= V.w_size - yA && (ie(V, !1), V.strm.avail_out === 0))
                  return p;
              }
              return V.insert = 0, me === q ? (ie(V, !0), V.strm.avail_out === 0 ? QA : bA) : (V.strstart > V.block_start && (ie(V, !1), V.strm.avail_out === 0), p);
            }
            function se(V, me) {
              for (var Ye, SA; ; ) {
                if (V.lookahead < yA) {
                  if (Re(V), V.lookahead < yA && me === P)
                    return p;
                  if (V.lookahead === 0)
                    break;
                }
                if (Ye = 0, V.lookahead >= xA && (V.ins_h = (V.ins_h << V.hash_shift ^ V.window[V.strstart + xA - 1]) & V.hash_mask, Ye = V.prev[V.strstart & V.w_mask] = V.head[V.ins_h], V.head[V.ins_h] = V.strstart), Ye !== 0 && V.strstart - Ye <= V.w_size - yA && (V.match_length = Le(V, Ye)), V.match_length >= xA)
                  if (SA = a._tr_tally(V, V.strstart - V.match_start, V.match_length - xA), V.lookahead -= V.match_length, V.match_length <= V.max_lazy_match && V.lookahead >= xA) {
                    V.match_length--;
                    do
                      V.strstart++, V.ins_h = (V.ins_h << V.hash_shift ^ V.window[V.strstart + xA - 1]) & V.hash_mask, Ye = V.prev[V.strstart & V.w_mask] = V.head[V.ins_h], V.head[V.ins_h] = V.strstart;
                    while (--V.match_length !== 0);
                    V.strstart++;
                  } else
                    V.strstart += V.match_length, V.match_length = 0, V.ins_h = V.window[V.strstart], V.ins_h = (V.ins_h << V.hash_shift ^ V.window[V.strstart + 1]) & V.hash_mask;
                else
                  SA = a._tr_tally(V, 0, V.window[V.strstart]), V.lookahead--, V.strstart++;
                if (SA && (ie(V, !1), V.strm.avail_out === 0))
                  return p;
              }
              return V.insert = V.strstart < xA - 1 ? V.strstart : xA - 1, me === q ? (ie(V, !0), V.strm.avail_out === 0 ? QA : bA) : V.last_lit && (ie(V, !1), V.strm.avail_out === 0) ? p : rA;
            }
            function Ee(V, me) {
              for (var Ye, SA, ue; ; ) {
                if (V.lookahead < yA) {
                  if (Re(V), V.lookahead < yA && me === P)
                    return p;
                  if (V.lookahead === 0)
                    break;
                }
                if (Ye = 0, V.lookahead >= xA && (V.ins_h = (V.ins_h << V.hash_shift ^ V.window[V.strstart + xA - 1]) & V.hash_mask, Ye = V.prev[V.strstart & V.w_mask] = V.head[V.ins_h], V.head[V.ins_h] = V.strstart), V.prev_length = V.match_length, V.prev_match = V.match_start, V.match_length = xA - 1, Ye !== 0 && V.prev_length < V.max_lazy_match && V.strstart - Ye <= V.w_size - yA && (V.match_length = Le(V, Ye), V.match_length <= 5 && (V.strategy === IA || V.match_length === xA && V.strstart - V.match_start > 4096) && (V.match_length = xA - 1)), V.prev_length >= xA && V.match_length <= V.prev_length) {
                  ue = V.strstart + V.lookahead - xA, SA = a._tr_tally(V, V.strstart - 1 - V.prev_match, V.prev_length - xA), V.lookahead -= V.prev_length - 1, V.prev_length -= 2;
                  do
                    ++V.strstart <= ue && (V.ins_h = (V.ins_h << V.hash_shift ^ V.window[V.strstart + xA - 1]) & V.hash_mask, Ye = V.prev[V.strstart & V.w_mask] = V.head[V.ins_h], V.head[V.ins_h] = V.strstart);
                  while (--V.prev_length !== 0);
                  if (V.match_available = 0, V.match_length = xA - 1, V.strstart++, SA && (ie(V, !1), V.strm.avail_out === 0))
                    return p;
                } else if (V.match_available) {
                  if (SA = a._tr_tally(V, 0, V.window[V.strstart - 1]), SA && ie(V, !1), V.strstart++, V.lookahead--, V.strm.avail_out === 0)
                    return p;
                } else
                  V.match_available = 1, V.strstart++, V.lookahead--;
              }
              return V.match_available && (SA = a._tr_tally(V, 0, V.window[V.strstart - 1]), V.match_available = 0), V.insert = V.strstart < xA - 1 ? V.strstart : xA - 1, me === q ? (ie(V, !0), V.strm.avail_out === 0 ? QA : bA) : V.last_lit && (ie(V, !1), V.strm.avail_out === 0) ? p : rA;
            }
            function wA(V, me) {
              for (var Ye, SA, ue, Fe, tt = V.window; ; ) {
                if (V.lookahead <= LA) {
                  if (Re(V), V.lookahead <= LA && me === P)
                    return p;
                  if (V.lookahead === 0)
                    break;
                }
                if (V.match_length = 0, V.lookahead >= xA && V.strstart > 0 && (ue = V.strstart - 1, SA = tt[ue], SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue])) {
                  Fe = V.strstart + LA;
                  do
                    ;
                  while (SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && SA === tt[++ue] && ue < Fe);
                  V.match_length = LA - (Fe - ue), V.match_length > V.lookahead && (V.match_length = V.lookahead);
                }
                if (V.match_length >= xA ? (Ye = a._tr_tally(V, 1, V.match_length - xA), V.lookahead -= V.match_length, V.strstart += V.match_length, V.match_length = 0) : (Ye = a._tr_tally(V, 0, V.window[V.strstart]), V.lookahead--, V.strstart++), Ye && (ie(V, !1), V.strm.avail_out === 0))
                  return p;
              }
              return V.insert = 0, me === q ? (ie(V, !0), V.strm.avail_out === 0 ? QA : bA) : V.last_lit && (ie(V, !1), V.strm.avail_out === 0) ? p : rA;
            }
            function R(V, me) {
              for (var Ye; ; ) {
                if (V.lookahead === 0 && (Re(V), V.lookahead === 0)) {
                  if (me === P)
                    return p;
                  break;
                }
                if (V.match_length = 0, Ye = a._tr_tally(V, 0, V.window[V.strstart]), V.lookahead--, V.strstart++, Ye && (ie(V, !1), V.strm.avail_out === 0))
                  return p;
              }
              return V.insert = 0, me === q ? (ie(V, !0), V.strm.avail_out === 0 ? QA : bA) : V.last_lit && (ie(V, !1), V.strm.avail_out === 0) ? p : rA;
            }
            function G(V, me, Ye, SA, ue) {
              this.good_length = V, this.max_lazy = me, this.nice_length = Ye, this.max_chain = SA, this.func = ue;
            }
            var W;
            W = [
              /*      good lazy nice chain */
              new G(0, 0, 0, 0, _e),
              /* 0 store only */
              new G(4, 4, 8, 4, se),
              /* 1 max speed, no lazy matches */
              new G(4, 5, 16, 8, se),
              /* 2 */
              new G(4, 6, 32, 32, se),
              /* 3 */
              new G(4, 4, 16, 16, Ee),
              /* 4 lazy matches */
              new G(8, 16, 32, 32, Ee),
              /* 5 */
              new G(8, 16, 128, 128, Ee),
              /* 6 */
              new G(8, 32, 128, 256, Ee),
              /* 7 */
              new G(32, 128, 258, 1024, Ee),
              /* 8 */
              new G(32, 258, 258, 4096, Ee)
              /* 9 max compression */
            ];
            function aA(V) {
              V.window_size = 2 * V.w_size, dA(V.head), V.max_lazy_match = W[V.level].max_lazy, V.good_match = W[V.level].good_length, V.nice_match = W[V.level].nice_length, V.max_chain_length = W[V.level].max_chain, V.strstart = 0, V.block_start = 0, V.lookahead = 0, V.insert = 0, V.match_length = V.prev_length = xA - 1, V.match_available = 0, V.ins_h = 0;
            }
            function j() {
              this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new A.Buf16(zA * 2), this.dyn_dtree = new A.Buf16((2 * VA + 1) * 2), this.bl_tree = new A.Buf16((2 * EA + 1) * 2), dA(this.dyn_ltree), dA(this.dyn_dtree), dA(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new A.Buf16(OA + 1), this.heap = new A.Buf16(2 * kA + 1), dA(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new A.Buf16(2 * kA + 1), dA(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
            }
            function pA(V) {
              var me;
              return !V || !V.state ? M(V, T) : (V.total_in = V.total_out = 0, V.data_type = w, me = V.state, me.pending = 0, me.pending_out = 0, me.wrap < 0 && (me.wrap = -me.wrap), me.status = me.wrap ? fA : _, V.adler = me.wrap === 2 ? 0 : 1, me.last_flush = P, a._tr_init(me), K);
            }
            function Be(V) {
              var me = pA(V);
              return me === K && aA(V.state), me;
            }
            function Ie(V, me) {
              return !V || !V.state || V.state.wrap !== 2 ? T : (V.state.gzhead = me, K);
            }
            function ee(V, me, Ye, SA, ue, Fe) {
              if (!V)
                return T;
              var tt = 1;
              if (me === CA && (me = 6), SA < 0 ? (tt = 0, SA = -SA) : SA > 15 && (tt = 2, SA -= 16), ue < 1 || ue > RA || Ye !== v || SA < 8 || SA > 15 || me < 0 || me > 9 || Fe < 0 || Fe > lA)
                return M(V, T);
              SA === 8 && (SA = 9);
              var We = new j();
              return V.state = We, We.strm = V, We.wrap = tt, We.gzhead = null, We.w_bits = SA, We.w_size = 1 << We.w_bits, We.w_mask = We.w_size - 1, We.hash_bits = ue + 7, We.hash_size = 1 << We.hash_bits, We.hash_mask = We.hash_size - 1, We.hash_shift = ~~((We.hash_bits + xA - 1) / xA), We.window = new A.Buf8(We.w_size * 2), We.head = new A.Buf16(We.hash_size), We.prev = new A.Buf16(We.w_size), We.lit_bufsize = 1 << ue + 6, We.pending_buf_size = We.lit_bufsize * 4, We.pending_buf = new A.Buf8(We.pending_buf_size), We.d_buf = 1 * We.lit_bufsize, We.l_buf = 3 * We.lit_bufsize, We.level = me, We.strategy = Fe, We.method = Ye, Be(V);
            }
            function Me(V, me) {
              return ee(V, me, v, DA, $, uA);
            }
            function MA(V, me) {
              var Ye, SA, ue, Fe;
              if (!V || !V.state || me > AA || me < 0)
                return V ? M(V, T) : T;
              if (SA = V.state, !V.output || !V.input && V.avail_in !== 0 || SA.status === oA && me !== q)
                return M(V, V.avail_out === 0 ? eA : T);
              if (SA.strm = V, Ye = SA.last_flush, SA.last_flush = me, SA.status === fA)
                if (SA.wrap === 2)
                  V.adler = 0, KA(SA, 31), KA(SA, 139), KA(SA, 8), SA.gzhead ? (KA(
                    SA,
                    (SA.gzhead.text ? 1 : 0) + (SA.gzhead.hcrc ? 2 : 0) + (SA.gzhead.extra ? 4 : 0) + (SA.gzhead.name ? 8 : 0) + (SA.gzhead.comment ? 16 : 0)
                  ), KA(SA, SA.gzhead.time & 255), KA(SA, SA.gzhead.time >> 8 & 255), KA(SA, SA.gzhead.time >> 16 & 255), KA(SA, SA.gzhead.time >> 24 & 255), KA(SA, SA.level === 9 ? 2 : SA.strategy >= k || SA.level < 2 ? 4 : 0), KA(SA, SA.gzhead.os & 255), SA.gzhead.extra && SA.gzhead.extra.length && (KA(SA, SA.gzhead.extra.length & 255), KA(SA, SA.gzhead.extra.length >> 8 & 255)), SA.gzhead.hcrc && (V.adler = x(V.adler, SA.pending_buf, SA.pending, 0)), SA.gzindex = 0, SA.status = sA) : (KA(SA, 0), KA(SA, 0), KA(SA, 0), KA(SA, 0), KA(SA, 0), KA(SA, SA.level === 9 ? 2 : SA.strategy >= k || SA.level < 2 ? 4 : 0), KA(SA, y), SA.status = _);
                else {
                  var tt = v + (SA.w_bits - 8 << 4) << 8, We = -1;
                  SA.strategy >= k || SA.level < 2 ? We = 0 : SA.level < 6 ? We = 1 : SA.level === 6 ? We = 2 : We = 3, tt |= We << 6, SA.strstart !== 0 && (tt |= TA), tt += 31 - tt % 31, SA.status = _, Pe(SA, tt), SA.strstart !== 0 && (Pe(SA, V.adler >>> 16), Pe(SA, V.adler & 65535)), V.adler = 1;
                }
              if (SA.status === sA)
                if (SA.gzhead.extra) {
                  for (ue = SA.pending; SA.gzindex < (SA.gzhead.extra.length & 65535) && !(SA.pending === SA.pending_buf_size && (SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), he(V), ue = SA.pending, SA.pending === SA.pending_buf_size)); )
                    KA(SA, SA.gzhead.extra[SA.gzindex] & 255), SA.gzindex++;
                  SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), SA.gzindex === SA.gzhead.extra.length && (SA.gzindex = 0, SA.status = F);
                } else
                  SA.status = F;
              if (SA.status === F)
                if (SA.gzhead.name) {
                  ue = SA.pending;
                  do {
                    if (SA.pending === SA.pending_buf_size && (SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), he(V), ue = SA.pending, SA.pending === SA.pending_buf_size)) {
                      Fe = 1;
                      break;
                    }
                    SA.gzindex < SA.gzhead.name.length ? Fe = SA.gzhead.name.charCodeAt(SA.gzindex++) & 255 : Fe = 0, KA(SA, Fe);
                  } while (Fe !== 0);
                  SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), Fe === 0 && (SA.gzindex = 0, SA.status = o);
                } else
                  SA.status = o;
              if (SA.status === o)
                if (SA.gzhead.comment) {
                  ue = SA.pending;
                  do {
                    if (SA.pending === SA.pending_buf_size && (SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), he(V), ue = SA.pending, SA.pending === SA.pending_buf_size)) {
                      Fe = 1;
                      break;
                    }
                    SA.gzindex < SA.gzhead.comment.length ? Fe = SA.gzhead.comment.charCodeAt(SA.gzindex++) & 255 : Fe = 0, KA(SA, Fe);
                  } while (Fe !== 0);
                  SA.gzhead.hcrc && SA.pending > ue && (V.adler = x(V.adler, SA.pending_buf, SA.pending - ue, ue)), Fe === 0 && (SA.status = h);
                } else
                  SA.status = h;
              if (SA.status === h && (SA.gzhead.hcrc ? (SA.pending + 2 > SA.pending_buf_size && he(V), SA.pending + 2 <= SA.pending_buf_size && (KA(SA, V.adler & 255), KA(SA, V.adler >> 8 & 255), V.adler = 0, SA.status = _)) : SA.status = _), SA.pending !== 0) {
                if (he(V), V.avail_out === 0)
                  return SA.last_flush = -1, K;
              } else if (V.avail_in === 0 && FA(me) <= FA(Ye) && me !== q)
                return M(V, eA);
              if (SA.status === oA && V.avail_in !== 0)
                return M(V, eA);
              if (V.avail_in !== 0 || SA.lookahead !== 0 || me !== P && SA.status !== oA) {
                var Ze = SA.strategy === k ? R(SA, me) : SA.strategy === tA ? wA(SA, me) : W[SA.level].func(SA, me);
                if ((Ze === QA || Ze === bA) && (SA.status = oA), Ze === p || Ze === QA)
                  return V.avail_out === 0 && (SA.last_flush = -1), K;
                if (Ze === rA && (me === d ? a._tr_align(SA) : me !== AA && (a._tr_stored_block(SA, 0, 0, !1), me === J && (dA(SA.head), SA.lookahead === 0 && (SA.strstart = 0, SA.block_start = 0, SA.insert = 0))), he(V), V.avail_out === 0))
                  return SA.last_flush = -1, K;
              }
              return me !== q ? K : SA.wrap <= 0 ? z : (SA.wrap === 2 ? (KA(SA, V.adler & 255), KA(SA, V.adler >> 8 & 255), KA(SA, V.adler >> 16 & 255), KA(SA, V.adler >> 24 & 255), KA(SA, V.total_in & 255), KA(SA, V.total_in >> 8 & 255), KA(SA, V.total_in >> 16 & 255), KA(SA, V.total_in >> 24 & 255)) : (Pe(SA, V.adler >>> 16), Pe(SA, V.adler & 65535)), he(V), SA.wrap > 0 && (SA.wrap = -SA.wrap), SA.pending !== 0 ? K : z);
            }
            function be(V) {
              var me;
              return !V || !V.state ? T : (me = V.state.status, me !== fA && me !== sA && me !== F && me !== o && me !== h && me !== _ && me !== oA ? M(V, T) : (V.state = null, me === _ ? M(V, H) : K));
            }
            function at(V, me) {
              var Ye = me.length, SA, ue, Fe, tt, We, Ze, Ct, fi;
              if (!V || !V.state || (SA = V.state, tt = SA.wrap, tt === 2 || tt === 1 && SA.status !== fA || SA.lookahead))
                return T;
              for (tt === 1 && (V.adler = D(V.adler, me, Ye, 0)), SA.wrap = 0, Ye >= SA.w_size && (tt === 0 && (dA(SA.head), SA.strstart = 0, SA.block_start = 0, SA.insert = 0), fi = new A.Buf8(SA.w_size), A.arraySet(fi, me, Ye - SA.w_size, SA.w_size, 0), me = fi, Ye = SA.w_size), We = V.avail_in, Ze = V.next_in, Ct = V.input, V.avail_in = Ye, V.next_in = 0, V.input = me, Re(SA); SA.lookahead >= xA; ) {
                ue = SA.strstart, Fe = SA.lookahead - (xA - 1);
                do
                  SA.ins_h = (SA.ins_h << SA.hash_shift ^ SA.window[ue + xA - 1]) & SA.hash_mask, SA.prev[ue & SA.w_mask] = SA.head[SA.ins_h], SA.head[SA.ins_h] = ue, ue++;
                while (--Fe);
                SA.strstart = ue, SA.lookahead = xA - 1, Re(SA);
              }
              return SA.strstart += SA.lookahead, SA.block_start = SA.strstart, SA.insert = SA.lookahead, SA.lookahead = 0, SA.match_length = SA.prev_length = xA - 1, SA.match_available = 0, V.next_in = Ze, V.input = Ct, V.avail_in = We, SA.wrap = tt, K;
            }
            B.deflateInit = Me, B.deflateInit2 = ee, B.deflateReset = Be, B.deflateResetKeep = pA, B.deflateSetHeader = Ie, B.deflate = MA, B.deflateEnd = be, B.deflateSetDictionary = at, B.deflateInfo = "pako deflate (from Nodeca project)";
          },
          /***/
          6395(Q) {
            var B = 30, r = 12;
            Q.exports = function(a, D) {
              var x, N, P, d, J, q, AA, K, z, T, H, eA, CA, IA, k, tA, lA, uA, w, v, RA, DA, $, cA, Ae;
              x = a.state, N = a.next_in, cA = a.input, P = N + (a.avail_in - 5), d = a.next_out, Ae = a.output, J = d - (D - a.avail_out), q = d + (a.avail_out - 257), AA = x.dmax, K = x.wsize, z = x.whave, T = x.wnext, H = x.window, eA = x.hold, CA = x.bits, IA = x.lencode, k = x.distcode, tA = (1 << x.lenbits) - 1, lA = (1 << x.distbits) - 1;
              A:
                do {
                  CA < 15 && (eA += cA[N++] << CA, CA += 8, eA += cA[N++] << CA, CA += 8), uA = IA[eA & tA];
                  e:
                    for (; ; ) {
                      if (w = uA >>> 24, eA >>>= w, CA -= w, w = uA >>> 16 & 255, w === 0)
                        Ae[d++] = uA & 65535;
                      else if (w & 16) {
                        v = uA & 65535, w &= 15, w && (CA < w && (eA += cA[N++] << CA, CA += 8), v += eA & (1 << w) - 1, eA >>>= w, CA -= w), CA < 15 && (eA += cA[N++] << CA, CA += 8, eA += cA[N++] << CA, CA += 8), uA = k[eA & lA];
                        t:
                          for (; ; ) {
                            if (w = uA >>> 24, eA >>>= w, CA -= w, w = uA >>> 16 & 255, w & 16) {
                              if (RA = uA & 65535, w &= 15, CA < w && (eA += cA[N++] << CA, CA += 8, CA < w && (eA += cA[N++] << CA, CA += 8)), RA += eA & (1 << w) - 1, RA > AA) {
                                a.msg = "invalid distance too far back", x.mode = B;
                                break A;
                              }
                              if (eA >>>= w, CA -= w, w = d - J, RA > w) {
                                if (w = RA - w, w > z && x.sane) {
                                  a.msg = "invalid distance too far back", x.mode = B;
                                  break A;
                                }
                                if (DA = 0, $ = H, T === 0) {
                                  if (DA += K - w, w < v) {
                                    v -= w;
                                    do
                                      Ae[d++] = H[DA++];
                                    while (--w);
                                    DA = d - RA, $ = Ae;
                                  }
                                } else if (T < w) {
                                  if (DA += K + T - w, w -= T, w < v) {
                                    v -= w;
                                    do
                                      Ae[d++] = H[DA++];
                                    while (--w);
                                    if (DA = 0, T < v) {
                                      w = T, v -= w;
                                      do
                                        Ae[d++] = H[DA++];
                                      while (--w);
                                      DA = d - RA, $ = Ae;
                                    }
                                  }
                                } else if (DA += T - w, w < v) {
                                  v -= w;
                                  do
                                    Ae[d++] = H[DA++];
                                  while (--w);
                                  DA = d - RA, $ = Ae;
                                }
                                for (; v > 2; )
                                  Ae[d++] = $[DA++], Ae[d++] = $[DA++], Ae[d++] = $[DA++], v -= 3;
                                v && (Ae[d++] = $[DA++], v > 1 && (Ae[d++] = $[DA++]));
                              } else {
                                DA = d - RA;
                                do
                                  Ae[d++] = Ae[DA++], Ae[d++] = Ae[DA++], Ae[d++] = Ae[DA++], v -= 3;
                                while (v > 2);
                                v && (Ae[d++] = Ae[DA++], v > 1 && (Ae[d++] = Ae[DA++]));
                              }
                            } else if ((w & 64) === 0) {
                              uA = k[(uA & 65535) + (eA & (1 << w) - 1)];
                              continue t;
                            } else {
                              a.msg = "invalid distance code", x.mode = B;
                              break A;
                            }
                            break;
                          }
                      } else if ((w & 64) === 0) {
                        uA = IA[(uA & 65535) + (eA & (1 << w) - 1)];
                        continue e;
                      } else if (w & 32) {
                        x.mode = r;
                        break A;
                      } else {
                        a.msg = "invalid literal/length code", x.mode = B;
                        break A;
                      }
                      break;
                    }
                } while (N < P && d < q);
              v = CA >> 3, N -= v, CA -= v << 3, eA &= (1 << CA) - 1, a.next_in = N, a.next_out = d, a.avail_in = N < P ? 5 + (P - N) : 5 - (N - P), a.avail_out = d < q ? 257 + (q - d) : 257 - (d - q), x.hold = eA, x.bits = CA;
            };
          },
          /***/
          2269(Q, B, r) {
            var A = r(2519), a = r(6911), D = r(9049), x = r(6395), N = r(2920), P = 0, d = 1, J = 2, q = 4, AA = 5, K = 6, z = 0, T = 1, H = 2, eA = -2, CA = -3, IA = -4, k = -5, tA = 8, lA = 1, uA = 2, w = 3, v = 4, RA = 5, DA = 6, $ = 7, cA = 8, Ae = 9, kA = 10, VA = 11, EA = 12, zA = 13, OA = 14, xA = 15, LA = 16, yA = 17, TA = 18, fA = 19, sA = 20, F = 21, o = 22, h = 23, _ = 24, oA = 25, p = 26, rA = 27, QA = 28, bA = 29, y = 30, M = 31, FA = 32, dA = 852, he = 592, ie = 15, KA = ie;
            function Pe(ee) {
              return (ee >>> 24 & 255) + (ee >>> 8 & 65280) + ((ee & 65280) << 8) + ((ee & 255) << 24);
            }
            function Je() {
              this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new A.Buf16(320), this.work = new A.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
            }
            function Le(ee) {
              var Me;
              return !ee || !ee.state ? eA : (Me = ee.state, ee.total_in = ee.total_out = Me.total = 0, ee.msg = "", Me.wrap && (ee.adler = Me.wrap & 1), Me.mode = lA, Me.last = 0, Me.havedict = 0, Me.dmax = 32768, Me.head = null, Me.hold = 0, Me.bits = 0, Me.lencode = Me.lendyn = new A.Buf32(dA), Me.distcode = Me.distdyn = new A.Buf32(he), Me.sane = 1, Me.back = -1, z);
            }
            function Re(ee) {
              var Me;
              return !ee || !ee.state ? eA : (Me = ee.state, Me.wsize = 0, Me.whave = 0, Me.wnext = 0, Le(ee));
            }
            function _e(ee, Me) {
              var MA, be;
              return !ee || !ee.state || (be = ee.state, Me < 0 ? (MA = 0, Me = -Me) : (MA = (Me >> 4) + 1, Me < 48 && (Me &= 15)), Me && (Me < 8 || Me > 15)) ? eA : (be.window !== null && be.wbits !== Me && (be.window = null), be.wrap = MA, be.wbits = Me, Re(ee));
            }
            function se(ee, Me) {
              var MA, be;
              return ee ? (be = new Je(), ee.state = be, be.window = null, MA = _e(ee, Me), MA !== z && (ee.state = null), MA) : eA;
            }
            function Ee(ee) {
              return se(ee, KA);
            }
            var wA = !0, R, G;
            function W(ee) {
              if (wA) {
                var Me;
                for (R = new A.Buf32(512), G = new A.Buf32(32), Me = 0; Me < 144; )
                  ee.lens[Me++] = 8;
                for (; Me < 256; )
                  ee.lens[Me++] = 9;
                for (; Me < 280; )
                  ee.lens[Me++] = 7;
                for (; Me < 288; )
                  ee.lens[Me++] = 8;
                for (N(d, ee.lens, 0, 288, R, 0, ee.work, { bits: 9 }), Me = 0; Me < 32; )
                  ee.lens[Me++] = 5;
                N(J, ee.lens, 0, 32, G, 0, ee.work, { bits: 5 }), wA = !1;
              }
              ee.lencode = R, ee.lenbits = 9, ee.distcode = G, ee.distbits = 5;
            }
            function aA(ee, Me, MA, be) {
              var at, V = ee.state;
              return V.window === null && (V.wsize = 1 << V.wbits, V.wnext = 0, V.whave = 0, V.window = new A.Buf8(V.wsize)), be >= V.wsize ? (A.arraySet(V.window, Me, MA - V.wsize, V.wsize, 0), V.wnext = 0, V.whave = V.wsize) : (at = V.wsize - V.wnext, at > be && (at = be), A.arraySet(V.window, Me, MA - be, at, V.wnext), be -= at, be ? (A.arraySet(V.window, Me, MA - be, be, 0), V.wnext = be, V.whave = V.wsize) : (V.wnext += at, V.wnext === V.wsize && (V.wnext = 0), V.whave < V.wsize && (V.whave += at))), 0;
            }
            function j(ee, Me) {
              var MA, be, at, V, me, Ye, SA, ue, Fe, tt, We, Ze, Ct, fi, st = 0, pt, Mt, Tt, Zt, yi, xi, Ot, bt, qt = new A.Buf8(4), ti, Ke, qe = (
                /* permutation of code lengths */
                [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
              );
              if (!ee || !ee.state || !ee.output || !ee.input && ee.avail_in !== 0)
                return eA;
              MA = ee.state, MA.mode === EA && (MA.mode = zA), me = ee.next_out, at = ee.output, SA = ee.avail_out, V = ee.next_in, be = ee.input, Ye = ee.avail_in, ue = MA.hold, Fe = MA.bits, tt = Ye, We = SA, bt = z;
              A:
                for (; ; )
                  switch (MA.mode) {
                    case lA:
                      if (MA.wrap === 0) {
                        MA.mode = zA;
                        break;
                      }
                      for (; Fe < 16; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if (MA.wrap & 2 && ue === 35615) {
                        MA.check = 0, qt[0] = ue & 255, qt[1] = ue >>> 8 & 255, MA.check = D(MA.check, qt, 2, 0), ue = 0, Fe = 0, MA.mode = uA;
                        break;
                      }
                      if (MA.flags = 0, MA.head && (MA.head.done = !1), !(MA.wrap & 1) || /* check if zlib header allowed */
                      (((ue & 255) << 8) + (ue >> 8)) % 31) {
                        ee.msg = "incorrect header check", MA.mode = y;
                        break;
                      }
                      if ((ue & 15) !== tA) {
                        ee.msg = "unknown compression method", MA.mode = y;
                        break;
                      }
                      if (ue >>>= 4, Fe -= 4, Ot = (ue & 15) + 8, MA.wbits === 0)
                        MA.wbits = Ot;
                      else if (Ot > MA.wbits) {
                        ee.msg = "invalid window size", MA.mode = y;
                        break;
                      }
                      MA.dmax = 1 << Ot, ee.adler = MA.check = 1, MA.mode = ue & 512 ? kA : EA, ue = 0, Fe = 0;
                      break;
                    case uA:
                      for (; Fe < 16; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if (MA.flags = ue, (MA.flags & 255) !== tA) {
                        ee.msg = "unknown compression method", MA.mode = y;
                        break;
                      }
                      if (MA.flags & 57344) {
                        ee.msg = "unknown header flags set", MA.mode = y;
                        break;
                      }
                      MA.head && (MA.head.text = ue >> 8 & 1), MA.flags & 512 && (qt[0] = ue & 255, qt[1] = ue >>> 8 & 255, MA.check = D(MA.check, qt, 2, 0)), ue = 0, Fe = 0, MA.mode = w;
                    /* falls through */
                    case w:
                      for (; Fe < 32; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      MA.head && (MA.head.time = ue), MA.flags & 512 && (qt[0] = ue & 255, qt[1] = ue >>> 8 & 255, qt[2] = ue >>> 16 & 255, qt[3] = ue >>> 24 & 255, MA.check = D(MA.check, qt, 4, 0)), ue = 0, Fe = 0, MA.mode = v;
                    /* falls through */
                    case v:
                      for (; Fe < 16; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      MA.head && (MA.head.xflags = ue & 255, MA.head.os = ue >> 8), MA.flags & 512 && (qt[0] = ue & 255, qt[1] = ue >>> 8 & 255, MA.check = D(MA.check, qt, 2, 0)), ue = 0, Fe = 0, MA.mode = RA;
                    /* falls through */
                    case RA:
                      if (MA.flags & 1024) {
                        for (; Fe < 16; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        MA.length = ue, MA.head && (MA.head.extra_len = ue), MA.flags & 512 && (qt[0] = ue & 255, qt[1] = ue >>> 8 & 255, MA.check = D(MA.check, qt, 2, 0)), ue = 0, Fe = 0;
                      } else MA.head && (MA.head.extra = null);
                      MA.mode = DA;
                    /* falls through */
                    case DA:
                      if (MA.flags & 1024 && (Ze = MA.length, Ze > Ye && (Ze = Ye), Ze && (MA.head && (Ot = MA.head.extra_len - MA.length, MA.head.extra || (MA.head.extra = new Array(MA.head.extra_len)), A.arraySet(
                        MA.head.extra,
                        be,
                        V,
                        // extra field is limited to 65536 bytes
                        // - no need for additional size check
                        Ze,
                        /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
                        Ot
                      )), MA.flags & 512 && (MA.check = D(MA.check, be, Ze, V)), Ye -= Ze, V += Ze, MA.length -= Ze), MA.length))
                        break A;
                      MA.length = 0, MA.mode = $;
                    /* falls through */
                    case $:
                      if (MA.flags & 2048) {
                        if (Ye === 0)
                          break A;
                        Ze = 0;
                        do
                          Ot = be[V + Ze++], MA.head && Ot && MA.length < 65536 && (MA.head.name += String.fromCharCode(Ot));
                        while (Ot && Ze < Ye);
                        if (MA.flags & 512 && (MA.check = D(MA.check, be, Ze, V)), Ye -= Ze, V += Ze, Ot)
                          break A;
                      } else MA.head && (MA.head.name = null);
                      MA.length = 0, MA.mode = cA;
                    /* falls through */
                    case cA:
                      if (MA.flags & 4096) {
                        if (Ye === 0)
                          break A;
                        Ze = 0;
                        do
                          Ot = be[V + Ze++], MA.head && Ot && MA.length < 65536 && (MA.head.comment += String.fromCharCode(Ot));
                        while (Ot && Ze < Ye);
                        if (MA.flags & 512 && (MA.check = D(MA.check, be, Ze, V)), Ye -= Ze, V += Ze, Ot)
                          break A;
                      } else MA.head && (MA.head.comment = null);
                      MA.mode = Ae;
                    /* falls through */
                    case Ae:
                      if (MA.flags & 512) {
                        for (; Fe < 16; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        if (ue !== (MA.check & 65535)) {
                          ee.msg = "header crc mismatch", MA.mode = y;
                          break;
                        }
                        ue = 0, Fe = 0;
                      }
                      MA.head && (MA.head.hcrc = MA.flags >> 9 & 1, MA.head.done = !0), ee.adler = MA.check = 0, MA.mode = EA;
                      break;
                    case kA:
                      for (; Fe < 32; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      ee.adler = MA.check = Pe(ue), ue = 0, Fe = 0, MA.mode = VA;
                    /* falls through */
                    case VA:
                      if (MA.havedict === 0)
                        return ee.next_out = me, ee.avail_out = SA, ee.next_in = V, ee.avail_in = Ye, MA.hold = ue, MA.bits = Fe, H;
                      ee.adler = MA.check = 1, MA.mode = EA;
                    /* falls through */
                    case EA:
                      if (Me === AA || Me === K)
                        break A;
                    /* falls through */
                    case zA:
                      if (MA.last) {
                        ue >>>= Fe & 7, Fe -= Fe & 7, MA.mode = rA;
                        break;
                      }
                      for (; Fe < 3; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      switch (MA.last = ue & 1, ue >>>= 1, Fe -= 1, ue & 3) {
                        case 0:
                          MA.mode = OA;
                          break;
                        case 1:
                          if (W(MA), MA.mode = sA, Me === K) {
                            ue >>>= 2, Fe -= 2;
                            break A;
                          }
                          break;
                        case 2:
                          MA.mode = yA;
                          break;
                        case 3:
                          ee.msg = "invalid block type", MA.mode = y;
                      }
                      ue >>>= 2, Fe -= 2;
                      break;
                    case OA:
                      for (ue >>>= Fe & 7, Fe -= Fe & 7; Fe < 32; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if ((ue & 65535) !== (ue >>> 16 ^ 65535)) {
                        ee.msg = "invalid stored block lengths", MA.mode = y;
                        break;
                      }
                      if (MA.length = ue & 65535, ue = 0, Fe = 0, MA.mode = xA, Me === K)
                        break A;
                    /* falls through */
                    case xA:
                      MA.mode = LA;
                    /* falls through */
                    case LA:
                      if (Ze = MA.length, Ze) {
                        if (Ze > Ye && (Ze = Ye), Ze > SA && (Ze = SA), Ze === 0)
                          break A;
                        A.arraySet(at, be, V, Ze, me), Ye -= Ze, V += Ze, SA -= Ze, me += Ze, MA.length -= Ze;
                        break;
                      }
                      MA.mode = EA;
                      break;
                    case yA:
                      for (; Fe < 14; ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if (MA.nlen = (ue & 31) + 257, ue >>>= 5, Fe -= 5, MA.ndist = (ue & 31) + 1, ue >>>= 5, Fe -= 5, MA.ncode = (ue & 15) + 4, ue >>>= 4, Fe -= 4, MA.nlen > 286 || MA.ndist > 30) {
                        ee.msg = "too many length or distance symbols", MA.mode = y;
                        break;
                      }
                      MA.have = 0, MA.mode = TA;
                    /* falls through */
                    case TA:
                      for (; MA.have < MA.ncode; ) {
                        for (; Fe < 3; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        MA.lens[qe[MA.have++]] = ue & 7, ue >>>= 3, Fe -= 3;
                      }
                      for (; MA.have < 19; )
                        MA.lens[qe[MA.have++]] = 0;
                      if (MA.lencode = MA.lendyn, MA.lenbits = 7, ti = { bits: MA.lenbits }, bt = N(P, MA.lens, 0, 19, MA.lencode, 0, MA.work, ti), MA.lenbits = ti.bits, bt) {
                        ee.msg = "invalid code lengths set", MA.mode = y;
                        break;
                      }
                      MA.have = 0, MA.mode = fA;
                    /* falls through */
                    case fA:
                      for (; MA.have < MA.nlen + MA.ndist; ) {
                        for (; st = MA.lencode[ue & (1 << MA.lenbits) - 1], pt = st >>> 24, Mt = st >>> 16 & 255, Tt = st & 65535, !(pt <= Fe); ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        if (Tt < 16)
                          ue >>>= pt, Fe -= pt, MA.lens[MA.have++] = Tt;
                        else {
                          if (Tt === 16) {
                            for (Ke = pt + 2; Fe < Ke; ) {
                              if (Ye === 0)
                                break A;
                              Ye--, ue += be[V++] << Fe, Fe += 8;
                            }
                            if (ue >>>= pt, Fe -= pt, MA.have === 0) {
                              ee.msg = "invalid bit length repeat", MA.mode = y;
                              break;
                            }
                            Ot = MA.lens[MA.have - 1], Ze = 3 + (ue & 3), ue >>>= 2, Fe -= 2;
                          } else if (Tt === 17) {
                            for (Ke = pt + 3; Fe < Ke; ) {
                              if (Ye === 0)
                                break A;
                              Ye--, ue += be[V++] << Fe, Fe += 8;
                            }
                            ue >>>= pt, Fe -= pt, Ot = 0, Ze = 3 + (ue & 7), ue >>>= 3, Fe -= 3;
                          } else {
                            for (Ke = pt + 7; Fe < Ke; ) {
                              if (Ye === 0)
                                break A;
                              Ye--, ue += be[V++] << Fe, Fe += 8;
                            }
                            ue >>>= pt, Fe -= pt, Ot = 0, Ze = 11 + (ue & 127), ue >>>= 7, Fe -= 7;
                          }
                          if (MA.have + Ze > MA.nlen + MA.ndist) {
                            ee.msg = "invalid bit length repeat", MA.mode = y;
                            break;
                          }
                          for (; Ze--; )
                            MA.lens[MA.have++] = Ot;
                        }
                      }
                      if (MA.mode === y)
                        break;
                      if (MA.lens[256] === 0) {
                        ee.msg = "invalid code -- missing end-of-block", MA.mode = y;
                        break;
                      }
                      if (MA.lenbits = 9, ti = { bits: MA.lenbits }, bt = N(d, MA.lens, 0, MA.nlen, MA.lencode, 0, MA.work, ti), MA.lenbits = ti.bits, bt) {
                        ee.msg = "invalid literal/lengths set", MA.mode = y;
                        break;
                      }
                      if (MA.distbits = 6, MA.distcode = MA.distdyn, ti = { bits: MA.distbits }, bt = N(J, MA.lens, MA.nlen, MA.ndist, MA.distcode, 0, MA.work, ti), MA.distbits = ti.bits, bt) {
                        ee.msg = "invalid distances set", MA.mode = y;
                        break;
                      }
                      if (MA.mode = sA, Me === K)
                        break A;
                    /* falls through */
                    case sA:
                      MA.mode = F;
                    /* falls through */
                    case F:
                      if (Ye >= 6 && SA >= 258) {
                        ee.next_out = me, ee.avail_out = SA, ee.next_in = V, ee.avail_in = Ye, MA.hold = ue, MA.bits = Fe, x(ee, We), me = ee.next_out, at = ee.output, SA = ee.avail_out, V = ee.next_in, be = ee.input, Ye = ee.avail_in, ue = MA.hold, Fe = MA.bits, MA.mode === EA && (MA.back = -1);
                        break;
                      }
                      for (MA.back = 0; st = MA.lencode[ue & (1 << MA.lenbits) - 1], pt = st >>> 24, Mt = st >>> 16 & 255, Tt = st & 65535, !(pt <= Fe); ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if (Mt && (Mt & 240) === 0) {
                        for (Zt = pt, yi = Mt, xi = Tt; st = MA.lencode[xi + ((ue & (1 << Zt + yi) - 1) >> Zt)], pt = st >>> 24, Mt = st >>> 16 & 255, Tt = st & 65535, !(Zt + pt <= Fe); ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        ue >>>= Zt, Fe -= Zt, MA.back += Zt;
                      }
                      if (ue >>>= pt, Fe -= pt, MA.back += pt, MA.length = Tt, Mt === 0) {
                        MA.mode = p;
                        break;
                      }
                      if (Mt & 32) {
                        MA.back = -1, MA.mode = EA;
                        break;
                      }
                      if (Mt & 64) {
                        ee.msg = "invalid literal/length code", MA.mode = y;
                        break;
                      }
                      MA.extra = Mt & 15, MA.mode = o;
                    /* falls through */
                    case o:
                      if (MA.extra) {
                        for (Ke = MA.extra; Fe < Ke; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        MA.length += ue & (1 << MA.extra) - 1, ue >>>= MA.extra, Fe -= MA.extra, MA.back += MA.extra;
                      }
                      MA.was = MA.length, MA.mode = h;
                    /* falls through */
                    case h:
                      for (; st = MA.distcode[ue & (1 << MA.distbits) - 1], pt = st >>> 24, Mt = st >>> 16 & 255, Tt = st & 65535, !(pt <= Fe); ) {
                        if (Ye === 0)
                          break A;
                        Ye--, ue += be[V++] << Fe, Fe += 8;
                      }
                      if ((Mt & 240) === 0) {
                        for (Zt = pt, yi = Mt, xi = Tt; st = MA.distcode[xi + ((ue & (1 << Zt + yi) - 1) >> Zt)], pt = st >>> 24, Mt = st >>> 16 & 255, Tt = st & 65535, !(Zt + pt <= Fe); ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        ue >>>= Zt, Fe -= Zt, MA.back += Zt;
                      }
                      if (ue >>>= pt, Fe -= pt, MA.back += pt, Mt & 64) {
                        ee.msg = "invalid distance code", MA.mode = y;
                        break;
                      }
                      MA.offset = Tt, MA.extra = Mt & 15, MA.mode = _;
                    /* falls through */
                    case _:
                      if (MA.extra) {
                        for (Ke = MA.extra; Fe < Ke; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        MA.offset += ue & (1 << MA.extra) - 1, ue >>>= MA.extra, Fe -= MA.extra, MA.back += MA.extra;
                      }
                      if (MA.offset > MA.dmax) {
                        ee.msg = "invalid distance too far back", MA.mode = y;
                        break;
                      }
                      MA.mode = oA;
                    /* falls through */
                    case oA:
                      if (SA === 0)
                        break A;
                      if (Ze = We - SA, MA.offset > Ze) {
                        if (Ze = MA.offset - Ze, Ze > MA.whave && MA.sane) {
                          ee.msg = "invalid distance too far back", MA.mode = y;
                          break;
                        }
                        Ze > MA.wnext ? (Ze -= MA.wnext, Ct = MA.wsize - Ze) : Ct = MA.wnext - Ze, Ze > MA.length && (Ze = MA.length), fi = MA.window;
                      } else
                        fi = at, Ct = me - MA.offset, Ze = MA.length;
                      Ze > SA && (Ze = SA), SA -= Ze, MA.length -= Ze;
                      do
                        at[me++] = fi[Ct++];
                      while (--Ze);
                      MA.length === 0 && (MA.mode = F);
                      break;
                    case p:
                      if (SA === 0)
                        break A;
                      at[me++] = MA.length, SA--, MA.mode = F;
                      break;
                    case rA:
                      if (MA.wrap) {
                        for (; Fe < 32; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue |= be[V++] << Fe, Fe += 8;
                        }
                        if (We -= SA, ee.total_out += We, MA.total += We, We && (ee.adler = MA.check = /*UPDATE(state.check, put - _out, _out);*/
                        MA.flags ? D(MA.check, at, We, me - We) : a(MA.check, at, We, me - We)), We = SA, (MA.flags ? ue : Pe(ue)) !== MA.check) {
                          ee.msg = "incorrect data check", MA.mode = y;
                          break;
                        }
                        ue = 0, Fe = 0;
                      }
                      MA.mode = QA;
                    /* falls through */
                    case QA:
                      if (MA.wrap && MA.flags) {
                        for (; Fe < 32; ) {
                          if (Ye === 0)
                            break A;
                          Ye--, ue += be[V++] << Fe, Fe += 8;
                        }
                        if (ue !== (MA.total & 4294967295)) {
                          ee.msg = "incorrect length check", MA.mode = y;
                          break;
                        }
                        ue = 0, Fe = 0;
                      }
                      MA.mode = bA;
                    /* falls through */
                    case bA:
                      bt = T;
                      break A;
                    case y:
                      bt = CA;
                      break A;
                    case M:
                      return IA;
                    case FA:
                    /* falls through */
                    default:
                      return eA;
                  }
              return ee.next_out = me, ee.avail_out = SA, ee.next_in = V, ee.avail_in = Ye, MA.hold = ue, MA.bits = Fe, (MA.wsize || We !== ee.avail_out && MA.mode < y && (MA.mode < rA || Me !== q)) && aA(ee, ee.output, ee.next_out, We - ee.avail_out), tt -= ee.avail_in, We -= ee.avail_out, ee.total_in += tt, ee.total_out += We, MA.total += We, MA.wrap && We && (ee.adler = MA.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
              MA.flags ? D(MA.check, at, We, ee.next_out - We) : a(MA.check, at, We, ee.next_out - We)), ee.data_type = MA.bits + (MA.last ? 64 : 0) + (MA.mode === EA ? 128 : 0) + (MA.mode === sA || MA.mode === xA ? 256 : 0), (tt === 0 && We === 0 || Me === q) && bt === z && (bt = k), bt;
            }
            function pA(ee) {
              if (!ee || !ee.state)
                return eA;
              var Me = ee.state;
              return Me.window && (Me.window = null), ee.state = null, z;
            }
            function Be(ee, Me) {
              var MA;
              return !ee || !ee.state || (MA = ee.state, (MA.wrap & 2) === 0) ? eA : (MA.head = Me, Me.done = !1, z);
            }
            function Ie(ee, Me) {
              var MA = Me.length, be, at, V;
              return !ee || !ee.state || (be = ee.state, be.wrap !== 0 && be.mode !== VA) ? eA : be.mode === VA && (at = 1, at = a(at, Me, MA, 0), at !== be.check) ? CA : (V = aA(ee, Me, MA, MA), V ? (be.mode = M, IA) : (be.havedict = 1, z));
            }
            B.inflateReset = Re, B.inflateReset2 = _e, B.inflateResetKeep = Le, B.inflateInit = Ee, B.inflateInit2 = se, B.inflate = j, B.inflateEnd = pA, B.inflateGetHeader = Be, B.inflateSetDictionary = Ie, B.inflateInfo = "pako inflate (from Nodeca project)";
          },
          /***/
          2920(Q, B, r) {
            var A = r(2519), a = 15, D = 852, x = 592, N = 0, P = 1, d = 2, J = [
              /* Length codes 257..285 base */
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              13,
              15,
              17,
              19,
              23,
              27,
              31,
              35,
              43,
              51,
              59,
              67,
              83,
              99,
              115,
              131,
              163,
              195,
              227,
              258,
              0,
              0
            ], q = [
              /* Length codes 257..285 extra */
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              16,
              72,
              78
            ], AA = [
              /* Distance codes 0..29 base */
              1,
              2,
              3,
              4,
              5,
              7,
              9,
              13,
              17,
              25,
              33,
              49,
              65,
              97,
              129,
              193,
              257,
              385,
              513,
              769,
              1025,
              1537,
              2049,
              3073,
              4097,
              6145,
              8193,
              12289,
              16385,
              24577,
              0,
              0
            ], K = [
              /* Distance codes 0..29 extra */
              16,
              16,
              16,
              16,
              17,
              17,
              18,
              18,
              19,
              19,
              20,
              20,
              21,
              21,
              22,
              22,
              23,
              23,
              24,
              24,
              25,
              25,
              26,
              26,
              27,
              27,
              28,
              28,
              29,
              29,
              64,
              64
            ];
            Q.exports = function(T, H, eA, CA, IA, k, tA, lA) {
              var uA = lA.bits, w = 0, v = 0, RA = 0, DA = 0, $ = 0, cA = 0, Ae = 0, kA = 0, VA = 0, EA = 0, zA, OA, xA, LA, yA, TA = null, fA = 0, sA, F = new A.Buf16(a + 1), o = new A.Buf16(a + 1), h = null, _ = 0, oA, p, rA;
              for (w = 0; w <= a; w++)
                F[w] = 0;
              for (v = 0; v < CA; v++)
                F[H[eA + v]]++;
              for ($ = uA, DA = a; DA >= 1 && F[DA] === 0; DA--)
                ;
              if ($ > DA && ($ = DA), DA === 0)
                return IA[k++] = 20971520, IA[k++] = 20971520, lA.bits = 1, 0;
              for (RA = 1; RA < DA && F[RA] === 0; RA++)
                ;
              for ($ < RA && ($ = RA), kA = 1, w = 1; w <= a; w++)
                if (kA <<= 1, kA -= F[w], kA < 0)
                  return -1;
              if (kA > 0 && (T === N || DA !== 1))
                return -1;
              for (o[1] = 0, w = 1; w < a; w++)
                o[w + 1] = o[w] + F[w];
              for (v = 0; v < CA; v++)
                H[eA + v] !== 0 && (tA[o[H[eA + v]]++] = v);
              if (T === N ? (TA = h = tA, sA = 19) : T === P ? (TA = J, fA -= 257, h = q, _ -= 257, sA = 256) : (TA = AA, h = K, sA = -1), EA = 0, v = 0, w = RA, yA = k, cA = $, Ae = 0, xA = -1, VA = 1 << $, LA = VA - 1, T === P && VA > D || T === d && VA > x)
                return 1;
              for (; ; ) {
                oA = w - Ae, tA[v] < sA ? (p = 0, rA = tA[v]) : tA[v] > sA ? (p = h[_ + tA[v]], rA = TA[fA + tA[v]]) : (p = 96, rA = 0), zA = 1 << w - Ae, OA = 1 << cA, RA = OA;
                do
                  OA -= zA, IA[yA + (EA >> Ae) + OA] = oA << 24 | p << 16 | rA | 0;
                while (OA !== 0);
                for (zA = 1 << w - 1; EA & zA; )
                  zA >>= 1;
                if (zA !== 0 ? (EA &= zA - 1, EA += zA) : EA = 0, v++, --F[w] === 0) {
                  if (w === DA)
                    break;
                  w = H[eA + tA[v]];
                }
                if (w > $ && (EA & LA) !== xA) {
                  for (Ae === 0 && (Ae = $), yA += RA, cA = w - Ae, kA = 1 << cA; cA + Ae < DA && (kA -= F[cA + Ae], !(kA <= 0)); )
                    cA++, kA <<= 1;
                  if (VA += 1 << cA, T === P && VA > D || T === d && VA > x)
                    return 1;
                  xA = EA & LA, IA[xA] = $ << 24 | cA << 16 | yA - k | 0;
                }
              }
              return EA !== 0 && (IA[yA + EA] = w - Ae << 24 | 4194304 | 0), lA.bits = $, 0;
            };
          },
          /***/
          6228(Q) {
            Q.exports = {
              2: "need dictionary",
              /* Z_NEED_DICT       2  */
              1: "stream end",
              /* Z_STREAM_END      1  */
              0: "",
              /* Z_OK              0  */
              "-1": "file error",
              /* Z_ERRNO         (-1) */
              "-2": "stream error",
              /* Z_STREAM_ERROR  (-2) */
              "-3": "data error",
              /* Z_DATA_ERROR    (-3) */
              "-4": "insufficient memory",
              /* Z_MEM_ERROR     (-4) */
              "-5": "buffer error",
              /* Z_BUF_ERROR     (-5) */
              "-6": "incompatible version"
              /* Z_VERSION_ERROR (-6) */
            };
          },
          /***/
          2367(Q, B, r) {
            var A = r(2519), a = 4, D = 0, x = 1, N = 2;
            function P(j) {
              for (var pA = j.length; --pA >= 0; )
                j[pA] = 0;
            }
            var d = 0, J = 1, q = 2, AA = 3, K = 258, z = 29, T = 256, H = T + 1 + z, eA = 30, CA = 19, IA = 2 * H + 1, k = 15, tA = 16, lA = 7, uA = 256, w = 16, v = 17, RA = 18, DA = (
              /* extra bits for each length code */
              [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]
            ), $ = (
              /* extra bits for each distance code */
              [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]
            ), cA = (
              /* extra bits for each bit length code */
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]
            ), Ae = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], kA = 512, VA = new Array((H + 2) * 2);
            P(VA);
            var EA = new Array(eA * 2);
            P(EA);
            var zA = new Array(kA);
            P(zA);
            var OA = new Array(K - AA + 1);
            P(OA);
            var xA = new Array(z);
            P(xA);
            var LA = new Array(eA);
            P(LA);
            function yA(j, pA, Be, Ie, ee) {
              this.static_tree = j, this.extra_bits = pA, this.extra_base = Be, this.elems = Ie, this.max_length = ee, this.has_stree = j && j.length;
            }
            var TA, fA, sA;
            function F(j, pA) {
              this.dyn_tree = j, this.max_code = 0, this.stat_desc = pA;
            }
            function o(j) {
              return j < 256 ? zA[j] : zA[256 + (j >>> 7)];
            }
            function h(j, pA) {
              j.pending_buf[j.pending++] = pA & 255, j.pending_buf[j.pending++] = pA >>> 8 & 255;
            }
            function _(j, pA, Be) {
              j.bi_valid > tA - Be ? (j.bi_buf |= pA << j.bi_valid & 65535, h(j, j.bi_buf), j.bi_buf = pA >> tA - j.bi_valid, j.bi_valid += Be - tA) : (j.bi_buf |= pA << j.bi_valid & 65535, j.bi_valid += Be);
            }
            function oA(j, pA, Be) {
              _(
                j,
                Be[pA * 2],
                Be[pA * 2 + 1]
                /*.Len*/
              );
            }
            function p(j, pA) {
              var Be = 0;
              do
                Be |= j & 1, j >>>= 1, Be <<= 1;
              while (--pA > 0);
              return Be >>> 1;
            }
            function rA(j) {
              j.bi_valid === 16 ? (h(j, j.bi_buf), j.bi_buf = 0, j.bi_valid = 0) : j.bi_valid >= 8 && (j.pending_buf[j.pending++] = j.bi_buf & 255, j.bi_buf >>= 8, j.bi_valid -= 8);
            }
            function QA(j, pA) {
              var Be = pA.dyn_tree, Ie = pA.max_code, ee = pA.stat_desc.static_tree, Me = pA.stat_desc.has_stree, MA = pA.stat_desc.extra_bits, be = pA.stat_desc.extra_base, at = pA.stat_desc.max_length, V, me, Ye, SA, ue, Fe, tt = 0;
              for (SA = 0; SA <= k; SA++)
                j.bl_count[SA] = 0;
              for (Be[j.heap[j.heap_max] * 2 + 1] = 0, V = j.heap_max + 1; V < IA; V++)
                me = j.heap[V], SA = Be[Be[me * 2 + 1] * 2 + 1] + 1, SA > at && (SA = at, tt++), Be[me * 2 + 1] = SA, !(me > Ie) && (j.bl_count[SA]++, ue = 0, me >= be && (ue = MA[me - be]), Fe = Be[me * 2], j.opt_len += Fe * (SA + ue), Me && (j.static_len += Fe * (ee[me * 2 + 1] + ue)));
              if (tt !== 0) {
                do {
                  for (SA = at - 1; j.bl_count[SA] === 0; )
                    SA--;
                  j.bl_count[SA]--, j.bl_count[SA + 1] += 2, j.bl_count[at]--, tt -= 2;
                } while (tt > 0);
                for (SA = at; SA !== 0; SA--)
                  for (me = j.bl_count[SA]; me !== 0; )
                    Ye = j.heap[--V], !(Ye > Ie) && (Be[Ye * 2 + 1] !== SA && (j.opt_len += (SA - Be[Ye * 2 + 1]) * Be[Ye * 2], Be[Ye * 2 + 1] = SA), me--);
              }
            }
            function bA(j, pA, Be) {
              var Ie = new Array(k + 1), ee = 0, Me, MA;
              for (Me = 1; Me <= k; Me++)
                Ie[Me] = ee = ee + Be[Me - 1] << 1;
              for (MA = 0; MA <= pA; MA++) {
                var be = j[MA * 2 + 1];
                be !== 0 && (j[MA * 2] = p(Ie[be]++, be));
              }
            }
            function y() {
              var j, pA, Be, Ie, ee, Me = new Array(k + 1);
              for (Be = 0, Ie = 0; Ie < z - 1; Ie++)
                for (xA[Ie] = Be, j = 0; j < 1 << DA[Ie]; j++)
                  OA[Be++] = Ie;
              for (OA[Be - 1] = Ie, ee = 0, Ie = 0; Ie < 16; Ie++)
                for (LA[Ie] = ee, j = 0; j < 1 << $[Ie]; j++)
                  zA[ee++] = Ie;
              for (ee >>= 7; Ie < eA; Ie++)
                for (LA[Ie] = ee << 7, j = 0; j < 1 << $[Ie] - 7; j++)
                  zA[256 + ee++] = Ie;
              for (pA = 0; pA <= k; pA++)
                Me[pA] = 0;
              for (j = 0; j <= 143; )
                VA[j * 2 + 1] = 8, j++, Me[8]++;
              for (; j <= 255; )
                VA[j * 2 + 1] = 9, j++, Me[9]++;
              for (; j <= 279; )
                VA[j * 2 + 1] = 7, j++, Me[7]++;
              for (; j <= 287; )
                VA[j * 2 + 1] = 8, j++, Me[8]++;
              for (bA(VA, H + 1, Me), j = 0; j < eA; j++)
                EA[j * 2 + 1] = 5, EA[j * 2] = p(j, 5);
              TA = new yA(VA, DA, T + 1, H, k), fA = new yA(EA, $, 0, eA, k), sA = new yA(new Array(0), cA, 0, CA, lA);
            }
            function M(j) {
              var pA;
              for (pA = 0; pA < H; pA++)
                j.dyn_ltree[pA * 2] = 0;
              for (pA = 0; pA < eA; pA++)
                j.dyn_dtree[pA * 2] = 0;
              for (pA = 0; pA < CA; pA++)
                j.bl_tree[pA * 2] = 0;
              j.dyn_ltree[uA * 2] = 1, j.opt_len = j.static_len = 0, j.last_lit = j.matches = 0;
            }
            function FA(j) {
              j.bi_valid > 8 ? h(j, j.bi_buf) : j.bi_valid > 0 && (j.pending_buf[j.pending++] = j.bi_buf), j.bi_buf = 0, j.bi_valid = 0;
            }
            function dA(j, pA, Be, Ie) {
              FA(j), h(j, Be), h(j, ~Be), A.arraySet(j.pending_buf, j.window, pA, Be, j.pending), j.pending += Be;
            }
            function he(j, pA, Be, Ie) {
              var ee = pA * 2, Me = Be * 2;
              return j[ee] < j[Me] || j[ee] === j[Me] && Ie[pA] <= Ie[Be];
            }
            function ie(j, pA, Be) {
              for (var Ie = j.heap[Be], ee = Be << 1; ee <= j.heap_len && (ee < j.heap_len && he(pA, j.heap[ee + 1], j.heap[ee], j.depth) && ee++, !he(pA, Ie, j.heap[ee], j.depth)); )
                j.heap[Be] = j.heap[ee], Be = ee, ee <<= 1;
              j.heap[Be] = Ie;
            }
            function KA(j, pA, Be) {
              var Ie, ee, Me = 0, MA, be;
              if (j.last_lit !== 0)
                do
                  Ie = j.pending_buf[j.d_buf + Me * 2] << 8 | j.pending_buf[j.d_buf + Me * 2 + 1], ee = j.pending_buf[j.l_buf + Me], Me++, Ie === 0 ? oA(j, ee, pA) : (MA = OA[ee], oA(j, MA + T + 1, pA), be = DA[MA], be !== 0 && (ee -= xA[MA], _(j, ee, be)), Ie--, MA = o(Ie), oA(j, MA, Be), be = $[MA], be !== 0 && (Ie -= LA[MA], _(j, Ie, be)));
                while (Me < j.last_lit);
              oA(j, uA, pA);
            }
            function Pe(j, pA) {
              var Be = pA.dyn_tree, Ie = pA.stat_desc.static_tree, ee = pA.stat_desc.has_stree, Me = pA.stat_desc.elems, MA, be, at = -1, V;
              for (j.heap_len = 0, j.heap_max = IA, MA = 0; MA < Me; MA++)
                Be[MA * 2] !== 0 ? (j.heap[++j.heap_len] = at = MA, j.depth[MA] = 0) : Be[MA * 2 + 1] = 0;
              for (; j.heap_len < 2; )
                V = j.heap[++j.heap_len] = at < 2 ? ++at : 0, Be[V * 2] = 1, j.depth[V] = 0, j.opt_len--, ee && (j.static_len -= Ie[V * 2 + 1]);
              for (pA.max_code = at, MA = j.heap_len >> 1; MA >= 1; MA--)
                ie(j, Be, MA);
              V = Me;
              do
                MA = j.heap[
                  1
                  /*SMALLEST*/
                ], j.heap[
                  1
                  /*SMALLEST*/
                ] = j.heap[j.heap_len--], ie(
                  j,
                  Be,
                  1
                  /*SMALLEST*/
                ), be = j.heap[
                  1
                  /*SMALLEST*/
                ], j.heap[--j.heap_max] = MA, j.heap[--j.heap_max] = be, Be[V * 2] = Be[MA * 2] + Be[be * 2], j.depth[V] = (j.depth[MA] >= j.depth[be] ? j.depth[MA] : j.depth[be]) + 1, Be[MA * 2 + 1] = Be[be * 2 + 1] = V, j.heap[
                  1
                  /*SMALLEST*/
                ] = V++, ie(
                  j,
                  Be,
                  1
                  /*SMALLEST*/
                );
              while (j.heap_len >= 2);
              j.heap[--j.heap_max] = j.heap[
                1
                /*SMALLEST*/
              ], QA(j, pA), bA(Be, at, j.bl_count);
            }
            function Je(j, pA, Be) {
              var Ie, ee = -1, Me, MA = pA[1], be = 0, at = 7, V = 4;
              for (MA === 0 && (at = 138, V = 3), pA[(Be + 1) * 2 + 1] = 65535, Ie = 0; Ie <= Be; Ie++)
                Me = MA, MA = pA[(Ie + 1) * 2 + 1], !(++be < at && Me === MA) && (be < V ? j.bl_tree[Me * 2] += be : Me !== 0 ? (Me !== ee && j.bl_tree[Me * 2]++, j.bl_tree[w * 2]++) : be <= 10 ? j.bl_tree[v * 2]++ : j.bl_tree[RA * 2]++, be = 0, ee = Me, MA === 0 ? (at = 138, V = 3) : Me === MA ? (at = 6, V = 3) : (at = 7, V = 4));
            }
            function Le(j, pA, Be) {
              var Ie, ee = -1, Me, MA = pA[1], be = 0, at = 7, V = 4;
              for (MA === 0 && (at = 138, V = 3), Ie = 0; Ie <= Be; Ie++)
                if (Me = MA, MA = pA[(Ie + 1) * 2 + 1], !(++be < at && Me === MA)) {
                  if (be < V)
                    do
                      oA(j, Me, j.bl_tree);
                    while (--be !== 0);
                  else Me !== 0 ? (Me !== ee && (oA(j, Me, j.bl_tree), be--), oA(j, w, j.bl_tree), _(j, be - 3, 2)) : be <= 10 ? (oA(j, v, j.bl_tree), _(j, be - 3, 3)) : (oA(j, RA, j.bl_tree), _(j, be - 11, 7));
                  be = 0, ee = Me, MA === 0 ? (at = 138, V = 3) : Me === MA ? (at = 6, V = 3) : (at = 7, V = 4);
                }
            }
            function Re(j) {
              var pA;
              for (Je(j, j.dyn_ltree, j.l_desc.max_code), Je(j, j.dyn_dtree, j.d_desc.max_code), Pe(j, j.bl_desc), pA = CA - 1; pA >= 3 && j.bl_tree[Ae[pA] * 2 + 1] === 0; pA--)
                ;
              return j.opt_len += 3 * (pA + 1) + 5 + 5 + 4, pA;
            }
            function _e(j, pA, Be, Ie) {
              var ee;
              for (_(j, pA - 257, 5), _(j, Be - 1, 5), _(j, Ie - 4, 4), ee = 0; ee < Ie; ee++)
                _(j, j.bl_tree[Ae[ee] * 2 + 1], 3);
              Le(j, j.dyn_ltree, pA - 1), Le(j, j.dyn_dtree, Be - 1);
            }
            function se(j) {
              var pA = 4093624447, Be;
              for (Be = 0; Be <= 31; Be++, pA >>>= 1)
                if (pA & 1 && j.dyn_ltree[Be * 2] !== 0)
                  return D;
              if (j.dyn_ltree[18] !== 0 || j.dyn_ltree[20] !== 0 || j.dyn_ltree[26] !== 0)
                return x;
              for (Be = 32; Be < T; Be++)
                if (j.dyn_ltree[Be * 2] !== 0)
                  return x;
              return D;
            }
            var Ee = !1;
            function wA(j) {
              Ee || (y(), Ee = !0), j.l_desc = new F(j.dyn_ltree, TA), j.d_desc = new F(j.dyn_dtree, fA), j.bl_desc = new F(j.bl_tree, sA), j.bi_buf = 0, j.bi_valid = 0, M(j);
            }
            function R(j, pA, Be, Ie) {
              _(j, (d << 1) + (Ie ? 1 : 0), 3), dA(j, pA, Be);
            }
            function G(j) {
              _(j, J << 1, 3), oA(j, uA, VA), rA(j);
            }
            function W(j, pA, Be, Ie) {
              var ee, Me, MA = 0;
              j.level > 0 ? (j.strm.data_type === N && (j.strm.data_type = se(j)), Pe(j, j.l_desc), Pe(j, j.d_desc), MA = Re(j), ee = j.opt_len + 3 + 7 >>> 3, Me = j.static_len + 3 + 7 >>> 3, Me <= ee && (ee = Me)) : ee = Me = Be + 5, Be + 4 <= ee && pA !== -1 ? R(j, pA, Be, Ie) : j.strategy === a || Me === ee ? (_(j, (J << 1) + (Ie ? 1 : 0), 3), KA(j, VA, EA)) : (_(j, (q << 1) + (Ie ? 1 : 0), 3), _e(j, j.l_desc.max_code + 1, j.d_desc.max_code + 1, MA + 1), KA(j, j.dyn_ltree, j.dyn_dtree)), M(j), Ie && FA(j);
            }
            function aA(j, pA, Be) {
              return j.pending_buf[j.d_buf + j.last_lit * 2] = pA >>> 8 & 255, j.pending_buf[j.d_buf + j.last_lit * 2 + 1] = pA & 255, j.pending_buf[j.l_buf + j.last_lit] = Be & 255, j.last_lit++, pA === 0 ? j.dyn_ltree[Be * 2]++ : (j.matches++, pA--, j.dyn_ltree[(OA[Be] + T + 1) * 2]++, j.dyn_dtree[o(pA) * 2]++), j.last_lit === j.lit_bufsize - 1;
            }
            B._tr_init = wA, B._tr_stored_block = R, B._tr_flush_block = W, B._tr_tally = aA, B._tr_align = G;
          },
          /***/
          7468(Q) {
            function B() {
              this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
            }
            Q.exports = B;
          },
          /***/
          884(Q) {
            Q.exports = [
              "Float16Array",
              "Float32Array",
              "Float64Array",
              "Int8Array",
              "Int16Array",
              "Int32Array",
              "Uint8Array",
              "Uint8ClampedArray",
              "Uint16Array",
              "Uint32Array",
              "BigInt64Array",
              "BigUint64Array"
            ];
          },
          /***/
          9964(Q) {
            var B = Q.exports = {}, r, A;
            function a() {
              throw new Error("setTimeout has not been defined");
            }
            function D() {
              throw new Error("clearTimeout has not been defined");
            }
            (function() {
              try {
                typeof setTimeout == "function" ? r = setTimeout : r = a;
              } catch {
                r = a;
              }
              try {
                typeof clearTimeout == "function" ? A = clearTimeout : A = D;
              } catch {
                A = D;
              }
            })();
            function x(H) {
              if (r === setTimeout)
                return setTimeout(H, 0);
              if ((r === a || !r) && setTimeout)
                return r = setTimeout, setTimeout(H, 0);
              try {
                return r(H, 0);
              } catch {
                try {
                  return r.call(null, H, 0);
                } catch {
                  return r.call(this, H, 0);
                }
              }
            }
            function N(H) {
              if (A === clearTimeout)
                return clearTimeout(H);
              if ((A === D || !A) && clearTimeout)
                return A = clearTimeout, clearTimeout(H);
              try {
                return A(H);
              } catch {
                try {
                  return A.call(null, H);
                } catch {
                  return A.call(this, H);
                }
              }
            }
            var P = [], d = !1, J, q = -1;
            function AA() {
              !d || !J || (d = !1, J.length ? P = J.concat(P) : q = -1, P.length && K());
            }
            function K() {
              if (!d) {
                var H = x(AA);
                d = !0;
                for (var eA = P.length; eA; ) {
                  for (J = P, P = []; ++q < eA; )
                    J && J[q].run();
                  q = -1, eA = P.length;
                }
                J = null, d = !1, N(H);
              }
            }
            B.nextTick = function(H) {
              var eA = new Array(arguments.length - 1);
              if (arguments.length > 1)
                for (var CA = 1; CA < arguments.length; CA++)
                  eA[CA - 1] = arguments[CA];
              P.push(new z(H, eA)), P.length === 1 && !d && x(K);
            };
            function z(H, eA) {
              this.fun = H, this.array = eA;
            }
            z.prototype.run = function() {
              this.fun.apply(null, this.array);
            }, B.title = "browser", B.browser = !0, B.env = {}, B.argv = [], B.version = "", B.versions = {};
            function T() {
            }
            B.on = T, B.addListener = T, B.once = T, B.off = T, B.removeListener = T, B.removeAllListeners = T, B.emit = T, B.prependListener = T, B.prependOnceListener = T, B.listeners = function(H) {
              return [];
            }, B.binding = function(H) {
              throw new Error("process.binding is not supported");
            }, B.cwd = function() {
              return "/";
            }, B.chdir = function(H) {
              throw new Error("process.chdir is not supported");
            }, B.umask = function() {
              return 0;
            };
          },
          /***/
          8843(Q, B, r) {
            var A = r(2774), a = r(1689), D = A("RegExp.prototype.exec"), x = r(6785);
            Q.exports = function(P) {
              if (!a(P))
                throw new x("`regex` must be a RegExp");
              return function(J) {
                return D(P, J) !== null;
              };
            };
          },
          /***/
          1733(Q, B, r) {
            var A = r(783).Buffer;
            (function(a) {
              a.parser = function(y, M) {
                return new x(y, M);
              }, a.SAXParser = x, a.SAXStream = z, a.createStream = AA, a.MAX_BUFFER_LENGTH = 65536;
              var D = [
                "comment",
                "sgmlDecl",
                "textNode",
                "tagName",
                "doctype",
                "procInstName",
                "procInstBody",
                "entity",
                "attribName",
                "attribValue",
                "cdata",
                "script"
              ];
              a.EVENTS = [
                "text",
                "processinginstruction",
                "sgmldeclaration",
                "doctype",
                "comment",
                "opentagstart",
                "attribute",
                "opentag",
                "closetag",
                "opencdata",
                "cdata",
                "closecdata",
                "error",
                "end",
                "ready",
                "script",
                "opennamespace",
                "closenamespace"
              ];
              function x(y, M) {
                if (!(this instanceof x))
                  return new x(y, M);
                var FA = this;
                P(FA), FA.q = FA.c = "", FA.bufferCheckPosition = a.MAX_BUFFER_LENGTH, FA.encoding = null, FA.opt = M || {}, FA.opt.lowercase = FA.opt.lowercase || FA.opt.lowercasetags, FA.looseCase = FA.opt.lowercase ? "toLowerCase" : "toUpperCase", FA.opt.maxEntityCount = FA.opt.maxEntityCount || 512, FA.opt.maxEntityDepth = FA.opt.maxEntityDepth || 4, FA.entityCount = FA.entityDepth = 0, FA.tags = [], FA.closed = FA.closedRoot = FA.sawRoot = !1, FA.tag = FA.error = null, FA.strict = !!y, FA.noscript = !!(y || FA.opt.noscript), FA.state = cA.BEGIN, FA.strictEntities = FA.opt.strictEntities, FA.ENTITIES = FA.strictEntities ? Object.create(a.XML_ENTITIES) : Object.create(a.ENTITIES), FA.attribList = [], FA.opt.xmlns && (FA.ns = Object.create(IA)), FA.opt.unquotedAttributeValues === void 0 && (FA.opt.unquotedAttributeValues = !y), FA.trackPosition = FA.opt.position !== !1, FA.trackPosition && (FA.position = FA.line = FA.column = 0), kA(FA, "onready");
              }
              Object.create || (Object.create = function(y) {
                function M() {
                }
                M.prototype = y;
                var FA = new M();
                return FA;
              }), Object.keys || (Object.keys = function(y) {
                var M = [];
                for (var FA in y) y.hasOwnProperty(FA) && M.push(FA);
                return M;
              });
              function N(y) {
                for (var M = Math.max(a.MAX_BUFFER_LENGTH, 10), FA = 0, dA = 0, he = D.length; dA < he; dA++) {
                  var ie = y[D[dA]].length;
                  if (ie > M)
                    switch (D[dA]) {
                      case "textNode":
                        LA(y);
                        break;
                      case "cdata":
                        xA(y, "oncdata", y.cdata), y.cdata = "";
                        break;
                      case "script":
                        xA(y, "onscript", y.script), y.script = "";
                        break;
                      default:
                        TA(y, "Max buffer length exceeded: " + D[dA]);
                    }
                  FA = Math.max(FA, ie);
                }
                var KA = a.MAX_BUFFER_LENGTH - FA;
                y.bufferCheckPosition = KA + y.position;
              }
              function P(y) {
                for (var M = 0, FA = D.length; M < FA; M++)
                  y[D[M]] = "";
              }
              function d(y) {
                LA(y), y.cdata !== "" && (xA(y, "oncdata", y.cdata), y.cdata = ""), y.script !== "" && (xA(y, "onscript", y.script), y.script = "");
              }
              x.prototype = {
                end: function() {
                  fA(this);
                },
                write: bA,
                resume: function() {
                  return this.error = null, this;
                },
                close: function() {
                  return this.write(null);
                },
                flush: function() {
                  d(this);
                }
              };
              var J;
              try {
                J = r(9760).Stream;
              } catch {
                J = function() {
                };
              }
              J || (J = function() {
              });
              var q = a.EVENTS.filter(function(y) {
                return y !== "error" && y !== "end";
              });
              function AA(y, M) {
                return new z(y, M);
              }
              function K(y, M) {
                if (y.length >= 2) {
                  if (y[0] === 255 && y[1] === 254)
                    return "utf-16le";
                  if (y[0] === 254 && y[1] === 255)
                    return "utf-16be";
                }
                return y.length >= 3 && y[0] === 239 && y[1] === 187 && y[2] === 191 ? "utf8" : y.length >= 4 ? y[0] === 60 && y[1] === 0 && y[2] === 63 && y[3] === 0 ? "utf-16le" : y[0] === 0 && y[1] === 60 && y[2] === 0 && y[3] === 63 ? "utf-16be" : "utf8" : M ? "utf8" : null;
              }
              function z(y, M) {
                if (!(this instanceof z))
                  return new z(y, M);
                J.apply(this), this._parser = new x(y, M), this.writable = !0, this.readable = !0;
                var FA = this;
                this._parser.onend = function() {
                  FA.emit("end");
                }, this._parser.onerror = function(dA) {
                  FA.emit("error", dA), FA._parser.error = null;
                }, this._decoder = null, this._decoderBuffer = null, q.forEach(function(dA) {
                  Object.defineProperty(FA, "on" + dA, {
                    get: function() {
                      return FA._parser["on" + dA];
                    },
                    set: function(he) {
                      if (!he)
                        return FA.removeAllListeners(dA), FA._parser["on" + dA] = he, he;
                      FA.on(dA, he);
                    },
                    enumerable: !0,
                    configurable: !1
                  });
                });
              }
              z.prototype = Object.create(J.prototype, {
                constructor: {
                  value: z
                }
              }), z.prototype._decodeBuffer = function(y, M) {
                if (this._decoderBuffer && (y = A.concat([this._decoderBuffer, y]), this._decoderBuffer = null), !this._decoder) {
                  var FA = K(y, M);
                  if (!FA)
                    return this._decoderBuffer = y, "";
                  this._parser.encoding = FA, this._decoder = new TextDecoder(FA);
                }
                return this._decoder.decode(y, { stream: !M });
              }, z.prototype.write = function(y) {
                if (typeof A == "function" && typeof A.isBuffer == "function" && A.isBuffer(y))
                  y = this._decodeBuffer(y, !1);
                else if (this._decoderBuffer) {
                  var M = this._decodeBuffer(A.alloc(0), !0);
                  M && (this._parser.write(M), this.emit("data", M));
                }
                return this._parser.write(y.toString()), this.emit("data", y), !0;
              }, z.prototype.end = function(y) {
                if (y && y.length && this.write(y), this._decoderBuffer) {
                  var M = this._decodeBuffer(A.alloc(0), !0);
                  M && (this._parser.write(M), this.emit("data", M));
                } else if (this._decoder) {
                  var FA = this._decoder.decode();
                  FA && (this._parser.write(FA), this.emit("data", FA));
                }
                return this._parser.end(), !0;
              }, z.prototype.on = function(y, M) {
                var FA = this;
                return !FA._parser["on" + y] && q.indexOf(y) !== -1 && (FA._parser["on" + y] = function() {
                  var dA = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
                  dA.splice(0, 0, y), FA.emit.apply(FA, dA);
                }), J.prototype.on.call(FA, y, M);
              };
              var T = "[CDATA[", H = "DOCTYPE", eA = "http://www.w3.org/XML/1998/namespace", CA = "http://www.w3.org/2000/xmlns/", IA = { xml: eA, xmlns: CA }, k = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, tA = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, lA = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, uA = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
              function w(y) {
                return y === " " || y === `
` || y === "\r" || y === "	";
              }
              function v(y) {
                return y === '"' || y === "'";
              }
              function RA(y) {
                return y === ">" || w(y);
              }
              function DA(y, M) {
                return y.test(M);
              }
              function $(y, M) {
                return !DA(y, M);
              }
              var cA = 0;
              a.STATE = {
                BEGIN: cA++,
                // leading byte order mark or whitespace
                BEGIN_WHITESPACE: cA++,
                // leading whitespace
                TEXT: cA++,
                // general stuff
                TEXT_ENTITY: cA++,
                // &amp and such.
                OPEN_WAKA: cA++,
                // <
                SGML_DECL: cA++,
                // <!BLARG
                SGML_DECL_QUOTED: cA++,
                // <!BLARG foo "bar
                DOCTYPE: cA++,
                // <!DOCTYPE
                DOCTYPE_QUOTED: cA++,
                // <!DOCTYPE "//blah
                DOCTYPE_DTD: cA++,
                // <!DOCTYPE "//blah" [ ...
                DOCTYPE_DTD_QUOTED: cA++,
                // <!DOCTYPE "//blah" [ "foo
                COMMENT_STARTING: cA++,
                // <!-
                COMMENT: cA++,
                // <!--
                COMMENT_ENDING: cA++,
                // <!-- blah -
                COMMENT_ENDED: cA++,
                // <!-- blah --
                CDATA: cA++,
                // <![CDATA[ something
                CDATA_ENDING: cA++,
                // ]
                CDATA_ENDING_2: cA++,
                // ]]
                PROC_INST: cA++,
                // <?hi
                PROC_INST_BODY: cA++,
                // <?hi there
                PROC_INST_ENDING: cA++,
                // <?hi "there" ?
                OPEN_TAG: cA++,
                // <strong
                OPEN_TAG_SLASH: cA++,
                // <strong /
                ATTRIB: cA++,
                // <a
                ATTRIB_NAME: cA++,
                // <a foo
                ATTRIB_NAME_SAW_WHITE: cA++,
                // <a foo _
                ATTRIB_VALUE: cA++,
                // <a foo=
                ATTRIB_VALUE_QUOTED: cA++,
                // <a foo="bar
                ATTRIB_VALUE_CLOSED: cA++,
                // <a foo="bar"
                ATTRIB_VALUE_UNQUOTED: cA++,
                // <a foo=bar
                ATTRIB_VALUE_ENTITY_Q: cA++,
                // <foo bar="&quot;"
                ATTRIB_VALUE_ENTITY_U: cA++,
                // <foo bar=&quot
                CLOSE_TAG: cA++,
                // </a
                CLOSE_TAG_SAW_WHITE: cA++,
                // </a   >
                SCRIPT: cA++,
                // <script> ...
                SCRIPT_ENDING: cA++
                // <script> ... <
              }, a.XML_ENTITIES = {
                amp: "&",
                gt: ">",
                lt: "<",
                quot: '"',
                apos: "'"
              }, a.ENTITIES = {
                amp: "&",
                gt: ">",
                lt: "<",
                quot: '"',
                apos: "'",
                AElig: 198,
                Aacute: 193,
                Acirc: 194,
                Agrave: 192,
                Aring: 197,
                Atilde: 195,
                Auml: 196,
                Ccedil: 199,
                ETH: 208,
                Eacute: 201,
                Ecirc: 202,
                Egrave: 200,
                Euml: 203,
                Iacute: 205,
                Icirc: 206,
                Igrave: 204,
                Iuml: 207,
                Ntilde: 209,
                Oacute: 211,
                Ocirc: 212,
                Ograve: 210,
                Oslash: 216,
                Otilde: 213,
                Ouml: 214,
                THORN: 222,
                Uacute: 218,
                Ucirc: 219,
                Ugrave: 217,
                Uuml: 220,
                Yacute: 221,
                aacute: 225,
                acirc: 226,
                aelig: 230,
                agrave: 224,
                aring: 229,
                atilde: 227,
                auml: 228,
                ccedil: 231,
                eacute: 233,
                ecirc: 234,
                egrave: 232,
                eth: 240,
                euml: 235,
                iacute: 237,
                icirc: 238,
                igrave: 236,
                iuml: 239,
                ntilde: 241,
                oacute: 243,
                ocirc: 244,
                ograve: 242,
                oslash: 248,
                otilde: 245,
                ouml: 246,
                szlig: 223,
                thorn: 254,
                uacute: 250,
                ucirc: 251,
                ugrave: 249,
                uuml: 252,
                yacute: 253,
                yuml: 255,
                copy: 169,
                reg: 174,
                nbsp: 160,
                iexcl: 161,
                cent: 162,
                pound: 163,
                curren: 164,
                yen: 165,
                brvbar: 166,
                sect: 167,
                uml: 168,
                ordf: 170,
                laquo: 171,
                not: 172,
                shy: 173,
                macr: 175,
                deg: 176,
                plusmn: 177,
                sup1: 185,
                sup2: 178,
                sup3: 179,
                acute: 180,
                micro: 181,
                para: 182,
                middot: 183,
                cedil: 184,
                ordm: 186,
                raquo: 187,
                frac14: 188,
                frac12: 189,
                frac34: 190,
                iquest: 191,
                times: 215,
                divide: 247,
                OElig: 338,
                oelig: 339,
                Scaron: 352,
                scaron: 353,
                Yuml: 376,
                fnof: 402,
                circ: 710,
                tilde: 732,
                Alpha: 913,
                Beta: 914,
                Gamma: 915,
                Delta: 916,
                Epsilon: 917,
                Zeta: 918,
                Eta: 919,
                Theta: 920,
                Iota: 921,
                Kappa: 922,
                Lambda: 923,
                Mu: 924,
                Nu: 925,
                Xi: 926,
                Omicron: 927,
                Pi: 928,
                Rho: 929,
                Sigma: 931,
                Tau: 932,
                Upsilon: 933,
                Phi: 934,
                Chi: 935,
                Psi: 936,
                Omega: 937,
                alpha: 945,
                beta: 946,
                gamma: 947,
                delta: 948,
                epsilon: 949,
                zeta: 950,
                eta: 951,
                theta: 952,
                iota: 953,
                kappa: 954,
                lambda: 955,
                mu: 956,
                nu: 957,
                xi: 958,
                omicron: 959,
                pi: 960,
                rho: 961,
                sigmaf: 962,
                sigma: 963,
                tau: 964,
                upsilon: 965,
                phi: 966,
                chi: 967,
                psi: 968,
                omega: 969,
                thetasym: 977,
                upsih: 978,
                piv: 982,
                ensp: 8194,
                emsp: 8195,
                thinsp: 8201,
                zwnj: 8204,
                zwj: 8205,
                lrm: 8206,
                rlm: 8207,
                ndash: 8211,
                mdash: 8212,
                lsquo: 8216,
                rsquo: 8217,
                sbquo: 8218,
                ldquo: 8220,
                rdquo: 8221,
                bdquo: 8222,
                dagger: 8224,
                Dagger: 8225,
                bull: 8226,
                hellip: 8230,
                permil: 8240,
                prime: 8242,
                Prime: 8243,
                lsaquo: 8249,
                rsaquo: 8250,
                oline: 8254,
                frasl: 8260,
                euro: 8364,
                image: 8465,
                weierp: 8472,
                real: 8476,
                trade: 8482,
                alefsym: 8501,
                larr: 8592,
                uarr: 8593,
                rarr: 8594,
                darr: 8595,
                harr: 8596,
                crarr: 8629,
                lArr: 8656,
                uArr: 8657,
                rArr: 8658,
                dArr: 8659,
                hArr: 8660,
                forall: 8704,
                part: 8706,
                exist: 8707,
                empty: 8709,
                nabla: 8711,
                isin: 8712,
                notin: 8713,
                ni: 8715,
                prod: 8719,
                sum: 8721,
                minus: 8722,
                lowast: 8727,
                radic: 8730,
                prop: 8733,
                infin: 8734,
                ang: 8736,
                and: 8743,
                or: 8744,
                cap: 8745,
                cup: 8746,
                int: 8747,
                there4: 8756,
                sim: 8764,
                cong: 8773,
                asymp: 8776,
                ne: 8800,
                equiv: 8801,
                le: 8804,
                ge: 8805,
                sub: 8834,
                sup: 8835,
                nsub: 8836,
                sube: 8838,
                supe: 8839,
                oplus: 8853,
                otimes: 8855,
                perp: 8869,
                sdot: 8901,
                lceil: 8968,
                rceil: 8969,
                lfloor: 8970,
                rfloor: 8971,
                lang: 9001,
                rang: 9002,
                loz: 9674,
                spades: 9824,
                clubs: 9827,
                hearts: 9829,
                diams: 9830
              }, Object.keys(a.ENTITIES).forEach(function(y) {
                var M = a.ENTITIES[y], FA = typeof M == "number" ? String.fromCharCode(M) : M;
                a.ENTITIES[y] = FA;
              });
              for (var Ae in a.STATE)
                a.STATE[a.STATE[Ae]] = Ae;
              cA = a.STATE;
              function kA(y, M, FA) {
                y[M] && y[M](FA);
              }
              function VA(y) {
                var M = y && y.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
                return M ? M[2] : null;
              }
              function EA(y) {
                return y ? y.toLowerCase().replace(/[^a-z0-9]/g, "") : null;
              }
              function zA(y, M) {
                const FA = EA(y), dA = EA(M);
                return !FA || !dA ? !0 : dA === "utf16" ? FA === "utf16le" || FA === "utf16be" : FA === dA;
              }
              function OA(y, M) {
                if (!(!y.strict || !y.encoding || !M || M.name !== "xml")) {
                  var FA = VA(M.body);
                  FA && !zA(y.encoding, FA) && sA(
                    y,
                    "XML declaration encoding " + FA + " does not match detected stream encoding " + y.encoding.toUpperCase()
                  );
                }
              }
              function xA(y, M, FA) {
                y.textNode && LA(y), kA(y, M, FA);
              }
              function LA(y) {
                y.textNode = yA(y.opt, y.textNode), y.textNode && kA(y, "ontext", y.textNode), y.textNode = "";
              }
              function yA(y, M) {
                return y.trim && (M = M.trim()), y.normalize && (M = M.replace(/\s+/g, " ")), M;
              }
              function TA(y, M) {
                return LA(y), y.trackPosition && (M += `
Line: ` + y.line + `
Column: ` + y.column + `
Char: ` + y.c), M = new Error(M), y.error = M, kA(y, "onerror", M), y;
              }
              function fA(y) {
                return y.sawRoot && !y.closedRoot && sA(y, "Unclosed root tag"), y.state !== cA.BEGIN && y.state !== cA.BEGIN_WHITESPACE && y.state !== cA.TEXT && TA(y, "Unexpected end"), LA(y), y.c = "", y.closed = !0, kA(y, "onend"), x.call(y, y.strict, y.opt), y;
              }
              function sA(y, M) {
                if (typeof y != "object" || !(y instanceof x))
                  throw new Error("bad call to strictFail");
                y.strict && TA(y, M);
              }
              function F(y) {
                y.strict || (y.tagName = y.tagName[y.looseCase]());
                var M = y.tags[y.tags.length - 1] || y, FA = y.tag = { name: y.tagName, attributes: {} };
                y.opt.xmlns && (FA.ns = M.ns), y.attribList.length = 0, xA(y, "onopentagstart", FA);
              }
              function o(y, M) {
                var FA = y.indexOf(":"), dA = FA < 0 ? ["", y] : y.split(":"), he = dA[0], ie = dA[1];
                return M && y === "xmlns" && (he = "xmlns", ie = ""), { prefix: he, local: ie };
              }
              function h(y) {
                if (y.strict || (y.attribName = y.attribName[y.looseCase]()), y.attribList.indexOf(y.attribName) !== -1 || y.tag.attributes.hasOwnProperty(y.attribName)) {
                  y.attribName = y.attribValue = "";
                  return;
                }
                if (y.opt.xmlns) {
                  var M = o(y.attribName, !0), FA = M.prefix, dA = M.local;
                  if (FA === "xmlns")
                    if (dA === "xml" && y.attribValue !== eA)
                      sA(
                        y,
                        "xml: prefix must be bound to " + eA + `
Actual: ` + y.attribValue
                      );
                    else if (dA === "xmlns" && y.attribValue !== CA)
                      sA(
                        y,
                        "xmlns: prefix must be bound to " + CA + `
Actual: ` + y.attribValue
                      );
                    else {
                      var he = y.tag, ie = y.tags[y.tags.length - 1] || y;
                      he.ns === ie.ns && (he.ns = Object.create(ie.ns)), he.ns[dA] = y.attribValue;
                    }
                  y.attribList.push([y.attribName, y.attribValue]);
                } else
                  y.tag.attributes[y.attribName] = y.attribValue, xA(y, "onattribute", {
                    name: y.attribName,
                    value: y.attribValue
                  });
                y.attribName = y.attribValue = "";
              }
              function _(y, M) {
                if (y.opt.xmlns) {
                  var FA = y.tag, dA = o(y.tagName);
                  FA.prefix = dA.prefix, FA.local = dA.local, FA.uri = FA.ns[dA.prefix] || "", FA.prefix && !FA.uri && (sA(
                    y,
                    "Unbound namespace prefix: " + JSON.stringify(y.tagName)
                  ), FA.uri = dA.prefix);
                  var he = y.tags[y.tags.length - 1] || y;
                  FA.ns && he.ns !== FA.ns && Object.keys(FA.ns).forEach(function(R) {
                    xA(y, "onopennamespace", {
                      prefix: R,
                      uri: FA.ns[R]
                    });
                  });
                  for (var ie = 0, KA = y.attribList.length; ie < KA; ie++) {
                    var Pe = y.attribList[ie], Je = Pe[0], Le = Pe[1], Re = o(Je, !0), _e = Re.prefix, se = Re.local, Ee = _e === "" ? "" : FA.ns[_e] || "", wA = {
                      name: Je,
                      value: Le,
                      prefix: _e,
                      local: se,
                      uri: Ee
                    };
                    _e && _e !== "xmlns" && !Ee && (sA(
                      y,
                      "Unbound namespace prefix: " + JSON.stringify(_e)
                    ), wA.uri = _e), y.tag.attributes[Je] = wA, xA(y, "onattribute", wA);
                  }
                  y.attribList.length = 0;
                }
                y.tag.isSelfClosing = !!M, y.sawRoot = !0, y.tags.push(y.tag), xA(y, "onopentag", y.tag), M || (!y.noscript && y.tagName.toLowerCase() === "script" ? y.state = cA.SCRIPT : y.state = cA.TEXT, y.tag = null, y.tagName = ""), y.attribName = y.attribValue = "", y.attribList.length = 0;
              }
              function oA(y) {
                if (!y.tagName) {
                  sA(y, "Weird empty close tag."), y.textNode += "</>", y.state = cA.TEXT;
                  return;
                }
                if (y.script) {
                  if (y.tagName !== "script") {
                    y.script += "</" + y.tagName + ">", y.tagName = "", y.state = cA.SCRIPT;
                    return;
                  }
                  xA(y, "onscript", y.script), y.script = "";
                }
                var M = y.tags.length, FA = y.tagName;
                y.strict || (FA = FA[y.looseCase]());
                for (var dA = FA; M--; ) {
                  var he = y.tags[M];
                  if (he.name !== dA)
                    sA(y, "Unexpected close tag");
                  else
                    break;
                }
                if (M < 0) {
                  sA(y, "Unmatched closing tag: " + y.tagName), y.textNode += "</" + y.tagName + ">", y.state = cA.TEXT;
                  return;
                }
                y.tagName = FA;
                for (var ie = y.tags.length; ie-- > M; ) {
                  var KA = y.tag = y.tags.pop();
                  y.tagName = y.tag.name, xA(y, "onclosetag", y.tagName);
                  var Pe = {};
                  for (var Je in KA.ns)
                    Pe[Je] = KA.ns[Je];
                  var Le = y.tags[y.tags.length - 1] || y;
                  y.opt.xmlns && KA.ns !== Le.ns && Object.keys(KA.ns).forEach(function(Re) {
                    var _e = KA.ns[Re];
                    xA(y, "onclosenamespace", { prefix: Re, uri: _e });
                  });
                }
                M === 0 && (y.closedRoot = !0), y.tagName = y.attribValue = y.attribName = "", y.attribList.length = 0, y.state = cA.TEXT;
              }
              function p(y) {
                var M = y.entity, FA = M.toLowerCase(), dA, he = "";
                return y.ENTITIES[M] ? y.ENTITIES[M] : y.ENTITIES[FA] ? y.ENTITIES[FA] : (M = FA, M.charAt(0) === "#" && (M.charAt(1) === "x" ? (M = M.slice(2), dA = parseInt(M, 16), he = dA.toString(16)) : (M = M.slice(1), dA = parseInt(M, 10), he = dA.toString(10))), M = M.replace(/^0+/, ""), isNaN(dA) || he.toLowerCase() !== M || dA < 0 || dA > 1114111 ? (sA(y, "Invalid character entity"), "&" + y.entity + ";") : String.fromCodePoint(dA));
              }
              function rA(y, M) {
                M === "<" ? (y.state = cA.OPEN_WAKA, y.startTagPosition = y.position) : w(M) || (sA(y, "Non-whitespace before first tag."), y.textNode = M, y.state = cA.TEXT);
              }
              function QA(y, M) {
                var FA = "";
                return M < y.length && (FA = y.charAt(M)), FA;
              }
              function bA(y) {
                var M = this;
                if (this.error)
                  throw this.error;
                if (M.closed)
                  return TA(
                    M,
                    "Cannot write after close. Assign an onready handler."
                  );
                if (y === null)
                  return fA(M);
                typeof y == "object" && (y = y.toString());
                for (var FA = 0, dA = ""; dA = QA(y, FA++), M.c = dA, !!dA; )
                  switch (M.trackPosition && (M.position++, dA === `
` ? (M.line++, M.column = 0) : M.column++), M.state) {
                    case cA.BEGIN:
                      if (M.state = cA.BEGIN_WHITESPACE, dA === "\uFEFF")
                        continue;
                      rA(M, dA);
                      continue;
                    case cA.BEGIN_WHITESPACE:
                      rA(M, dA);
                      continue;
                    case cA.TEXT:
                      if (M.sawRoot && !M.closedRoot) {
                        for (var ie = FA - 1; dA && dA !== "<" && dA !== "&"; )
                          dA = QA(y, FA++), dA && M.trackPosition && (M.position++, dA === `
` ? (M.line++, M.column = 0) : M.column++);
                        M.textNode += y.substring(ie, FA - 1);
                      }
                      dA === "<" && !(M.sawRoot && M.closedRoot && !M.strict) ? (M.state = cA.OPEN_WAKA, M.startTagPosition = M.position) : (!w(dA) && (!M.sawRoot || M.closedRoot) && sA(M, "Text data outside of root node."), dA === "&" ? M.state = cA.TEXT_ENTITY : M.textNode += dA);
                      continue;
                    case cA.SCRIPT:
                      dA === "<" ? M.state = cA.SCRIPT_ENDING : M.script += dA;
                      continue;
                    case cA.SCRIPT_ENDING:
                      dA === "/" ? M.state = cA.CLOSE_TAG : (M.script += "<" + dA, M.state = cA.SCRIPT);
                      continue;
                    case cA.OPEN_WAKA:
                      if (dA === "!")
                        M.state = cA.SGML_DECL, M.sgmlDecl = "";
                      else if (!w(dA)) if (DA(k, dA))
                        M.state = cA.OPEN_TAG, M.tagName = dA;
                      else if (dA === "/")
                        M.state = cA.CLOSE_TAG, M.tagName = "";
                      else if (dA === "?")
                        M.state = cA.PROC_INST, M.procInstName = M.procInstBody = "";
                      else {
                        if (sA(M, "Unencoded <"), M.startTagPosition + 1 < M.position) {
                          var he = M.position - M.startTagPosition;
                          dA = new Array(he).join(" ") + dA;
                        }
                        M.textNode += "<" + dA, M.state = cA.TEXT;
                      }
                      continue;
                    case cA.SGML_DECL:
                      if (M.sgmlDecl + dA === "--") {
                        M.state = cA.COMMENT, M.comment = "", M.sgmlDecl = "";
                        continue;
                      }
                      M.doctype && M.doctype !== !0 && M.sgmlDecl ? (M.state = cA.DOCTYPE_DTD, M.doctype += "<!" + M.sgmlDecl + dA, M.sgmlDecl = "") : (M.sgmlDecl + dA).toUpperCase() === T ? (xA(M, "onopencdata"), M.state = cA.CDATA, M.sgmlDecl = "", M.cdata = "") : (M.sgmlDecl + dA).toUpperCase() === H ? (M.state = cA.DOCTYPE, (M.doctype || M.sawRoot) && sA(
                        M,
                        "Inappropriately located doctype declaration"
                      ), M.doctype = "", M.sgmlDecl = "") : dA === ">" ? (xA(M, "onsgmldeclaration", M.sgmlDecl), M.sgmlDecl = "", M.state = cA.TEXT) : (v(dA) && (M.state = cA.SGML_DECL_QUOTED), M.sgmlDecl += dA);
                      continue;
                    case cA.SGML_DECL_QUOTED:
                      dA === M.q && (M.state = cA.SGML_DECL, M.q = ""), M.sgmlDecl += dA;
                      continue;
                    case cA.DOCTYPE:
                      dA === ">" ? (M.state = cA.TEXT, xA(M, "ondoctype", M.doctype), M.doctype = !0) : (M.doctype += dA, dA === "[" ? M.state = cA.DOCTYPE_DTD : v(dA) && (M.state = cA.DOCTYPE_QUOTED, M.q = dA));
                      continue;
                    case cA.DOCTYPE_QUOTED:
                      M.doctype += dA, dA === M.q && (M.q = "", M.state = cA.DOCTYPE);
                      continue;
                    case cA.DOCTYPE_DTD:
                      dA === "]" ? (M.doctype += dA, M.state = cA.DOCTYPE) : dA === "<" ? (M.state = cA.OPEN_WAKA, M.startTagPosition = M.position) : v(dA) ? (M.doctype += dA, M.state = cA.DOCTYPE_DTD_QUOTED, M.q = dA) : M.doctype += dA;
                      continue;
                    case cA.DOCTYPE_DTD_QUOTED:
                      M.doctype += dA, dA === M.q && (M.state = cA.DOCTYPE_DTD, M.q = "");
                      continue;
                    case cA.COMMENT:
                      dA === "-" ? M.state = cA.COMMENT_ENDING : M.comment += dA;
                      continue;
                    case cA.COMMENT_ENDING:
                      dA === "-" ? (M.state = cA.COMMENT_ENDED, M.comment = yA(M.opt, M.comment), M.comment && xA(M, "oncomment", M.comment), M.comment = "") : (M.comment += "-" + dA, M.state = cA.COMMENT);
                      continue;
                    case cA.COMMENT_ENDED:
                      dA !== ">" ? (sA(M, "Malformed comment"), M.comment += "--" + dA, M.state = cA.COMMENT) : M.doctype && M.doctype !== !0 ? M.state = cA.DOCTYPE_DTD : M.state = cA.TEXT;
                      continue;
                    case cA.CDATA:
                      for (var ie = FA - 1; dA && dA !== "]"; )
                        dA = QA(y, FA++), dA && M.trackPosition && (M.position++, dA === `
` ? (M.line++, M.column = 0) : M.column++);
                      M.cdata += y.substring(ie, FA - 1), dA === "]" && (M.state = cA.CDATA_ENDING);
                      continue;
                    case cA.CDATA_ENDING:
                      dA === "]" ? M.state = cA.CDATA_ENDING_2 : (M.cdata += "]" + dA, M.state = cA.CDATA);
                      continue;
                    case cA.CDATA_ENDING_2:
                      dA === ">" ? (M.cdata && xA(M, "oncdata", M.cdata), xA(M, "onclosecdata"), M.cdata = "", M.state = cA.TEXT) : dA === "]" ? M.cdata += "]" : (M.cdata += "]]" + dA, M.state = cA.CDATA);
                      continue;
                    case cA.PROC_INST:
                      dA === "?" ? M.state = cA.PROC_INST_ENDING : w(dA) ? M.state = cA.PROC_INST_BODY : M.procInstName += dA;
                      continue;
                    case cA.PROC_INST_BODY:
                      if (!M.procInstBody && w(dA))
                        continue;
                      dA === "?" ? M.state = cA.PROC_INST_ENDING : M.procInstBody += dA;
                      continue;
                    case cA.PROC_INST_ENDING:
                      if (dA === ">") {
                        const Le = {
                          name: M.procInstName,
                          body: M.procInstBody
                        };
                        OA(M, Le), xA(M, "onprocessinginstruction", Le), M.procInstName = M.procInstBody = "", M.state = cA.TEXT;
                      } else
                        M.procInstBody += "?" + dA, M.state = cA.PROC_INST_BODY;
                      continue;
                    case cA.OPEN_TAG:
                      DA(tA, dA) ? M.tagName += dA : (F(M), dA === ">" ? _(M) : dA === "/" ? M.state = cA.OPEN_TAG_SLASH : (w(dA) || sA(M, "Invalid character in tag name"), M.state = cA.ATTRIB));
                      continue;
                    case cA.OPEN_TAG_SLASH:
                      dA === ">" ? (_(M, !0), oA(M)) : (sA(
                        M,
                        "Forward-slash in opening tag not followed by >"
                      ), M.state = cA.ATTRIB);
                      continue;
                    case cA.ATTRIB:
                      if (w(dA))
                        continue;
                      dA === ">" ? _(M) : dA === "/" ? M.state = cA.OPEN_TAG_SLASH : DA(k, dA) ? (M.attribName = dA, M.attribValue = "", M.state = cA.ATTRIB_NAME) : sA(M, "Invalid attribute name");
                      continue;
                    case cA.ATTRIB_NAME:
                      dA === "=" ? M.state = cA.ATTRIB_VALUE : dA === ">" ? (sA(M, "Attribute without value"), M.attribValue = M.attribName, h(M), _(M)) : w(dA) ? M.state = cA.ATTRIB_NAME_SAW_WHITE : DA(tA, dA) ? M.attribName += dA : sA(M, "Invalid attribute name");
                      continue;
                    case cA.ATTRIB_NAME_SAW_WHITE:
                      if (dA === "=")
                        M.state = cA.ATTRIB_VALUE;
                      else {
                        if (w(dA))
                          continue;
                        sA(M, "Attribute without value"), M.tag.attributes[M.attribName] = "", M.attribValue = "", xA(M, "onattribute", {
                          name: M.attribName,
                          value: ""
                        }), M.attribName = "", dA === ">" ? _(M) : DA(k, dA) ? (M.attribName = dA, M.state = cA.ATTRIB_NAME) : (sA(M, "Invalid attribute name"), M.state = cA.ATTRIB);
                      }
                      continue;
                    case cA.ATTRIB_VALUE:
                      if (w(dA))
                        continue;
                      v(dA) ? (M.q = dA, M.state = cA.ATTRIB_VALUE_QUOTED) : (M.opt.unquotedAttributeValues || TA(M, "Unquoted attribute value"), M.state = cA.ATTRIB_VALUE_UNQUOTED, M.attribValue = dA);
                      continue;
                    case cA.ATTRIB_VALUE_QUOTED:
                      if (dA !== M.q) {
                        dA === "&" ? M.state = cA.ATTRIB_VALUE_ENTITY_Q : M.attribValue += dA;
                        continue;
                      }
                      h(M), M.q = "", M.state = cA.ATTRIB_VALUE_CLOSED;
                      continue;
                    case cA.ATTRIB_VALUE_CLOSED:
                      w(dA) ? M.state = cA.ATTRIB : dA === ">" ? _(M) : dA === "/" ? M.state = cA.OPEN_TAG_SLASH : DA(k, dA) ? (sA(M, "No whitespace between attributes"), M.attribName = dA, M.attribValue = "", M.state = cA.ATTRIB_NAME) : sA(M, "Invalid attribute name");
                      continue;
                    case cA.ATTRIB_VALUE_UNQUOTED:
                      if (!RA(dA)) {
                        dA === "&" ? M.state = cA.ATTRIB_VALUE_ENTITY_U : M.attribValue += dA;
                        continue;
                      }
                      h(M), dA === ">" ? _(M) : M.state = cA.ATTRIB;
                      continue;
                    case cA.CLOSE_TAG:
                      if (M.tagName)
                        dA === ">" ? oA(M) : DA(tA, dA) ? M.tagName += dA : M.script ? (M.script += "</" + M.tagName + dA, M.tagName = "", M.state = cA.SCRIPT) : (w(dA) || sA(M, "Invalid tagname in closing tag"), M.state = cA.CLOSE_TAG_SAW_WHITE);
                      else {
                        if (w(dA))
                          continue;
                        $(k, dA) ? M.script ? (M.script += "</" + dA, M.state = cA.SCRIPT) : sA(M, "Invalid tagname in closing tag.") : M.tagName = dA;
                      }
                      continue;
                    case cA.CLOSE_TAG_SAW_WHITE:
                      if (w(dA))
                        continue;
                      dA === ">" ? oA(M) : sA(M, "Invalid characters in closing tag");
                      continue;
                    case cA.TEXT_ENTITY:
                    case cA.ATTRIB_VALUE_ENTITY_Q:
                    case cA.ATTRIB_VALUE_ENTITY_U:
                      var KA, Pe;
                      switch (M.state) {
                        case cA.TEXT_ENTITY:
                          KA = cA.TEXT, Pe = "textNode";
                          break;
                        case cA.ATTRIB_VALUE_ENTITY_Q:
                          KA = cA.ATTRIB_VALUE_QUOTED, Pe = "attribValue";
                          break;
                        case cA.ATTRIB_VALUE_ENTITY_U:
                          KA = cA.ATTRIB_VALUE_UNQUOTED, Pe = "attribValue";
                          break;
                      }
                      if (dA === ";") {
                        var Je = p(M);
                        M.opt.unparsedEntities && !Object.values(a.XML_ENTITIES).includes(Je) ? ((M.entityCount += 1) > M.opt.maxEntityCount && TA(
                          M,
                          "Parsed entity count exceeds max entity count"
                        ), (M.entityDepth += 1) > M.opt.maxEntityDepth && TA(
                          M,
                          "Parsed entity depth exceeds max entity depth"
                        ), M.entity = "", M.state = KA, M.write(Je), M.entityDepth -= 1) : (M[Pe] += Je, M.entity = "", M.state = KA);
                      } else DA(M.entity.length ? uA : lA, dA) ? M.entity += dA : (sA(M, "Invalid character in entity name"), M[Pe] += "&" + M.entity + dA, M.entity = "", M.state = KA);
                      continue;
                    default:
                      throw new Error(M, "Unknown state: " + M.state);
                  }
                return M.position >= M.bufferCheckPosition && N(M), M;
              }
              /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
              String.fromCodePoint || (function() {
                var y = String.fromCharCode, M = Math.floor, FA = function() {
                  var dA = 16384, he = [], ie, KA, Pe = -1, Je = arguments.length;
                  if (!Je)
                    return "";
                  for (var Le = ""; ++Pe < Je; ) {
                    var Re = Number(arguments[Pe]);
                    if (!isFinite(Re) || // `NaN`, `+Infinity`, or `-Infinity`
                    Re < 0 || // not a valid Unicode code point
                    Re > 1114111 || // not a valid Unicode code point
                    M(Re) !== Re)
                      throw RangeError("Invalid code point: " + Re);
                    Re <= 65535 ? he.push(Re) : (Re -= 65536, ie = (Re >> 10) + 55296, KA = Re % 1024 + 56320, he.push(ie, KA)), (Pe + 1 === Je || he.length > dA) && (Le += y.apply(null, he), he.length = 0);
                  }
                  return Le;
                };
                Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
                  value: FA,
                  configurable: !0,
                  writable: !0
                }) : String.fromCodePoint = FA;
              })();
            })(B);
          },
          /***/
          6255(Q, B, r) {
            var A = r(8651), a = r(9295), D = r(8890)(), x = r(8109), N = r(6785), P = A("%Math.floor%");
            Q.exports = function(J, q) {
              if (typeof J != "function")
                throw new N("`fn` is not a function");
              if (typeof q != "number" || q < 0 || q > 4294967295 || P(q) !== q)
                throw new N("`length` must be a positive 32-bit integer");
              var AA = arguments.length > 2 && !!arguments[2], K = !0, z = !0;
              if ("length" in J && x) {
                var T = x(J, "length");
                T && !T.configurable && (K = !1), T && !T.writable && (z = !1);
              }
              return (K || z || !AA) && (D ? a(
                /** @type {Parameters<define>[0]} */
                J,
                "length",
                q,
                !0,
                !0
              ) : a(
                /** @type {Parameters<define>[0]} */
                J,
                "length",
                q
              )), J;
            };
          },
          /***/
          9760(Q, B, r) {
            Q.exports = D;
            var A = r(4785).EventEmitter, a = r(9784);
            a(D, A), D.Readable = r(8261), D.Writable = r(9781), D.Duplex = r(4903), D.Transform = r(8569), D.PassThrough = r(7723), D.finished = r(2167), D.pipeline = r(3765), D.Stream = D;
            function D() {
              A.call(this);
            }
            D.prototype.pipe = function(x, N) {
              var P = this;
              function d(H) {
                x.writable && x.write(H) === !1 && P.pause && P.pause();
              }
              P.on("data", d);
              function J() {
                P.readable && P.resume && P.resume();
              }
              x.on("drain", J), !x._isStdio && (!N || N.end !== !1) && (P.on("end", AA), P.on("close", K));
              var q = !1;
              function AA() {
                q || (q = !0, x.end());
              }
              function K() {
                q || (q = !0, typeof x.destroy == "function" && x.destroy());
              }
              function z(H) {
                if (T(), A.listenerCount(this, "error") === 0)
                  throw H;
              }
              P.on("error", z), x.on("error", z);
              function T() {
                P.removeListener("data", d), x.removeListener("drain", J), P.removeListener("end", AA), P.removeListener("close", K), P.removeListener("error", z), x.removeListener("error", z), P.removeListener("end", T), P.removeListener("close", T), x.removeListener("close", T);
              }
              return P.on("end", T), P.on("close", T), x.on("close", T), x.emit("pipe", P), x;
            };
          },
          /***/
          3797(Q) {
            function B(P, d) {
              P.prototype = Object.create(d.prototype), P.prototype.constructor = P, P.__proto__ = d;
            }
            var r = {};
            function A(P, d, J) {
              J || (J = Error);
              function q(K, z, T) {
                return typeof d == "string" ? d : d(K, z, T);
              }
              var AA = /* @__PURE__ */ (function(K) {
                B(z, K);
                function z(T, H, eA) {
                  return K.call(this, q(T, H, eA)) || this;
                }
                return z;
              })(J);
              AA.prototype.name = J.name, AA.prototype.code = P, r[P] = AA;
            }
            function a(P, d) {
              if (Array.isArray(P)) {
                var J = P.length;
                return P = P.map(function(q) {
                  return String(q);
                }), J > 2 ? "one of ".concat(d, " ").concat(P.slice(0, J - 1).join(", "), ", or ") + P[J - 1] : J === 2 ? "one of ".concat(d, " ").concat(P[0], " or ").concat(P[1]) : "of ".concat(d, " ").concat(P[0]);
              } else
                return "of ".concat(d, " ").concat(String(P));
            }
            function D(P, d, J) {
              return P.substr(0, d.length) === d;
            }
            function x(P, d, J) {
              return (J === void 0 || J > P.length) && (J = P.length), P.substring(J - d.length, J) === d;
            }
            function N(P, d, J) {
              return typeof J != "number" && (J = 0), J + d.length > P.length ? !1 : P.indexOf(d, J) !== -1;
            }
            A("ERR_INVALID_OPT_VALUE", function(P, d) {
              return 'The value "' + d + '" is invalid for option "' + P + '"';
            }, TypeError), A("ERR_INVALID_ARG_TYPE", function(P, d, J) {
              var q;
              typeof d == "string" && D(d, "not ") ? (q = "must not be", d = d.replace(/^not /, "")) : q = "must be";
              var AA;
              if (x(P, " argument"))
                AA = "The ".concat(P, " ").concat(q, " ").concat(a(d, "type"));
              else {
                var K = N(P, ".") ? "property" : "argument";
                AA = 'The "'.concat(P, '" ').concat(K, " ").concat(q, " ").concat(a(d, "type"));
              }
              return AA += ". Received type ".concat(typeof J), AA;
            }, TypeError), A("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), A("ERR_METHOD_NOT_IMPLEMENTED", function(P) {
              return "The " + P + " method is not implemented";
            }), A("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), A("ERR_STREAM_DESTROYED", function(P) {
              return "Cannot call " + P + " after a stream was destroyed";
            }), A("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), A("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), A("ERR_STREAM_WRITE_AFTER_END", "write after end"), A("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), A("ERR_UNKNOWN_ENCODING", function(P) {
              return "Unknown encoding: " + P;
            }, TypeError), A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), Q.exports.F = r;
          },
          /***/
          4903(Q, B, r) {
            var A = r(9964), a = Object.keys || function(K) {
              var z = [];
              for (var T in K) z.push(T);
              return z;
            };
            Q.exports = J;
            var D = r(8261), x = r(9781);
            r(9784)(J, D);
            for (var N = a(x.prototype), P = 0; P < N.length; P++) {
              var d = N[P];
              J.prototype[d] || (J.prototype[d] = x.prototype[d]);
            }
            function J(K) {
              if (!(this instanceof J)) return new J(K);
              D.call(this, K), x.call(this, K), this.allowHalfOpen = !0, K && (K.readable === !1 && (this.readable = !1), K.writable === !1 && (this.writable = !1), K.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", q)));
            }
            Object.defineProperty(J.prototype, "writableHighWaterMark", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState.highWaterMark;
              }
            }), Object.defineProperty(J.prototype, "writableBuffer", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState && this._writableState.getBuffer();
              }
            }), Object.defineProperty(J.prototype, "writableLength", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState.length;
              }
            });
            function q() {
              this._writableState.ended || A.nextTick(AA, this);
            }
            function AA(K) {
              K.end();
            }
            Object.defineProperty(J.prototype, "destroyed", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
              },
              set: function(z) {
                this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = z, this._writableState.destroyed = z);
              }
            });
          },
          /***/
          7723(Q, B, r) {
            Q.exports = a;
            var A = r(8569);
            r(9784)(a, A);
            function a(D) {
              if (!(this instanceof a)) return new a(D);
              A.call(this, D);
            }
            a.prototype._transform = function(D, x, N) {
              N(null, D);
            };
          },
          /***/
          8261(Q, B, r) {
            var A = r(9964);
            Q.exports = cA;
            var a;
            cA.ReadableState = $, r(4785).EventEmitter;
            var D = function(M, FA) {
              return M.listeners(FA).length;
            }, x = r(9018), N = r(783).Buffer, P = (typeof r.g < "u" ? r.g : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
            };
            function d(y) {
              return N.from(y);
            }
            function J(y) {
              return N.isBuffer(y) || y instanceof P;
            }
            var q = r(7199), AA;
            q && q.debuglog ? AA = q.debuglog("stream") : AA = function() {
            };
            var K = r(182), z = r(7385), T = r(8130), H = T.getHighWaterMark, eA = r(3797).F, CA = eA.ERR_INVALID_ARG_TYPE, IA = eA.ERR_STREAM_PUSH_AFTER_EOF, k = eA.ERR_METHOD_NOT_IMPLEMENTED, tA = eA.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, lA, uA, w;
            r(9784)(cA, x);
            var v = z.errorOrDestroy, RA = ["error", "close", "destroy", "pause", "resume"];
            function DA(y, M, FA) {
              if (typeof y.prependListener == "function") return y.prependListener(M, FA);
              !y._events || !y._events[M] ? y.on(M, FA) : Array.isArray(y._events[M]) ? y._events[M].unshift(FA) : y._events[M] = [FA, y._events[M]];
            }
            function $(y, M, FA) {
              a = a || r(4903), y = y || {}, typeof FA != "boolean" && (FA = M instanceof a), this.objectMode = !!y.objectMode, FA && (this.objectMode = this.objectMode || !!y.readableObjectMode), this.highWaterMark = H(this, y, "readableHighWaterMark", FA), this.buffer = new K(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = y.emitClose !== !1, this.autoDestroy = !!y.autoDestroy, this.destroyed = !1, this.defaultEncoding = y.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, y.encoding && (lA || (lA = r(3143).I), this.decoder = new lA(y.encoding), this.encoding = y.encoding);
            }
            function cA(y) {
              if (a = a || r(4903), !(this instanceof cA)) return new cA(y);
              var M = this instanceof a;
              this._readableState = new $(y, this, M), this.readable = !0, y && (typeof y.read == "function" && (this._read = y.read), typeof y.destroy == "function" && (this._destroy = y.destroy)), x.call(this);
            }
            Object.defineProperty(cA.prototype, "destroyed", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState === void 0 ? !1 : this._readableState.destroyed;
              },
              set: function(M) {
                this._readableState && (this._readableState.destroyed = M);
              }
            }), cA.prototype.destroy = z.destroy, cA.prototype._undestroy = z.undestroy, cA.prototype._destroy = function(y, M) {
              M(y);
            }, cA.prototype.push = function(y, M) {
              var FA = this._readableState, dA;
              return FA.objectMode ? dA = !0 : typeof y == "string" && (M = M || FA.defaultEncoding, M !== FA.encoding && (y = N.from(y, M), M = ""), dA = !0), Ae(this, y, M, !1, dA);
            }, cA.prototype.unshift = function(y) {
              return Ae(this, y, null, !0, !1);
            };
            function Ae(y, M, FA, dA, he) {
              AA("readableAddChunk", M);
              var ie = y._readableState;
              if (M === null)
                ie.reading = !1, xA(y, ie);
              else {
                var KA;
                if (he || (KA = VA(ie, M)), KA)
                  v(y, KA);
                else if (ie.objectMode || M && M.length > 0)
                  if (typeof M != "string" && !ie.objectMode && Object.getPrototypeOf(M) !== N.prototype && (M = d(M)), dA)
                    ie.endEmitted ? v(y, new tA()) : kA(y, ie, M, !0);
                  else if (ie.ended)
                    v(y, new IA());
                  else {
                    if (ie.destroyed)
                      return !1;
                    ie.reading = !1, ie.decoder && !FA ? (M = ie.decoder.write(M), ie.objectMode || M.length !== 0 ? kA(y, ie, M, !1) : TA(y, ie)) : kA(y, ie, M, !1);
                  }
                else dA || (ie.reading = !1, TA(y, ie));
              }
              return !ie.ended && (ie.length < ie.highWaterMark || ie.length === 0);
            }
            function kA(y, M, FA, dA) {
              M.flowing && M.length === 0 && !M.sync ? (M.awaitDrain = 0, y.emit("data", FA)) : (M.length += M.objectMode ? 1 : FA.length, dA ? M.buffer.unshift(FA) : M.buffer.push(FA), M.needReadable && LA(y)), TA(y, M);
            }
            function VA(y, M) {
              var FA;
              return !J(M) && typeof M != "string" && M !== void 0 && !y.objectMode && (FA = new CA("chunk", ["string", "Buffer", "Uint8Array"], M)), FA;
            }
            cA.prototype.isPaused = function() {
              return this._readableState.flowing === !1;
            }, cA.prototype.setEncoding = function(y) {
              lA || (lA = r(3143).I);
              var M = new lA(y);
              this._readableState.decoder = M, this._readableState.encoding = this._readableState.decoder.encoding;
              for (var FA = this._readableState.buffer.head, dA = ""; FA !== null; )
                dA += M.write(FA.data), FA = FA.next;
              return this._readableState.buffer.clear(), dA !== "" && this._readableState.buffer.push(dA), this._readableState.length = dA.length, this;
            };
            var EA = 1073741824;
            function zA(y) {
              return y >= EA ? y = EA : (y--, y |= y >>> 1, y |= y >>> 2, y |= y >>> 4, y |= y >>> 8, y |= y >>> 16, y++), y;
            }
            function OA(y, M) {
              return y <= 0 || M.length === 0 && M.ended ? 0 : M.objectMode ? 1 : y !== y ? M.flowing && M.length ? M.buffer.head.data.length : M.length : (y > M.highWaterMark && (M.highWaterMark = zA(y)), y <= M.length ? y : M.ended ? M.length : (M.needReadable = !0, 0));
            }
            cA.prototype.read = function(y) {
              AA("read", y), y = parseInt(y, 10);
              var M = this._readableState, FA = y;
              if (y !== 0 && (M.emittedReadable = !1), y === 0 && M.needReadable && ((M.highWaterMark !== 0 ? M.length >= M.highWaterMark : M.length > 0) || M.ended))
                return AA("read: emitReadable", M.length, M.ended), M.length === 0 && M.ended ? rA(this) : LA(this), null;
              if (y = OA(y, M), y === 0 && M.ended)
                return M.length === 0 && rA(this), null;
              var dA = M.needReadable;
              AA("need readable", dA), (M.length === 0 || M.length - y < M.highWaterMark) && (dA = !0, AA("length less than watermark", dA)), M.ended || M.reading ? (dA = !1, AA("reading or ended", dA)) : dA && (AA("do read"), M.reading = !0, M.sync = !0, M.length === 0 && (M.needReadable = !0), this._read(M.highWaterMark), M.sync = !1, M.reading || (y = OA(FA, M)));
              var he;
              return y > 0 ? he = p(y, M) : he = null, he === null ? (M.needReadable = M.length <= M.highWaterMark, y = 0) : (M.length -= y, M.awaitDrain = 0), M.length === 0 && (M.ended || (M.needReadable = !0), FA !== y && M.ended && rA(this)), he !== null && this.emit("data", he), he;
            };
            function xA(y, M) {
              if (AA("onEofChunk"), !M.ended) {
                if (M.decoder) {
                  var FA = M.decoder.end();
                  FA && FA.length && (M.buffer.push(FA), M.length += M.objectMode ? 1 : FA.length);
                }
                M.ended = !0, M.sync ? LA(y) : (M.needReadable = !1, M.emittedReadable || (M.emittedReadable = !0, yA(y)));
              }
            }
            function LA(y) {
              var M = y._readableState;
              AA("emitReadable", M.needReadable, M.emittedReadable), M.needReadable = !1, M.emittedReadable || (AA("emitReadable", M.flowing), M.emittedReadable = !0, A.nextTick(yA, y));
            }
            function yA(y) {
              var M = y._readableState;
              AA("emitReadable_", M.destroyed, M.length, M.ended), !M.destroyed && (M.length || M.ended) && (y.emit("readable"), M.emittedReadable = !1), M.needReadable = !M.flowing && !M.ended && M.length <= M.highWaterMark, oA(y);
            }
            function TA(y, M) {
              M.readingMore || (M.readingMore = !0, A.nextTick(fA, y, M));
            }
            function fA(y, M) {
              for (; !M.reading && !M.ended && (M.length < M.highWaterMark || M.flowing && M.length === 0); ) {
                var FA = M.length;
                if (AA("maybeReadMore read 0"), y.read(0), FA === M.length)
                  break;
              }
              M.readingMore = !1;
            }
            cA.prototype._read = function(y) {
              v(this, new k("_read()"));
            }, cA.prototype.pipe = function(y, M) {
              var FA = this, dA = this._readableState;
              switch (dA.pipesCount) {
                case 0:
                  dA.pipes = y;
                  break;
                case 1:
                  dA.pipes = [dA.pipes, y];
                  break;
                default:
                  dA.pipes.push(y);
                  break;
              }
              dA.pipesCount += 1, AA("pipe count=%d opts=%j", dA.pipesCount, M);
              var he = (!M || M.end !== !1) && y !== A.stdout && y !== A.stderr, ie = he ? Pe : R;
              dA.endEmitted ? A.nextTick(ie) : FA.once("end", ie), y.on("unpipe", KA);
              function KA(G, W) {
                AA("onunpipe"), G === FA && W && W.hasUnpiped === !1 && (W.hasUnpiped = !0, Re());
              }
              function Pe() {
                AA("onend"), y.end();
              }
              var Je = sA(FA);
              y.on("drain", Je);
              var Le = !1;
              function Re() {
                AA("cleanup"), y.removeListener("close", Ee), y.removeListener("finish", wA), y.removeListener("drain", Je), y.removeListener("error", se), y.removeListener("unpipe", KA), FA.removeListener("end", Pe), FA.removeListener("end", R), FA.removeListener("data", _e), Le = !0, dA.awaitDrain && (!y._writableState || y._writableState.needDrain) && Je();
              }
              FA.on("data", _e);
              function _e(G) {
                AA("ondata");
                var W = y.write(G);
                AA("dest.write", W), W === !1 && ((dA.pipesCount === 1 && dA.pipes === y || dA.pipesCount > 1 && bA(dA.pipes, y) !== -1) && !Le && (AA("false write response, pause", dA.awaitDrain), dA.awaitDrain++), FA.pause());
              }
              function se(G) {
                AA("onerror", G), R(), y.removeListener("error", se), D(y, "error") === 0 && v(y, G);
              }
              DA(y, "error", se);
              function Ee() {
                y.removeListener("finish", wA), R();
              }
              y.once("close", Ee);
              function wA() {
                AA("onfinish"), y.removeListener("close", Ee), R();
              }
              y.once("finish", wA);
              function R() {
                AA("unpipe"), FA.unpipe(y);
              }
              return y.emit("pipe", FA), dA.flowing || (AA("pipe resume"), FA.resume()), y;
            };
            function sA(y) {
              return function() {
                var FA = y._readableState;
                AA("pipeOnDrain", FA.awaitDrain), FA.awaitDrain && FA.awaitDrain--, FA.awaitDrain === 0 && D(y, "data") && (FA.flowing = !0, oA(y));
              };
            }
            cA.prototype.unpipe = function(y) {
              var M = this._readableState, FA = {
                hasUnpiped: !1
              };
              if (M.pipesCount === 0) return this;
              if (M.pipesCount === 1)
                return y && y !== M.pipes ? this : (y || (y = M.pipes), M.pipes = null, M.pipesCount = 0, M.flowing = !1, y && y.emit("unpipe", this, FA), this);
              if (!y) {
                var dA = M.pipes, he = M.pipesCount;
                M.pipes = null, M.pipesCount = 0, M.flowing = !1;
                for (var ie = 0; ie < he; ie++) dA[ie].emit("unpipe", this, {
                  hasUnpiped: !1
                });
                return this;
              }
              var KA = bA(M.pipes, y);
              return KA === -1 ? this : (M.pipes.splice(KA, 1), M.pipesCount -= 1, M.pipesCount === 1 && (M.pipes = M.pipes[0]), y.emit("unpipe", this, FA), this);
            }, cA.prototype.on = function(y, M) {
              var FA = x.prototype.on.call(this, y, M), dA = this._readableState;
              return y === "data" ? (dA.readableListening = this.listenerCount("readable") > 0, dA.flowing !== !1 && this.resume()) : y === "readable" && !dA.endEmitted && !dA.readableListening && (dA.readableListening = dA.needReadable = !0, dA.flowing = !1, dA.emittedReadable = !1, AA("on readable", dA.length, dA.reading), dA.length ? LA(this) : dA.reading || A.nextTick(o, this)), FA;
            }, cA.prototype.addListener = cA.prototype.on, cA.prototype.removeListener = function(y, M) {
              var FA = x.prototype.removeListener.call(this, y, M);
              return y === "readable" && A.nextTick(F, this), FA;
            }, cA.prototype.removeAllListeners = function(y) {
              var M = x.prototype.removeAllListeners.apply(this, arguments);
              return (y === "readable" || y === void 0) && A.nextTick(F, this), M;
            };
            function F(y) {
              var M = y._readableState;
              M.readableListening = y.listenerCount("readable") > 0, M.resumeScheduled && !M.paused ? M.flowing = !0 : y.listenerCount("data") > 0 && y.resume();
            }
            function o(y) {
              AA("readable nexttick read 0"), y.read(0);
            }
            cA.prototype.resume = function() {
              var y = this._readableState;
              return y.flowing || (AA("resume"), y.flowing = !y.readableListening, h(this, y)), y.paused = !1, this;
            };
            function h(y, M) {
              M.resumeScheduled || (M.resumeScheduled = !0, A.nextTick(_, y, M));
            }
            function _(y, M) {
              AA("resume", M.reading), M.reading || y.read(0), M.resumeScheduled = !1, y.emit("resume"), oA(y), M.flowing && !M.reading && y.read(0);
            }
            cA.prototype.pause = function() {
              return AA("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (AA("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
            };
            function oA(y) {
              var M = y._readableState;
              for (AA("flow", M.flowing); M.flowing && y.read() !== null; ) ;
            }
            cA.prototype.wrap = function(y) {
              var M = this, FA = this._readableState, dA = !1;
              y.on("end", function() {
                if (AA("wrapped end"), FA.decoder && !FA.ended) {
                  var KA = FA.decoder.end();
                  KA && KA.length && M.push(KA);
                }
                M.push(null);
              }), y.on("data", function(KA) {
                if (AA("wrapped data"), FA.decoder && (KA = FA.decoder.write(KA)), !(FA.objectMode && KA == null) && !(!FA.objectMode && (!KA || !KA.length))) {
                  var Pe = M.push(KA);
                  Pe || (dA = !0, y.pause());
                }
              });
              for (var he in y)
                this[he] === void 0 && typeof y[he] == "function" && (this[he] = /* @__PURE__ */ (function(Pe) {
                  return function() {
                    return y[Pe].apply(y, arguments);
                  };
                })(he));
              for (var ie = 0; ie < RA.length; ie++)
                y.on(RA[ie], this.emit.bind(this, RA[ie]));
              return this._read = function(KA) {
                AA("wrapped _read", KA), dA && (dA = !1, y.resume());
              }, this;
            }, typeof Symbol == "function" && (cA.prototype[Symbol.asyncIterator] = function() {
              return uA === void 0 && (uA = r(9676)), uA(this);
            }), Object.defineProperty(cA.prototype, "readableHighWaterMark", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState.highWaterMark;
              }
            }), Object.defineProperty(cA.prototype, "readableBuffer", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState && this._readableState.buffer;
              }
            }), Object.defineProperty(cA.prototype, "readableFlowing", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState.flowing;
              },
              set: function(M) {
                this._readableState && (this._readableState.flowing = M);
              }
            }), cA._fromList = p, Object.defineProperty(cA.prototype, "readableLength", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._readableState.length;
              }
            });
            function p(y, M) {
              if (M.length === 0) return null;
              var FA;
              return M.objectMode ? FA = M.buffer.shift() : !y || y >= M.length ? (M.decoder ? FA = M.buffer.join("") : M.buffer.length === 1 ? FA = M.buffer.first() : FA = M.buffer.concat(M.length), M.buffer.clear()) : FA = M.buffer.consume(y, M.decoder), FA;
            }
            function rA(y) {
              var M = y._readableState;
              AA("endReadable", M.endEmitted), M.endEmitted || (M.ended = !0, A.nextTick(QA, M, y));
            }
            function QA(y, M) {
              if (AA("endReadableNT", y.endEmitted, y.length), !y.endEmitted && y.length === 0 && (y.endEmitted = !0, M.readable = !1, M.emit("end"), y.autoDestroy)) {
                var FA = M._writableState;
                (!FA || FA.autoDestroy && FA.finished) && M.destroy();
              }
            }
            typeof Symbol == "function" && (cA.from = function(y, M) {
              return w === void 0 && (w = r(378)), w(cA, y, M);
            });
            function bA(y, M) {
              for (var FA = 0, dA = y.length; FA < dA; FA++)
                if (y[FA] === M) return FA;
              return -1;
            }
          },
          /***/
          8569(Q, B, r) {
            Q.exports = J;
            var A = r(3797).F, a = A.ERR_METHOD_NOT_IMPLEMENTED, D = A.ERR_MULTIPLE_CALLBACK, x = A.ERR_TRANSFORM_ALREADY_TRANSFORMING, N = A.ERR_TRANSFORM_WITH_LENGTH_0, P = r(4903);
            r(9784)(J, P);
            function d(K, z) {
              var T = this._transformState;
              T.transforming = !1;
              var H = T.writecb;
              if (H === null)
                return this.emit("error", new D());
              T.writechunk = null, T.writecb = null, z != null && this.push(z), H(K);
              var eA = this._readableState;
              eA.reading = !1, (eA.needReadable || eA.length < eA.highWaterMark) && this._read(eA.highWaterMark);
            }
            function J(K) {
              if (!(this instanceof J)) return new J(K);
              P.call(this, K), this._transformState = {
                afterTransform: d.bind(this),
                needTransform: !1,
                transforming: !1,
                writecb: null,
                writechunk: null,
                writeencoding: null
              }, this._readableState.needReadable = !0, this._readableState.sync = !1, K && (typeof K.transform == "function" && (this._transform = K.transform), typeof K.flush == "function" && (this._flush = K.flush)), this.on("prefinish", q);
            }
            function q() {
              var K = this;
              typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(z, T) {
                AA(K, z, T);
              }) : AA(this, null, null);
            }
            J.prototype.push = function(K, z) {
              return this._transformState.needTransform = !1, P.prototype.push.call(this, K, z);
            }, J.prototype._transform = function(K, z, T) {
              T(new a("_transform()"));
            }, J.prototype._write = function(K, z, T) {
              var H = this._transformState;
              if (H.writecb = T, H.writechunk = K, H.writeencoding = z, !H.transforming) {
                var eA = this._readableState;
                (H.needTransform || eA.needReadable || eA.length < eA.highWaterMark) && this._read(eA.highWaterMark);
              }
            }, J.prototype._read = function(K) {
              var z = this._transformState;
              z.writechunk !== null && !z.transforming ? (z.transforming = !0, this._transform(z.writechunk, z.writeencoding, z.afterTransform)) : z.needTransform = !0;
            }, J.prototype._destroy = function(K, z) {
              P.prototype._destroy.call(this, K, function(T) {
                z(T);
              });
            };
            function AA(K, z, T) {
              if (z) return K.emit("error", z);
              if (T != null && K.push(T), K._writableState.length) throw new N();
              if (K._transformState.transforming) throw new x();
              return K.push(null);
            }
          },
          /***/
          9781(Q, B, r) {
            var A = r(9964);
            Q.exports = $;
            function a(oA) {
              var p = this;
              this.next = null, this.entry = null, this.finish = function() {
                _(p, oA);
              };
            }
            var D;
            $.WritableState = RA;
            var x = {
              deprecate: r(6465)
            }, N = r(9018), P = r(783).Buffer, d = (typeof r.g < "u" ? r.g : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
            };
            function J(oA) {
              return P.from(oA);
            }
            function q(oA) {
              return P.isBuffer(oA) || oA instanceof d;
            }
            var AA = r(7385), K = r(8130), z = K.getHighWaterMark, T = r(3797).F, H = T.ERR_INVALID_ARG_TYPE, eA = T.ERR_METHOD_NOT_IMPLEMENTED, CA = T.ERR_MULTIPLE_CALLBACK, IA = T.ERR_STREAM_CANNOT_PIPE, k = T.ERR_STREAM_DESTROYED, tA = T.ERR_STREAM_NULL_VALUES, lA = T.ERR_STREAM_WRITE_AFTER_END, uA = T.ERR_UNKNOWN_ENCODING, w = AA.errorOrDestroy;
            r(9784)($, N);
            function v() {
            }
            function RA(oA, p, rA) {
              D = D || r(4903), oA = oA || {}, typeof rA != "boolean" && (rA = p instanceof D), this.objectMode = !!oA.objectMode, rA && (this.objectMode = this.objectMode || !!oA.writableObjectMode), this.highWaterMark = z(this, oA, "writableHighWaterMark", rA), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
              var QA = oA.decodeStrings === !1;
              this.decodeStrings = !QA, this.defaultEncoding = oA.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(bA) {
                xA(p, bA);
              }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = oA.emitClose !== !1, this.autoDestroy = !!oA.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new a(this);
            }
            RA.prototype.getBuffer = function() {
              for (var p = this.bufferedRequest, rA = []; p; )
                rA.push(p), p = p.next;
              return rA;
            }, (function() {
              try {
                Object.defineProperty(RA.prototype, "buffer", {
                  get: x.deprecate(function() {
                    return this.getBuffer();
                  }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
                });
              } catch {
              }
            })();
            var DA;
            typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (DA = Function.prototype[Symbol.hasInstance], Object.defineProperty($, Symbol.hasInstance, {
              value: function(p) {
                return DA.call(this, p) ? !0 : this !== $ ? !1 : p && p._writableState instanceof RA;
              }
            })) : DA = function(p) {
              return p instanceof this;
            };
            function $(oA) {
              D = D || r(4903);
              var p = this instanceof D;
              if (!p && !DA.call($, this)) return new $(oA);
              this._writableState = new RA(oA, this, p), this.writable = !0, oA && (typeof oA.write == "function" && (this._write = oA.write), typeof oA.writev == "function" && (this._writev = oA.writev), typeof oA.destroy == "function" && (this._destroy = oA.destroy), typeof oA.final == "function" && (this._final = oA.final)), N.call(this);
            }
            $.prototype.pipe = function() {
              w(this, new IA());
            };
            function cA(oA, p) {
              var rA = new lA();
              w(oA, rA), A.nextTick(p, rA);
            }
            function Ae(oA, p, rA, QA) {
              var bA;
              return rA === null ? bA = new tA() : typeof rA != "string" && !p.objectMode && (bA = new H("chunk", ["string", "Buffer"], rA)), bA ? (w(oA, bA), A.nextTick(QA, bA), !1) : !0;
            }
            $.prototype.write = function(oA, p, rA) {
              var QA = this._writableState, bA = !1, y = !QA.objectMode && q(oA);
              return y && !P.isBuffer(oA) && (oA = J(oA)), typeof p == "function" && (rA = p, p = null), y ? p = "buffer" : p || (p = QA.defaultEncoding), typeof rA != "function" && (rA = v), QA.ending ? cA(this, rA) : (y || Ae(this, QA, oA, rA)) && (QA.pendingcb++, bA = VA(this, QA, y, oA, p, rA)), bA;
            }, $.prototype.cork = function() {
              this._writableState.corked++;
            }, $.prototype.uncork = function() {
              var oA = this._writableState;
              oA.corked && (oA.corked--, !oA.writing && !oA.corked && !oA.bufferProcessing && oA.bufferedRequest && TA(this, oA));
            }, $.prototype.setDefaultEncoding = function(p) {
              if (typeof p == "string" && (p = p.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((p + "").toLowerCase()) > -1)) throw new uA(p);
              return this._writableState.defaultEncoding = p, this;
            }, Object.defineProperty($.prototype, "writableBuffer", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState && this._writableState.getBuffer();
              }
            });
            function kA(oA, p, rA) {
              return !oA.objectMode && oA.decodeStrings !== !1 && typeof p == "string" && (p = P.from(p, rA)), p;
            }
            Object.defineProperty($.prototype, "writableHighWaterMark", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState.highWaterMark;
              }
            });
            function VA(oA, p, rA, QA, bA, y) {
              if (!rA) {
                var M = kA(p, QA, bA);
                QA !== M && (rA = !0, bA = "buffer", QA = M);
              }
              var FA = p.objectMode ? 1 : QA.length;
              p.length += FA;
              var dA = p.length < p.highWaterMark;
              if (dA || (p.needDrain = !0), p.writing || p.corked) {
                var he = p.lastBufferedRequest;
                p.lastBufferedRequest = {
                  chunk: QA,
                  encoding: bA,
                  isBuf: rA,
                  callback: y,
                  next: null
                }, he ? he.next = p.lastBufferedRequest : p.bufferedRequest = p.lastBufferedRequest, p.bufferedRequestCount += 1;
              } else
                EA(oA, p, !1, FA, QA, bA, y);
              return dA;
            }
            function EA(oA, p, rA, QA, bA, y, M) {
              p.writelen = QA, p.writecb = M, p.writing = !0, p.sync = !0, p.destroyed ? p.onwrite(new k("write")) : rA ? oA._writev(bA, p.onwrite) : oA._write(bA, y, p.onwrite), p.sync = !1;
            }
            function zA(oA, p, rA, QA, bA) {
              --p.pendingcb, rA ? (A.nextTick(bA, QA), A.nextTick(o, oA, p), oA._writableState.errorEmitted = !0, w(oA, QA)) : (bA(QA), oA._writableState.errorEmitted = !0, w(oA, QA), o(oA, p));
            }
            function OA(oA) {
              oA.writing = !1, oA.writecb = null, oA.length -= oA.writelen, oA.writelen = 0;
            }
            function xA(oA, p) {
              var rA = oA._writableState, QA = rA.sync, bA = rA.writecb;
              if (typeof bA != "function") throw new CA();
              if (OA(rA), p) zA(oA, rA, QA, p, bA);
              else {
                var y = fA(rA) || oA.destroyed;
                !y && !rA.corked && !rA.bufferProcessing && rA.bufferedRequest && TA(oA, rA), QA ? A.nextTick(LA, oA, rA, y, bA) : LA(oA, rA, y, bA);
              }
            }
            function LA(oA, p, rA, QA) {
              rA || yA(oA, p), p.pendingcb--, QA(), o(oA, p);
            }
            function yA(oA, p) {
              p.length === 0 && p.needDrain && (p.needDrain = !1, oA.emit("drain"));
            }
            function TA(oA, p) {
              p.bufferProcessing = !0;
              var rA = p.bufferedRequest;
              if (oA._writev && rA && rA.next) {
                var QA = p.bufferedRequestCount, bA = new Array(QA), y = p.corkedRequestsFree;
                y.entry = rA;
                for (var M = 0, FA = !0; rA; )
                  bA[M] = rA, rA.isBuf || (FA = !1), rA = rA.next, M += 1;
                bA.allBuffers = FA, EA(oA, p, !0, p.length, bA, "", y.finish), p.pendingcb++, p.lastBufferedRequest = null, y.next ? (p.corkedRequestsFree = y.next, y.next = null) : p.corkedRequestsFree = new a(p), p.bufferedRequestCount = 0;
              } else {
                for (; rA; ) {
                  var dA = rA.chunk, he = rA.encoding, ie = rA.callback, KA = p.objectMode ? 1 : dA.length;
                  if (EA(oA, p, !1, KA, dA, he, ie), rA = rA.next, p.bufferedRequestCount--, p.writing)
                    break;
                }
                rA === null && (p.lastBufferedRequest = null);
              }
              p.bufferedRequest = rA, p.bufferProcessing = !1;
            }
            $.prototype._write = function(oA, p, rA) {
              rA(new eA("_write()"));
            }, $.prototype._writev = null, $.prototype.end = function(oA, p, rA) {
              var QA = this._writableState;
              return typeof oA == "function" ? (rA = oA, oA = null, p = null) : typeof p == "function" && (rA = p, p = null), oA != null && this.write(oA, p), QA.corked && (QA.corked = 1, this.uncork()), QA.ending || h(this, QA, rA), this;
            }, Object.defineProperty($.prototype, "writableLength", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState.length;
              }
            });
            function fA(oA) {
              return oA.ending && oA.length === 0 && oA.bufferedRequest === null && !oA.finished && !oA.writing;
            }
            function sA(oA, p) {
              oA._final(function(rA) {
                p.pendingcb--, rA && w(oA, rA), p.prefinished = !0, oA.emit("prefinish"), o(oA, p);
              });
            }
            function F(oA, p) {
              !p.prefinished && !p.finalCalled && (typeof oA._final == "function" && !p.destroyed ? (p.pendingcb++, p.finalCalled = !0, A.nextTick(sA, oA, p)) : (p.prefinished = !0, oA.emit("prefinish")));
            }
            function o(oA, p) {
              var rA = fA(p);
              if (rA && (F(oA, p), p.pendingcb === 0 && (p.finished = !0, oA.emit("finish"), p.autoDestroy))) {
                var QA = oA._readableState;
                (!QA || QA.autoDestroy && QA.endEmitted) && oA.destroy();
              }
              return rA;
            }
            function h(oA, p, rA) {
              p.ending = !0, o(oA, p), rA && (p.finished ? A.nextTick(rA) : oA.once("finish", rA)), p.ended = !0, oA.writable = !1;
            }
            function _(oA, p, rA) {
              var QA = oA.entry;
              for (oA.entry = null; QA; ) {
                var bA = QA.callback;
                p.pendingcb--, bA(rA), QA = QA.next;
              }
              p.corkedRequestsFree.next = oA;
            }
            Object.defineProperty($.prototype, "destroyed", {
              // making it explicit this property is not enumerable
              // because otherwise some prototype manipulation in
              // userland will fail
              enumerable: !1,
              get: function() {
                return this._writableState === void 0 ? !1 : this._writableState.destroyed;
              },
              set: function(p) {
                this._writableState && (this._writableState.destroyed = p);
              }
            }), $.prototype.destroy = AA.destroy, $.prototype._undestroy = AA.undestroy, $.prototype._destroy = function(oA, p) {
              p(oA);
            };
          },
          /***/
          9676(Q, B, r) {
            var A = r(9964), a;
            function D(uA, w, v) {
              return w = x(w), w in uA ? Object.defineProperty(uA, w, { value: v, enumerable: !0, configurable: !0, writable: !0 }) : uA[w] = v, uA;
            }
            function x(uA) {
              var w = N(uA, "string");
              return typeof w == "symbol" ? w : String(w);
            }
            function N(uA, w) {
              if (typeof uA != "object" || uA === null) return uA;
              var v = uA[Symbol.toPrimitive];
              if (v !== void 0) {
                var RA = v.call(uA, w);
                if (typeof RA != "object") return RA;
                throw new TypeError("@@toPrimitive must return a primitive value.");
              }
              return (w === "string" ? String : Number)(uA);
            }
            var P = r(2167), d = Symbol("lastResolve"), J = Symbol("lastReject"), q = Symbol("error"), AA = Symbol("ended"), K = Symbol("lastPromise"), z = Symbol("handlePromise"), T = Symbol("stream");
            function H(uA, w) {
              return {
                value: uA,
                done: w
              };
            }
            function eA(uA) {
              var w = uA[d];
              if (w !== null) {
                var v = uA[T].read();
                v !== null && (uA[K] = null, uA[d] = null, uA[J] = null, w(H(v, !1)));
              }
            }
            function CA(uA) {
              A.nextTick(eA, uA);
            }
            function IA(uA, w) {
              return function(v, RA) {
                uA.then(function() {
                  if (w[AA]) {
                    v(H(void 0, !0));
                    return;
                  }
                  w[z](v, RA);
                }, RA);
              };
            }
            var k = Object.getPrototypeOf(function() {
            }), tA = Object.setPrototypeOf((a = {
              get stream() {
                return this[T];
              },
              next: function() {
                var w = this, v = this[q];
                if (v !== null)
                  return Promise.reject(v);
                if (this[AA])
                  return Promise.resolve(H(void 0, !0));
                if (this[T].destroyed)
                  return new Promise(function(cA, Ae) {
                    A.nextTick(function() {
                      w[q] ? Ae(w[q]) : cA(H(void 0, !0));
                    });
                  });
                var RA = this[K], DA;
                if (RA)
                  DA = new Promise(IA(RA, this));
                else {
                  var $ = this[T].read();
                  if ($ !== null)
                    return Promise.resolve(H($, !1));
                  DA = new Promise(this[z]);
                }
                return this[K] = DA, DA;
              }
            }, D(a, Symbol.asyncIterator, function() {
              return this;
            }), D(a, "return", function() {
              var w = this;
              return new Promise(function(v, RA) {
                w[T].destroy(null, function(DA) {
                  if (DA) {
                    RA(DA);
                    return;
                  }
                  v(H(void 0, !0));
                });
              });
            }), a), k), lA = function(w) {
              var v, RA = Object.create(tA, (v = {}, D(v, T, {
                value: w,
                writable: !0
              }), D(v, d, {
                value: null,
                writable: !0
              }), D(v, J, {
                value: null,
                writable: !0
              }), D(v, q, {
                value: null,
                writable: !0
              }), D(v, AA, {
                value: w._readableState.endEmitted,
                writable: !0
              }), D(v, z, {
                value: function($, cA) {
                  var Ae = RA[T].read();
                  Ae ? (RA[K] = null, RA[d] = null, RA[J] = null, $(H(Ae, !1))) : (RA[d] = $, RA[J] = cA);
                },
                writable: !0
              }), v));
              return RA[K] = null, P(w, function(DA) {
                if (DA && DA.code !== "ERR_STREAM_PREMATURE_CLOSE") {
                  var $ = RA[J];
                  $ !== null && (RA[K] = null, RA[d] = null, RA[J] = null, $(DA)), RA[q] = DA;
                  return;
                }
                var cA = RA[d];
                cA !== null && (RA[K] = null, RA[d] = null, RA[J] = null, cA(H(void 0, !0))), RA[AA] = !0;
              }), w.on("readable", CA.bind(null, RA)), RA;
            };
            Q.exports = lA;
          },
          /***/
          7385(Q, B, r) {
            var A = r(9964);
            function a(J, q) {
              var AA = this, K = this._readableState && this._readableState.destroyed, z = this._writableState && this._writableState.destroyed;
              return K || z ? (q ? q(J) : J && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, A.nextTick(P, this, J)) : A.nextTick(P, this, J)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(J || null, function(T) {
                !q && T ? AA._writableState ? AA._writableState.errorEmitted ? A.nextTick(x, AA) : (AA._writableState.errorEmitted = !0, A.nextTick(D, AA, T)) : A.nextTick(D, AA, T) : q ? (A.nextTick(x, AA), q(T)) : A.nextTick(x, AA);
              }), this);
            }
            function D(J, q) {
              P(J, q), x(J);
            }
            function x(J) {
              J._writableState && !J._writableState.emitClose || J._readableState && !J._readableState.emitClose || J.emit("close");
            }
            function N() {
              this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
            }
            function P(J, q) {
              J.emit("error", q);
            }
            function d(J, q) {
              var AA = J._readableState, K = J._writableState;
              AA && AA.autoDestroy || K && K.autoDestroy ? J.destroy(q) : J.emit("error", q);
            }
            Q.exports = {
              destroy: a,
              undestroy: N,
              errorOrDestroy: d
            };
          },
          /***/
          2167(Q, B, r) {
            var A = r(3797).F.ERR_STREAM_PREMATURE_CLOSE;
            function a(P) {
              var d = !1;
              return function() {
                if (!d) {
                  d = !0;
                  for (var J = arguments.length, q = new Array(J), AA = 0; AA < J; AA++)
                    q[AA] = arguments[AA];
                  P.apply(this, q);
                }
              };
            }
            function D() {
            }
            function x(P) {
              return P.setHeader && typeof P.abort == "function";
            }
            function N(P, d, J) {
              if (typeof d == "function") return N(P, null, d);
              d || (d = {}), J = a(J || D);
              var q = d.readable || d.readable !== !1 && P.readable, AA = d.writable || d.writable !== !1 && P.writable, K = function() {
                P.writable || T();
              }, z = P._writableState && P._writableState.finished, T = function() {
                AA = !1, z = !0, q || J.call(P);
              }, H = P._readableState && P._readableState.endEmitted, eA = function() {
                q = !1, H = !0, AA || J.call(P);
              }, CA = function(lA) {
                J.call(P, lA);
              }, IA = function() {
                var lA;
                if (q && !H)
                  return (!P._readableState || !P._readableState.ended) && (lA = new A()), J.call(P, lA);
                if (AA && !z)
                  return (!P._writableState || !P._writableState.ended) && (lA = new A()), J.call(P, lA);
              }, k = function() {
                P.req.on("finish", T);
              };
              return x(P) ? (P.on("complete", T), P.on("abort", IA), P.req ? k() : P.on("request", k)) : AA && !P._writableState && (P.on("end", K), P.on("close", K)), P.on("end", eA), P.on("finish", T), d.error !== !1 && P.on("error", CA), P.on("close", IA), function() {
                P.removeListener("complete", T), P.removeListener("abort", IA), P.removeListener("request", k), P.req && P.req.removeListener("finish", T), P.removeListener("end", K), P.removeListener("close", K), P.removeListener("finish", T), P.removeListener("end", eA), P.removeListener("error", CA), P.removeListener("close", IA);
              };
            }
            Q.exports = N;
          },
          /***/
          378(Q) {
            Q.exports = function() {
              throw new Error("Readable.from is not available in the browser");
            };
          },
          /***/
          3765(Q, B, r) {
            var A;
            function a(T) {
              var H = !1;
              return function() {
                H || (H = !0, T.apply(void 0, arguments));
              };
            }
            var D = r(3797).F, x = D.ERR_MISSING_ARGS, N = D.ERR_STREAM_DESTROYED;
            function P(T) {
              if (T) throw T;
            }
            function d(T) {
              return T.setHeader && typeof T.abort == "function";
            }
            function J(T, H, eA, CA) {
              CA = a(CA);
              var IA = !1;
              T.on("close", function() {
                IA = !0;
              }), A === void 0 && (A = r(2167)), A(T, {
                readable: H,
                writable: eA
              }, function(tA) {
                if (tA) return CA(tA);
                IA = !0, CA();
              });
              var k = !1;
              return function(tA) {
                if (!IA && !k) {
                  if (k = !0, d(T)) return T.abort();
                  if (typeof T.destroy == "function") return T.destroy();
                  CA(tA || new N("pipe"));
                }
              };
            }
            function q(T) {
              T();
            }
            function AA(T, H) {
              return T.pipe(H);
            }
            function K(T) {
              return !T.length || typeof T[T.length - 1] != "function" ? P : T.pop();
            }
            function z() {
              for (var T = arguments.length, H = new Array(T), eA = 0; eA < T; eA++)
                H[eA] = arguments[eA];
              var CA = K(H);
              if (Array.isArray(H[0]) && (H = H[0]), H.length < 2)
                throw new x("streams");
              var IA, k = H.map(function(tA, lA) {
                var uA = lA < H.length - 1, w = lA > 0;
                return J(tA, uA, w, function(v) {
                  IA || (IA = v), v && k.forEach(q), !uA && (k.forEach(q), CA(IA));
                });
              });
              return H.reduce(AA);
            }
            Q.exports = z;
          },
          /***/
          8130(Q, B, r) {
            var A = r(3797).F.ERR_INVALID_OPT_VALUE;
            function a(x, N, P) {
              return x.highWaterMark != null ? x.highWaterMark : N ? x[P] : null;
            }
            function D(x, N, P, d) {
              var J = a(N, d, P);
              if (J != null) {
                if (!(isFinite(J) && Math.floor(J) === J) || J < 0) {
                  var q = d ? P : "highWaterMark";
                  throw new A(q, J);
                }
                return Math.floor(J);
              }
              return x.objectMode ? 16 : 16384;
            }
            Q.exports = {
              getHighWaterMark: D
            };
          },
          /***/
          9018(Q, B, r) {
            Q.exports = r(4785).EventEmitter;
          },
          /***/
          3143(Q, B, r) {
            var A = r(5691).Buffer, a = A.isEncoding || function(k) {
              switch (k = "" + k, k && k.toLowerCase()) {
                case "hex":
                case "utf8":
                case "utf-8":
                case "ascii":
                case "binary":
                case "base64":
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                case "raw":
                  return !0;
                default:
                  return !1;
              }
            };
            function D(k) {
              if (!k) return "utf8";
              for (var tA; ; )
                switch (k) {
                  case "utf8":
                  case "utf-8":
                    return "utf8";
                  case "ucs2":
                  case "ucs-2":
                  case "utf16le":
                  case "utf-16le":
                    return "utf16le";
                  case "latin1":
                  case "binary":
                    return "latin1";
                  case "base64":
                  case "ascii":
                  case "hex":
                    return k;
                  default:
                    if (tA) return;
                    k = ("" + k).toLowerCase(), tA = !0;
                }
            }
            function x(k) {
              var tA = D(k);
              if (typeof tA != "string" && (A.isEncoding === a || !a(k))) throw new Error("Unknown encoding: " + k);
              return tA || k;
            }
            B.I = N;
            function N(k) {
              this.encoding = x(k);
              var tA;
              switch (this.encoding) {
                case "utf16le":
                  this.text = z, this.end = T, tA = 4;
                  break;
                case "utf8":
                  this.fillLast = q, tA = 4;
                  break;
                case "base64":
                  this.text = H, this.end = eA, tA = 3;
                  break;
                default:
                  this.write = CA, this.end = IA;
                  return;
              }
              this.lastNeed = 0, this.lastTotal = 0, this.lastChar = A.allocUnsafe(tA);
            }
            N.prototype.write = function(k) {
              if (k.length === 0) return "";
              var tA, lA;
              if (this.lastNeed) {
                if (tA = this.fillLast(k), tA === void 0) return "";
                lA = this.lastNeed, this.lastNeed = 0;
              } else
                lA = 0;
              return lA < k.length ? tA ? tA + this.text(k, lA) : this.text(k, lA) : tA || "";
            }, N.prototype.end = K, N.prototype.text = AA, N.prototype.fillLast = function(k) {
              if (this.lastNeed <= k.length)
                return k.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
              k.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, k.length), this.lastNeed -= k.length;
            };
            function P(k) {
              return k <= 127 ? 0 : k >> 5 === 6 ? 2 : k >> 4 === 14 ? 3 : k >> 3 === 30 ? 4 : k >> 6 === 2 ? -1 : -2;
            }
            function d(k, tA, lA) {
              var uA = tA.length - 1;
              if (uA < lA) return 0;
              var w = P(tA[uA]);
              return w >= 0 ? (w > 0 && (k.lastNeed = w - 1), w) : --uA < lA || w === -2 ? 0 : (w = P(tA[uA]), w >= 0 ? (w > 0 && (k.lastNeed = w - 2), w) : --uA < lA || w === -2 ? 0 : (w = P(tA[uA]), w >= 0 ? (w > 0 && (w === 2 ? w = 0 : k.lastNeed = w - 3), w) : 0));
            }
            function J(k, tA, lA) {
              if ((tA[0] & 192) !== 128)
                return k.lastNeed = 0, "�";
              if (k.lastNeed > 1 && tA.length > 1) {
                if ((tA[1] & 192) !== 128)
                  return k.lastNeed = 1, "�";
                if (k.lastNeed > 2 && tA.length > 2 && (tA[2] & 192) !== 128)
                  return k.lastNeed = 2, "�";
              }
            }
            function q(k) {
              var tA = this.lastTotal - this.lastNeed, lA = J(this, k);
              if (lA !== void 0) return lA;
              if (this.lastNeed <= k.length)
                return k.copy(this.lastChar, tA, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
              k.copy(this.lastChar, tA, 0, k.length), this.lastNeed -= k.length;
            }
            function AA(k, tA) {
              var lA = d(this, k, tA);
              if (!this.lastNeed) return k.toString("utf8", tA);
              this.lastTotal = lA;
              var uA = k.length - (lA - this.lastNeed);
              return k.copy(this.lastChar, 0, uA), k.toString("utf8", tA, uA);
            }
            function K(k) {
              var tA = k && k.length ? this.write(k) : "";
              return this.lastNeed ? tA + "�" : tA;
            }
            function z(k, tA) {
              if ((k.length - tA) % 2 === 0) {
                var lA = k.toString("utf16le", tA);
                if (lA) {
                  var uA = lA.charCodeAt(lA.length - 1);
                  if (uA >= 55296 && uA <= 56319)
                    return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = k[k.length - 2], this.lastChar[1] = k[k.length - 1], lA.slice(0, -1);
                }
                return lA;
              }
              return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = k[k.length - 1], k.toString("utf16le", tA, k.length - 1);
            }
            function T(k) {
              var tA = k && k.length ? this.write(k) : "";
              if (this.lastNeed) {
                var lA = this.lastTotal - this.lastNeed;
                return tA + this.lastChar.toString("utf16le", 0, lA);
              }
              return tA;
            }
            function H(k, tA) {
              var lA = (k.length - tA) % 3;
              return lA === 0 ? k.toString("base64", tA) : (this.lastNeed = 3 - lA, this.lastTotal = 3, lA === 1 ? this.lastChar[0] = k[k.length - 1] : (this.lastChar[0] = k[k.length - 2], this.lastChar[1] = k[k.length - 1]), k.toString("base64", tA, k.length - lA));
            }
            function eA(k) {
              var tA = k && k.length ? this.write(k) : "";
              return this.lastNeed ? tA + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : tA;
            }
            function CA(k) {
              return k.toString(this.encoding);
            }
            function IA(k) {
              return k && k.length ? this.write(k) : "";
            }
          },
          /***/
          3483(Q) {
            var B = 0, r = -3;
            function A() {
              this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
            }
            function a(v, RA) {
              this.source = v, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = RA, this.destLen = 0, this.ltree = new A(), this.dtree = new A();
            }
            var D = new A(), x = new A(), N = new Uint8Array(30), P = new Uint16Array(30), d = new Uint8Array(30), J = new Uint16Array(30), q = new Uint8Array([
              16,
              17,
              18,
              0,
              8,
              7,
              9,
              6,
              10,
              5,
              11,
              4,
              12,
              3,
              13,
              2,
              14,
              1,
              15
            ]), AA = new A(), K = new Uint8Array(320);
            function z(v, RA, DA, $) {
              var cA, Ae;
              for (cA = 0; cA < DA; ++cA) v[cA] = 0;
              for (cA = 0; cA < 30 - DA; ++cA) v[cA + DA] = cA / DA | 0;
              for (Ae = $, cA = 0; cA < 30; ++cA)
                RA[cA] = Ae, Ae += 1 << v[cA];
            }
            function T(v, RA) {
              var DA;
              for (DA = 0; DA < 7; ++DA) v.table[DA] = 0;
              for (v.table[7] = 24, v.table[8] = 152, v.table[9] = 112, DA = 0; DA < 24; ++DA) v.trans[DA] = 256 + DA;
              for (DA = 0; DA < 144; ++DA) v.trans[24 + DA] = DA;
              for (DA = 0; DA < 8; ++DA) v.trans[168 + DA] = 280 + DA;
              for (DA = 0; DA < 112; ++DA) v.trans[176 + DA] = 144 + DA;
              for (DA = 0; DA < 5; ++DA) RA.table[DA] = 0;
              for (RA.table[5] = 32, DA = 0; DA < 32; ++DA) RA.trans[DA] = DA;
            }
            var H = new Uint16Array(16);
            function eA(v, RA, DA, $) {
              var cA, Ae;
              for (cA = 0; cA < 16; ++cA) v.table[cA] = 0;
              for (cA = 0; cA < $; ++cA) v.table[RA[DA + cA]]++;
              for (v.table[0] = 0, Ae = 0, cA = 0; cA < 16; ++cA)
                H[cA] = Ae, Ae += v.table[cA];
              for (cA = 0; cA < $; ++cA)
                RA[DA + cA] && (v.trans[H[RA[DA + cA]]++] = cA);
            }
            function CA(v) {
              v.bitcount-- || (v.tag = v.source[v.sourceIndex++], v.bitcount = 7);
              var RA = v.tag & 1;
              return v.tag >>>= 1, RA;
            }
            function IA(v, RA, DA) {
              if (!RA)
                return DA;
              for (; v.bitcount < 24; )
                v.tag |= v.source[v.sourceIndex++] << v.bitcount, v.bitcount += 8;
              var $ = v.tag & 65535 >>> 16 - RA;
              return v.tag >>>= RA, v.bitcount -= RA, $ + DA;
            }
            function k(v, RA) {
              for (; v.bitcount < 24; )
                v.tag |= v.source[v.sourceIndex++] << v.bitcount, v.bitcount += 8;
              var DA = 0, $ = 0, cA = 0, Ae = v.tag;
              do
                $ = 2 * $ + (Ae & 1), Ae >>>= 1, ++cA, DA += RA.table[cA], $ -= RA.table[cA];
              while ($ >= 0);
              return v.tag = Ae, v.bitcount -= cA, RA.trans[DA + $];
            }
            function tA(v, RA, DA) {
              var $, cA, Ae, kA, VA, EA;
              for ($ = IA(v, 5, 257), cA = IA(v, 5, 1), Ae = IA(v, 4, 4), kA = 0; kA < 19; ++kA) K[kA] = 0;
              for (kA = 0; kA < Ae; ++kA) {
                var zA = IA(v, 3, 0);
                K[q[kA]] = zA;
              }
              for (eA(AA, K, 0, 19), VA = 0; VA < $ + cA; ) {
                var OA = k(v, AA);
                switch (OA) {
                  case 16:
                    var xA = K[VA - 1];
                    for (EA = IA(v, 2, 3); EA; --EA)
                      K[VA++] = xA;
                    break;
                  case 17:
                    for (EA = IA(v, 3, 3); EA; --EA)
                      K[VA++] = 0;
                    break;
                  case 18:
                    for (EA = IA(v, 7, 11); EA; --EA)
                      K[VA++] = 0;
                    break;
                  default:
                    K[VA++] = OA;
                    break;
                }
              }
              eA(RA, K, 0, $), eA(DA, K, $, cA);
            }
            function lA(v, RA, DA) {
              for (; ; ) {
                var $ = k(v, RA);
                if ($ === 256)
                  return B;
                if ($ < 256)
                  v.dest[v.destLen++] = $;
                else {
                  var cA, Ae, kA, VA;
                  for ($ -= 257, cA = IA(v, N[$], P[$]), Ae = k(v, DA), kA = v.destLen - IA(v, d[Ae], J[Ae]), VA = kA; VA < kA + cA; ++VA)
                    v.dest[v.destLen++] = v.dest[VA];
                }
              }
            }
            function uA(v) {
              for (var RA, DA, $; v.bitcount > 8; )
                v.sourceIndex--, v.bitcount -= 8;
              if (RA = v.source[v.sourceIndex + 1], RA = 256 * RA + v.source[v.sourceIndex], DA = v.source[v.sourceIndex + 3], DA = 256 * DA + v.source[v.sourceIndex + 2], RA !== (~DA & 65535))
                return r;
              for (v.sourceIndex += 4, $ = RA; $; --$)
                v.dest[v.destLen++] = v.source[v.sourceIndex++];
              return v.bitcount = 0, B;
            }
            function w(v, RA) {
              var DA = new a(v, RA), $, cA, Ae;
              do {
                switch ($ = CA(DA), cA = IA(DA, 2, 0), cA) {
                  case 0:
                    Ae = uA(DA);
                    break;
                  case 1:
                    Ae = lA(DA, D, x);
                    break;
                  case 2:
                    tA(DA, DA.ltree, DA.dtree), Ae = lA(DA, DA.ltree, DA.dtree);
                    break;
                  default:
                    Ae = r;
                }
                if (Ae !== B)
                  throw new Error("Data error");
              } while (!$);
              return DA.destLen < DA.dest.length ? typeof DA.dest.slice == "function" ? DA.dest.slice(0, DA.destLen) : DA.dest.subarray(0, DA.destLen) : DA.dest;
            }
            T(D, x), z(N, P, 4, 3), z(d, J, 2, 1), N[28] = 0, P[28] = 258, Q.exports = w;
          },
          /***/
          6465(Q, B, r) {
            Q.exports = A;
            function A(D, x) {
              if (a("noDeprecation"))
                return D;
              var N = !1;
              function P() {
                if (!N) {
                  if (a("throwDeprecation"))
                    throw new Error(x);
                  a("traceDeprecation") ? console.trace(x) : console.warn(x), N = !0;
                }
                return D.apply(this, arguments);
              }
              return P;
            }
            function a(D) {
              try {
                if (!r.g.localStorage) return !1;
              } catch {
                return !1;
              }
              var x = r.g.localStorage[D];
              return x == null ? !1 : String(x).toLowerCase() === "true";
            }
          },
          /***/
          1201(Q) {
            Q.exports = function(r) {
              return r && typeof r == "object" && typeof r.copy == "function" && typeof r.fill == "function" && typeof r.readUInt8 == "function";
            };
          },
          /***/
          9490(Q, B, r) {
            var A = r(7906), a = r(4610), D = r(3381), x = r(6094);
            function N(KA) {
              return KA.call.bind(KA);
            }
            var P = typeof BigInt < "u", d = typeof Symbol < "u", J = N(Object.prototype.toString), q = N(Number.prototype.valueOf), AA = N(String.prototype.valueOf), K = N(Boolean.prototype.valueOf);
            if (P)
              var z = N(BigInt.prototype.valueOf);
            if (d)
              var T = N(Symbol.prototype.valueOf);
            function H(KA, Pe) {
              if (typeof KA != "object")
                return !1;
              try {
                return Pe(KA), !0;
              } catch {
                return !1;
              }
            }
            B.isArgumentsObject = A, B.isGeneratorFunction = a, B.isTypedArray = x;
            function eA(KA) {
              return typeof Promise < "u" && KA instanceof Promise || KA !== null && typeof KA == "object" && typeof KA.then == "function" && typeof KA.catch == "function";
            }
            B.isPromise = eA;
            function CA(KA) {
              return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(KA) : x(KA) || sA(KA);
            }
            B.isArrayBufferView = CA;
            function IA(KA) {
              return D(KA) === "Uint8Array";
            }
            B.isUint8Array = IA;
            function k(KA) {
              return D(KA) === "Uint8ClampedArray";
            }
            B.isUint8ClampedArray = k;
            function tA(KA) {
              return D(KA) === "Uint16Array";
            }
            B.isUint16Array = tA;
            function lA(KA) {
              return D(KA) === "Uint32Array";
            }
            B.isUint32Array = lA;
            function uA(KA) {
              return D(KA) === "Int8Array";
            }
            B.isInt8Array = uA;
            function w(KA) {
              return D(KA) === "Int16Array";
            }
            B.isInt16Array = w;
            function v(KA) {
              return D(KA) === "Int32Array";
            }
            B.isInt32Array = v;
            function RA(KA) {
              return D(KA) === "Float32Array";
            }
            B.isFloat32Array = RA;
            function DA(KA) {
              return D(KA) === "Float64Array";
            }
            B.isFloat64Array = DA;
            function $(KA) {
              return D(KA) === "BigInt64Array";
            }
            B.isBigInt64Array = $;
            function cA(KA) {
              return D(KA) === "BigUint64Array";
            }
            B.isBigUint64Array = cA;
            function Ae(KA) {
              return J(KA) === "[object Map]";
            }
            Ae.working = typeof Map < "u" && Ae(/* @__PURE__ */ new Map());
            function kA(KA) {
              return typeof Map > "u" ? !1 : Ae.working ? Ae(KA) : KA instanceof Map;
            }
            B.isMap = kA;
            function VA(KA) {
              return J(KA) === "[object Set]";
            }
            VA.working = typeof Set < "u" && VA(/* @__PURE__ */ new Set());
            function EA(KA) {
              return typeof Set > "u" ? !1 : VA.working ? VA(KA) : KA instanceof Set;
            }
            B.isSet = EA;
            function zA(KA) {
              return J(KA) === "[object WeakMap]";
            }
            zA.working = typeof WeakMap < "u" && zA(/* @__PURE__ */ new WeakMap());
            function OA(KA) {
              return typeof WeakMap > "u" ? !1 : zA.working ? zA(KA) : KA instanceof WeakMap;
            }
            B.isWeakMap = OA;
            function xA(KA) {
              return J(KA) === "[object WeakSet]";
            }
            xA.working = typeof WeakSet < "u" && xA(/* @__PURE__ */ new WeakSet());
            function LA(KA) {
              return xA(KA);
            }
            B.isWeakSet = LA;
            function yA(KA) {
              return J(KA) === "[object ArrayBuffer]";
            }
            yA.working = typeof ArrayBuffer < "u" && yA(new ArrayBuffer());
            function TA(KA) {
              return typeof ArrayBuffer > "u" ? !1 : yA.working ? yA(KA) : KA instanceof ArrayBuffer;
            }
            B.isArrayBuffer = TA;
            function fA(KA) {
              return J(KA) === "[object DataView]";
            }
            fA.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && fA(new DataView(new ArrayBuffer(1), 0, 1));
            function sA(KA) {
              return typeof DataView > "u" ? !1 : fA.working ? fA(KA) : KA instanceof DataView;
            }
            B.isDataView = sA;
            var F = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
            function o(KA) {
              return J(KA) === "[object SharedArrayBuffer]";
            }
            function h(KA) {
              return typeof F > "u" ? !1 : (typeof o.working > "u" && (o.working = o(new F())), o.working ? o(KA) : KA instanceof F);
            }
            B.isSharedArrayBuffer = h;
            function _(KA) {
              return J(KA) === "[object AsyncFunction]";
            }
            B.isAsyncFunction = _;
            function oA(KA) {
              return J(KA) === "[object Map Iterator]";
            }
            B.isMapIterator = oA;
            function p(KA) {
              return J(KA) === "[object Set Iterator]";
            }
            B.isSetIterator = p;
            function rA(KA) {
              return J(KA) === "[object Generator]";
            }
            B.isGeneratorObject = rA;
            function QA(KA) {
              return J(KA) === "[object WebAssembly.Module]";
            }
            B.isWebAssemblyCompiledModule = QA;
            function bA(KA) {
              return H(KA, q);
            }
            B.isNumberObject = bA;
            function y(KA) {
              return H(KA, AA);
            }
            B.isStringObject = y;
            function M(KA) {
              return H(KA, K);
            }
            B.isBooleanObject = M;
            function FA(KA) {
              return P && H(KA, z);
            }
            B.isBigIntObject = FA;
            function dA(KA) {
              return d && H(KA, T);
            }
            B.isSymbolObject = dA;
            function he(KA) {
              return bA(KA) || y(KA) || M(KA) || FA(KA) || dA(KA);
            }
            B.isBoxedPrimitive = he;
            function ie(KA) {
              return typeof Uint8Array < "u" && (TA(KA) || h(KA));
            }
            B.isAnyArrayBuffer = ie, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(KA) {
              Object.defineProperty(B, KA, {
                enumerable: !1,
                value: function() {
                  throw new Error(KA + " is not supported in userland");
                }
              });
            });
          },
          /***/
          7187(Q, B, r) {
            var A = r(9964), a = Object.getOwnPropertyDescriptors || function(F) {
              for (var o = Object.keys(F), h = {}, _ = 0; _ < o.length; _++)
                h[o[_]] = Object.getOwnPropertyDescriptor(F, o[_]);
              return h;
            }, D = /%[sdj%]/g;
            B.format = function(sA) {
              if (!w(sA)) {
                for (var F = [], o = 0; o < arguments.length; o++)
                  F.push(d(arguments[o]));
                return F.join(" ");
              }
              for (var o = 1, h = arguments, _ = h.length, oA = String(sA).replace(D, function(rA) {
                if (rA === "%%") return "%";
                if (o >= _) return rA;
                switch (rA) {
                  case "%s":
                    return String(h[o++]);
                  case "%d":
                    return Number(h[o++]);
                  case "%j":
                    try {
                      return JSON.stringify(h[o++]);
                    } catch {
                      return "[Circular]";
                    }
                  default:
                    return rA;
                }
              }), p = h[o]; o < _; p = h[++o])
                tA(p) || !$(p) ? oA += " " + p : oA += " " + d(p);
              return oA;
            }, B.deprecate = function(sA, F) {
              if (typeof A < "u" && A.noDeprecation === !0)
                return sA;
              if (typeof A > "u")
                return function() {
                  return B.deprecate(sA, F).apply(this, arguments);
                };
              var o = !1;
              function h() {
                if (!o) {
                  if (A.throwDeprecation)
                    throw new Error(F);
                  A.traceDeprecation ? console.trace(F) : console.error(F), o = !0;
                }
                return sA.apply(this, arguments);
              }
              return h;
            };
            var x = {}, N = /^$/;
            if (A.env.NODE_DEBUG) {
              var P = A.env.NODE_DEBUG;
              P = P.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), N = new RegExp("^" + P + "$", "i");
            }
            B.debuglog = function(sA) {
              if (sA = sA.toUpperCase(), !x[sA])
                if (N.test(sA)) {
                  var F = A.pid;
                  x[sA] = function() {
                    var o = B.format.apply(B, arguments);
                    console.error("%s %d: %s", sA, F, o);
                  };
                } else
                  x[sA] = function() {
                  };
              return x[sA];
            };
            function d(sA, F) {
              var o = {
                seen: [],
                stylize: q
              };
              return arguments.length >= 3 && (o.depth = arguments[2]), arguments.length >= 4 && (o.colors = arguments[3]), k(F) ? o.showHidden = F : F && B._extend(o, F), RA(o.showHidden) && (o.showHidden = !1), RA(o.depth) && (o.depth = 2), RA(o.colors) && (o.colors = !1), RA(o.customInspect) && (o.customInspect = !0), o.colors && (o.stylize = J), K(o, sA, o.depth);
            }
            B.inspect = d, d.colors = {
              bold: [1, 22],
              italic: [3, 23],
              underline: [4, 24],
              inverse: [7, 27],
              white: [37, 39],
              grey: [90, 39],
              black: [30, 39],
              blue: [34, 39],
              cyan: [36, 39],
              green: [32, 39],
              magenta: [35, 39],
              red: [31, 39],
              yellow: [33, 39]
            }, d.styles = {
              special: "cyan",
              number: "yellow",
              boolean: "yellow",
              undefined: "grey",
              null: "bold",
              string: "green",
              date: "magenta",
              // "name": intentionally not styling
              regexp: "red"
            };
            function J(sA, F) {
              var o = d.styles[F];
              return o ? "\x1B[" + d.colors[o][0] + "m" + sA + "\x1B[" + d.colors[o][1] + "m" : sA;
            }
            function q(sA, F) {
              return sA;
            }
            function AA(sA) {
              var F = {};
              return sA.forEach(function(o, h) {
                F[o] = !0;
              }), F;
            }
            function K(sA, F, o) {
              if (sA.customInspect && F && kA(F.inspect) && // Filter out the util module, it's inspect function is special
              F.inspect !== B.inspect && // Also filter out any prototype objects using the circular check.
              !(F.constructor && F.constructor.prototype === F)) {
                var h = F.inspect(o, sA);
                return w(h) || (h = K(sA, h, o)), h;
              }
              var _ = z(sA, F);
              if (_)
                return _;
              var oA = Object.keys(F), p = AA(oA);
              if (sA.showHidden && (oA = Object.getOwnPropertyNames(F)), Ae(F) && (oA.indexOf("message") >= 0 || oA.indexOf("description") >= 0))
                return T(F);
              if (oA.length === 0) {
                if (kA(F)) {
                  var rA = F.name ? ": " + F.name : "";
                  return sA.stylize("[Function" + rA + "]", "special");
                }
                if (DA(F))
                  return sA.stylize(RegExp.prototype.toString.call(F), "regexp");
                if (cA(F))
                  return sA.stylize(Date.prototype.toString.call(F), "date");
                if (Ae(F))
                  return T(F);
              }
              var QA = "", bA = !1, y = ["{", "}"];
              if (IA(F) && (bA = !0, y = ["[", "]"]), kA(F)) {
                var M = F.name ? ": " + F.name : "";
                QA = " [Function" + M + "]";
              }
              if (DA(F) && (QA = " " + RegExp.prototype.toString.call(F)), cA(F) && (QA = " " + Date.prototype.toUTCString.call(F)), Ae(F) && (QA = " " + T(F)), oA.length === 0 && (!bA || F.length == 0))
                return y[0] + QA + y[1];
              if (o < 0)
                return DA(F) ? sA.stylize(RegExp.prototype.toString.call(F), "regexp") : sA.stylize("[Object]", "special");
              sA.seen.push(F);
              var FA;
              return bA ? FA = H(sA, F, o, p, oA) : FA = oA.map(function(dA) {
                return eA(sA, F, o, p, dA, bA);
              }), sA.seen.pop(), CA(FA, QA, y);
            }
            function z(sA, F) {
              if (RA(F))
                return sA.stylize("undefined", "undefined");
              if (w(F)) {
                var o = "'" + JSON.stringify(F).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
                return sA.stylize(o, "string");
              }
              if (uA(F))
                return sA.stylize("" + F, "number");
              if (k(F))
                return sA.stylize("" + F, "boolean");
              if (tA(F))
                return sA.stylize("null", "null");
            }
            function T(sA) {
              return "[" + Error.prototype.toString.call(sA) + "]";
            }
            function H(sA, F, o, h, _) {
              for (var oA = [], p = 0, rA = F.length; p < rA; ++p)
                LA(F, String(p)) ? oA.push(eA(
                  sA,
                  F,
                  o,
                  h,
                  String(p),
                  !0
                )) : oA.push("");
              return _.forEach(function(QA) {
                QA.match(/^\d+$/) || oA.push(eA(
                  sA,
                  F,
                  o,
                  h,
                  QA,
                  !0
                ));
              }), oA;
            }
            function eA(sA, F, o, h, _, oA) {
              var p, rA, QA;
              if (QA = Object.getOwnPropertyDescriptor(F, _) || { value: F[_] }, QA.get ? QA.set ? rA = sA.stylize("[Getter/Setter]", "special") : rA = sA.stylize("[Getter]", "special") : QA.set && (rA = sA.stylize("[Setter]", "special")), LA(h, _) || (p = "[" + _ + "]"), rA || (sA.seen.indexOf(QA.value) < 0 ? (tA(o) ? rA = K(sA, QA.value, null) : rA = K(sA, QA.value, o - 1), rA.indexOf(`
`) > -1 && (oA ? rA = rA.split(`
`).map(function(bA) {
                return "  " + bA;
              }).join(`
`).slice(2) : rA = `
` + rA.split(`
`).map(function(bA) {
                return "   " + bA;
              }).join(`
`))) : rA = sA.stylize("[Circular]", "special")), RA(p)) {
                if (oA && _.match(/^\d+$/))
                  return rA;
                p = JSON.stringify("" + _), p.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (p = p.slice(1, -1), p = sA.stylize(p, "name")) : (p = p.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), p = sA.stylize(p, "string"));
              }
              return p + ": " + rA;
            }
            function CA(sA, F, o) {
              var h = sA.reduce(function(_, oA) {
                return oA.indexOf(`
`) >= 0, _ + oA.replace(/\u001b\[\d\d?m/g, "").length + 1;
              }, 0);
              return h > 60 ? o[0] + (F === "" ? "" : F + `
 `) + " " + sA.join(`,
  `) + " " + o[1] : o[0] + F + " " + sA.join(", ") + " " + o[1];
            }
            B.types = r(9490);
            function IA(sA) {
              return Array.isArray(sA);
            }
            B.isArray = IA;
            function k(sA) {
              return typeof sA == "boolean";
            }
            B.isBoolean = k;
            function tA(sA) {
              return sA === null;
            }
            B.isNull = tA;
            function lA(sA) {
              return sA == null;
            }
            B.isNullOrUndefined = lA;
            function uA(sA) {
              return typeof sA == "number";
            }
            B.isNumber = uA;
            function w(sA) {
              return typeof sA == "string";
            }
            B.isString = w;
            function v(sA) {
              return typeof sA == "symbol";
            }
            B.isSymbol = v;
            function RA(sA) {
              return sA === void 0;
            }
            B.isUndefined = RA;
            function DA(sA) {
              return $(sA) && EA(sA) === "[object RegExp]";
            }
            B.isRegExp = DA, B.types.isRegExp = DA;
            function $(sA) {
              return typeof sA == "object" && sA !== null;
            }
            B.isObject = $;
            function cA(sA) {
              return $(sA) && EA(sA) === "[object Date]";
            }
            B.isDate = cA, B.types.isDate = cA;
            function Ae(sA) {
              return $(sA) && (EA(sA) === "[object Error]" || sA instanceof Error);
            }
            B.isError = Ae, B.types.isNativeError = Ae;
            function kA(sA) {
              return typeof sA == "function";
            }
            B.isFunction = kA;
            function VA(sA) {
              return sA === null || typeof sA == "boolean" || typeof sA == "number" || typeof sA == "string" || typeof sA == "symbol" || // ES6 symbol
              typeof sA > "u";
            }
            B.isPrimitive = VA, B.isBuffer = r(1201);
            function EA(sA) {
              return Object.prototype.toString.call(sA);
            }
            function zA(sA) {
              return sA < 10 ? "0" + sA.toString(10) : sA.toString(10);
            }
            var OA = [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "May",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Oct",
              "Nov",
              "Dec"
            ];
            function xA() {
              var sA = /* @__PURE__ */ new Date(), F = [
                zA(sA.getHours()),
                zA(sA.getMinutes()),
                zA(sA.getSeconds())
              ].join(":");
              return [sA.getDate(), OA[sA.getMonth()], F].join(" ");
            }
            B.log = function() {
              console.log("%s - %s", xA(), B.format.apply(B, arguments));
            }, B.inherits = r(9784), B._extend = function(sA, F) {
              if (!F || !$(F)) return sA;
              for (var o = Object.keys(F), h = o.length; h--; )
                sA[o[h]] = F[o[h]];
              return sA;
            };
            function LA(sA, F) {
              return Object.prototype.hasOwnProperty.call(sA, F);
            }
            var yA = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
            B.promisify = function(F) {
              if (typeof F != "function")
                throw new TypeError('The "original" argument must be of type Function');
              if (yA && F[yA]) {
                var o = F[yA];
                if (typeof o != "function")
                  throw new TypeError('The "util.promisify.custom" argument must be of type Function');
                return Object.defineProperty(o, yA, {
                  value: o,
                  enumerable: !1,
                  writable: !1,
                  configurable: !0
                }), o;
              }
              function o() {
                for (var h, _, oA = new Promise(function(QA, bA) {
                  h = QA, _ = bA;
                }), p = [], rA = 0; rA < arguments.length; rA++)
                  p.push(arguments[rA]);
                p.push(function(QA, bA) {
                  QA ? _(QA) : h(bA);
                });
                try {
                  F.apply(this, p);
                } catch (QA) {
                  _(QA);
                }
                return oA;
              }
              return Object.setPrototypeOf(o, Object.getPrototypeOf(F)), yA && Object.defineProperty(o, yA, {
                value: o,
                enumerable: !1,
                writable: !1,
                configurable: !0
              }), Object.defineProperties(
                o,
                a(F)
              );
            }, B.promisify.custom = yA;
            function TA(sA, F) {
              if (!sA) {
                var o = new Error("Promise was rejected with a falsy value");
                o.reason = sA, sA = o;
              }
              return F(sA);
            }
            function fA(sA) {
              if (typeof sA != "function")
                throw new TypeError('The "original" argument must be of type Function');
              function F() {
                for (var o = [], h = 0; h < arguments.length; h++)
                  o.push(arguments[h]);
                var _ = o.pop();
                if (typeof _ != "function")
                  throw new TypeError("The last argument must be of type Function");
                var oA = this, p = function() {
                  return _.apply(oA, arguments);
                };
                sA.apply(this, o).then(
                  function(rA) {
                    A.nextTick(p.bind(null, null, rA));
                  },
                  function(rA) {
                    A.nextTick(TA.bind(null, rA, p));
                  }
                );
              }
              return Object.setPrototypeOf(F, Object.getPrototypeOf(sA)), Object.defineProperties(
                F,
                a(sA)
              ), F;
            }
            B.callbackify = fA;
          },
          /***/
          3381(Q, B, r) {
            var A = r(8404), a = r(821), D = r(6601), x = r(2774), N = r(8109), P = r(7106), d = x("Object.prototype.toString"), J = r(6626)(), q = typeof globalThis > "u" ? r.g : globalThis, AA = a(), K = x("String.prototype.slice"), z = x("Array.prototype.indexOf", !0) || function(IA, k) {
              for (var tA = 0; tA < IA.length; tA += 1)
                if (IA[tA] === k)
                  return tA;
              return -1;
            }, T = { __proto__: null };
            J && N && P ? A(AA, function(CA) {
              var IA = new q[CA]();
              if (Symbol.toStringTag in IA && P) {
                var k = P(IA), tA = N(k, Symbol.toStringTag);
                if (!tA && k) {
                  var lA = P(k);
                  tA = N(lA, Symbol.toStringTag);
                }
                if (tA && tA.get) {
                  var uA = D(tA.get);
                  T[
                    /** @type {`$${import('.').TypedArrayName}`} */
                    "$" + CA
                  ] = uA;
                }
              }
            }) : A(AA, function(CA) {
              var IA = new q[CA](), k = IA.slice || IA.set;
              if (k) {
                var tA = (
                  /** @type {import('./types').BoundSlice | import('./types').BoundSet} */
                  // @ts-expect-error TODO FIXME
                  D(k)
                );
                T[
                  /** @type {`$${import('.').TypedArrayName}`} */
                  "$" + CA
                ] = tA;
              }
            });
            var H = function(IA) {
              var k = !1;
              return A(
                /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
                T,
                /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
                function(tA, lA) {
                  if (!k)
                    try {
                      "$" + tA(IA) === lA && (k = /** @type {import('.').TypedArrayName} */
                      K(lA, 1));
                    } catch {
                    }
                }
              ), k;
            }, eA = function(IA) {
              var k = !1;
              return A(
                /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
                T,
                /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
                function(tA, lA) {
                  if (!k)
                    try {
                      tA(IA), k = /** @type {import('.').TypedArrayName} */
                      K(lA, 1);
                    } catch {
                    }
                }
              ), k;
            };
            Q.exports = function(IA) {
              if (!IA || typeof IA != "object")
                return !1;
              if (!J) {
                var k = K(d(IA), 8, -1);
                return z(AA, k) > -1 ? k : k !== "Object" ? !1 : eA(IA);
              }
              return N ? H(IA) : null;
            };
          },
          /***/
          6457(Q, B, r) {
            var A, a, D;
            (function(x, N) {
              a = [], A = N, D = typeof A == "function" ? A.apply(B, a) : A, D !== void 0 && (Q.exports = D);
            })(this, function() {
              function x(K, z) {
                return typeof z > "u" ? z = { autoBom: !1 } : typeof z != "object" && (console.warn("Deprecated: Expected third argument to be a object"), z = { autoBom: !z }), z.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(K.type) ? new Blob(["\uFEFF", K], { type: K.type }) : K;
              }
              function N(K, z, T) {
                var H = new XMLHttpRequest();
                H.open("GET", K), H.responseType = "blob", H.onload = function() {
                  AA(H.response, z, T);
                }, H.onerror = function() {
                  console.error("could not download file");
                }, H.send();
              }
              function P(K) {
                var z = new XMLHttpRequest();
                z.open("HEAD", K, !1);
                try {
                  z.send();
                } catch {
                }
                return 200 <= z.status && 299 >= z.status;
              }
              function d(K) {
                try {
                  K.dispatchEvent(new MouseEvent("click"));
                } catch {
                  var z = document.createEvent("MouseEvents");
                  z.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), K.dispatchEvent(z);
                }
              }
              var J = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof r.g == "object" && r.g.global === r.g ? r.g : void 0, q = J.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), AA = J.saveAs || (typeof window != "object" || window !== J ? function() {
              } : typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !q ? function(K, z, T) {
                var H = J.URL || J.webkitURL, eA = document.createElement("a");
                z = z || K.name || "download", eA.download = z, eA.rel = "noopener", typeof K == "string" ? (eA.href = K, eA.origin === location.origin ? d(eA) : P(eA.href) ? N(K, z, T) : d(eA, eA.target = "_blank")) : (eA.href = H.createObjectURL(K), setTimeout(function() {
                  H.revokeObjectURL(eA.href);
                }, 4e4), setTimeout(function() {
                  d(eA);
                }, 0));
              } : "msSaveOrOpenBlob" in navigator ? function(K, z, T) {
                if (z = z || K.name || "download", typeof K != "string") navigator.msSaveOrOpenBlob(x(K, T), z);
                else if (P(K)) N(K, z, T);
                else {
                  var H = document.createElement("a");
                  H.href = K, H.target = "_blank", setTimeout(function() {
                    d(H);
                  });
                }
              } : function(K, z, T, H) {
                if (H = H || open("", "_blank"), H && (H.document.title = H.document.body.innerText = "downloading..."), typeof K == "string") return N(K, z, T);
                var eA = K.type === "application/octet-stream", CA = /constructor/i.test(J.HTMLElement) || J.safari, IA = /CriOS\/[\d]+/.test(navigator.userAgent);
                if ((IA || eA && CA || q) && typeof FileReader < "u") {
                  var k = new FileReader();
                  k.onloadend = function() {
                    var uA = k.result;
                    uA = IA ? uA : uA.replace(/^data:[^;]*;/, "data:attachment/file;"), H ? H.location.href = uA : location = uA, H = null;
                  }, k.readAsDataURL(K);
                } else {
                  var tA = J.URL || J.webkitURL, lA = tA.createObjectURL(K);
                  H ? H.location = lA : location.href = lA, H = null, setTimeout(function() {
                    tA.revokeObjectURL(lA);
                  }, 4e4);
                }
              });
              J.saveAs = AA.saveAs = AA, Q.exports = AA;
            });
          },
          /***/
          6274() {
          },
          /***/
          8535() {
          },
          /***/
          5470() {
          },
          /***/
          3779() {
          },
          /***/
          7199() {
          },
          /***/
          5117(Q) {
            Q.exports = typeof ArrayBuffer < "u" && typeof DataView < "u";
          },
          /***/
          4074(Q, B, r) {
            var A = r(5117), a = r(5144), D = r(7756), x = r(8681), N = r(3598), P = r(6341), d = r(9391), J = r(8819), q = r(5719), AA = r(4092), K = r(1182), z = r(9877), T = r(8607), H = r(443), eA = r(8663), CA = r(6044), IA = r(6921), k = IA.enforce, tA = IA.get, lA = D.Int8Array, uA = lA && lA.prototype, w = D.Uint8ClampedArray, v = w && w.prototype, RA = lA && T(lA), DA = uA && T(uA), $ = Object.prototype, cA = D.TypeError, Ae = eA("toStringTag"), kA = CA("TYPED_ARRAY_TAG"), VA = "TypedArrayConstructor", EA = A && !!H && d(D.opera) !== "Opera", zA = !1, OA, xA, LA, yA = {
              Int8Array: 1,
              Uint8Array: 1,
              Uint8ClampedArray: 1,
              Int16Array: 2,
              Uint16Array: 2,
              Int32Array: 4,
              Uint32Array: 4,
              Float32Array: 4,
              Float64Array: 8
            }, TA = {
              BigInt64Array: 8,
              BigUint64Array: 8
            }, fA = function(rA) {
              if (!N(rA)) return !1;
              var QA = d(rA);
              return QA === "DataView" || P(yA, QA) || P(TA, QA);
            }, sA = function(p) {
              var rA = T(p);
              if (N(rA)) {
                var QA = tA(rA);
                return QA && P(QA, VA) ? QA[VA] : sA(rA);
              }
            }, F = function(p) {
              if (!N(p)) return !1;
              var rA = d(p);
              return P(yA, rA) || P(TA, rA);
            }, o = function(p) {
              if (F(p)) return p;
              throw new cA("Target is not a typed array");
            }, h = function(p) {
              if (x(p) && (!H || z(RA, p))) return p;
              throw new cA(J(p) + " is not a typed array constructor");
            }, _ = function(p, rA, QA, bA) {
              if (a) {
                if (QA) for (var y in yA) {
                  var M = D[y];
                  if (M && P(M.prototype, p)) try {
                    delete M.prototype[p];
                  } catch {
                    try {
                      M.prototype[p] = rA;
                    } catch {
                    }
                  }
                }
                (!DA[p] || QA) && AA(DA, p, QA ? rA : EA && uA[p] || rA, bA);
              }
            }, oA = function(p, rA, QA) {
              var bA, y;
              if (a) {
                if (H) {
                  if (QA) {
                    for (bA in yA)
                      if (y = D[bA], y && P(y, p)) try {
                        delete y[p];
                      } catch {
                      }
                  }
                  if (!RA[p] || QA)
                    try {
                      return AA(RA, p, QA ? rA : EA && RA[p] || rA);
                    } catch {
                    }
                  else return;
                }
                for (bA in yA)
                  y = D[bA], y && (!y[p] || QA) && AA(y, p, rA);
              }
            };
            for (OA in yA)
              xA = D[OA], LA = xA && xA.prototype, LA ? k(LA)[VA] = xA : EA = !1;
            for (OA in TA)
              xA = D[OA], LA = xA && xA.prototype, LA && (k(LA)[VA] = xA);
            if ((!EA || !x(RA) || RA === Function.prototype) && (RA = function() {
              throw new cA("Incorrect invocation");
            }, EA))
              for (OA in yA)
                D[OA] && H(D[OA], RA);
            if ((!EA || !DA || DA === $) && (DA = RA.prototype, EA))
              for (OA in yA)
                D[OA] && H(D[OA].prototype, DA);
            if (EA && T(v) !== DA && H(v, DA), a && !P(DA, Ae)) {
              zA = !0, K(DA, Ae, {
                configurable: !0,
                get: function() {
                  return N(this) ? this[kA] : void 0;
                }
              });
              for (OA in yA) D[OA] && q(D[OA].prototype, kA, OA);
            }
            Q.exports = {
              NATIVE_ARRAY_BUFFER_VIEWS: EA,
              TYPED_ARRAY_TAG: zA && kA,
              aTypedArray: o,
              aTypedArrayConstructor: h,
              exportTypedArrayMethod: _,
              exportTypedArrayStaticMethod: oA,
              getTypedArrayConstructor: sA,
              isView: fA,
              isTypedArray: F,
              TypedArray: RA,
              TypedArrayPrototype: DA
            };
          },
          /***/
          4415(Q, B) {
            function r(A, a, D) {
              return a in A ? Object.defineProperty(A, a, { value: D, enumerable: !0, configurable: !0, writable: !0 }) : A[a] = D, A;
            }
            B._ = r;
          },
          /***/
          8395(Q, B, r) {
            B._ = r(1635).__decorate;
          },
          /***/
          821(Q, B, r) {
            var A = r(884), a = typeof globalThis > "u" ? r.g : globalThis;
            Q.exports = function() {
              for (var x = [], N = 0; N < A.length; N++)
                typeof a[A[N]] == "function" && (x[x.length] = A[N]);
              return x;
            };
          },
          /***/
          890(Q, B, r) {
            var A = r(6341), a = r(8468), D = r(5888), x = r(3793), N = D.data, P = D.normalize, d = "USE_FUNCTION_CONSTRUCTOR", J = "AsyncIteratorPrototype", q = function(AA, K) {
              if (a(AA)) for (var z = 0; z < AA.length; z++) N[P(AA[z])] = K;
            };
            Q.exports = function(AA) {
              AA && typeof AA == "object" && (q(AA.useNative, D.NATIVE), q(AA.usePolyfill, D.POLYFILL), q(AA.useFeatureDetection, null), A(AA, d) && (x[d] = !!AA[d]), A(AA, J) && (x[J] = AA[J]));
            };
          },
          /***/
          1078(Q, B, r) {
            var A = r(8681), a = r(8819), D = TypeError;
            Q.exports = function(x) {
              if (A(x)) return x;
              throw new D(a(x) + " is not a function");
            };
          },
          /***/
          7222(Q, B, r) {
            var A = r(2657), a = String, D = TypeError;
            Q.exports = function(x) {
              if (A(x)) return x;
              throw new D("Can't set " + a(x) + " as a prototype");
            };
          },
          /***/
          1825(Q, B, r) {
            var A = r(8663), a = r(4860), D = r(2333).f, x = A("unscopables"), N = Array.prototype;
            N[x] === void 0 && D(N, x, {
              configurable: !0,
              value: a(null)
            }), Q.exports = function(P) {
              N[x][P] = !0;
            };
          },
          /***/
          2091(Q, B, r) {
            var A = r(3598), a = String, D = TypeError;
            Q.exports = function(x) {
              if (A(x)) return x;
              throw new D(a(x) + " is not an object");
            };
          },
          /***/
          3161(Q, B, r) {
            var A = r(3297), a = r(4918), D = r(4730);
            Q.exports = function(N) {
              for (var P = A(this), d = D(P), J = arguments.length, q = a(J > 1 ? arguments[1] : void 0, d), AA = J > 2 ? arguments[2] : void 0, K = AA === void 0 ? d : a(AA, d); K > q; ) P[q++] = N;
              return P;
            };
          },
          /***/
          789(Q, B, r) {
            var A = r(5137), a = r(4918), D = r(4730), x = function(N) {
              return function(P, d, J) {
                var q = A(P), AA = D(q);
                if (AA === 0) return !N && -1;
                var K = a(J, AA), z;
                if (N && d !== d) {
                  for (; AA > K; )
                    if (z = q[K++], z !== z) return !0;
                } else for (; AA > K; K++)
                  if ((N || K in q) && q[K] === d) return N || K || 0;
                return !N && -1;
              };
            };
            Q.exports = {
              // `Array.prototype.includes` method
              // https://tc39.es/ecma262/#sec-array.prototype.includes
              includes: x(!0),
              // `Array.prototype.indexOf` method
              // https://tc39.es/ecma262/#sec-array.prototype.indexof
              indexOf: x(!1)
            };
          },
          /***/
          2740(Q, B, r) {
            var A = r(1212);
            Q.exports = A([].slice);
          },
          /***/
          644(Q, B, r) {
            var A = r(2740), a = Math.floor, D = function(x, N) {
              var P = x.length;
              if (P < 8)
                for (var d = 1, J, q; d < P; ) {
                  for (q = d, J = x[d]; q && N(x[q - 1], J) > 0; )
                    x[q] = x[--q];
                  q !== d++ && (x[q] = J);
                }
              else
                for (var AA = a(P / 2), K = D(A(x, 0, AA), N), z = D(A(x, AA), N), T = K.length, H = z.length, eA = 0, CA = 0; eA < T || CA < H; )
                  x[eA + CA] = eA < T && CA < H ? N(K[eA], z[CA]) <= 0 ? K[eA++] : z[CA++] : eA < T ? K[eA++] : z[CA++];
              return x;
            };
            Q.exports = D;
          },
          /***/
          8420(Q, B, r) {
            var A = r(1212), a = A({}.toString), D = A("".slice);
            Q.exports = function(x) {
              return D(a(x), 8, -1);
            };
          },
          /***/
          9391(Q, B, r) {
            var A = r(7920), a = r(8681), D = r(8420), x = r(8663), N = x("toStringTag"), P = Object, d = D(/* @__PURE__ */ (function() {
              return arguments;
            })()) === "Arguments", J = function(q, AA) {
              try {
                return q[AA];
              } catch {
              }
            };
            Q.exports = A ? D : function(q) {
              var AA, K, z;
              return q === void 0 ? "Undefined" : q === null ? "Null" : typeof (K = J(AA = P(q), N)) == "string" ? K : d ? D(AA) : (z = D(AA)) === "Object" && a(AA.callee) ? "Arguments" : z;
            };
          },
          /***/
          8032(Q, B, r) {
            var A = r(6341), a = r(7523), D = r(423), x = r(2333);
            Q.exports = function(N, P, d) {
              for (var J = a(P), q = x.f, AA = D.f, K = 0; K < J.length; K++) {
                var z = J[K];
                !A(N, z) && !(d && A(d, z)) && q(N, z, AA(P, z));
              }
            };
          },
          /***/
          5071(Q, B, r) {
            var A = r(299);
            Q.exports = !A(function() {
              function a() {
              }
              return a.prototype.constructor = null, Object.getPrototypeOf(new a()) !== a.prototype;
            });
          },
          /***/
          5719(Q, B, r) {
            var A = r(5144), a = r(2333), D = r(8264);
            Q.exports = A ? function(x, N, P) {
              return a.f(x, N, D(1, P));
            } : function(x, N, P) {
              return x[N] = P, x;
            };
          },
          /***/
          8264(Q) {
            Q.exports = function(B, r) {
              return {
                enumerable: !(B & 1),
                configurable: !(B & 2),
                writable: !(B & 4),
                value: r
              };
            };
          },
          /***/
          1182(Q, B, r) {
            var A = r(3383), a = r(2333);
            Q.exports = function(D, x, N) {
              return N.get && A(N.get, x, { getter: !0 }), N.set && A(N.set, x, { setter: !0 }), a.f(D, x, N);
            };
          },
          /***/
          4092(Q, B, r) {
            var A = r(8681), a = r(2333), D = r(3383), x = r(7309);
            Q.exports = function(N, P, d, J) {
              J || (J = {});
              var q = J.enumerable, AA = J.name !== void 0 ? J.name : P;
              if (A(d) && D(d, AA, J), J.global)
                q ? N[P] = d : x(P, d);
              else {
                try {
                  J.unsafe ? N[P] && (q = !0) : delete N[P];
                } catch {
                }
                q ? N[P] = d : a.f(N, P, {
                  value: d,
                  enumerable: !1,
                  configurable: !J.nonConfigurable,
                  writable: !J.nonWritable
                });
              }
              return N;
            };
          },
          /***/
          7309(Q, B, r) {
            var A = r(7756), a = Object.defineProperty;
            Q.exports = function(D, x) {
              try {
                a(A, D, { value: x, configurable: !0, writable: !0 });
              } catch {
                A[D] = x;
              }
              return x;
            };
          },
          /***/
          5144(Q, B, r) {
            var A = r(299);
            Q.exports = !A(function() {
              return Object.defineProperty({}, 1, { get: function() {
                return 7;
              } })[1] !== 7;
            });
          },
          /***/
          2283(Q, B, r) {
            var A = r(7756), a = r(3598), D = A.document, x = a(D) && a(D.createElement);
            Q.exports = function(N) {
              return x ? D.createElement(N) : {};
            };
          },
          /***/
          2555(Q) {
            Q.exports = [
              "constructor",
              "hasOwnProperty",
              "isPrototypeOf",
              "propertyIsEnumerable",
              "toLocaleString",
              "toString",
              "valueOf"
            ];
          },
          /***/
          5337(Q, B, r) {
            var A = r(8115), a = A.match(/firefox\/(\d+)/i);
            Q.exports = !!a && +a[1];
          },
          /***/
          7383(Q, B, r) {
            var A = r(8115);
            Q.exports = /MSIE|Trident/.test(A);
          },
          /***/
          8115(Q, B, r) {
            var A = r(7756), a = A.navigator, D = a && a.userAgent;
            Q.exports = D ? String(D) : "";
          },
          /***/
          2227(Q, B, r) {
            var A = r(7756), a = r(8115), D = A.process, x = A.Deno, N = D && D.versions || x && x.version, P = N && N.v8, d, J;
            P && (d = P.split("."), J = d[0] > 0 && d[0] < 4 ? 1 : +(d[0] + d[1])), !J && a && (d = a.match(/Edge\/(\d+)/), (!d || d[1] >= 74) && (d = a.match(/Chrome\/(\d+)/), d && (J = +d[1]))), Q.exports = J;
          },
          /***/
          4507(Q, B, r) {
            var A = r(8115), a = A.match(/AppleWebKit\/(\d+)\./);
            Q.exports = !!a && +a[1];
          },
          /***/
          3762(Q, B, r) {
            var A = r(7756), a = r(423).f, D = r(5719), x = r(4092), N = r(7309), P = r(8032), d = r(5888);
            Q.exports = function(J, q) {
              var AA = J.target, K = J.global, z = J.stat, T, H, eA, CA, IA, k;
              if (K ? H = A : z ? H = A[AA] || N(AA, {}) : H = A[AA] && A[AA].prototype, H) for (eA in q) {
                if (IA = q[eA], J.dontCallGetSet ? (k = a(H, eA), CA = k && k.value) : CA = H[eA], T = d(K ? eA : AA + (z ? "." : "#") + eA, J.forced), !T && CA !== void 0) {
                  if (typeof IA == typeof CA) continue;
                  P(IA, CA);
                }
                (J.sham || CA && CA.sham) && D(IA, "sham", !0), x(H, eA, IA, J);
              }
            };
          },
          /***/
          299(Q) {
            Q.exports = function(B) {
              try {
                return !!B();
              } catch {
                return !0;
              }
            };
          },
          /***/
          1676(Q, B, r) {
            var A = r(299);
            Q.exports = !A(function() {
              var a = (function() {
              }).bind();
              return typeof a != "function" || a.hasOwnProperty("prototype");
            });
          },
          /***/
          8993(Q, B, r) {
            var A = r(1676), a = Function.prototype.call;
            Q.exports = A ? a.bind(a) : function() {
              return a.apply(a, arguments);
            };
          },
          /***/
          4378(Q, B, r) {
            var A = r(5144), a = r(6341), D = Function.prototype, x = A && Object.getOwnPropertyDescriptor, N = a(D, "name"), P = N && (function() {
            }).name === "something", d = N && (!A || A && x(D, "name").configurable);
            Q.exports = {
              EXISTS: N,
              PROPER: P,
              CONFIGURABLE: d
            };
          },
          /***/
          4494(Q, B, r) {
            var A = r(1212), a = r(1078);
            Q.exports = function(D, x, N) {
              try {
                return A(a(Object.getOwnPropertyDescriptor(D, x)[N]));
              } catch {
              }
            };
          },
          /***/
          5336(Q, B, r) {
            var A = r(8420), a = r(1212);
            Q.exports = function(D) {
              if (A(D) === "Function") return a(D);
            };
          },
          /***/
          1212(Q, B, r) {
            var A = r(1676), a = Function.prototype, D = a.call, x = A && a.bind.bind(D, D);
            Q.exports = A ? x : function(N) {
              return function() {
                return D.apply(N, arguments);
              };
            };
          },
          /***/
          7139(Q, B, r) {
            var A = r(7756), a = r(8681), D = function(x) {
              return a(x) ? x : void 0;
            };
            Q.exports = function(x, N) {
              return arguments.length < 2 ? D(A[x]) : A[x] && A[x][N];
            };
          },
          /***/
          9738(Q, B, r) {
            var A = r(1078), a = r(6297);
            Q.exports = function(D, x) {
              var N = D[x];
              return a(N) ? void 0 : A(N);
            };
          },
          /***/
          7756(Q, B, r) {
            var A = function(a) {
              return a && a.Math === Math && a;
            };
            Q.exports = // eslint-disable-next-line es/no-global-this -- safe
            A(typeof globalThis == "object" && globalThis) || A(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
            A(typeof self == "object" && self) || A(typeof r.g == "object" && r.g) || A(typeof this == "object" && this) || // eslint-disable-next-line no-new-func -- fallback
            /* @__PURE__ */ (function() {
              return this;
            })() || Function("return this")();
          },
          /***/
          6341(Q, B, r) {
            var A = r(1212), a = r(3297), D = A({}.hasOwnProperty);
            Q.exports = Object.hasOwn || function(N, P) {
              return D(a(N), P);
            };
          },
          /***/
          2993(Q) {
            Q.exports = {};
          },
          /***/
          4329(Q, B, r) {
            var A = r(7139);
            Q.exports = A("document", "documentElement");
          },
          /***/
          7657(Q, B, r) {
            var A = r(5144), a = r(299), D = r(2283);
            Q.exports = !A && !a(function() {
              return Object.defineProperty(D("div"), "a", {
                get: function() {
                  return 7;
                }
              }).a !== 7;
            });
          },
          /***/
          2203(Q, B, r) {
            var A = r(1212), a = r(299), D = r(8420), x = Object, N = A("".split);
            Q.exports = a(function() {
              return !x("z").propertyIsEnumerable(0);
            }) ? function(P) {
              return D(P) === "String" ? N(P, "") : x(P);
            } : x;
          },
          /***/
          4550(Q, B, r) {
            var A = r(1212), a = r(8681), D = r(3793), x = A(Function.toString);
            a(D.inspectSource) || (D.inspectSource = function(N) {
              return x(N);
            }), Q.exports = D.inspectSource;
          },
          /***/
          6921(Q, B, r) {
            var A = r(1194), a = r(7756), D = r(3598), x = r(5719), N = r(6341), P = r(3793), d = r(7099), J = r(2993), q = "Object already initialized", AA = a.TypeError, K = a.WeakMap, z, T, H, eA = function(tA) {
              return H(tA) ? T(tA) : z(tA, {});
            }, CA = function(tA) {
              return function(lA) {
                var uA;
                if (!D(lA) || (uA = T(lA)).type !== tA)
                  throw new AA("Incompatible receiver, " + tA + " required");
                return uA;
              };
            };
            if (A || P.state) {
              var IA = P.state || (P.state = new K());
              IA.get = IA.get, IA.has = IA.has, IA.set = IA.set, z = function(tA, lA) {
                if (IA.has(tA)) throw new AA(q);
                return lA.facade = tA, IA.set(tA, lA), lA;
              }, T = function(tA) {
                return IA.get(tA) || {};
              }, H = function(tA) {
                return IA.has(tA);
              };
            } else {
              var k = d("state");
              J[k] = !0, z = function(tA, lA) {
                if (N(tA, k)) throw new AA(q);
                return lA.facade = tA, x(tA, k, lA), lA;
              }, T = function(tA) {
                return N(tA, k) ? tA[k] : {};
              }, H = function(tA) {
                return N(tA, k);
              };
            }
            Q.exports = {
              set: z,
              get: T,
              has: H,
              enforce: eA,
              getterFor: CA
            };
          },
          /***/
          8468(Q, B, r) {
            var A = r(8420);
            Q.exports = Array.isArray || function(D) {
              return A(D) === "Array";
            };
          },
          /***/
          8681(Q) {
            var B = typeof document == "object" && document.all;
            Q.exports = typeof B > "u" && B !== void 0 ? function(r) {
              return typeof r == "function" || r === B;
            } : function(r) {
              return typeof r == "function";
            };
          },
          /***/
          5888(Q, B, r) {
            var A = r(299), a = r(8681), D = /#|\.prototype\./, x = function(q, AA) {
              var K = P[N(q)];
              return K === J ? !0 : K === d ? !1 : a(AA) ? A(AA) : !!AA;
            }, N = x.normalize = function(q) {
              return String(q).replace(D, ".").toLowerCase();
            }, P = x.data = {}, d = x.NATIVE = "N", J = x.POLYFILL = "P";
            Q.exports = x;
          },
          /***/
          6297(Q) {
            Q.exports = function(B) {
              return B == null;
            };
          },
          /***/
          3598(Q, B, r) {
            var A = r(8681);
            Q.exports = function(a) {
              return typeof a == "object" ? a !== null : A(a);
            };
          },
          /***/
          2657(Q, B, r) {
            var A = r(3598);
            Q.exports = function(a) {
              return A(a) || a === null;
            };
          },
          /***/
          7695(Q) {
            Q.exports = !1;
          },
          /***/
          5985(Q, B, r) {
            var A = r(7139), a = r(8681), D = r(9877), x = r(8300), N = Object;
            Q.exports = x ? function(P) {
              return typeof P == "symbol";
            } : function(P) {
              var d = A("Symbol");
              return a(d) && D(d.prototype, N(P));
            };
          },
          /***/
          4730(Q, B, r) {
            var A = r(8266);
            Q.exports = function(a) {
              return A(a.length);
            };
          },
          /***/
          3383(Q, B, r) {
            var A = r(1212), a = r(299), D = r(8681), x = r(6341), N = r(5144), P = r(4378).CONFIGURABLE, d = r(4550), J = r(6921), q = J.enforce, AA = J.get, K = String, z = Object.defineProperty, T = A("".slice), H = A("".replace), eA = A([].join), CA = N && !a(function() {
              return z(function() {
              }, "length", { value: 8 }).length !== 8;
            }), IA = String(String).split("String"), k = Q.exports = function(tA, lA, uA) {
              T(K(lA), 0, 7) === "Symbol(" && (lA = "[" + H(K(lA), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), uA && uA.getter && (lA = "get " + lA), uA && uA.setter && (lA = "set " + lA), (!x(tA, "name") || P && tA.name !== lA) && (N ? z(tA, "name", { value: lA, configurable: !0 }) : tA.name = lA), CA && uA && x(uA, "arity") && tA.length !== uA.arity && z(tA, "length", { value: uA.arity });
              try {
                uA && x(uA, "constructor") && uA.constructor ? N && z(tA, "prototype", { writable: !1 }) : tA.prototype && (tA.prototype = void 0);
              } catch {
              }
              var w = q(tA);
              return x(w, "source") || (w.source = eA(IA, typeof lA == "string" ? lA : "")), tA;
            };
            Function.prototype.toString = k(function() {
              return D(this) && AA(this).source || d(this);
            }, "toString");
          },
          /***/
          2537(Q) {
            var B = Math.ceil, r = Math.floor;
            Q.exports = Math.trunc || function(a) {
              var D = +a;
              return (D > 0 ? r : B)(D);
            };
          },
          /***/
          4860(Q, B, r) {
            var A = r(2091), a = r(2197), D = r(2555), x = r(2993), N = r(4329), P = r(2283), d = r(7099), J = ">", q = "<", AA = "prototype", K = "script", z = d("IE_PROTO"), T = function() {
            }, H = function(tA) {
              return q + K + J + tA + q + "/" + K + J;
            }, eA = function(tA) {
              tA.write(H("")), tA.close();
              var lA = tA.parentWindow.Object;
              return tA = null, lA;
            }, CA = function() {
              var tA = P("iframe"), lA = "java" + K + ":", uA;
              return tA.style.display = "none", N.appendChild(tA), tA.src = String(lA), uA = tA.contentWindow.document, uA.open(), uA.write(H("document.F=Object")), uA.close(), uA.F;
            }, IA, k = function() {
              try {
                IA = new ActiveXObject("htmlfile");
              } catch {
              }
              k = typeof document < "u" ? document.domain && IA ? eA(IA) : CA() : eA(IA);
              for (var tA = D.length; tA--; ) delete k[AA][D[tA]];
              return k();
            };
            x[z] = !0, Q.exports = Object.create || function(lA, uA) {
              var w;
              return lA !== null ? (T[AA] = A(lA), w = new T(), T[AA] = null, w[z] = lA) : w = k(), uA === void 0 ? w : a.f(w, uA);
            };
          },
          /***/
          2197(Q, B, r) {
            var A = r(5144), a = r(2538), D = r(2333), x = r(2091), N = r(5137), P = r(9428);
            B.f = A && !a ? Object.defineProperties : function(J, q) {
              x(J);
              for (var AA = N(q), K = P(q), z = K.length, T = 0, H; z > T; ) D.f(J, H = K[T++], AA[H]);
              return J;
            };
          },
          /***/
          2333(Q, B, r) {
            var A = r(5144), a = r(7657), D = r(2538), x = r(2091), N = r(1413), P = TypeError, d = Object.defineProperty, J = Object.getOwnPropertyDescriptor, q = "enumerable", AA = "configurable", K = "writable";
            B.f = A ? D ? function(T, H, eA) {
              if (x(T), H = N(H), x(eA), typeof T == "function" && H === "prototype" && "value" in eA && K in eA && !eA[K]) {
                var CA = J(T, H);
                CA && CA[K] && (T[H] = eA.value, eA = {
                  configurable: AA in eA ? eA[AA] : CA[AA],
                  enumerable: q in eA ? eA[q] : CA[q],
                  writable: !1
                });
              }
              return d(T, H, eA);
            } : d : function(T, H, eA) {
              if (x(T), H = N(H), x(eA), a) try {
                return d(T, H, eA);
              } catch {
              }
              if ("get" in eA || "set" in eA) throw new P("Accessors not supported");
              return "value" in eA && (T[H] = eA.value), T;
            };
          },
          /***/
          423(Q, B, r) {
            var A = r(5144), a = r(8993), D = r(4961), x = r(8264), N = r(5137), P = r(1413), d = r(6341), J = r(7657), q = Object.getOwnPropertyDescriptor;
            B.f = A ? q : function(K, z) {
              if (K = N(K), z = P(z), J) try {
                return q(K, z);
              } catch {
              }
              if (d(K, z)) return x(!a(D.f, K, z), K[z]);
            };
          },
          /***/
          5412(Q, B, r) {
            var A = r(3120), a = r(2555), D = a.concat("length", "prototype");
            B.f = Object.getOwnPropertyNames || function(N) {
              return A(N, D);
            };
          },
          /***/
          4073(Q, B) {
            B.f = Object.getOwnPropertySymbols;
          },
          /***/
          8607(Q, B, r) {
            var A = r(6341), a = r(8681), D = r(3297), x = r(7099), N = r(5071), P = x("IE_PROTO"), d = Object, J = d.prototype;
            Q.exports = N ? d.getPrototypeOf : function(q) {
              var AA = D(q);
              if (A(AA, P)) return AA[P];
              var K = AA.constructor;
              return a(K) && AA instanceof K ? K.prototype : AA instanceof d ? J : null;
            };
          },
          /***/
          9877(Q, B, r) {
            var A = r(1212);
            Q.exports = A({}.isPrototypeOf);
          },
          /***/
          3120(Q, B, r) {
            var A = r(1212), a = r(6341), D = r(5137), x = r(789).indexOf, N = r(2993), P = A([].push);
            Q.exports = function(d, J) {
              var q = D(d), AA = 0, K = [], z;
              for (z in q) !a(N, z) && a(q, z) && P(K, z);
              for (; J.length > AA; ) a(q, z = J[AA++]) && (~x(K, z) || P(K, z));
              return K;
            };
          },
          /***/
          9428(Q, B, r) {
            var A = r(3120), a = r(2555);
            Q.exports = Object.keys || function(x) {
              return A(x, a);
            };
          },
          /***/
          4961(Q, B) {
            var r = {}.propertyIsEnumerable, A = Object.getOwnPropertyDescriptor, a = A && !r.call({ 1: 2 }, 1);
            B.f = a ? function(x) {
              var N = A(this, x);
              return !!N && N.enumerable;
            } : r;
          },
          /***/
          443(Q, B, r) {
            var A = r(4494), a = r(3598), D = r(5034), x = r(7222);
            Q.exports = Object.setPrototypeOf || ("__proto__" in {} ? (function() {
              var N = !1, P = {}, d;
              try {
                d = A(Object.prototype, "__proto__", "set"), d(P, []), N = P instanceof Array;
              } catch {
              }
              return function(q, AA) {
                return D(q), x(AA), a(q) && (N ? d(q, AA) : q.__proto__ = AA), q;
              };
            })() : void 0);
          },
          /***/
          290(Q, B, r) {
            var A = r(8993), a = r(8681), D = r(3598), x = TypeError;
            Q.exports = function(N, P) {
              var d, J;
              if (P === "string" && a(d = N.toString) && !D(J = A(d, N)) || a(d = N.valueOf) && !D(J = A(d, N)) || P !== "string" && a(d = N.toString) && !D(J = A(d, N))) return J;
              throw new x("Can't convert object to primitive value");
            };
          },
          /***/
          7523(Q, B, r) {
            var A = r(7139), a = r(1212), D = r(5412), x = r(4073), N = r(2091), P = a([].concat);
            Q.exports = A("Reflect", "ownKeys") || function(J) {
              var q = D.f(N(J)), AA = x.f;
              return AA ? P(q, AA(J)) : q;
            };
          },
          /***/
          5034(Q, B, r) {
            var A = r(6297), a = TypeError;
            Q.exports = function(D) {
              if (A(D)) throw new a("Can't call method on " + D);
              return D;
            };
          },
          /***/
          7099(Q, B, r) {
            var A = r(997), a = r(6044), D = A("keys");
            Q.exports = function(x) {
              return D[x] || (D[x] = a(x));
            };
          },
          /***/
          3793(Q, B, r) {
            var A = r(7695), a = r(7756), D = r(7309), x = "__core-js_shared__", N = Q.exports = a[x] || D(x, {});
            (N.versions || (N.versions = [])).push({
              version: "3.49.0",
              mode: A ? "pure" : "global",
              copyright: "© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",
              license: "https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",
              source: "https://github.com/zloirock/core-js"
            });
          },
          /***/
          997(Q, B, r) {
            var A = r(3793);
            Q.exports = function(a, D) {
              return A[a] || (A[a] = D || {});
            };
          },
          /***/
          4483(Q, B, r) {
            var A = r(2227), a = r(299), D = r(7756), x = D.String;
            Q.exports = !!Object.getOwnPropertySymbols && !a(function() {
              var N = Symbol("symbol detection");
              return !x(N) || !(Object(N) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
              !Symbol.sham && A && A < 41;
            });
          },
          /***/
          4918(Q, B, r) {
            var A = r(2119), a = Math.max, D = Math.min;
            Q.exports = function(x, N) {
              var P = A(x);
              return P < 0 ? a(P + N, 0) : D(P, N);
            };
          },
          /***/
          3018(Q, B, r) {
            var A = r(3301), a = TypeError;
            Q.exports = function(D) {
              var x = A(D, "number");
              if (typeof x == "number") throw new a("Can't convert number to bigint");
              return BigInt(x);
            };
          },
          /***/
          5137(Q, B, r) {
            var A = r(2203), a = r(5034);
            Q.exports = function(D) {
              return A(a(D));
            };
          },
          /***/
          2119(Q, B, r) {
            var A = r(2537);
            Q.exports = function(a) {
              var D = +a;
              return D !== D || D === 0 ? 0 : A(D);
            };
          },
          /***/
          8266(Q, B, r) {
            var A = r(2119), a = Math.min;
            Q.exports = function(D) {
              var x = A(D);
              return x > 0 ? a(x, 9007199254740991) : 0;
            };
          },
          /***/
          3297(Q, B, r) {
            var A = r(5034), a = Object;
            Q.exports = function(D) {
              return a(A(D));
            };
          },
          /***/
          4001(Q, B, r) {
            var A = r(7866), a = RangeError;
            Q.exports = function(D, x) {
              var N = A(D);
              if (N % x) throw new a("Wrong offset");
              return N;
            };
          },
          /***/
          7866(Q, B, r) {
            var A = r(2119), a = RangeError;
            Q.exports = function(D) {
              var x = A(D);
              if (x < 0) throw new a("The argument can't be less than 0");
              return x;
            };
          },
          /***/
          3301(Q, B, r) {
            var A = r(8993), a = r(3598), D = r(5985), x = r(9738), N = r(290), P = r(8663), d = TypeError, J = P("toPrimitive");
            Q.exports = function(q, AA) {
              if (!a(q) || D(q)) return q;
              var K = x(q, J), z;
              if (K) {
                if (AA === void 0 && (AA = "default"), z = A(K, q, AA), !a(z) || D(z)) return z;
                throw new d("Can't convert object to primitive value");
              }
              return AA === void 0 && (AA = "number"), N(q, AA);
            };
          },
          /***/
          1413(Q, B, r) {
            var A = r(3301), a = r(5985);
            Q.exports = function(D) {
              var x = A(D, "string");
              return a(x) ? x : x + "";
            };
          },
          /***/
          7920(Q, B, r) {
            var A = r(8663), a = A("toStringTag"), D = {};
            D[a] = "z", Q.exports = String(D) === "[object z]";
          },
          /***/
          8819(Q) {
            var B = String;
            Q.exports = function(r) {
              try {
                return B(r);
              } catch {
                return "Object";
              }
            };
          },
          /***/
          6044(Q, B, r) {
            var A = r(1212), a = 0, D = Math.random(), x = A(1.1.toString);
            Q.exports = function(N) {
              return "Symbol(" + (N === void 0 ? "" : N) + ")_" + x(++a + D, 36);
            };
          },
          /***/
          8300(Q, B, r) {
            var A = r(4483);
            Q.exports = A && !Symbol.sham && typeof Symbol.iterator == "symbol";
          },
          /***/
          2538(Q, B, r) {
            var A = r(5144), a = r(299);
            Q.exports = A && a(function() {
              return Object.defineProperty(function() {
              }, "prototype", {
                value: 42,
                writable: !1
              }).prototype !== 42;
            });
          },
          /***/
          1194(Q, B, r) {
            var A = r(7756), a = r(8681), D = A.WeakMap;
            Q.exports = a(D) && /native code/.test(String(D));
          },
          /***/
          8663(Q, B, r) {
            var A = r(7756), a = r(997), D = r(6341), x = r(6044), N = r(4483), P = r(8300), d = A.Symbol, J = a("wks"), q = P ? d.for || d : d && d.withoutSetter || x;
            Q.exports = function(AA) {
              return D(J, AA) || (J[AA] = N && D(d, AA) ? d[AA] : q("Symbol." + AA)), J[AA];
            };
          },
          /***/
          187(Q, B, r) {
            var A = r(3762), a = r(789).includes, D = r(299), x = r(1825), N = D(function() {
              return !Array(1).includes();
            }), P = D(function() {
              return [, 1].includes(void 0, 1);
            });
            A({ target: "Array", proto: !0, forced: N || P }, {
              includes: function(J) {
                return a(this, J, arguments.length > 1 ? arguments[1] : void 0);
              }
            }), x("includes");
          },
          /***/
          8376(Q, B, r) {
            var A = r(4074), a = r(3161), D = r(3018), x = r(9391), N = r(8993), P = r(1212), d = r(299), J = A.aTypedArray, q = A.exportTypedArrayMethod, AA = P("".slice), K = d(function() {
              var z = 0;
              return new Int8Array(2).fill({ valueOf: function() {
                return z++;
              } }), z !== 1;
            });
            q("fill", function(T) {
              var H = arguments.length;
              J(this);
              var eA = AA(x(this), 0, 3) === "Big" ? D(T) : +T;
              return N(a, this, eA, H > 1 ? arguments[1] : void 0, H > 2 ? arguments[2] : void 0);
            }, K);
          },
          /***/
          6401(Q, B, r) {
            var A = r(7756), a = r(8993), D = r(4074), x = r(4730), N = r(4001), P = r(3297), d = r(299), J = A.RangeError, q = A.Int8Array, AA = q && q.prototype, K = AA && AA.set, z = D.aTypedArray, T = D.exportTypedArrayMethod, H = !d(function() {
              var CA = new Uint8ClampedArray(2);
              return a(K, CA, { length: 1, 0: 3 }, 1), CA[1] !== 3;
            }), eA = H && D.NATIVE_ARRAY_BUFFER_VIEWS && d(function() {
              var CA = new q(2);
              return CA.set(1), CA.set("2", 1), CA[0] !== 0 || CA[1] !== 2;
            });
            T("set", function(IA) {
              z(this);
              var k = N(arguments.length > 1 ? arguments[1] : void 0, 1), tA = P(IA);
              if (H) return a(K, this, tA, k);
              var lA = this.length, uA = x(tA), w = 0;
              if (uA + k > lA) throw new J("Wrong length");
              for (; w < uA; ) this[k + w] = tA[w++];
            }, !H || eA);
          },
          /***/
          2017(Q, B, r) {
            var A = r(7756), a = r(5336), D = r(299), x = r(1078), N = r(644), P = r(4074), d = r(5337), J = r(7383), q = r(2227), AA = r(4507), K = P.aTypedArray, z = P.exportTypedArrayMethod, T = A.Uint16Array, H = T && a(T.prototype.sort), eA = !!H && !(D(function() {
              H(new T(2), null);
            }) && D(function() {
              H(new T(2), {});
            })), CA = !!H && !D(function() {
              if (q) return q < 74;
              if (d) return d < 67;
              if (J) return !0;
              if (AA) return AA < 602;
              var k = new T(516), tA = Array(516), lA, uA;
              for (lA = 0; lA < 516; lA++)
                uA = lA % 4, k[lA] = 515 - lA, tA[lA] = lA - 2 * uA + 3;
              for (H(k, function(w, v) {
                return (w / 4 | 0) - (v / 4 | 0);
              }), lA = 0; lA < 516; lA++)
                if (k[lA] !== tA[lA]) return !0;
            }), IA = function(k) {
              return function(tA, lA) {
                return k !== void 0 ? +k(tA, lA) || 0 : lA !== lA ? tA !== tA ? 0 : -1 : tA !== tA ? 1 : tA === 0 && lA === 0 ? 1 / tA > 0 ? 1 / lA > 0 ? 0 : 1 : 1 / lA > 0 ? -1 : 0 : tA > lA ? 1 : tA < lA ? -1 : 0;
              };
            };
            z("sort", function(tA) {
              return tA !== void 0 && x(tA), CA ? H(this, tA) : N(K(this), IA(tA));
            }, !CA || eA);
          },
          /***/
          1715(Q, B, r) {
            var A = r(5233), a = r(4415), D = r(8395), x = r(453), N = r(4766), P = r(7571), d = r(4406), J = r(1613), q = r(3483), AA = r(4460);
            function K(BA, i) {
              return Object.keys(i).forEach(function(u) {
                u === "default" || u === "__esModule" || Object.prototype.hasOwnProperty.call(BA, u) || Object.defineProperty(BA, u, {
                  enumerable: !0,
                  get: function() {
                    return i[u];
                  }
                });
              }), BA;
            }
            function z(BA, i, u, m) {
              Object.defineProperty(BA, i, { get: u, set: m, enumerable: !0, configurable: !0 });
            }
            function T(BA) {
              return BA && BA.__esModule ? BA.default : BA;
            }
            var H = {};
            z(H, "logErrors", () => eA), z(H, "registerFormat", () => IA), z(H, "create", () => k), z(H, "defaultLanguage", () => tA), z(H, "setDefaultLanguage", () => lA);
            let eA = !1, CA = [];
            function IA(BA) {
              CA.push(BA);
            }
            function k(BA, i) {
              for (let u = 0; u < CA.length; u++) {
                let m = CA[u];
                if (m.probe(BA)) {
                  let L = new m(new A.DecodeStream(BA));
                  return i ? L.getFont(i) : L;
                }
              }
              throw new Error("Unknown font format");
            }
            let tA = "en";
            function lA(BA = "en") {
              tA = BA;
            }
            function uA(BA, i, u) {
              if (u.get) {
                let m = u.get;
                u.get = function() {
                  let L = m.call(this);
                  return Object.defineProperty(this, i, {
                    value: L
                  }), L;
                };
              } else if (typeof u.value == "function") {
                let m = u.value;
                return {
                  get() {
                    let L = /* @__PURE__ */ new Map();
                    function Z(...O) {
                      let PA = O.length > 0 ? O[0] : "value";
                      if (L.has(PA)) return L.get(PA);
                      let XA = m.apply(this, O);
                      return L.set(PA, XA), XA;
                    }
                    return Object.defineProperty(this, i, {
                      value: Z
                    }), Z;
                  }
                };
              }
            }
            let w = new A.Struct({
              firstCode: A.uint16,
              entryCount: A.uint16,
              idDelta: A.int16,
              idRangeOffset: A.uint16
            }), v = new A.Struct({
              startCharCode: A.uint32,
              endCharCode: A.uint32,
              glyphID: A.uint32
            }), RA = new A.Struct({
              startUnicodeValue: A.uint24,
              additionalCount: A.uint8
            }), DA = new A.Struct({
              unicodeValue: A.uint24,
              glyphID: A.uint16
            }), $ = new A.Array(RA, A.uint32), cA = new A.Array(DA, A.uint32), Ae = new A.Struct({
              varSelector: A.uint24,
              defaultUVS: new A.Pointer(A.uint32, $, {
                type: "parent"
              }),
              nonDefaultUVS: new A.Pointer(A.uint32, cA, {
                type: "parent"
              })
            }), kA = new A.VersionedStruct(A.uint16, {
              0: {
                length: A.uint16,
                language: A.uint16,
                codeMap: new A.LazyArray(A.uint8, 256)
              },
              2: {
                length: A.uint16,
                language: A.uint16,
                subHeaderKeys: new A.Array(A.uint16, 256),
                subHeaderCount: (BA) => Math.max.apply(Math, BA.subHeaderKeys),
                subHeaders: new A.LazyArray(w, "subHeaderCount"),
                glyphIndexArray: new A.LazyArray(A.uint16, "subHeaderCount")
              },
              4: {
                length: A.uint16,
                language: A.uint16,
                segCountX2: A.uint16,
                segCount: (BA) => BA.segCountX2 >> 1,
                searchRange: A.uint16,
                entrySelector: A.uint16,
                rangeShift: A.uint16,
                endCode: new A.LazyArray(A.uint16, "segCount"),
                reservedPad: new A.Reserved(A.uint16),
                startCode: new A.LazyArray(A.uint16, "segCount"),
                idDelta: new A.LazyArray(A.int16, "segCount"),
                idRangeOffset: new A.LazyArray(A.uint16, "segCount"),
                glyphIndexArray: new A.LazyArray(A.uint16, (BA) => (BA.length - BA._currentOffset) / 2)
              },
              6: {
                length: A.uint16,
                language: A.uint16,
                firstCode: A.uint16,
                entryCount: A.uint16,
                glyphIndices: new A.LazyArray(A.uint16, "entryCount")
              },
              8: {
                reserved: new A.Reserved(A.uint16),
                length: A.uint32,
                language: A.uint16,
                is32: new A.LazyArray(A.uint8, 8192),
                nGroups: A.uint32,
                groups: new A.LazyArray(v, "nGroups")
              },
              10: {
                reserved: new A.Reserved(A.uint16),
                length: A.uint32,
                language: A.uint32,
                firstCode: A.uint32,
                entryCount: A.uint32,
                glyphIndices: new A.LazyArray(A.uint16, "numChars")
              },
              12: {
                reserved: new A.Reserved(A.uint16),
                length: A.uint32,
                language: A.uint32,
                nGroups: A.uint32,
                groups: new A.LazyArray(v, "nGroups")
              },
              13: {
                reserved: new A.Reserved(A.uint16),
                length: A.uint32,
                language: A.uint32,
                nGroups: A.uint32,
                groups: new A.LazyArray(v, "nGroups")
              },
              14: {
                length: A.uint32,
                numRecords: A.uint32,
                varSelectors: new A.LazyArray(Ae, "numRecords")
              }
            }), VA = new A.Struct({
              platformID: A.uint16,
              encodingID: A.uint16,
              table: new A.Pointer(A.uint32, kA, {
                type: "parent",
                lazy: !0
              })
            });
            var EA = new A.Struct({
              version: A.uint16,
              numSubtables: A.uint16,
              tables: new A.Array(VA, "numSubtables")
            }), zA = new A.Struct({
              version: A.int32,
              revision: A.int32,
              checkSumAdjustment: A.uint32,
              magicNumber: A.uint32,
              flags: A.uint16,
              unitsPerEm: A.uint16,
              created: new A.Array(A.int32, 2),
              modified: new A.Array(A.int32, 2),
              xMin: A.int16,
              yMin: A.int16,
              xMax: A.int16,
              yMax: A.int16,
              macStyle: new A.Bitfield(A.uint16, [
                "bold",
                "italic",
                "underline",
                "outline",
                "shadow",
                "condensed",
                "extended"
              ]),
              lowestRecPPEM: A.uint16,
              fontDirectionHint: A.int16,
              indexToLocFormat: A.int16,
              glyphDataFormat: A.int16
              // 0 for current format
            }), OA = new A.Struct({
              version: A.int32,
              ascent: A.int16,
              descent: A.int16,
              lineGap: A.int16,
              advanceWidthMax: A.uint16,
              minLeftSideBearing: A.int16,
              minRightSideBearing: A.int16,
              xMaxExtent: A.int16,
              caretSlopeRise: A.int16,
              caretSlopeRun: A.int16,
              caretOffset: A.int16,
              reserved: new A.Reserved(A.int16, 4),
              metricDataFormat: A.int16,
              numberOfMetrics: A.uint16
              // Number of advance widths in 'hmtx' table
            });
            let xA = new A.Struct({
              advance: A.uint16,
              bearing: A.int16
            });
            var LA = new A.Struct({
              metrics: new A.LazyArray(xA, (BA) => BA.parent.hhea.numberOfMetrics),
              bearings: new A.LazyArray(A.int16, (BA) => BA.parent.maxp.numGlyphs - BA.parent.hhea.numberOfMetrics)
            }), yA = new A.Struct({
              version: A.int32,
              numGlyphs: A.uint16,
              maxPoints: A.uint16,
              maxContours: A.uint16,
              maxComponentPoints: A.uint16,
              maxComponentContours: A.uint16,
              maxZones: A.uint16,
              maxTwilightPoints: A.uint16,
              maxStorage: A.uint16,
              maxFunctionDefs: A.uint16,
              maxInstructionDefs: A.uint16,
              maxStackElements: A.uint16,
              maxSizeOfInstructions: A.uint16,
              maxComponentElements: A.uint16,
              maxComponentDepth: A.uint16
              // Maximum levels of recursion; 1 for simple components
            });
            function TA(BA, i, u = 0) {
              return BA === 1 && _[u] ? _[u] : h[BA][i];
            }
            const fA = /* @__PURE__ */ new Set([
              "x-mac-roman",
              "x-mac-cyrillic",
              "iso-8859-6",
              "iso-8859-8"
            ]), sA = {
              "x-mac-croatian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ",
              "x-mac-gaelic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ",
              "x-mac-greek": "Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­",
              "x-mac-icelandic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
              "x-mac-inuit": "ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł",
              "x-mac-ce": "ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",
              "x-mac-romanian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
              "x-mac-turkish": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
            }, F = /* @__PURE__ */ new Map();
            function o(BA) {
              let i = F.get(BA);
              if (i) return i;
              let u = sA[BA];
              if (u) {
                let m = /* @__PURE__ */ new Map();
                for (let L = 0; L < u.length; L++) m.set(u.charCodeAt(L), 128 + L);
                return F.set(BA, m), m;
              }
              if (fA.has(BA)) {
                let m = new TextDecoder(BA), L = new Uint8Array(128);
                for (let PA = 0; PA < 128; PA++) L[PA] = 128 + PA;
                let Z = /* @__PURE__ */ new Map(), O = m.decode(L);
                for (let PA = 0; PA < 128; PA++) Z.set(O.charCodeAt(PA), 128 + PA);
                return F.set(BA, Z), Z;
              }
            }
            const h = [
              // unicode
              [
                "utf-16be",
                "utf-16be",
                "utf-16be",
                "utf-16be",
                "utf-16be",
                "utf-16be",
                "utf-16be"
              ],
              // macintosh
              // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/
              // 0	Roman                 17	Malayalam
              // 1	Japanese	            18	Sinhalese
              // 2	Traditional Chinese	  19	Burmese
              // 3	Korean	              20	Khmer
              // 4	Arabic	              21	Thai
              // 5	Hebrew	              22	Laotian
              // 6	Greek	                23	Georgian
              // 7	Russian	              24	Armenian
              // 8	RSymbol	              25	Simplified Chinese
              // 9	Devanagari	          26	Tibetan
              // 10	Gurmukhi	            27	Mongolian
              // 11	Gujarati	            28	Geez
              // 12	Oriya	                29	Slavic
              // 13	Bengali	              30	Vietnamese
              // 14	Tamil	                31	Sindhi
              // 15	Telugu	              32	(Uninterpreted)
              // 16	Kannada
              [
                "x-mac-roman",
                "shift-jis",
                "big5",
                "euc-kr",
                "iso-8859-6",
                "iso-8859-8",
                "x-mac-greek",
                "x-mac-cyrillic",
                "x-mac-symbol",
                "x-mac-devanagari",
                "x-mac-gurmukhi",
                "x-mac-gujarati",
                "Oriya",
                "Bengali",
                "Tamil",
                "Telugu",
                "Kannada",
                "Malayalam",
                "Sinhalese",
                "Burmese",
                "Khmer",
                "iso-8859-11",
                "Laotian",
                "Georgian",
                "Armenian",
                "gbk",
                "Tibetan",
                "Mongolian",
                "Geez",
                "x-mac-ce",
                "Vietnamese",
                "Sindhi"
              ],
              // ISO (deprecated)
              [
                "ascii",
                null,
                "iso-8859-1"
              ],
              // windows
              // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx
              [
                "symbol",
                "utf-16be",
                "shift-jis",
                "gb18030",
                "big5",
                "euc-kr",
                "johab",
                null,
                null,
                null,
                "utf-16be"
              ]
            ], _ = {
              15: "x-mac-icelandic",
              17: "x-mac-turkish",
              18: "x-mac-croatian",
              24: "x-mac-ce",
              25: "x-mac-ce",
              26: "x-mac-ce",
              27: "x-mac-ce",
              28: "x-mac-ce",
              30: "x-mac-icelandic",
              37: "x-mac-romanian",
              38: "x-mac-ce",
              39: "x-mac-ce",
              40: "x-mac-ce",
              143: "x-mac-inuit",
              146: "x-mac-gaelic"
            }, oA = [
              // unicode
              [],
              {
                0: "en",
                30: "fo",
                60: "ks",
                90: "rw",
                1: "fr",
                31: "fa",
                61: "ku",
                91: "rn",
                2: "de",
                32: "ru",
                62: "sd",
                92: "ny",
                3: "it",
                33: "zh",
                63: "bo",
                93: "mg",
                4: "nl",
                34: "nl-BE",
                64: "ne",
                94: "eo",
                5: "sv",
                35: "ga",
                65: "sa",
                128: "cy",
                6: "es",
                36: "sq",
                66: "mr",
                129: "eu",
                7: "da",
                37: "ro",
                67: "bn",
                130: "ca",
                8: "pt",
                38: "cz",
                68: "as",
                131: "la",
                9: "no",
                39: "sk",
                69: "gu",
                132: "qu",
                10: "he",
                40: "si",
                70: "pa",
                133: "gn",
                11: "ja",
                41: "yi",
                71: "or",
                134: "ay",
                12: "ar",
                42: "sr",
                72: "ml",
                135: "tt",
                13: "fi",
                43: "mk",
                73: "kn",
                136: "ug",
                14: "el",
                44: "bg",
                74: "ta",
                137: "dz",
                15: "is",
                45: "uk",
                75: "te",
                138: "jv",
                16: "mt",
                46: "be",
                76: "si",
                139: "su",
                17: "tr",
                47: "uz",
                77: "my",
                140: "gl",
                18: "hr",
                48: "kk",
                78: "km",
                141: "af",
                19: "zh-Hant",
                49: "az-Cyrl",
                79: "lo",
                142: "br",
                20: "ur",
                50: "az-Arab",
                80: "vi",
                143: "iu",
                21: "hi",
                51: "hy",
                81: "id",
                144: "gd",
                22: "th",
                52: "ka",
                82: "tl",
                145: "gv",
                23: "ko",
                53: "mo",
                83: "ms",
                146: "ga",
                24: "lt",
                54: "ky",
                84: "ms-Arab",
                147: "to",
                25: "pl",
                55: "tg",
                85: "am",
                148: "el-polyton",
                26: "hu",
                56: "tk",
                86: "ti",
                149: "kl",
                27: "es",
                57: "mn-CN",
                87: "om",
                150: "az",
                28: "lv",
                58: "mn",
                88: "so",
                151: "nn",
                29: "se",
                59: "ps",
                89: "sw"
              },
              // ISO (deprecated)
              [],
              {
                1078: "af",
                16393: "en-IN",
                1159: "rw",
                1074: "tn",
                1052: "sq",
                6153: "en-IE",
                1089: "sw",
                1115: "si",
                1156: "gsw",
                8201: "en-JM",
                1111: "kok",
                1051: "sk",
                1118: "am",
                17417: "en-MY",
                1042: "ko",
                1060: "sl",
                5121: "ar-DZ",
                5129: "en-NZ",
                1088: "ky",
                11274: "es-AR",
                15361: "ar-BH",
                13321: "en-PH",
                1108: "lo",
                16394: "es-BO",
                3073: "ar",
                18441: "en-SG",
                1062: "lv",
                13322: "es-CL",
                2049: "ar-IQ",
                7177: "en-ZA",
                1063: "lt",
                9226: "es-CO",
                11265: "ar-JO",
                11273: "en-TT",
                2094: "dsb",
                5130: "es-CR",
                13313: "ar-KW",
                2057: "en-GB",
                1134: "lb",
                7178: "es-DO",
                12289: "ar-LB",
                1033: "en",
                1071: "mk",
                12298: "es-EC",
                4097: "ar-LY",
                12297: "en-ZW",
                2110: "ms-BN",
                17418: "es-SV",
                6145: "ary",
                1061: "et",
                1086: "ms",
                4106: "es-GT",
                8193: "ar-OM",
                1080: "fo",
                1100: "ml",
                18442: "es-HN",
                16385: "ar-QA",
                1124: "fil",
                1082: "mt",
                2058: "es-MX",
                1025: "ar-SA",
                1035: "fi",
                1153: "mi",
                19466: "es-NI",
                10241: "ar-SY",
                2060: "fr-BE",
                1146: "arn",
                6154: "es-PA",
                7169: "aeb",
                3084: "fr-CA",
                1102: "mr",
                15370: "es-PY",
                14337: "ar-AE",
                1036: "fr",
                1148: "moh",
                10250: "es-PE",
                9217: "ar-YE",
                5132: "fr-LU",
                1104: "mn",
                20490: "es-PR",
                1067: "hy",
                6156: "fr-MC",
                2128: "mn-CN",
                3082: "es",
                1101: "as",
                4108: "fr-CH",
                1121: "ne",
                1034: "es",
                2092: "az-Cyrl",
                1122: "fy",
                1044: "nb",
                21514: "es-US",
                1068: "az",
                1110: "gl",
                2068: "nn",
                14346: "es-UY",
                1133: "ba",
                1079: "ka",
                1154: "oc",
                8202: "es-VE",
                1069: "eu",
                3079: "de-AT",
                1096: "or",
                2077: "sv-FI",
                1059: "be",
                1031: "de",
                1123: "ps",
                1053: "sv",
                2117: "bn",
                5127: "de-LI",
                1045: "pl",
                1114: "syr",
                1093: "bn-IN",
                4103: "de-LU",
                1046: "pt",
                1064: "tg",
                8218: "bs-Cyrl",
                2055: "de-CH",
                2070: "pt-PT",
                2143: "tzm",
                5146: "bs",
                1032: "el",
                1094: "pa",
                1097: "ta",
                1150: "br",
                1135: "kl",
                1131: "qu-BO",
                1092: "tt",
                1026: "bg",
                1095: "gu",
                2155: "qu-EC",
                1098: "te",
                1027: "ca",
                1128: "ha",
                3179: "qu",
                1054: "th",
                3076: "zh-HK",
                1037: "he",
                1048: "ro",
                1105: "bo",
                5124: "zh-MO",
                1081: "hi",
                1047: "rm",
                1055: "tr",
                2052: "zh",
                1038: "hu",
                1049: "ru",
                1090: "tk",
                4100: "zh-SG",
                1039: "is",
                9275: "smn",
                1152: "ug",
                1028: "zh-TW",
                1136: "ig",
                4155: "smj-NO",
                1058: "uk",
                1155: "co",
                1057: "id",
                5179: "smj",
                1070: "hsb",
                1050: "hr",
                1117: "iu",
                3131: "se-FI",
                1056: "ur",
                4122: "hr-BA",
                2141: "iu-Latn",
                1083: "se",
                2115: "uz-Cyrl",
                1029: "cs",
                2108: "ga",
                2107: "se-SE",
                1091: "uz",
                1030: "da",
                1076: "xh",
                8251: "sms",
                1066: "vi",
                1164: "prs",
                1077: "zu",
                6203: "sma-NO",
                1106: "cy",
                1125: "dv",
                1040: "it",
                7227: "sms",
                1160: "wo",
                2067: "nl-BE",
                2064: "it-CH",
                1103: "sa",
                1157: "sah",
                1043: "nl",
                1041: "ja",
                7194: "sr-Cyrl-BA",
                1144: "ii",
                3081: "en-AU",
                1099: "kn",
                3098: "sr",
                1130: "yo",
                10249: "en-BZ",
                1087: "kk",
                6170: "sr-Latn-BA",
                4105: "en-CA",
                1107: "km",
                2074: "sr-Latn",
                9225: "en-029",
                1158: "quc",
                1132: "nso"
              }
            ];
            let p = new A.Struct({
              platformID: A.uint16,
              encodingID: A.uint16,
              languageID: A.uint16,
              nameID: A.uint16,
              length: A.uint16,
              string: new A.Pointer(A.uint16, new A.String("length", (BA) => TA(BA.platformID, BA.encodingID, BA.languageID)), {
                type: "parent",
                relativeTo: (BA) => BA.parent.stringOffset,
                allowNull: !1
              })
            }), rA = new A.Struct({
              length: A.uint16,
              tag: new A.Pointer(A.uint16, new A.String("length", "utf16be"), {
                type: "parent",
                relativeTo: (BA) => BA.stringOffset
              })
            });
            var QA = new A.VersionedStruct(A.uint16, {
              0: {
                count: A.uint16,
                stringOffset: A.uint16,
                records: new A.Array(p, "count")
              },
              1: {
                count: A.uint16,
                stringOffset: A.uint16,
                records: new A.Array(p, "count"),
                langTagCount: A.uint16,
                langTags: new A.Array(rA, "langTagCount")
              }
            }), bA = QA;
            const y = [
              "copyright",
              "fontFamily",
              "fontSubfamily",
              "uniqueSubfamily",
              "fullName",
              "version",
              "postscriptName",
              "trademark",
              "manufacturer",
              "designer",
              "description",
              "vendorURL",
              "designerURL",
              "license",
              "licenseURL",
              null,
              "preferredFamily",
              "preferredSubfamily",
              "compatibleFull",
              "sampleText",
              "postscriptCIDFontName",
              "wwsFamilyName",
              "wwsSubfamilyName"
            ];
            QA.process = function(BA) {
              var i = {};
              for (let u of this.records) {
                let m = oA[u.platformID][u.languageID];
                m == null && this.langTags != null && u.languageID >= 32768 && (m = this.langTags[u.languageID - 32768].tag), m == null && (m = u.platformID + "-" + u.languageID);
                let L = u.nameID >= 256 ? "fontFeatures" : y[u.nameID] || u.nameID;
                i[L] == null && (i[L] = {});
                let Z = i[L];
                u.nameID >= 256 && (Z = Z[u.nameID] || (Z[u.nameID] = {})), (typeof u.string == "string" || typeof Z[m] != "string") && (Z[m] = u.string);
              }
              this.records = i;
            }, QA.preEncode = function() {
              if (Array.isArray(this.records)) return;
              this.version = 0;
              let BA = [];
              for (let i in this.records) {
                let u = this.records[i];
                i !== "fontFeatures" && (BA.push({
                  platformID: 3,
                  encodingID: 1,
                  languageID: 1033,
                  nameID: y.indexOf(i),
                  length: u.en.length * 2,
                  string: u.en
                }), i === "postscriptName" && BA.push({
                  platformID: 1,
                  encodingID: 0,
                  languageID: 0,
                  nameID: y.indexOf(i),
                  length: u.en.length,
                  string: u.en
                }));
              }
              this.records = BA, this.count = BA.length, this.stringOffset = QA.size(this, null, !1);
            };
            var M = new A.VersionedStruct(A.uint16, {
              header: {
                xAvgCharWidth: A.int16,
                usWeightClass: A.uint16,
                usWidthClass: A.uint16,
                fsType: new A.Bitfield(A.uint16, [
                  null,
                  "noEmbedding",
                  "viewOnly",
                  "editable",
                  null,
                  null,
                  null,
                  null,
                  "noSubsetting",
                  "bitmapOnly"
                ]),
                ySubscriptXSize: A.int16,
                ySubscriptYSize: A.int16,
                ySubscriptXOffset: A.int16,
                ySubscriptYOffset: A.int16,
                ySuperscriptXSize: A.int16,
                ySuperscriptYSize: A.int16,
                ySuperscriptXOffset: A.int16,
                ySuperscriptYOffset: A.int16,
                yStrikeoutSize: A.int16,
                yStrikeoutPosition: A.int16,
                sFamilyClass: A.int16,
                panose: new A.Array(A.uint8, 10),
                ulCharRange: new A.Array(A.uint32, 4),
                vendorID: new A.String(4),
                fsSelection: new A.Bitfield(A.uint16, [
                  "italic",
                  "underscore",
                  "negative",
                  "outlined",
                  "strikeout",
                  "bold",
                  "regular",
                  "useTypoMetrics",
                  "wws",
                  "oblique"
                ]),
                usFirstCharIndex: A.uint16,
                usLastCharIndex: A.uint16
                // The maximum Unicode index in this font
              },
              // The Apple version of this table ends here, but the Microsoft one continues on...
              0: {},
              1: {
                typoAscender: A.int16,
                typoDescender: A.int16,
                typoLineGap: A.int16,
                winAscent: A.uint16,
                winDescent: A.uint16,
                codePageRange: new A.Array(A.uint32, 2)
              },
              2: {
                // these should be common with version 1 somehow
                typoAscender: A.int16,
                typoDescender: A.int16,
                typoLineGap: A.int16,
                winAscent: A.uint16,
                winDescent: A.uint16,
                codePageRange: new A.Array(A.uint32, 2),
                xHeight: A.int16,
                capHeight: A.int16,
                defaultChar: A.uint16,
                breakChar: A.uint16,
                maxContent: A.uint16
              },
              5: {
                typoAscender: A.int16,
                typoDescender: A.int16,
                typoLineGap: A.int16,
                winAscent: A.uint16,
                winDescent: A.uint16,
                codePageRange: new A.Array(A.uint32, 2),
                xHeight: A.int16,
                capHeight: A.int16,
                defaultChar: A.uint16,
                breakChar: A.uint16,
                maxContent: A.uint16,
                usLowerOpticalPointSize: A.uint16,
                usUpperOpticalPointSize: A.uint16
              }
            });
            let FA = M.versions;
            FA[3] = FA[4] = FA[2];
            var dA = M, he = new A.VersionedStruct(A.fixed32, {
              header: {
                italicAngle: A.fixed32,
                underlinePosition: A.int16,
                underlineThickness: A.int16,
                isFixedPitch: A.uint32,
                minMemType42: A.uint32,
                maxMemType42: A.uint32,
                minMemType1: A.uint32,
                maxMemType1: A.uint32
                // Maximum memory usage when a TrueType font is downloaded as a Type 1 font
              },
              1: {},
              2: {
                numberOfGlyphs: A.uint16,
                glyphNameIndex: new A.Array(A.uint16, "numberOfGlyphs"),
                names: new A.Array(new A.String(A.uint8))
              },
              2.5: {
                numberOfGlyphs: A.uint16,
                offsets: new A.Array(A.uint8, "numberOfGlyphs")
              },
              3: {},
              4: {
                map: new A.Array(A.uint32, (BA) => BA.parent.maxp.numGlyphs)
              }
            }), ie = new A.Struct({
              controlValues: new A.Array(A.int16)
            }), KA = new A.Struct({
              instructions: new A.Array(A.uint8)
            });
            let Pe = new A.VersionedStruct("head.indexToLocFormat", {
              0: {
                offsets: new A.Array(A.uint16)
              },
              1: {
                offsets: new A.Array(A.uint32)
              }
            });
            Pe.process = function() {
              if (this.version === 0 && !this._processed) {
                for (let BA = 0; BA < this.offsets.length; BA++) this.offsets[BA] <<= 1;
                this._processed = !0;
              }
            }, Pe.preEncode = function() {
              if (this.version === 0 && this._processed !== !1) {
                for (let BA = 0; BA < this.offsets.length; BA++) this.offsets[BA] >>>= 1;
                this._processed = !1;
              }
            };
            var Je = Pe, Le = new A.Struct({
              controlValueProgram: new A.Array(A.uint8)
            }), Re = new A.Array(new A.Buffer());
            class _e {
              getCFFVersion(i) {
                for (; i && !i.hdrSize; ) i = i.parent;
                return i ? i.version : -1;
              }
              decode(i, u) {
                let L = this.getCFFVersion(u) >= 2 ? i.readUInt32BE() : i.readUInt16BE();
                if (L === 0) return [];
                let Z = i.readUInt8(), O;
                if (Z === 1) O = A.uint8;
                else if (Z === 2) O = A.uint16;
                else if (Z === 3) O = A.uint24;
                else if (Z === 4) O = A.uint32;
                else throw new Error(`Bad offset size in CFFIndex: ${Z} ${i.pos}`);
                let PA = [], XA = i.pos + (L + 1) * Z - 1, te = O.decode(i);
                for (let ce = 0; ce < L; ce++) {
                  let ge = O.decode(i);
                  if (this.type != null) {
                    let Ge = i.pos;
                    i.pos = XA + te, u.length = ge - te, PA.push(this.type.decode(i, u)), i.pos = Ge;
                  } else PA.push({
                    offset: XA + te,
                    length: ge - te
                  });
                  te = ge;
                }
                return i.pos = XA + te, PA;
              }
              size(i, u) {
                let m = 2;
                if (i.length === 0) return m;
                let L = this.type || new A.Buffer(), Z = 1;
                for (let PA = 0; PA < i.length; PA++) {
                  let XA = i[PA];
                  Z += L.size(XA, u);
                }
                let O;
                if (Z <= 255) O = A.uint8;
                else if (Z <= 65535) O = A.uint16;
                else if (Z <= 16777215) O = A.uint24;
                else if (Z <= 4294967295) O = A.uint32;
                else throw new Error("Bad offset in CFFIndex");
                return m += 1 + O.size() * (i.length + 1), m += Z - 1, m;
              }
              encode(i, u, m) {
                if (i.writeUInt16BE(u.length), u.length === 0) return;
                let L = this.type || new A.Buffer(), Z = [], O = 1;
                for (let XA of u) {
                  let te = L.size(XA, m);
                  Z.push(te), O += te;
                }
                let PA;
                if (O <= 255) PA = A.uint8;
                else if (O <= 65535) PA = A.uint16;
                else if (O <= 16777215) PA = A.uint24;
                else if (O <= 4294967295) PA = A.uint32;
                else throw new Error("Bad offset in CFFIndex");
                i.writeUInt8(PA.size()), O = 1, PA.encode(i, O);
                for (let XA of Z)
                  O += XA, PA.encode(i, O);
                for (let XA of u) L.encode(i, XA, m);
              }
              constructor(i) {
                this.type = i;
              }
            }
            const se = 15, Ee = [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              ".",
              "E",
              "E-",
              null,
              "-"
            ], wA = {
              ".": 10,
              E: 11,
              "E-": 12,
              "-": 14
            };
            class R {
              static decode(i, u) {
                if (32 <= u && u <= 246) return u - 139;
                if (247 <= u && u <= 250) return (u - 247) * 256 + i.readUInt8() + 108;
                if (251 <= u && u <= 254) return -(u - 251) * 256 - i.readUInt8() - 108;
                if (u === 28) return i.readInt16BE();
                if (u === 29) return i.readInt32BE();
                if (u === 30) {
                  let m = "";
                  for (; ; ) {
                    let L = i.readUInt8(), Z = L >> 4;
                    if (Z === se) break;
                    m += Ee[Z];
                    let O = L & 15;
                    if (O === se) break;
                    m += Ee[O];
                  }
                  return parseFloat(m);
                }
                return null;
              }
              static size(i) {
                if (i.forceLarge && (i = 32768), (i | 0) !== i) {
                  let u = "" + i;
                  return 1 + Math.ceil((u.length + 1) / 2);
                } else return -107 <= i && i <= 107 ? 1 : 108 <= i && i <= 1131 || -1131 <= i && i <= -108 ? 2 : -32768 <= i && i <= 32767 ? 3 : 5;
              }
              static encode(i, u) {
                let m = Number(u);
                if (u.forceLarge)
                  return i.writeUInt8(29), i.writeInt32BE(m);
                if ((m | 0) !== m) {
                  i.writeUInt8(30);
                  let Z = "" + m;
                  for (let O = 0; O < Z.length; O += 2) {
                    let PA = Z[O], XA = wA[PA] || +PA;
                    if (O === Z.length - 1) var L = se;
                    else {
                      let te = Z[O + 1];
                      var L = wA[te] || +te;
                    }
                    i.writeUInt8(XA << 4 | L & 15);
                  }
                  if (L !== se) return i.writeUInt8(se << 4);
                } else return -107 <= m && m <= 107 ? i.writeUInt8(m + 139) : 108 <= m && m <= 1131 ? (m -= 108, i.writeUInt8((m >> 8) + 247), i.writeUInt8(m & 255)) : -1131 <= m && m <= -108 ? (m = -m - 108, i.writeUInt8((m >> 8) + 251), i.writeUInt8(m & 255)) : -32768 <= m && m <= 32767 ? (i.writeUInt8(28), i.writeInt16BE(m)) : (i.writeUInt8(29), i.writeInt32BE(m));
              }
            }
            class G {
              decodeOperands(i, u, m, L) {
                if (Array.isArray(i)) return L.map((Z, O) => this.decodeOperands(i[O], u, m, [
                  Z
                ]));
                if (i.decode != null) return i.decode(u, m, L);
                switch (i) {
                  case "number":
                  case "offset":
                  case "sid":
                    return L[0];
                  case "boolean":
                    return !!L[0];
                  default:
                    return L;
                }
              }
              encodeOperands(i, u, m, L) {
                return Array.isArray(i) ? L.map((Z, O) => this.encodeOperands(i[O], u, m, Z)[0]) : i.encode != null ? i.encode(u, L, m) : typeof L == "number" ? [
                  L
                ] : typeof L == "boolean" ? [
                  +L
                ] : Array.isArray(L) ? L : [
                  L
                ];
              }
              decode(i, u) {
                let m = i.pos + u.length, L = {}, Z = [];
                Object.defineProperties(L, {
                  parent: {
                    value: u
                  },
                  _startOffset: {
                    value: i.pos
                  }
                });
                for (let O in this.fields) {
                  let PA = this.fields[O];
                  L[PA[1]] = PA[3];
                }
                for (; i.pos < m; ) {
                  let O = i.readUInt8();
                  if (O < 28) {
                    O === 12 && (O = O << 8 | i.readUInt8());
                    let PA = this.fields[O];
                    if (!PA) throw new Error(`Unknown operator ${O}`);
                    let XA = this.decodeOperands(PA[2], i, L, Z);
                    XA != null && (XA instanceof A.PropertyDescriptor ? Object.defineProperty(L, PA[1], XA) : L[PA[1]] = XA), Z = [];
                  } else Z.push(R.decode(i, O));
                }
                return L;
              }
              size(i, u, m = !0) {
                let L = {
                  parent: u,
                  val: i,
                  pointerSize: 0,
                  startOffset: u.startOffset || 0
                }, Z = 0;
                for (let O in this.fields) {
                  let PA = this.fields[O], XA = i[PA[1]];
                  if (XA == null || T(x)(XA, PA[3])) continue;
                  let te = this.encodeOperands(PA[2], null, L, XA);
                  for (let ge of te) Z += R.size(ge);
                  let ce = Array.isArray(PA[0]) ? PA[0] : [
                    PA[0]
                  ];
                  Z += ce.length;
                }
                return m && (Z += L.pointerSize), Z;
              }
              encode(i, u, m) {
                let L = {
                  pointers: [],
                  startOffset: i.pos,
                  parent: m,
                  val: u,
                  pointerSize: 0
                };
                L.pointerOffset = i.pos + this.size(u, L, !1);
                for (let O of this.ops) {
                  let PA = u[O[1]];
                  if (PA == null || T(x)(PA, O[3])) continue;
                  let XA = this.encodeOperands(O[2], i, L, PA);
                  for (let ce of XA) R.encode(i, ce);
                  let te = Array.isArray(O[0]) ? O[0] : [
                    O[0]
                  ];
                  for (let ce of te) i.writeUInt8(ce);
                }
                let Z = 0;
                for (; Z < L.pointers.length; ) {
                  let O = L.pointers[Z++];
                  O.type.encode(i, O.val, O.parent);
                }
              }
              constructor(i = []) {
                this.ops = i, this.fields = {};
                for (let u of i) {
                  let m = Array.isArray(u[0]) ? u[0][0] << 8 | u[0][1] : u[0];
                  this.fields[m] = u;
                }
              }
            }
            class W extends A.Pointer {
              decode(i, u, m) {
                return this.offsetType = {
                  decode: () => m[0]
                }, super.decode(i, u, m);
              }
              encode(i, u, m) {
                if (!i)
                  return this.offsetType = {
                    size: () => 0
                  }, this.size(u, m), [
                    new aA(0)
                  ];
                let L = null;
                return this.offsetType = {
                  encode: (Z, O) => L = O
                }, super.encode(i, u, m), [
                  new aA(L)
                ];
              }
              constructor(i, u = {}) {
                u.type == null && (u.type = "global"), super(null, i, u);
              }
            }
            class aA {
              valueOf() {
                return this.val;
              }
              constructor(i) {
                this.val = i, this.forceLarge = !0;
              }
            }
            class j {
              static decode(i, u, m) {
                let L = m.pop();
                for (; m.length > L; ) m.pop();
              }
            }
            var pA = new G([
              // key       name                    type                                          default
              [
                6,
                "BlueValues",
                "delta",
                null
              ],
              [
                7,
                "OtherBlues",
                "delta",
                null
              ],
              [
                8,
                "FamilyBlues",
                "delta",
                null
              ],
              [
                9,
                "FamilyOtherBlues",
                "delta",
                null
              ],
              [
                [
                  12,
                  9
                ],
                "BlueScale",
                "number",
                0.039625
              ],
              [
                [
                  12,
                  10
                ],
                "BlueShift",
                "number",
                7
              ],
              [
                [
                  12,
                  11
                ],
                "BlueFuzz",
                "number",
                1
              ],
              [
                10,
                "StdHW",
                "number",
                null
              ],
              [
                11,
                "StdVW",
                "number",
                null
              ],
              [
                [
                  12,
                  12
                ],
                "StemSnapH",
                "delta",
                null
              ],
              [
                [
                  12,
                  13
                ],
                "StemSnapV",
                "delta",
                null
              ],
              [
                [
                  12,
                  14
                ],
                "ForceBold",
                "boolean",
                !1
              ],
              [
                [
                  12,
                  17
                ],
                "LanguageGroup",
                "number",
                0
              ],
              [
                [
                  12,
                  18
                ],
                "ExpansionFactor",
                "number",
                0.06
              ],
              [
                [
                  12,
                  19
                ],
                "initialRandomSeed",
                "number",
                0
              ],
              [
                20,
                "defaultWidthX",
                "number",
                0
              ],
              [
                21,
                "nominalWidthX",
                "number",
                0
              ],
              [
                22,
                "vsindex",
                "number",
                0
              ],
              [
                23,
                "blend",
                j,
                null
              ],
              [
                19,
                "Subrs",
                new W(new _e(), {
                  type: "local"
                }),
                null
              ]
            ]), Be = [
              ".notdef",
              "space",
              "exclam",
              "quotedbl",
              "numbersign",
              "dollar",
              "percent",
              "ampersand",
              "quoteright",
              "parenleft",
              "parenright",
              "asterisk",
              "plus",
              "comma",
              "hyphen",
              "period",
              "slash",
              "zero",
              "one",
              "two",
              "three",
              "four",
              "five",
              "six",
              "seven",
              "eight",
              "nine",
              "colon",
              "semicolon",
              "less",
              "equal",
              "greater",
              "question",
              "at",
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "H",
              "I",
              "J",
              "K",
              "L",
              "M",
              "N",
              "O",
              "P",
              "Q",
              "R",
              "S",
              "T",
              "U",
              "V",
              "W",
              "X",
              "Y",
              "Z",
              "bracketleft",
              "backslash",
              "bracketright",
              "asciicircum",
              "underscore",
              "quoteleft",
              "a",
              "b",
              "c",
              "d",
              "e",
              "f",
              "g",
              "h",
              "i",
              "j",
              "k",
              "l",
              "m",
              "n",
              "o",
              "p",
              "q",
              "r",
              "s",
              "t",
              "u",
              "v",
              "w",
              "x",
              "y",
              "z",
              "braceleft",
              "bar",
              "braceright",
              "asciitilde",
              "exclamdown",
              "cent",
              "sterling",
              "fraction",
              "yen",
              "florin",
              "section",
              "currency",
              "quotesingle",
              "quotedblleft",
              "guillemotleft",
              "guilsinglleft",
              "guilsinglright",
              "fi",
              "fl",
              "endash",
              "dagger",
              "daggerdbl",
              "periodcentered",
              "paragraph",
              "bullet",
              "quotesinglbase",
              "quotedblbase",
              "quotedblright",
              "guillemotright",
              "ellipsis",
              "perthousand",
              "questiondown",
              "grave",
              "acute",
              "circumflex",
              "tilde",
              "macron",
              "breve",
              "dotaccent",
              "dieresis",
              "ring",
              "cedilla",
              "hungarumlaut",
              "ogonek",
              "caron",
              "emdash",
              "AE",
              "ordfeminine",
              "Lslash",
              "Oslash",
              "OE",
              "ordmasculine",
              "ae",
              "dotlessi",
              "lslash",
              "oslash",
              "oe",
              "germandbls",
              "onesuperior",
              "logicalnot",
              "mu",
              "trademark",
              "Eth",
              "onehalf",
              "plusminus",
              "Thorn",
              "onequarter",
              "divide",
              "brokenbar",
              "degree",
              "thorn",
              "threequarters",
              "twosuperior",
              "registered",
              "minus",
              "eth",
              "multiply",
              "threesuperior",
              "copyright",
              "Aacute",
              "Acircumflex",
              "Adieresis",
              "Agrave",
              "Aring",
              "Atilde",
              "Ccedilla",
              "Eacute",
              "Ecircumflex",
              "Edieresis",
              "Egrave",
              "Iacute",
              "Icircumflex",
              "Idieresis",
              "Igrave",
              "Ntilde",
              "Oacute",
              "Ocircumflex",
              "Odieresis",
              "Ograve",
              "Otilde",
              "Scaron",
              "Uacute",
              "Ucircumflex",
              "Udieresis",
              "Ugrave",
              "Yacute",
              "Ydieresis",
              "Zcaron",
              "aacute",
              "acircumflex",
              "adieresis",
              "agrave",
              "aring",
              "atilde",
              "ccedilla",
              "eacute",
              "ecircumflex",
              "edieresis",
              "egrave",
              "iacute",
              "icircumflex",
              "idieresis",
              "igrave",
              "ntilde",
              "oacute",
              "ocircumflex",
              "odieresis",
              "ograve",
              "otilde",
              "scaron",
              "uacute",
              "ucircumflex",
              "udieresis",
              "ugrave",
              "yacute",
              "ydieresis",
              "zcaron",
              "exclamsmall",
              "Hungarumlautsmall",
              "dollaroldstyle",
              "dollarsuperior",
              "ampersandsmall",
              "Acutesmall",
              "parenleftsuperior",
              "parenrightsuperior",
              "twodotenleader",
              "onedotenleader",
              "zerooldstyle",
              "oneoldstyle",
              "twooldstyle",
              "threeoldstyle",
              "fouroldstyle",
              "fiveoldstyle",
              "sixoldstyle",
              "sevenoldstyle",
              "eightoldstyle",
              "nineoldstyle",
              "commasuperior",
              "threequartersemdash",
              "periodsuperior",
              "questionsmall",
              "asuperior",
              "bsuperior",
              "centsuperior",
              "dsuperior",
              "esuperior",
              "isuperior",
              "lsuperior",
              "msuperior",
              "nsuperior",
              "osuperior",
              "rsuperior",
              "ssuperior",
              "tsuperior",
              "ff",
              "ffi",
              "ffl",
              "parenleftinferior",
              "parenrightinferior",
              "Circumflexsmall",
              "hyphensuperior",
              "Gravesmall",
              "Asmall",
              "Bsmall",
              "Csmall",
              "Dsmall",
              "Esmall",
              "Fsmall",
              "Gsmall",
              "Hsmall",
              "Ismall",
              "Jsmall",
              "Ksmall",
              "Lsmall",
              "Msmall",
              "Nsmall",
              "Osmall",
              "Psmall",
              "Qsmall",
              "Rsmall",
              "Ssmall",
              "Tsmall",
              "Usmall",
              "Vsmall",
              "Wsmall",
              "Xsmall",
              "Ysmall",
              "Zsmall",
              "colonmonetary",
              "onefitted",
              "rupiah",
              "Tildesmall",
              "exclamdownsmall",
              "centoldstyle",
              "Lslashsmall",
              "Scaronsmall",
              "Zcaronsmall",
              "Dieresissmall",
              "Brevesmall",
              "Caronsmall",
              "Dotaccentsmall",
              "Macronsmall",
              "figuredash",
              "hypheninferior",
              "Ogoneksmall",
              "Ringsmall",
              "Cedillasmall",
              "questiondownsmall",
              "oneeighth",
              "threeeighths",
              "fiveeighths",
              "seveneighths",
              "onethird",
              "twothirds",
              "zerosuperior",
              "foursuperior",
              "fivesuperior",
              "sixsuperior",
              "sevensuperior",
              "eightsuperior",
              "ninesuperior",
              "zeroinferior",
              "oneinferior",
              "twoinferior",
              "threeinferior",
              "fourinferior",
              "fiveinferior",
              "sixinferior",
              "seveninferior",
              "eightinferior",
              "nineinferior",
              "centinferior",
              "dollarinferior",
              "periodinferior",
              "commainferior",
              "Agravesmall",
              "Aacutesmall",
              "Acircumflexsmall",
              "Atildesmall",
              "Adieresissmall",
              "Aringsmall",
              "AEsmall",
              "Ccedillasmall",
              "Egravesmall",
              "Eacutesmall",
              "Ecircumflexsmall",
              "Edieresissmall",
              "Igravesmall",
              "Iacutesmall",
              "Icircumflexsmall",
              "Idieresissmall",
              "Ethsmall",
              "Ntildesmall",
              "Ogravesmall",
              "Oacutesmall",
              "Ocircumflexsmall",
              "Otildesmall",
              "Odieresissmall",
              "OEsmall",
              "Oslashsmall",
              "Ugravesmall",
              "Uacutesmall",
              "Ucircumflexsmall",
              "Udieresissmall",
              "Yacutesmall",
              "Thornsmall",
              "Ydieresissmall",
              "001.000",
              "001.001",
              "001.002",
              "001.003",
              "Black",
              "Bold",
              "Book",
              "Light",
              "Medium",
              "Regular",
              "Roman",
              "Semibold"
            ];
            let Ie = [
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "space",
              "exclam",
              "quotedbl",
              "numbersign",
              "dollar",
              "percent",
              "ampersand",
              "quoteright",
              "parenleft",
              "parenright",
              "asterisk",
              "plus",
              "comma",
              "hyphen",
              "period",
              "slash",
              "zero",
              "one",
              "two",
              "three",
              "four",
              "five",
              "six",
              "seven",
              "eight",
              "nine",
              "colon",
              "semicolon",
              "less",
              "equal",
              "greater",
              "question",
              "at",
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "H",
              "I",
              "J",
              "K",
              "L",
              "M",
              "N",
              "O",
              "P",
              "Q",
              "R",
              "S",
              "T",
              "U",
              "V",
              "W",
              "X",
              "Y",
              "Z",
              "bracketleft",
              "backslash",
              "bracketright",
              "asciicircum",
              "underscore",
              "quoteleft",
              "a",
              "b",
              "c",
              "d",
              "e",
              "f",
              "g",
              "h",
              "i",
              "j",
              "k",
              "l",
              "m",
              "n",
              "o",
              "p",
              "q",
              "r",
              "s",
              "t",
              "u",
              "v",
              "w",
              "x",
              "y",
              "z",
              "braceleft",
              "bar",
              "braceright",
              "asciitilde",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "exclamdown",
              "cent",
              "sterling",
              "fraction",
              "yen",
              "florin",
              "section",
              "currency",
              "quotesingle",
              "quotedblleft",
              "guillemotleft",
              "guilsinglleft",
              "guilsinglright",
              "fi",
              "fl",
              "",
              "endash",
              "dagger",
              "daggerdbl",
              "periodcentered",
              "",
              "paragraph",
              "bullet",
              "quotesinglbase",
              "quotedblbase",
              "quotedblright",
              "guillemotright",
              "ellipsis",
              "perthousand",
              "",
              "questiondown",
              "",
              "grave",
              "acute",
              "circumflex",
              "tilde",
              "macron",
              "breve",
              "dotaccent",
              "dieresis",
              "",
              "ring",
              "cedilla",
              "",
              "hungarumlaut",
              "ogonek",
              "caron",
              "emdash",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "AE",
              "",
              "ordfeminine",
              "",
              "",
              "",
              "",
              "Lslash",
              "Oslash",
              "OE",
              "ordmasculine",
              "",
              "",
              "",
              "",
              "",
              "ae",
              "",
              "",
              "",
              "dotlessi",
              "",
              "",
              "lslash",
              "oslash",
              "oe",
              "germandbls"
            ], ee = [
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "space",
              "exclamsmall",
              "Hungarumlautsmall",
              "",
              "dollaroldstyle",
              "dollarsuperior",
              "ampersandsmall",
              "Acutesmall",
              "parenleftsuperior",
              "parenrightsuperior",
              "twodotenleader",
              "onedotenleader",
              "comma",
              "hyphen",
              "period",
              "fraction",
              "zerooldstyle",
              "oneoldstyle",
              "twooldstyle",
              "threeoldstyle",
              "fouroldstyle",
              "fiveoldstyle",
              "sixoldstyle",
              "sevenoldstyle",
              "eightoldstyle",
              "nineoldstyle",
              "colon",
              "semicolon",
              "commasuperior",
              "threequartersemdash",
              "periodsuperior",
              "questionsmall",
              "",
              "asuperior",
              "bsuperior",
              "centsuperior",
              "dsuperior",
              "esuperior",
              "",
              "",
              "isuperior",
              "",
              "",
              "lsuperior",
              "msuperior",
              "nsuperior",
              "osuperior",
              "",
              "",
              "rsuperior",
              "ssuperior",
              "tsuperior",
              "",
              "ff",
              "fi",
              "fl",
              "ffi",
              "ffl",
              "parenleftinferior",
              "",
              "parenrightinferior",
              "Circumflexsmall",
              "hyphensuperior",
              "Gravesmall",
              "Asmall",
              "Bsmall",
              "Csmall",
              "Dsmall",
              "Esmall",
              "Fsmall",
              "Gsmall",
              "Hsmall",
              "Ismall",
              "Jsmall",
              "Ksmall",
              "Lsmall",
              "Msmall",
              "Nsmall",
              "Osmall",
              "Psmall",
              "Qsmall",
              "Rsmall",
              "Ssmall",
              "Tsmall",
              "Usmall",
              "Vsmall",
              "Wsmall",
              "Xsmall",
              "Ysmall",
              "Zsmall",
              "colonmonetary",
              "onefitted",
              "rupiah",
              "Tildesmall",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "exclamdownsmall",
              "centoldstyle",
              "Lslashsmall",
              "",
              "",
              "Scaronsmall",
              "Zcaronsmall",
              "Dieresissmall",
              "Brevesmall",
              "Caronsmall",
              "",
              "Dotaccentsmall",
              "",
              "",
              "Macronsmall",
              "",
              "",
              "figuredash",
              "hypheninferior",
              "",
              "",
              "Ogoneksmall",
              "Ringsmall",
              "Cedillasmall",
              "",
              "",
              "",
              "onequarter",
              "onehalf",
              "threequarters",
              "questiondownsmall",
              "oneeighth",
              "threeeighths",
              "fiveeighths",
              "seveneighths",
              "onethird",
              "twothirds",
              "",
              "",
              "zerosuperior",
              "onesuperior",
              "twosuperior",
              "threesuperior",
              "foursuperior",
              "fivesuperior",
              "sixsuperior",
              "sevensuperior",
              "eightsuperior",
              "ninesuperior",
              "zeroinferior",
              "oneinferior",
              "twoinferior",
              "threeinferior",
              "fourinferior",
              "fiveinferior",
              "sixinferior",
              "seveninferior",
              "eightinferior",
              "nineinferior",
              "centinferior",
              "dollarinferior",
              "periodinferior",
              "commainferior",
              "Agravesmall",
              "Aacutesmall",
              "Acircumflexsmall",
              "Atildesmall",
              "Adieresissmall",
              "Aringsmall",
              "AEsmall",
              "Ccedillasmall",
              "Egravesmall",
              "Eacutesmall",
              "Ecircumflexsmall",
              "Edieresissmall",
              "Igravesmall",
              "Iacutesmall",
              "Icircumflexsmall",
              "Idieresissmall",
              "Ethsmall",
              "Ntildesmall",
              "Ogravesmall",
              "Oacutesmall",
              "Ocircumflexsmall",
              "Otildesmall",
              "Odieresissmall",
              "OEsmall",
              "Oslashsmall",
              "Ugravesmall",
              "Uacutesmall",
              "Ucircumflexsmall",
              "Udieresissmall",
              "Yacutesmall",
              "Thornsmall",
              "Ydieresissmall"
            ], Me = [
              ".notdef",
              "space",
              "exclam",
              "quotedbl",
              "numbersign",
              "dollar",
              "percent",
              "ampersand",
              "quoteright",
              "parenleft",
              "parenright",
              "asterisk",
              "plus",
              "comma",
              "hyphen",
              "period",
              "slash",
              "zero",
              "one",
              "two",
              "three",
              "four",
              "five",
              "six",
              "seven",
              "eight",
              "nine",
              "colon",
              "semicolon",
              "less",
              "equal",
              "greater",
              "question",
              "at",
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "H",
              "I",
              "J",
              "K",
              "L",
              "M",
              "N",
              "O",
              "P",
              "Q",
              "R",
              "S",
              "T",
              "U",
              "V",
              "W",
              "X",
              "Y",
              "Z",
              "bracketleft",
              "backslash",
              "bracketright",
              "asciicircum",
              "underscore",
              "quoteleft",
              "a",
              "b",
              "c",
              "d",
              "e",
              "f",
              "g",
              "h",
              "i",
              "j",
              "k",
              "l",
              "m",
              "n",
              "o",
              "p",
              "q",
              "r",
              "s",
              "t",
              "u",
              "v",
              "w",
              "x",
              "y",
              "z",
              "braceleft",
              "bar",
              "braceright",
              "asciitilde",
              "exclamdown",
              "cent",
              "sterling",
              "fraction",
              "yen",
              "florin",
              "section",
              "currency",
              "quotesingle",
              "quotedblleft",
              "guillemotleft",
              "guilsinglleft",
              "guilsinglright",
              "fi",
              "fl",
              "endash",
              "dagger",
              "daggerdbl",
              "periodcentered",
              "paragraph",
              "bullet",
              "quotesinglbase",
              "quotedblbase",
              "quotedblright",
              "guillemotright",
              "ellipsis",
              "perthousand",
              "questiondown",
              "grave",
              "acute",
              "circumflex",
              "tilde",
              "macron",
              "breve",
              "dotaccent",
              "dieresis",
              "ring",
              "cedilla",
              "hungarumlaut",
              "ogonek",
              "caron",
              "emdash",
              "AE",
              "ordfeminine",
              "Lslash",
              "Oslash",
              "OE",
              "ordmasculine",
              "ae",
              "dotlessi",
              "lslash",
              "oslash",
              "oe",
              "germandbls",
              "onesuperior",
              "logicalnot",
              "mu",
              "trademark",
              "Eth",
              "onehalf",
              "plusminus",
              "Thorn",
              "onequarter",
              "divide",
              "brokenbar",
              "degree",
              "thorn",
              "threequarters",
              "twosuperior",
              "registered",
              "minus",
              "eth",
              "multiply",
              "threesuperior",
              "copyright",
              "Aacute",
              "Acircumflex",
              "Adieresis",
              "Agrave",
              "Aring",
              "Atilde",
              "Ccedilla",
              "Eacute",
              "Ecircumflex",
              "Edieresis",
              "Egrave",
              "Iacute",
              "Icircumflex",
              "Idieresis",
              "Igrave",
              "Ntilde",
              "Oacute",
              "Ocircumflex",
              "Odieresis",
              "Ograve",
              "Otilde",
              "Scaron",
              "Uacute",
              "Ucircumflex",
              "Udieresis",
              "Ugrave",
              "Yacute",
              "Ydieresis",
              "Zcaron",
              "aacute",
              "acircumflex",
              "adieresis",
              "agrave",
              "aring",
              "atilde",
              "ccedilla",
              "eacute",
              "ecircumflex",
              "edieresis",
              "egrave",
              "iacute",
              "icircumflex",
              "idieresis",
              "igrave",
              "ntilde",
              "oacute",
              "ocircumflex",
              "odieresis",
              "ograve",
              "otilde",
              "scaron",
              "uacute",
              "ucircumflex",
              "udieresis",
              "ugrave",
              "yacute",
              "ydieresis",
              "zcaron"
            ], MA = [
              ".notdef",
              "space",
              "exclamsmall",
              "Hungarumlautsmall",
              "dollaroldstyle",
              "dollarsuperior",
              "ampersandsmall",
              "Acutesmall",
              "parenleftsuperior",
              "parenrightsuperior",
              "twodotenleader",
              "onedotenleader",
              "comma",
              "hyphen",
              "period",
              "fraction",
              "zerooldstyle",
              "oneoldstyle",
              "twooldstyle",
              "threeoldstyle",
              "fouroldstyle",
              "fiveoldstyle",
              "sixoldstyle",
              "sevenoldstyle",
              "eightoldstyle",
              "nineoldstyle",
              "colon",
              "semicolon",
              "commasuperior",
              "threequartersemdash",
              "periodsuperior",
              "questionsmall",
              "asuperior",
              "bsuperior",
              "centsuperior",
              "dsuperior",
              "esuperior",
              "isuperior",
              "lsuperior",
              "msuperior",
              "nsuperior",
              "osuperior",
              "rsuperior",
              "ssuperior",
              "tsuperior",
              "ff",
              "fi",
              "fl",
              "ffi",
              "ffl",
              "parenleftinferior",
              "parenrightinferior",
              "Circumflexsmall",
              "hyphensuperior",
              "Gravesmall",
              "Asmall",
              "Bsmall",
              "Csmall",
              "Dsmall",
              "Esmall",
              "Fsmall",
              "Gsmall",
              "Hsmall",
              "Ismall",
              "Jsmall",
              "Ksmall",
              "Lsmall",
              "Msmall",
              "Nsmall",
              "Osmall",
              "Psmall",
              "Qsmall",
              "Rsmall",
              "Ssmall",
              "Tsmall",
              "Usmall",
              "Vsmall",
              "Wsmall",
              "Xsmall",
              "Ysmall",
              "Zsmall",
              "colonmonetary",
              "onefitted",
              "rupiah",
              "Tildesmall",
              "exclamdownsmall",
              "centoldstyle",
              "Lslashsmall",
              "Scaronsmall",
              "Zcaronsmall",
              "Dieresissmall",
              "Brevesmall",
              "Caronsmall",
              "Dotaccentsmall",
              "Macronsmall",
              "figuredash",
              "hypheninferior",
              "Ogoneksmall",
              "Ringsmall",
              "Cedillasmall",
              "onequarter",
              "onehalf",
              "threequarters",
              "questiondownsmall",
              "oneeighth",
              "threeeighths",
              "fiveeighths",
              "seveneighths",
              "onethird",
              "twothirds",
              "zerosuperior",
              "onesuperior",
              "twosuperior",
              "threesuperior",
              "foursuperior",
              "fivesuperior",
              "sixsuperior",
              "sevensuperior",
              "eightsuperior",
              "ninesuperior",
              "zeroinferior",
              "oneinferior",
              "twoinferior",
              "threeinferior",
              "fourinferior",
              "fiveinferior",
              "sixinferior",
              "seveninferior",
              "eightinferior",
              "nineinferior",
              "centinferior",
              "dollarinferior",
              "periodinferior",
              "commainferior",
              "Agravesmall",
              "Aacutesmall",
              "Acircumflexsmall",
              "Atildesmall",
              "Adieresissmall",
              "Aringsmall",
              "AEsmall",
              "Ccedillasmall",
              "Egravesmall",
              "Eacutesmall",
              "Ecircumflexsmall",
              "Edieresissmall",
              "Igravesmall",
              "Iacutesmall",
              "Icircumflexsmall",
              "Idieresissmall",
              "Ethsmall",
              "Ntildesmall",
              "Ogravesmall",
              "Oacutesmall",
              "Ocircumflexsmall",
              "Otildesmall",
              "Odieresissmall",
              "OEsmall",
              "Oslashsmall",
              "Ugravesmall",
              "Uacutesmall",
              "Ucircumflexsmall",
              "Udieresissmall",
              "Yacutesmall",
              "Thornsmall",
              "Ydieresissmall"
            ], be = [
              ".notdef",
              "space",
              "dollaroldstyle",
              "dollarsuperior",
              "parenleftsuperior",
              "parenrightsuperior",
              "twodotenleader",
              "onedotenleader",
              "comma",
              "hyphen",
              "period",
              "fraction",
              "zerooldstyle",
              "oneoldstyle",
              "twooldstyle",
              "threeoldstyle",
              "fouroldstyle",
              "fiveoldstyle",
              "sixoldstyle",
              "sevenoldstyle",
              "eightoldstyle",
              "nineoldstyle",
              "colon",
              "semicolon",
              "commasuperior",
              "threequartersemdash",
              "periodsuperior",
              "asuperior",
              "bsuperior",
              "centsuperior",
              "dsuperior",
              "esuperior",
              "isuperior",
              "lsuperior",
              "msuperior",
              "nsuperior",
              "osuperior",
              "rsuperior",
              "ssuperior",
              "tsuperior",
              "ff",
              "fi",
              "fl",
              "ffi",
              "ffl",
              "parenleftinferior",
              "parenrightinferior",
              "hyphensuperior",
              "colonmonetary",
              "onefitted",
              "rupiah",
              "centoldstyle",
              "figuredash",
              "hypheninferior",
              "onequarter",
              "onehalf",
              "threequarters",
              "oneeighth",
              "threeeighths",
              "fiveeighths",
              "seveneighths",
              "onethird",
              "twothirds",
              "zerosuperior",
              "onesuperior",
              "twosuperior",
              "threesuperior",
              "foursuperior",
              "fivesuperior",
              "sixsuperior",
              "sevensuperior",
              "eightsuperior",
              "ninesuperior",
              "zeroinferior",
              "oneinferior",
              "twoinferior",
              "threeinferior",
              "fourinferior",
              "fiveinferior",
              "sixinferior",
              "seveninferior",
              "eightinferior",
              "nineinferior",
              "centinferior",
              "dollarinferior",
              "periodinferior",
              "commainferior"
            ], at = new A.Struct({
              reserved: new A.Reserved(A.uint16),
              reqFeatureIndex: A.uint16,
              featureCount: A.uint16,
              featureIndexes: new A.Array(A.uint16, "featureCount")
            }), V = new A.Struct({
              tag: new A.String(4),
              langSys: new A.Pointer(A.uint16, at, {
                type: "parent"
              })
            }), me = new A.Struct({
              defaultLangSys: new A.Pointer(A.uint16, at),
              count: A.uint16,
              langSysRecords: new A.Array(V, "count")
            }), Ye = new A.Struct({
              tag: new A.String(4),
              script: new A.Pointer(A.uint16, me, {
                type: "parent"
              })
            }), SA = new A.Array(Ye, A.uint16), ue = new A.Struct({
              version: A.uint16,
              nameID: A.uint16
            }), Fe = new A.Struct({
              featureParams: new A.Pointer(A.uint16, ue),
              lookupCount: A.uint16,
              lookupListIndexes: new A.Array(A.uint16, "lookupCount")
            }), tt = new A.Struct({
              tag: new A.String(4),
              feature: new A.Pointer(A.uint16, Fe, {
                type: "parent"
              })
            }), We = new A.Array(tt, A.uint16), Ze = new A.Struct({
              markAttachmentType: A.uint8,
              flags: new A.Bitfield(A.uint8, [
                "rightToLeft",
                "ignoreBaseGlyphs",
                "ignoreLigatures",
                "ignoreMarks",
                "useMarkFilteringSet"
              ])
            });
            function Ct(BA) {
              let i = new A.Struct({
                lookupType: A.uint16,
                flags: Ze,
                subTableCount: A.uint16,
                subTables: new A.Array(new A.Pointer(A.uint16, BA), "subTableCount"),
                markFilteringSet: new A.Optional(A.uint16, (u) => u.flags.flags.useMarkFilteringSet)
              });
              return new A.LazyArray(new A.Pointer(A.uint16, i), A.uint16);
            }
            let fi = new A.Struct({
              start: A.uint16,
              end: A.uint16,
              startCoverageIndex: A.uint16
            }), st = new A.VersionedStruct(A.uint16, {
              1: {
                glyphCount: A.uint16,
                glyphs: new A.Array(A.uint16, "glyphCount")
              },
              2: {
                rangeCount: A.uint16,
                rangeRecords: new A.Array(fi, "rangeCount")
              }
            }), pt = new A.Struct({
              start: A.uint16,
              end: A.uint16,
              class: A.uint16
            }), Mt = new A.VersionedStruct(A.uint16, {
              1: {
                startGlyph: A.uint16,
                glyphCount: A.uint16,
                classValueArray: new A.Array(A.uint16, "glyphCount")
              },
              2: {
                classRangeCount: A.uint16,
                classRangeRecord: new A.Array(pt, "classRangeCount")
              }
            }), Tt = new A.Struct({
              a: A.uint16,
              b: A.uint16,
              deltaFormat: A.uint16
            }), Zt = new A.Struct({
              sequenceIndex: A.uint16,
              lookupListIndex: A.uint16
            }), yi = new A.Struct({
              glyphCount: A.uint16,
              lookupCount: A.uint16,
              input: new A.Array(A.uint16, (BA) => BA.glyphCount - 1),
              lookupRecords: new A.Array(Zt, "lookupCount")
            }), xi = new A.Array(new A.Pointer(A.uint16, yi), A.uint16), Ot = new A.Struct({
              glyphCount: A.uint16,
              lookupCount: A.uint16,
              classes: new A.Array(A.uint16, (BA) => BA.glyphCount - 1),
              lookupRecords: new A.Array(Zt, "lookupCount")
            }), bt = new A.Array(new A.Pointer(A.uint16, Ot), A.uint16), qt = new A.VersionedStruct(A.uint16, {
              1: {
                coverage: new A.Pointer(A.uint16, st),
                ruleSetCount: A.uint16,
                ruleSets: new A.Array(new A.Pointer(A.uint16, xi), "ruleSetCount")
              },
              2: {
                coverage: new A.Pointer(A.uint16, st),
                classDef: new A.Pointer(A.uint16, Mt),
                classSetCnt: A.uint16,
                classSet: new A.Array(new A.Pointer(A.uint16, bt), "classSetCnt")
              },
              3: {
                glyphCount: A.uint16,
                lookupCount: A.uint16,
                coverages: new A.Array(new A.Pointer(A.uint16, st), "glyphCount"),
                lookupRecords: new A.Array(Zt, "lookupCount")
              }
            }), ti = new A.Struct({
              backtrackGlyphCount: A.uint16,
              backtrack: new A.Array(A.uint16, "backtrackGlyphCount"),
              inputGlyphCount: A.uint16,
              input: new A.Array(A.uint16, (BA) => BA.inputGlyphCount - 1),
              lookaheadGlyphCount: A.uint16,
              lookahead: new A.Array(A.uint16, "lookaheadGlyphCount"),
              lookupCount: A.uint16,
              lookupRecords: new A.Array(Zt, "lookupCount")
            }), Ke = new A.Array(new A.Pointer(A.uint16, ti), A.uint16), qe = new A.VersionedStruct(A.uint16, {
              1: {
                coverage: new A.Pointer(A.uint16, st),
                chainCount: A.uint16,
                chainRuleSets: new A.Array(new A.Pointer(A.uint16, Ke), "chainCount")
              },
              2: {
                coverage: new A.Pointer(A.uint16, st),
                backtrackClassDef: new A.Pointer(A.uint16, Mt),
                inputClassDef: new A.Pointer(A.uint16, Mt),
                lookaheadClassDef: new A.Pointer(A.uint16, Mt),
                chainCount: A.uint16,
                chainClassSet: new A.Array(new A.Pointer(A.uint16, Ke), "chainCount")
              },
              3: {
                backtrackGlyphCount: A.uint16,
                backtrackCoverage: new A.Array(new A.Pointer(A.uint16, st), "backtrackGlyphCount"),
                inputGlyphCount: A.uint16,
                inputCoverage: new A.Array(new A.Pointer(A.uint16, st), "inputGlyphCount"),
                lookaheadGlyphCount: A.uint16,
                lookaheadCoverage: new A.Array(new A.Pointer(A.uint16, st), "lookaheadGlyphCount"),
                lookupCount: A.uint16,
                lookupRecords: new A.Array(Zt, "lookupCount")
              }
            }), Dt = new A.Fixed(16, "BE", 14), ut = new A.Struct({
              startCoord: Dt,
              peakCoord: Dt,
              endCoord: Dt
            }), ni = new A.Struct({
              axisCount: A.uint16,
              regionCount: A.uint16,
              variationRegions: new A.Array(new A.Array(ut, "axisCount"), "regionCount")
            }), wi = new A.Struct({
              shortDeltas: new A.Array(A.int16, (BA) => BA.parent.shortDeltaCount),
              regionDeltas: new A.Array(A.int8, (BA) => BA.parent.regionIndexCount - BA.parent.shortDeltaCount),
              deltas: (BA) => BA.shortDeltas.concat(BA.regionDeltas)
            }), pi = new A.Struct({
              itemCount: A.uint16,
              shortDeltaCount: A.uint16,
              regionIndexCount: A.uint16,
              regionIndexes: new A.Array(A.uint16, "regionIndexCount"),
              deltaSets: new A.Array(wi, "itemCount")
            }), vA = new A.Struct({
              format: A.uint16,
              variationRegionList: new A.Pointer(A.uint32, ni),
              variationDataCount: A.uint16,
              itemVariationData: new A.Array(new A.Pointer(A.uint32, pi), "variationDataCount")
            }), UA = new A.VersionedStruct(A.uint16, {
              1: {
                axisIndex: A.uint16,
                axisIndex: A.uint16,
                filterRangeMinValue: Dt,
                filterRangeMaxValue: Dt
              }
            }), mA = new A.Struct({
              conditionCount: A.uint16,
              conditionTable: new A.Array(new A.Pointer(A.uint32, UA), "conditionCount")
            }), _A = new A.Struct({
              featureIndex: A.uint16,
              alternateFeatureTable: new A.Pointer(A.uint32, Fe, {
                type: "parent"
              })
            }), $A = new A.Struct({
              version: A.fixed32,
              substitutionCount: A.uint16,
              substitutions: new A.Array(_A, "substitutionCount")
            }), jA = new A.Struct({
              conditionSet: new A.Pointer(A.uint32, mA, {
                type: "parent"
              }),
              featureTableSubstitution: new A.Pointer(A.uint32, $A, {
                type: "parent"
              })
            }), le = new A.Struct({
              majorVersion: A.uint16,
              minorVersion: A.uint16,
              featureVariationRecordCount: A.uint32,
              featureVariationRecords: new A.Array(jA, "featureVariationRecordCount")
            });
            class JA {
              decode(i, u, m) {
                return this.predefinedOps[m[0]] ? this.predefinedOps[m[0]] : this.type.decode(i, u, m);
              }
              size(i, u) {
                return this.type.size(i, u);
              }
              encode(i, u, m) {
                let L = this.predefinedOps.indexOf(u);
                return L !== -1 ? L : this.type.encode(i, u, m);
              }
              constructor(i, u) {
                this.predefinedOps = i, this.type = u;
              }
            }
            class ne extends A.Number {
              decode(i) {
                return A.uint8.decode(i) & 127;
              }
              constructor() {
                super("UInt8");
              }
            }
            let ae = new A.Struct({
              first: A.uint16,
              nLeft: A.uint8
            }), ve = new A.Struct({
              first: A.uint16,
              nLeft: A.uint16
            }), ze = new A.VersionedStruct(new ne(), {
              0: {
                nCodes: A.uint8,
                codes: new A.Array(A.uint8, "nCodes")
              },
              1: {
                nRanges: A.uint8,
                ranges: new A.Array(ae, "nRanges")
              }
            }), At = new JA([
              Ie,
              ee
            ], new W(ze, {
              lazy: !0
            }));
            class Bt extends A.Array {
              decode(i, u) {
                let m = (0, A.resolveLength)(this.length, i, u), L = 0, Z = [];
                for (; L < m; ) {
                  let O = this.type.decode(i, u);
                  O.offset = L, L += O.nLeft + 1, Z.push(O);
                }
                return Z;
              }
            }
            let He = new A.VersionedStruct(A.uint8, {
              0: {
                glyphs: new A.Array(A.uint16, (BA) => BA.parent.CharStrings.length - 1)
              },
              1: {
                ranges: new Bt(ae, (BA) => BA.parent.CharStrings.length - 1)
              },
              2: {
                ranges: new Bt(ve, (BA) => BA.parent.CharStrings.length - 1)
              }
            }), Ce = new JA([
              Me,
              MA,
              be
            ], new W(He, {
              lazy: !0
            })), je = new A.Struct({
              first: A.uint16,
              fd: A.uint8
            }), it = new A.Struct({
              first: A.uint32,
              fd: A.uint16
            }), Et = new A.VersionedStruct(A.uint8, {
              0: {
                fds: new A.Array(A.uint8, (BA) => BA.parent.CharStrings.length)
              },
              3: {
                nRanges: A.uint16,
                ranges: new A.Array(je, "nRanges"),
                sentinel: A.uint16
              },
              4: {
                nRanges: A.uint32,
                ranges: new A.Array(it, "nRanges"),
                sentinel: A.uint32
              }
            }), Ft = new W(pA);
            class Qt {
              decode(i, u, m) {
                return u.length = m[0], Ft.decode(i, u, [
                  m[1]
                ]);
              }
              size(i, u) {
                return [
                  pA.size(i, u, !1),
                  Ft.size(i, u)[0]
                ];
              }
              encode(i, u, m) {
                return [
                  pA.size(u, m, !1),
                  Ft.encode(i, u, m)[0]
                ];
              }
            }
            let Rt = new G([
              // key       name                   type(s)                                 default
              [
                18,
                "Private",
                new Qt(),
                null
              ],
              [
                [
                  12,
                  38
                ],
                "FontName",
                "sid",
                null
              ],
              [
                [
                  12,
                  7
                ],
                "FontMatrix",
                "array",
                [
                  1e-3,
                  0,
                  0,
                  1e-3,
                  0,
                  0
                ]
              ],
              [
                [
                  12,
                  5
                ],
                "PaintType",
                "number",
                0
              ]
            ]), gt = new G([
              // key       name                   type(s)                                 default
              [
                [
                  12,
                  30
                ],
                "ROS",
                [
                  "sid",
                  "sid",
                  "number"
                ],
                null
              ],
              [
                0,
                "version",
                "sid",
                null
              ],
              [
                1,
                "Notice",
                "sid",
                null
              ],
              [
                [
                  12,
                  0
                ],
                "Copyright",
                "sid",
                null
              ],
              [
                2,
                "FullName",
                "sid",
                null
              ],
              [
                3,
                "FamilyName",
                "sid",
                null
              ],
              [
                4,
                "Weight",
                "sid",
                null
              ],
              [
                [
                  12,
                  1
                ],
                "isFixedPitch",
                "boolean",
                !1
              ],
              [
                [
                  12,
                  2
                ],
                "ItalicAngle",
                "number",
                0
              ],
              [
                [
                  12,
                  3
                ],
                "UnderlinePosition",
                "number",
                -100
              ],
              [
                [
                  12,
                  4
                ],
                "UnderlineThickness",
                "number",
                50
              ],
              [
                [
                  12,
                  5
                ],
                "PaintType",
                "number",
                0
              ],
              [
                [
                  12,
                  6
                ],
                "CharstringType",
                "number",
                2
              ],
              [
                [
                  12,
                  7
                ],
                "FontMatrix",
                "array",
                [
                  1e-3,
                  0,
                  0,
                  1e-3,
                  0,
                  0
                ]
              ],
              [
                13,
                "UniqueID",
                "number",
                null
              ],
              [
                5,
                "FontBBox",
                "array",
                [
                  0,
                  0,
                  0,
                  0
                ]
              ],
              [
                [
                  12,
                  8
                ],
                "StrokeWidth",
                "number",
                0
              ],
              [
                14,
                "XUID",
                "array",
                null
              ],
              [
                15,
                "charset",
                Ce,
                Me
              ],
              [
                16,
                "Encoding",
                At,
                Ie
              ],
              [
                17,
                "CharStrings",
                new W(new _e()),
                null
              ],
              [
                18,
                "Private",
                new Qt(),
                null
              ],
              [
                [
                  12,
                  20
                ],
                "SyntheticBase",
                "number",
                null
              ],
              [
                [
                  12,
                  21
                ],
                "PostScript",
                "sid",
                null
              ],
              [
                [
                  12,
                  22
                ],
                "BaseFontName",
                "sid",
                null
              ],
              [
                [
                  12,
                  23
                ],
                "BaseFontBlend",
                "delta",
                null
              ],
              // CID font specific
              [
                [
                  12,
                  31
                ],
                "CIDFontVersion",
                "number",
                0
              ],
              [
                [
                  12,
                  32
                ],
                "CIDFontRevision",
                "number",
                0
              ],
              [
                [
                  12,
                  33
                ],
                "CIDFontType",
                "number",
                0
              ],
              [
                [
                  12,
                  34
                ],
                "CIDCount",
                "number",
                8720
              ],
              [
                [
                  12,
                  35
                ],
                "UIDBase",
                "number",
                null
              ],
              [
                [
                  12,
                  37
                ],
                "FDSelect",
                new W(Et),
                null
              ],
              [
                [
                  12,
                  36
                ],
                "FDArray",
                new W(new _e(Rt)),
                null
              ],
              [
                [
                  12,
                  38
                ],
                "FontName",
                "sid",
                null
              ]
            ]), yt = new A.Struct({
              length: A.uint16,
              itemVariationStore: vA
            }), oi = new G([
              [
                [
                  12,
                  7
                ],
                "FontMatrix",
                "array",
                [
                  1e-3,
                  0,
                  0,
                  1e-3,
                  0,
                  0
                ]
              ],
              [
                17,
                "CharStrings",
                new W(new _e()),
                null
              ],
              [
                [
                  12,
                  37
                ],
                "FDSelect",
                new W(Et),
                null
              ],
              [
                [
                  12,
                  36
                ],
                "FDArray",
                new W(new _e(Rt)),
                null
              ],
              [
                24,
                "vstore",
                new W(yt),
                null
              ],
              [
                25,
                "maxstack",
                "number",
                193
              ]
            ]);
            var $t = new A.VersionedStruct(A.fixed16, {
              1: {
                hdrSize: A.uint8,
                offSize: A.uint8,
                nameIndex: new _e(new A.String("length")),
                topDictIndex: new _e(gt),
                stringIndex: new _e(new A.String("length")),
                globalSubrIndex: new _e()
              },
              2: {
                hdrSize: A.uint8,
                length: A.uint16,
                topDict: oi,
                globalSubrIndex: new _e()
              }
            });
            class St {
              static decode(i) {
                return new St(i);
              }
              decode() {
                this.stream.pos;
                let i = $t.decode(this.stream);
                for (let u in i) {
                  let m = i[u];
                  this[u] = m;
                }
                if (this.version < 2) {
                  if (this.topDictIndex.length !== 1) throw new Error("Only a single font is allowed in CFF");
                  this.topDict = this.topDictIndex[0];
                }
                return this.isCIDFont = this.topDict.ROS != null, this;
              }
              string(i) {
                return this.version >= 2 ? null : i < Be.length ? Be[i] : this.stringIndex[i - Be.length];
              }
              get postscriptName() {
                return this.version < 2 ? this.nameIndex[0] : null;
              }
              get fullName() {
                return this.string(this.topDict.FullName);
              }
              get familyName() {
                return this.string(this.topDict.FamilyName);
              }
              getCharString(i) {
                return this.stream.pos = this.topDict.CharStrings[i].offset, this.stream.readBuffer(this.topDict.CharStrings[i].length);
              }
              getGlyphName(i) {
                if (this.version >= 2 || this.isCIDFont) return null;
                let { charset: u } = this.topDict;
                if (Array.isArray(u)) return u[i];
                if (i === 0) return ".notdef";
                switch (i -= 1, u.version) {
                  case 0:
                    return this.string(u.glyphs[i]);
                  case 1:
                  case 2:
                    for (let m = 0; m < u.ranges.length; m++) {
                      let L = u.ranges[m];
                      if (L.offset <= i && i <= L.offset + L.nLeft) return this.string(L.first + (i - L.offset));
                    }
                    break;
                }
                return null;
              }
              fdForGlyph(i) {
                if (!this.topDict.FDSelect) return null;
                switch (this.topDict.FDSelect.version) {
                  case 0:
                    return this.topDict.FDSelect.fds[i];
                  case 3:
                  case 4:
                    let { ranges: u } = this.topDict.FDSelect, m = 0, L = u.length - 1;
                    for (; m <= L; ) {
                      let Z = m + L >> 1;
                      if (i < u[Z].first) L = Z - 1;
                      else if (Z < L && i >= u[Z + 1].first) m = Z + 1;
                      else return u[Z].fd;
                    }
                  default:
                    throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);
                }
              }
              privateDictForGlyph(i) {
                if (this.topDict.FDSelect) {
                  let u = this.fdForGlyph(i);
                  return this.topDict.FDArray[u] ? this.topDict.FDArray[u].Private : null;
                }
                return this.version < 2 ? this.topDict.Private : this.topDict.FDArray[0].Private;
              }
              constructor(i) {
                this.stream = i, this.decode();
              }
            }
            var ri = St;
            let an = new A.Struct({
              glyphIndex: A.uint16,
              vertOriginY: A.int16
            });
            var mi = new A.Struct({
              majorVersion: A.uint16,
              minorVersion: A.uint16,
              defaultVertOriginY: A.int16,
              numVertOriginYMetrics: A.uint16,
              metrics: new A.Array(an, "numVertOriginYMetrics")
            });
            let Ii = new A.Struct({
              height: A.uint8,
              width: A.uint8,
              horiBearingX: A.int8,
              horiBearingY: A.int8,
              horiAdvance: A.uint8,
              vertBearingX: A.int8,
              vertBearingY: A.int8,
              vertAdvance: A.uint8
            }), Hi = new A.Struct({
              height: A.uint8,
              width: A.uint8,
              bearingX: A.int8,
              bearingY: A.int8,
              advance: A.uint8
            }), Mi = new A.Struct({
              glyph: A.uint16,
              xOffset: A.int8,
              yOffset: A.int8
            });
            class Li {
            }
            class Fi {
            }
            new A.VersionedStruct("version", {
              1: {
                metrics: Hi,
                data: Li
              },
              2: {
                metrics: Hi,
                data: Fi
              },
              // format 3 is deprecated
              // format 4 is not supported by Microsoft
              5: {
                data: Fi
              },
              6: {
                metrics: Ii,
                data: Li
              },
              7: {
                metrics: Ii,
                data: Fi
              },
              8: {
                metrics: Hi,
                pad: new A.Reserved(A.uint8),
                numComponents: A.uint16,
                components: new A.Array(Mi, "numComponents")
              },
              9: {
                metrics: Ii,
                pad: new A.Reserved(A.uint8),
                numComponents: A.uint16,
                components: new A.Array(Mi, "numComponents")
              },
              17: {
                metrics: Hi,
                dataLen: A.uint32,
                data: new A.Buffer("dataLen")
              },
              18: {
                metrics: Ii,
                dataLen: A.uint32,
                data: new A.Buffer("dataLen")
              },
              19: {
                dataLen: A.uint32,
                data: new A.Buffer("dataLen")
              }
            });
            let Ti = new A.Struct({
              ascender: A.int8,
              descender: A.int8,
              widthMax: A.uint8,
              caretSlopeNumerator: A.int8,
              caretSlopeDenominator: A.int8,
              caretOffset: A.int8,
              minOriginSB: A.int8,
              minAdvanceSB: A.int8,
              maxBeforeBL: A.int8,
              minAfterBL: A.int8,
              pad: new A.Reserved(A.int8, 2)
            }), Yi = new A.Struct({
              glyphCode: A.uint16,
              offset: A.uint16
            }), Oi = new A.VersionedStruct(A.uint16, {
              header: {
                imageFormat: A.uint16,
                imageDataOffset: A.uint32
              },
              1: {
                offsetArray: new A.Array(A.uint32, (BA) => BA.parent.lastGlyphIndex - BA.parent.firstGlyphIndex + 1)
              },
              2: {
                imageSize: A.uint32,
                bigMetrics: Ii
              },
              3: {
                offsetArray: new A.Array(A.uint16, (BA) => BA.parent.lastGlyphIndex - BA.parent.firstGlyphIndex + 1)
              },
              4: {
                numGlyphs: A.uint32,
                glyphArray: new A.Array(Yi, (BA) => BA.numGlyphs + 1)
              },
              5: {
                imageSize: A.uint32,
                bigMetrics: Ii,
                numGlyphs: A.uint32,
                glyphCodeArray: new A.Array(A.uint16, "numGlyphs")
              }
            }), Pn = new A.Struct({
              firstGlyphIndex: A.uint16,
              lastGlyphIndex: A.uint16,
              subtable: new A.Pointer(A.uint32, Oi)
            }), Ui = new A.Struct({
              indexSubTableArray: new A.Pointer(A.uint32, new A.Array(Pn, 1), {
                type: "parent"
              }),
              indexTablesSize: A.uint32,
              numberOfIndexSubTables: A.uint32,
              colorRef: A.uint32,
              hori: Ti,
              vert: Ti,
              startGlyphIndex: A.uint16,
              endGlyphIndex: A.uint16,
              ppemX: A.uint8,
              ppemY: A.uint8,
              bitDepth: A.uint8,
              flags: new A.Bitfield(A.uint8, [
                "horizontal",
                "vertical"
              ])
            });
            var An = new A.Struct({
              version: A.uint32,
              numSizes: A.uint32,
              sizes: new A.Array(Ui, "numSizes")
            });
            let vn = new A.Struct({
              ppem: A.uint16,
              resolution: A.uint16,
              imageOffsets: new A.Array(new A.Pointer(A.uint32, "void"), (BA) => BA.parent.parent.maxp.numGlyphs + 1)
            });
            var en = new A.Struct({
              version: A.uint16,
              flags: new A.Bitfield(A.uint16, [
                "renderOutlines"
              ]),
              numImgTables: A.uint32,
              imageTables: new A.Array(new A.Pointer(A.uint32, vn), "numImgTables")
            });
            let hi = new A.Struct({
              gid: A.uint16,
              paletteIndex: A.uint16
              // Index value to use in the appropriate palette. This value must
            }), Mn = new A.Struct({
              gid: A.uint16,
              // and is not rendered for color.
              firstLayerIndex: A.uint16,
              // There will be numLayers consecutive entries for this base glyph.
              numLayers: A.uint16
            });
            var Pr = new A.Struct({
              version: A.uint16,
              numBaseGlyphRecords: A.uint16,
              baseGlyphRecord: new A.Pointer(A.uint32, new A.Array(Mn, "numBaseGlyphRecords")),
              layerRecords: new A.Pointer(A.uint32, new A.Array(hi, "numLayerRecords"), {
                lazy: !0
              }),
              numLayerRecords: A.uint16
            });
            let Ar = new A.Struct({
              blue: A.uint8,
              green: A.uint8,
              red: A.uint8,
              alpha: A.uint8
            });
            var er = new A.VersionedStruct(A.uint16, {
              header: {
                numPaletteEntries: A.uint16,
                numPalettes: A.uint16,
                numColorRecords: A.uint16,
                colorRecords: new A.Pointer(A.uint32, new A.Array(Ar, "numColorRecords")),
                colorRecordIndices: new A.Array(A.uint16, "numPalettes")
              },
              0: {},
              1: {
                offsetPaletteTypeArray: new A.Pointer(A.uint32, new A.Array(A.uint32, "numPalettes")),
                offsetPaletteLabelArray: new A.Pointer(A.uint32, new A.Array(A.uint16, "numPalettes")),
                offsetPaletteEntryLabelArray: new A.Pointer(A.uint32, new A.Array(A.uint16, "numPaletteEntries"))
              }
            });
            let on = new A.VersionedStruct(A.uint16, {
              1: {
                coordinate: A.int16
                // X or Y value, in design units
              },
              2: {
                coordinate: A.int16,
                referenceGlyph: A.uint16,
                baseCoordPoint: A.uint16
                // Index of contour point on the referenceGlyph
              },
              3: {
                coordinate: A.int16,
                deviceTable: new A.Pointer(A.uint16, Tt)
                // Device table for X or Y value
              }
            }), tr = new A.Struct({
              defaultIndex: A.uint16,
              baseCoordCount: A.uint16,
              baseCoords: new A.Array(new A.Pointer(A.uint16, on), "baseCoordCount")
            }), ir = new A.Struct({
              tag: new A.String(4),
              minCoord: new A.Pointer(A.uint16, on, {
                type: "parent"
              }),
              maxCoord: new A.Pointer(A.uint16, on, {
                type: "parent"
              })
              // May be NULL
            }), nr = new A.Struct({
              minCoord: new A.Pointer(A.uint16, on),
              maxCoord: new A.Pointer(A.uint16, on),
              featMinMaxCount: A.uint16,
              featMinMaxRecords: new A.Array(ir, "featMinMaxCount")
              // In alphabetical order
            }), vr = new A.Struct({
              tag: new A.String(4),
              minMax: new A.Pointer(A.uint16, nr, {
                type: "parent"
              })
            }), br = new A.Struct({
              baseValues: new A.Pointer(A.uint16, tr),
              defaultMinMax: new A.Pointer(A.uint16, nr),
              baseLangSysCount: A.uint16,
              baseLangSysRecords: new A.Array(vr, "baseLangSysCount")
              // in alphabetical order by BaseLangSysTag
            }), zr = new A.Struct({
              tag: new A.String(4),
              script: new A.Pointer(A.uint16, br, {
                type: "parent"
              })
            }), Tr = new A.Array(zr, A.uint16), Ur = new A.Array(new A.String(4), A.uint16), rr = new A.Struct({
              baseTagList: new A.Pointer(A.uint16, Ur),
              baseScriptList: new A.Pointer(A.uint16, Tr)
            });
            var Nr = new A.VersionedStruct(A.uint32, {
              header: {
                horizAxis: new A.Pointer(A.uint16, rr),
                vertAxis: new A.Pointer(A.uint16, rr)
                // May be NULL
              },
              65536: {},
              65537: {
                itemVariationStore: new A.Pointer(A.uint32, vA)
              }
            });
            let sr = new A.Array(A.uint16, A.uint16), bn = new A.Struct({
              coverage: new A.Pointer(A.uint16, st),
              glyphCount: A.uint16,
              attachPoints: new A.Array(new A.Pointer(A.uint16, sr), "glyphCount")
            }), Dn = new A.VersionedStruct(A.uint16, {
              1: {
                coordinate: A.int16
              },
              2: {
                caretValuePoint: A.uint16
              },
              3: {
                coordinate: A.int16,
                deviceTable: new A.Pointer(A.uint16, Tt)
              }
            }), kn = new A.Array(new A.Pointer(A.uint16, Dn), A.uint16), Rr = new A.Struct({
              coverage: new A.Pointer(A.uint16, st),
              ligGlyphCount: A.uint16,
              ligGlyphs: new A.Array(new A.Pointer(A.uint16, kn), "ligGlyphCount")
            }), ar = new A.Struct({
              markSetTableFormat: A.uint16,
              markSetCount: A.uint16,
              coverage: new A.Array(new A.Pointer(A.uint32, st), "markSetCount")
            });
            var Sr = new A.VersionedStruct(A.uint32, {
              header: {
                glyphClassDef: new A.Pointer(A.uint16, Mt),
                attachList: new A.Pointer(A.uint16, bn),
                ligCaretList: new A.Pointer(A.uint16, Rr),
                markAttachClassDef: new A.Pointer(A.uint16, Mt)
              },
              65536: {},
              65538: {
                markGlyphSetsDef: new A.Pointer(A.uint16, ar)
              },
              65539: {
                markGlyphSetsDef: new A.Pointer(A.uint16, ar),
                itemVariationStore: new A.Pointer(A.uint32, vA)
              }
            });
            let Vi = new A.Bitfield(A.uint16, [
              "xPlacement",
              "yPlacement",
              "xAdvance",
              "yAdvance",
              "xPlaDevice",
              "yPlaDevice",
              "xAdvDevice",
              "yAdvDevice"
            ]), Gr = {
              xPlacement: A.int16,
              yPlacement: A.int16,
              xAdvance: A.int16,
              yAdvance: A.int16,
              xPlaDevice: new A.Pointer(A.uint16, Tt, {
                type: "global",
                relativeTo: (BA) => BA.rel
              }),
              yPlaDevice: new A.Pointer(A.uint16, Tt, {
                type: "global",
                relativeTo: (BA) => BA.rel
              }),
              xAdvDevice: new A.Pointer(A.uint16, Tt, {
                type: "global",
                relativeTo: (BA) => BA.rel
              }),
              yAdvDevice: new A.Pointer(A.uint16, Tt, {
                type: "global",
                relativeTo: (BA) => BA.rel
              })
            };
            class Bn {
              buildStruct(i) {
                let u = i;
                for (; !u[this.key] && u.parent; ) u = u.parent;
                if (!u[this.key]) return;
                let m = {};
                m.rel = () => u._startOffset;
                let L = u[this.key];
                for (let Z in L) L[Z] && (m[Z] = Gr[Z]);
                return new A.Struct(m);
              }
              size(i, u) {
                return this.buildStruct(u).size(i, u);
              }
              decode(i, u) {
                let m = this.buildStruct(u).decode(i, u);
                return delete m.rel, m;
              }
              constructor(i = "valueFormat") {
                this.key = i;
              }
            }
            let Hr = new A.Struct({
              secondGlyph: A.uint16,
              value1: new Bn("valueFormat1"),
              value2: new Bn("valueFormat2")
            }), Lr = new A.Array(Hr, A.uint16), kr = new A.Struct({
              value1: new Bn("valueFormat1"),
              value2: new Bn("valueFormat2")
            }), dn = new A.VersionedStruct(A.uint16, {
              1: {
                xCoordinate: A.int16,
                yCoordinate: A.int16
              },
              2: {
                xCoordinate: A.int16,
                yCoordinate: A.int16,
                anchorPoint: A.uint16
              },
              3: {
                xCoordinate: A.int16,
                yCoordinate: A.int16,
                xDeviceTable: new A.Pointer(A.uint16, Tt),
                yDeviceTable: new A.Pointer(A.uint16, Tt)
              }
            }), jr = new A.Struct({
              entryAnchor: new A.Pointer(A.uint16, dn, {
                type: "parent"
              }),
              exitAnchor: new A.Pointer(A.uint16, dn, {
                type: "parent"
              })
            }), or = new A.Struct({
              class: A.uint16,
              markAnchor: new A.Pointer(A.uint16, dn, {
                type: "parent"
              })
            }), jn = new A.Array(or, A.uint16), Or = new A.Array(new A.Pointer(A.uint16, dn), (BA) => BA.parent.classCount), NA = new A.Array(Or, A.uint16), t = new A.Array(new A.Pointer(A.uint16, dn), (BA) => BA.parent.parent.classCount), C = new A.Array(t, A.uint16), b = new A.Array(new A.Pointer(A.uint16, C), A.uint16), nA = new A.VersionedStruct("lookupType", {
              1: new A.VersionedStruct(A.uint16, {
                1: {
                  coverage: new A.Pointer(A.uint16, st),
                  valueFormat: Vi,
                  value: new Bn()
                },
                2: {
                  coverage: new A.Pointer(A.uint16, st),
                  valueFormat: Vi,
                  valueCount: A.uint16,
                  values: new A.LazyArray(new Bn(), "valueCount")
                }
              }),
              2: new A.VersionedStruct(A.uint16, {
                1: {
                  coverage: new A.Pointer(A.uint16, st),
                  valueFormat1: Vi,
                  valueFormat2: Vi,
                  pairSetCount: A.uint16,
                  pairSets: new A.LazyArray(new A.Pointer(A.uint16, Lr), "pairSetCount")
                },
                2: {
                  coverage: new A.Pointer(A.uint16, st),
                  valueFormat1: Vi,
                  valueFormat2: Vi,
                  classDef1: new A.Pointer(A.uint16, Mt),
                  classDef2: new A.Pointer(A.uint16, Mt),
                  class1Count: A.uint16,
                  class2Count: A.uint16,
                  classRecords: new A.LazyArray(new A.LazyArray(kr, "class2Count"), "class1Count")
                }
              }),
              3: {
                format: A.uint16,
                coverage: new A.Pointer(A.uint16, st),
                entryExitCount: A.uint16,
                entryExitRecords: new A.Array(jr, "entryExitCount")
              },
              4: {
                format: A.uint16,
                markCoverage: new A.Pointer(A.uint16, st),
                baseCoverage: new A.Pointer(A.uint16, st),
                classCount: A.uint16,
                markArray: new A.Pointer(A.uint16, jn),
                baseArray: new A.Pointer(A.uint16, NA)
              },
              5: {
                format: A.uint16,
                markCoverage: new A.Pointer(A.uint16, st),
                ligatureCoverage: new A.Pointer(A.uint16, st),
                classCount: A.uint16,
                markArray: new A.Pointer(A.uint16, jn),
                ligatureArray: new A.Pointer(A.uint16, b)
              },
              6: {
                format: A.uint16,
                mark1Coverage: new A.Pointer(A.uint16, st),
                mark2Coverage: new A.Pointer(A.uint16, st),
                classCount: A.uint16,
                mark1Array: new A.Pointer(A.uint16, jn),
                mark2Array: new A.Pointer(A.uint16, NA)
              },
              7: qt,
              8: qe,
              9: {
                posFormat: A.uint16,
                lookupType: A.uint16,
                extension: new A.Pointer(A.uint32, null)
              }
            });
            nA.versions[9].extension.type = nA;
            var gA = new A.VersionedStruct(A.uint32, {
              header: {
                scriptList: new A.Pointer(A.uint16, SA),
                featureList: new A.Pointer(A.uint16, We),
                lookupList: new A.Pointer(A.uint16, new Ct(nA))
              },
              65536: {},
              65537: {
                featureVariations: new A.Pointer(A.uint32, le)
              }
            });
            let hA = new A.Array(A.uint16, A.uint16), HA = hA, GA = new A.Struct({
              glyph: A.uint16,
              compCount: A.uint16,
              components: new A.Array(A.uint16, (BA) => BA.compCount - 1)
            }), fe = new A.Array(new A.Pointer(A.uint16, GA), A.uint16), we = new A.VersionedStruct("lookupType", {
              1: new A.VersionedStruct(A.uint16, {
                1: {
                  coverage: new A.Pointer(A.uint16, st),
                  deltaGlyphID: A.int16
                },
                2: {
                  coverage: new A.Pointer(A.uint16, st),
                  glyphCount: A.uint16,
                  substitute: new A.LazyArray(A.uint16, "glyphCount")
                }
              }),
              2: {
                substFormat: A.uint16,
                coverage: new A.Pointer(A.uint16, st),
                count: A.uint16,
                sequences: new A.LazyArray(new A.Pointer(A.uint16, hA), "count")
              },
              3: {
                substFormat: A.uint16,
                coverage: new A.Pointer(A.uint16, st),
                count: A.uint16,
                alternateSet: new A.LazyArray(new A.Pointer(A.uint16, HA), "count")
              },
              4: {
                substFormat: A.uint16,
                coverage: new A.Pointer(A.uint16, st),
                count: A.uint16,
                ligatureSets: new A.LazyArray(new A.Pointer(A.uint16, fe), "count")
              },
              5: qt,
              6: qe,
              7: {
                substFormat: A.uint16,
                lookupType: A.uint16,
                extension: new A.Pointer(A.uint32, null)
              },
              8: {
                substFormat: A.uint16,
                coverage: new A.Pointer(A.uint16, st),
                backtrackCoverage: new A.Array(new A.Pointer(A.uint16, st), "backtrackGlyphCount"),
                lookaheadGlyphCount: A.uint16,
                lookaheadCoverage: new A.Array(new A.Pointer(A.uint16, st), "lookaheadGlyphCount"),
                glyphCount: A.uint16,
                substitutes: new A.Array(A.uint16, "glyphCount")
              }
            });
            we.versions[7].extension.type = we;
            var ye = new A.VersionedStruct(A.uint32, {
              header: {
                scriptList: new A.Pointer(A.uint16, SA),
                featureList: new A.Pointer(A.uint16, We),
                lookupList: new A.Pointer(A.uint16, new Ct(we))
              },
              65536: {},
              65537: {
                featureVariations: new A.Pointer(A.uint32, le)
              }
            });
            let De = new A.Array(A.uint16, A.uint16), g = new A.Struct({
              shrinkageEnableGSUB: new A.Pointer(A.uint16, De),
              shrinkageDisableGSUB: new A.Pointer(A.uint16, De),
              shrinkageEnableGPOS: new A.Pointer(A.uint16, De),
              shrinkageDisableGPOS: new A.Pointer(A.uint16, De),
              shrinkageJstfMax: new A.Pointer(A.uint16, new Ct(nA)),
              extensionEnableGSUB: new A.Pointer(A.uint16, De),
              extensionDisableGSUB: new A.Pointer(A.uint16, De),
              extensionEnableGPOS: new A.Pointer(A.uint16, De),
              extensionDisableGPOS: new A.Pointer(A.uint16, De),
              extensionJstfMax: new A.Pointer(A.uint16, new Ct(nA))
            }), s = new A.Array(new A.Pointer(A.uint16, g), A.uint16), I = new A.Struct({
              tag: new A.String(4),
              jstfLangSys: new A.Pointer(A.uint16, s)
            }), f = new A.Struct({
              extenderGlyphs: new A.Pointer(A.uint16, new A.Array(A.uint16, A.uint16)),
              defaultLangSys: new A.Pointer(A.uint16, s),
              langSysCount: A.uint16,
              langSysRecords: new A.Array(I, "langSysCount")
            }), S = new A.Struct({
              tag: new A.String(4),
              script: new A.Pointer(A.uint16, f, {
                type: "parent"
              })
            });
            var iA = new A.Struct({
              version: A.uint32,
              scriptCount: A.uint16,
              scriptList: new A.Array(S, "scriptCount")
            });
            class YA {
              decode(i, u) {
                switch (this.size(0, u)) {
                  case 1:
                    return i.readUInt8();
                  case 2:
                    return i.readUInt16BE();
                  case 3:
                    return i.readUInt24BE();
                  case 4:
                    return i.readUInt32BE();
                }
              }
              size(i, u) {
                return (0, A.resolveLength)(this._size, null, u);
              }
              constructor(i) {
                this._size = i;
              }
            }
            let ZA = new A.Struct({
              entry: new YA((BA) => ((BA.parent.entryFormat & 48) >> 4) + 1),
              outerIndex: (BA) => BA.entry >> (BA.parent.entryFormat & 15) + 1,
              innerIndex: (BA) => BA.entry & (1 << (BA.parent.entryFormat & 15) + 1) - 1
            }), oe = new A.Struct({
              entryFormat: A.uint16,
              mapCount: A.uint16,
              mapData: new A.Array(ZA, "mapCount")
            });
            var pe = new A.Struct({
              majorVersion: A.uint16,
              minorVersion: A.uint16,
              itemVariationStore: new A.Pointer(A.uint32, vA),
              advanceWidthMapping: new A.Pointer(A.uint32, oe),
              LSBMapping: new A.Pointer(A.uint32, oe),
              RSBMapping: new A.Pointer(A.uint32, oe)
            });
            let xe = new A.Struct({
              format: A.uint32,
              length: A.uint32,
              offset: A.uint32
            }), Qe = new A.Struct({
              reserved: new A.Reserved(A.uint16, 2),
              cbSignature: A.uint32,
              signature: new A.Buffer("cbSignature")
            });
            var ke = new A.Struct({
              ulVersion: A.uint32,
              usNumSigs: A.uint16,
              usFlag: A.uint16,
              signatures: new A.Array(xe, "usNumSigs"),
              signatureBlocks: new A.Array(Qe, "usNumSigs")
            });
            let lt = new A.Struct({
              rangeMaxPPEM: A.uint16,
              rangeGaspBehavior: new A.Bitfield(A.uint16, [
                "grayscale",
                "gridfit",
                "symmetricSmoothing",
                "symmetricGridfit"
                // only in version 1, for ClearType
              ])
            });
            var Xe = new A.Struct({
              version: A.uint16,
              numRanges: A.uint16,
              gaspRanges: new A.Array(lt, "numRanges")
              // Sorted by ppem
            });
            let et = new A.Struct({
              pixelSize: A.uint8,
              maximumWidth: A.uint8,
              widths: new A.Array(A.uint8, (BA) => BA.parent.parent.maxp.numGlyphs)
            });
            var Oe = new A.Struct({
              version: A.uint16,
              numRecords: A.int16,
              sizeDeviceRecord: A.int32,
              records: new A.Array(et, "numRecords")
            });
            let rt = new A.Struct({
              left: A.uint16,
              right: A.uint16,
              value: A.int16
            }), $e = new A.Struct({
              firstGlyph: A.uint16,
              nGlyphs: A.uint16,
              offsets: new A.Array(A.uint16, "nGlyphs"),
              max: (BA) => BA.offsets.length && Math.max.apply(Math, BA.offsets)
            }), wt = new A.Struct({
              off: (BA) => BA._startOffset - BA.parent.parent._startOffset,
              len: (BA) => ((BA.parent.leftTable.max - BA.off) / BA.parent.rowWidth + 1) * (BA.parent.rowWidth / 2),
              values: new A.LazyArray(A.int16, "len")
            }), Vt = new A.VersionedStruct("format", {
              0: {
                nPairs: A.uint16,
                searchRange: A.uint16,
                entrySelector: A.uint16,
                rangeShift: A.uint16,
                pairs: new A.Array(rt, "nPairs")
              },
              2: {
                rowWidth: A.uint16,
                leftTable: new A.Pointer(A.uint16, $e, {
                  type: "parent"
                }),
                rightTable: new A.Pointer(A.uint16, $e, {
                  type: "parent"
                }),
                array: new A.Pointer(A.uint16, wt, {
                  type: "parent"
                })
              },
              3: {
                glyphCount: A.uint16,
                kernValueCount: A.uint8,
                leftClassCount: A.uint8,
                rightClassCount: A.uint8,
                flags: A.uint8,
                kernValue: new A.Array(A.int16, "kernValueCount"),
                leftClass: new A.Array(A.uint8, "glyphCount"),
                rightClass: new A.Array(A.uint8, "glyphCount"),
                kernIndex: new A.Array(A.uint8, (BA) => BA.leftClassCount * BA.rightClassCount)
              }
            }), Ai = new A.VersionedStruct("version", {
              0: {
                subVersion: A.uint16,
                length: A.uint16,
                format: A.uint8,
                coverage: new A.Bitfield(A.uint8, [
                  "horizontal",
                  "minimum",
                  "crossStream",
                  "override"
                  // If set to 1 the value in this table replaces the accumulated value
                ]),
                subtable: Vt,
                padding: new A.Reserved(A.uint8, (BA) => BA.length - BA._currentOffset)
              },
              1: {
                length: A.uint32,
                coverage: new A.Bitfield(A.uint8, [
                  null,
                  null,
                  null,
                  null,
                  null,
                  "variation",
                  "crossStream",
                  "vertical"
                  // Set if table has vertical kerning values
                ]),
                format: A.uint8,
                tupleIndex: A.uint16,
                subtable: Vt,
                padding: new A.Reserved(A.uint8, (BA) => BA.length - BA._currentOffset)
              }
            });
            var Gt = new A.VersionedStruct(A.uint16, {
              0: {
                nTables: A.uint16,
                tables: new A.Array(Ai, "nTables")
              },
              1: {
                reserved: new A.Reserved(A.uint16),
                nTables: A.uint32,
                tables: new A.Array(Ai, "nTables")
              }
            }), ct = new A.Struct({
              version: A.uint16,
              numGlyphs: A.uint16,
              yPels: new A.Array(A.uint8, "numGlyphs")
            }), jt = new A.Struct({
              version: A.uint16,
              fontNumber: A.uint32,
              pitch: A.uint16,
              xHeight: A.uint16,
              style: A.uint16,
              typeFamily: A.uint16,
              capHeight: A.uint16,
              symbolSet: A.uint16,
              typeface: new A.String(16),
              characterComplement: new A.String(8),
              fileName: new A.String(6),
              strokeWeight: new A.String(1),
              widthType: new A.String(1),
              serifStyle: A.uint8,
              reserved: new A.Reserved(A.uint8)
            });
            let Pi = new A.Struct({
              bCharSet: A.uint8,
              xRatio: A.uint8,
              yStartRatio: A.uint8,
              yEndRatio: A.uint8
              // Ending y-Ratio value
            }), Ci = new A.Struct({
              yPelHeight: A.uint16,
              yMax: A.int16,
              yMin: A.int16
              // Minimum value (in pels) for this yPelHeight
            }), Xi = new A.Struct({
              recs: A.uint16,
              startsz: A.uint8,
              endsz: A.uint8,
              entries: new A.Array(Ci, "recs")
              // The VDMX records
            });
            var ki = new A.Struct({
              version: A.uint16,
              numRecs: A.uint16,
              numRatios: A.uint16,
              ratioRanges: new A.Array(Pi, "numRatios"),
              offsets: new A.Array(A.uint16, "numRatios"),
              groups: new A.Array(Xi, "numRecs")
              // The actual VDMX groupings
            }), In = new A.Struct({
              version: A.uint16,
              ascent: A.int16,
              descent: A.int16,
              lineGap: A.int16,
              advanceHeightMax: A.int16,
              minTopSideBearing: A.int16,
              minBottomSideBearing: A.int16,
              yMaxExtent: A.int16,
              caretSlopeRise: A.int16,
              caretSlopeRun: A.int16,
              caretOffset: A.int16,
              reserved: new A.Reserved(A.int16, 4),
              metricDataFormat: A.int16,
              numberOfMetrics: A.uint16
              // Number of advance heights in the Vertical Metrics table
            });
            let as = new A.Struct({
              advance: A.uint16,
              bearing: A.int16
              // The top sidebearing of the glyph
            });
            var On = new A.Struct({
              metrics: new A.LazyArray(as, (BA) => BA.parent.vhea.numberOfMetrics),
              bearings: new A.LazyArray(A.int16, (BA) => BA.parent.maxp.numGlyphs - BA.parent.vhea.numberOfMetrics)
            });
            let os = new A.Fixed(16, "BE", 14), _s = new A.Struct({
              fromCoord: os,
              toCoord: os
            }), HB = new A.Struct({
              pairCount: A.uint16,
              correspondence: new A.Array(_s, "pairCount")
            });
            var LB = new A.Struct({
              version: A.fixed32,
              axisCount: A.uint32,
              segment: new A.Array(HB, "axisCount")
            });
            class kB {
              getItem(i) {
                if (this._items[i] == null) {
                  let u = this.stream.pos;
                  this.stream.pos = this.base + this.type.size(null, this.parent) * i, this._items[i] = this.type.decode(this.stream, this.parent), this.stream.pos = u;
                }
                return this._items[i];
              }
              inspect() {
                return `[UnboundedArray ${this.type.constructor.name}]`;
              }
              constructor(i, u, m) {
                this.type = i, this.stream = u, this.parent = m, this.base = this.stream.pos, this._items = [];
              }
            }
            class gn extends A.Array {
              decode(i, u) {
                return new kB(this.type, i, u);
              }
              constructor(i) {
                super(i, 0);
              }
            }
            let zn = function(BA = A.uint16) {
              class i {
                decode(PA, XA) {
                  return XA = XA.parent.parent, this.type.decode(PA, XA);
                }
                size(PA, XA) {
                  return XA = XA.parent.parent, this.type.size(PA, XA);
                }
                encode(PA, XA, te) {
                  return te = te.parent.parent, this.type.encode(PA, XA, te);
                }
                constructor(PA) {
                  this.type = PA;
                }
              }
              BA = new i(BA);
              let u = new A.Struct({
                unitSize: A.uint16,
                nUnits: A.uint16,
                searchRange: A.uint16,
                entrySelector: A.uint16,
                rangeShift: A.uint16
              }), m = new A.Struct({
                lastGlyph: A.uint16,
                firstGlyph: A.uint16,
                value: BA
              }), L = new A.Struct({
                lastGlyph: A.uint16,
                firstGlyph: A.uint16,
                values: new A.Pointer(A.uint16, new A.Array(BA, (O) => O.lastGlyph - O.firstGlyph + 1), {
                  type: "parent"
                })
              }), Z = new A.Struct({
                glyph: A.uint16,
                value: BA
              });
              return new A.VersionedStruct(A.uint16, {
                0: {
                  values: new gn(BA)
                  // length == number of glyphs maybe?
                },
                2: {
                  binarySearchHeader: u,
                  segments: new A.Array(m, (O) => O.binarySearchHeader.nUnits)
                },
                4: {
                  binarySearchHeader: u,
                  segments: new A.Array(L, (O) => O.binarySearchHeader.nUnits)
                },
                6: {
                  binarySearchHeader: u,
                  segments: new A.Array(Z, (O) => O.binarySearchHeader.nUnits)
                },
                8: {
                  firstGlyph: A.uint16,
                  count: A.uint16,
                  values: new A.Array(BA, "count")
                }
              });
            };
            function Bs(BA = {}, i = A.uint16) {
              let u = Object.assign({
                newState: A.uint16,
                flags: A.uint16
              }, BA), m = new A.Struct(u), L = new gn(new A.Array(A.uint16, (O) => O.nClasses));
              return new A.Struct({
                nClasses: A.uint32,
                classTable: new A.Pointer(A.uint32, new zn(i)),
                stateArray: new A.Pointer(A.uint32, L),
                entryTable: new A.Pointer(A.uint32, new gn(m))
              });
            }
            function jB(BA = {}, i = A.uint16) {
              let u = new A.Struct({
                version() {
                  return 8;
                },
                firstGlyph: A.uint16,
                values: new A.Array(A.uint8, A.uint16)
              }), m = Object.assign({
                newStateOffset: A.uint16,
                // convert offset to stateArray index
                newState: (PA) => (PA.newStateOffset - (PA.parent.stateArray.base - PA.parent._startOffset)) / PA.parent.nClasses,
                flags: A.uint16
              }, BA), L = new A.Struct(m), Z = new gn(new A.Array(A.uint8, (PA) => PA.nClasses));
              return new A.Struct({
                nClasses: A.uint16,
                classTable: new A.Pointer(A.uint16, u),
                stateArray: new A.Pointer(A.uint16, Z),
                entryTable: new A.Pointer(A.uint16, new gn(L))
              });
            }
            let OB = new A.VersionedStruct("format", {
              0: {
                deltas: new A.Array(A.int16, 32)
              },
              1: {
                deltas: new A.Array(A.int16, 32),
                mappingData: new zn(A.uint16)
              },
              2: {
                standardGlyph: A.uint16,
                controlPoints: new A.Array(A.uint16, 32)
              },
              3: {
                standardGlyph: A.uint16,
                controlPoints: new A.Array(A.uint16, 32),
                mappingData: new zn(A.uint16)
              }
            });
            var JB = new A.Struct({
              version: A.fixed32,
              format: A.uint16,
              defaultBaseline: A.uint16,
              subtable: OB
            });
            let KB = new A.Struct({
              setting: A.uint16,
              nameIndex: A.int16,
              name: (BA) => BA.parent.parent.parent.name.records.fontFeatures[BA.nameIndex]
            }), WB = new A.Struct({
              feature: A.uint16,
              nSettings: A.uint16,
              settingTable: new A.Pointer(A.uint32, new A.Array(KB, "nSettings"), {
                type: "parent"
              }),
              featureFlags: new A.Bitfield(A.uint8, [
                null,
                null,
                null,
                null,
                null,
                null,
                "hasDefault",
                "exclusive"
              ]),
              defaultSetting: A.uint8,
              nameIndex: A.int16,
              name: (BA) => BA.parent.parent.name.records.fontFeatures[BA.nameIndex]
            });
            var VB = new A.Struct({
              version: A.fixed32,
              featureNameCount: A.uint16,
              reserved1: new A.Reserved(A.uint16),
              reserved2: new A.Reserved(A.uint32),
              featureNames: new A.Array(WB, "featureNameCount")
            });
            let XB = new A.Struct({
              axisTag: new A.String(4),
              minValue: A.fixed32,
              defaultValue: A.fixed32,
              maxValue: A.fixed32,
              flags: A.uint16,
              nameID: A.uint16,
              name: (BA) => BA.parent.parent.name.records.fontFeatures[BA.nameID]
            }), ZB = new A.Struct({
              nameID: A.uint16,
              name: (BA) => BA.parent.parent.name.records.fontFeatures[BA.nameID],
              flags: A.uint16,
              coord: new A.Array(A.fixed32, (BA) => BA.parent.axisCount),
              postscriptNameID: new A.Optional(A.uint16, (BA) => BA.parent.instanceSize - BA._currentOffset > 0)
            });
            var qB = new A.Struct({
              version: A.fixed32,
              offsetToData: A.uint16,
              countSizePairs: A.uint16,
              axisCount: A.uint16,
              axisSize: A.uint16,
              instanceCount: A.uint16,
              instanceSize: A.uint16,
              axis: new A.Array(XB, "axisCount"),
              instance: new A.Array(ZB, "instanceCount")
            });
            let _B = new A.Fixed(16, "BE", 14);
            class $B {
              static decode(i, u) {
                return u.flags ? i.readUInt32BE() : i.readUInt16BE() * 2;
              }
            }
            var Ag = new A.Struct({
              version: A.uint16,
              reserved: new A.Reserved(A.uint16),
              axisCount: A.uint16,
              globalCoordCount: A.uint16,
              globalCoords: new A.Pointer(A.uint32, new A.Array(new A.Array(_B, "axisCount"), "globalCoordCount")),
              glyphCount: A.uint16,
              flags: A.uint16,
              offsetToData: A.uint32,
              offsets: new A.Array(new A.Pointer($B, "void", {
                relativeTo: (BA) => BA.offsetToData,
                allowNull: !1
              }), (BA) => BA.glyphCount + 1)
            });
            let eg = new A.Struct({
              length: A.uint16,
              coverage: A.uint16,
              subFeatureFlags: A.uint32,
              stateTable: new jB()
            }), tg = new A.Struct({
              justClass: A.uint32,
              beforeGrowLimit: A.fixed32,
              beforeShrinkLimit: A.fixed32,
              afterGrowLimit: A.fixed32,
              afterShrinkLimit: A.fixed32,
              growFlags: A.uint16,
              shrinkFlags: A.uint16
            }), ig = new A.Array(tg, A.uint32), ng = new A.VersionedStruct("actionType", {
              0: {
                lowerLimit: A.fixed32,
                upperLimit: A.fixed32,
                order: A.uint16,
                glyphs: new A.Array(A.uint16, A.uint16)
              },
              1: {
                addGlyph: A.uint16
              },
              2: {
                substThreshold: A.fixed32,
                addGlyph: A.uint16,
                substGlyph: A.uint16
              },
              3: {},
              4: {
                variationAxis: A.uint32,
                minimumLimit: A.fixed32,
                noStretchValue: A.fixed32,
                maximumLimit: A.fixed32
              },
              5: {
                flags: A.uint16,
                glyph: A.uint16
              }
            }), rg = new A.Struct({
              actionClass: A.uint16,
              actionType: A.uint16,
              actionLength: A.uint32,
              actionData: ng,
              padding: new A.Reserved(A.uint8, (BA) => BA.actionLength - BA._currentOffset)
            }), sg = new A.Array(rg, A.uint32), ag = new A.Struct({
              lookupTable: new zn(new A.Pointer(A.uint16, sg))
            }), Ha = new A.Struct({
              classTable: new A.Pointer(A.uint16, eg, {
                type: "parent"
              }),
              wdcOffset: A.uint16,
              postCompensationTable: new A.Pointer(A.uint16, ag, {
                type: "parent"
              }),
              widthDeltaClusters: new zn(new A.Pointer(A.uint16, ig, {
                type: "parent",
                relativeTo: (BA) => BA.wdcOffset
              }))
            });
            var og = new A.Struct({
              version: A.uint32,
              format: A.uint16,
              horizontal: new A.Pointer(A.uint16, Ha),
              vertical: new A.Pointer(A.uint16, Ha)
            });
            let Bg = {
              action: A.uint16
            }, gg = {
              markIndex: A.uint16,
              currentIndex: A.uint16
            }, cg = {
              currentInsertIndex: A.uint16,
              markedInsertIndex: A.uint16
            }, lg = new A.Struct({
              items: new gn(new A.Pointer(A.uint32, new zn()))
            }), Eg = new A.VersionedStruct("type", {
              0: {
                stateTable: new Bs()
              },
              1: {
                stateTable: new Bs(gg),
                substitutionTable: new A.Pointer(A.uint32, lg)
              },
              2: {
                stateTable: new Bs(Bg),
                ligatureActions: new A.Pointer(A.uint32, new gn(A.uint32)),
                components: new A.Pointer(A.uint32, new gn(A.uint16)),
                ligatureList: new A.Pointer(A.uint32, new gn(A.uint16))
              },
              4: {
                lookupTable: new zn()
              },
              5: {
                stateTable: new Bs(cg),
                insertionActions: new A.Pointer(A.uint32, new gn(A.uint16))
              }
            }), wg = new A.Struct({
              length: A.uint32,
              coverage: A.uint24,
              type: A.uint8,
              subFeatureFlags: A.uint32,
              table: Eg,
              padding: new A.Reserved(A.uint8, (BA) => BA.length - BA._currentOffset)
            }), ug = new A.Struct({
              featureType: A.uint16,
              featureSetting: A.uint16,
              enableFlags: A.uint32,
              disableFlags: A.uint32
            }), fg = new A.Struct({
              defaultFlags: A.uint32,
              chainLength: A.uint32,
              nFeatureEntries: A.uint32,
              nSubtables: A.uint32,
              features: new A.Array(ug, "nFeatureEntries"),
              subtables: new A.Array(wg, "nSubtables")
            });
            var Qg = new A.Struct({
              version: A.uint16,
              unused: new A.Reserved(A.uint16),
              nChains: A.uint32,
              chains: new A.Array(fg, "nChains")
            });
            let hg = new A.Struct({
              left: A.int16,
              top: A.int16,
              right: A.int16,
              bottom: A.int16
            });
            var Cg = new A.Struct({
              version: A.fixed32,
              format: A.uint16,
              lookupTable: new zn(hg)
            });
            let Pt = {};
            var gs = Pt;
            Pt.cmap = EA, Pt.head = zA, Pt.hhea = OA, Pt.hmtx = LA, Pt.maxp = yA, Pt.name = bA, Pt["OS/2"] = dA, Pt.post = he, Pt.fpgm = KA, Pt.loca = Je, Pt.prep = Le, Pt["cvt "] = ie, Pt.glyf = Re, Pt["CFF "] = ri, Pt.CFF2 = ri, Pt.VORG = mi, Pt.EBLC = An, Pt.CBLC = Pt.EBLC, Pt.sbix = en, Pt.COLR = Pr, Pt.CPAL = er, Pt.BASE = Nr, Pt.GDEF = Sr, Pt.GPOS = gA, Pt.GSUB = ye, Pt.JSTF = iA, Pt.HVAR = pe, Pt.DSIG = ke, Pt.gasp = Xe, Pt.hdmx = Oe, Pt.kern = Gt, Pt.LTSH = ct, Pt.PCLT = jt, Pt.VDMX = ki, Pt.vhea = In, Pt.vmtx = On, Pt.avar = LB, Pt.bsln = JB, Pt.feat = VB, Pt.fvar = qB, Pt.gvar = Ag, Pt.just = og, Pt.morx = Qg, Pt.opbd = Cg;
            let Mg = new A.Struct({
              tag: new A.String(4),
              checkSum: A.uint32,
              offset: new A.Pointer(A.uint32, "void", {
                type: "global"
              }),
              length: A.uint32
            }), $s = new A.Struct({
              tag: new A.String(4),
              numTables: A.uint16,
              searchRange: A.uint16,
              entrySelector: A.uint16,
              rangeShift: A.uint16,
              tables: new A.Array(Mg, "numTables")
            });
            $s.process = function() {
              let BA = {};
              for (let i of this.tables) BA[i.tag] = i;
              this.tables = BA;
            }, $s.preEncode = function() {
              if (!Array.isArray(this.tables)) {
                let u = [];
                for (let m in this.tables) {
                  let L = this.tables[m];
                  L && u.push({
                    tag: m,
                    checkSum: 0,
                    offset: new A.VoidPointer(gs[m], L),
                    length: gs[m].size(L)
                  });
                }
                this.tables = u;
              }
              this.tag = "true", this.numTables = this.tables.length;
              let BA = Math.floor(Math.log(this.numTables) / Math.LN2), i = Math.pow(2, BA);
              this.searchRange = i * 16, this.entrySelector = Math.log(i) / Math.LN2, this.rangeShift = this.numTables * 16 - this.searchRange;
            };
            var La = $s;
            function cs(BA, i) {
              let u = 0, m = BA.length - 1;
              for (; u <= m; ) {
                let L = u + m >> 1, Z = i(BA[L]);
                if (Z < 0) m = L - 1;
                else if (Z > 0) u = L + 1;
                else return L;
              }
              return -1;
            }
            function Br(BA, i) {
              let u = [];
              for (; BA < i; ) u.push(BA++);
              return u;
            }
            const ls = new TextDecoder("ascii"), ka = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Jr = new Uint8Array(256);
            for (let BA = 0; BA < ka.length; BA++) Jr[ka.charCodeAt(BA)] = BA;
            function Aa(BA) {
              let i = BA.length * 0.75;
              BA[BA.length - 1] === "=" && (i--, BA[BA.length - 2] === "=" && i--);
              let u = new Uint8Array(i), m = 0;
              for (let L = 0, Z = BA.length; L < Z; L += 4) {
                let O = Jr[BA.charCodeAt(L)], PA = Jr[BA.charCodeAt(L + 1)], XA = Jr[BA.charCodeAt(L + 2)], te = Jr[BA.charCodeAt(L + 3)];
                u[m++] = O << 2 | PA >> 4, u[m++] = (PA & 15) << 4 | XA >> 2, u[m++] = (XA & 3) << 6 | te & 63;
              }
              return u;
            }
            class ea {
              findSubtable(i, u) {
                for (let [m, L] of u) for (let Z of i.tables)
                  if (Z.platformID === m && Z.encodingID === L) return Z.table;
                return null;
              }
              lookup(i, u) {
                if (this.encoding) i = this.encoding.get(i) || i;
                else if (u) {
                  let L = this.getVariationSelector(i, u);
                  if (L) return L;
                }
                let m = this.cmap;
                switch (m.version) {
                  case 0:
                    return m.codeMap.get(i) || 0;
                  case 4: {
                    let L = 0, Z = m.segCount - 1;
                    for (; L <= Z; ) {
                      let O = L + Z >> 1;
                      if (i < m.startCode.get(O)) Z = O - 1;
                      else if (i > m.endCode.get(O)) L = O + 1;
                      else {
                        let PA = m.idRangeOffset.get(O), XA;
                        if (PA === 0) XA = i + m.idDelta.get(O);
                        else {
                          let te = PA / 2 + (i - m.startCode.get(O)) - (m.segCount - O);
                          XA = m.glyphIndexArray.get(te) || 0, XA !== 0 && (XA += m.idDelta.get(O));
                        }
                        return XA & 65535;
                      }
                    }
                    return 0;
                  }
                  case 8:
                    throw new Error("TODO: cmap format 8");
                  case 6:
                  case 10:
                    return m.glyphIndices.get(i - m.firstCode) || 0;
                  case 12:
                  case 13: {
                    let L = 0, Z = m.nGroups - 1;
                    for (; L <= Z; ) {
                      let O = L + Z >> 1, PA = m.groups.get(O);
                      if (i < PA.startCharCode) Z = O - 1;
                      else if (i > PA.endCharCode) L = O + 1;
                      else
                        return m.version === 12 ? PA.glyphID + (i - PA.startCharCode) : PA.glyphID;
                    }
                    return 0;
                  }
                  case 14:
                    throw new Error("TODO: cmap format 14");
                  default:
                    throw new Error(`Unknown cmap format ${m.version}`);
                }
              }
              getVariationSelector(i, u) {
                if (!this.uvs) return 0;
                let m = this.uvs.varSelectors.toArray(), L = cs(m, (O) => u - O.varSelector), Z = m[L];
                return L !== -1 && Z.defaultUVS && (L = cs(Z.defaultUVS, (O) => i < O.startUnicodeValue ? -1 : i > O.startUnicodeValue + O.additionalCount ? 1 : 0)), L !== -1 && Z.nonDefaultUVS && (L = cs(Z.nonDefaultUVS, (O) => i - O.unicodeValue), L !== -1) ? Z.nonDefaultUVS[L].glyphID : 0;
              }
              getCharacterSet() {
                let i = this.cmap;
                switch (i.version) {
                  case 0:
                    return Br(0, i.codeMap.length);
                  case 4: {
                    let u = [], m = i.endCode.toArray();
                    for (let L = 0; L < m.length; L++) {
                      let Z = m[L] + 1, O = i.startCode.get(L);
                      u.push(...Br(O, Z));
                    }
                    return u;
                  }
                  case 8:
                    throw new Error("TODO: cmap format 8");
                  case 6:
                  case 10:
                    return Br(i.firstCode, i.firstCode + i.glyphIndices.length);
                  case 12:
                  case 13: {
                    let u = [];
                    for (let m of i.groups.toArray()) u.push(...Br(m.startCharCode, m.endCharCode + 1));
                    return u;
                  }
                  case 14:
                    throw new Error("TODO: cmap format 14");
                  default:
                    throw new Error(`Unknown cmap format ${i.version}`);
                }
              }
              codePointsForGlyph(i) {
                let u = this.cmap;
                switch (u.version) {
                  case 0: {
                    let L = [];
                    for (let Z = 0; Z < 256; Z++) u.codeMap.get(Z) === i && L.push(Z);
                    return L;
                  }
                  case 4: {
                    let L = [];
                    for (let Z = 0; Z < u.segCount; Z++) {
                      let O = u.endCode.get(Z), PA = u.startCode.get(Z), XA = u.idRangeOffset.get(Z), te = u.idDelta.get(Z);
                      for (var m = PA; m <= O; m++) {
                        let ce = 0;
                        if (XA === 0) ce = m + te;
                        else {
                          let ge = XA / 2 + (m - PA) - (u.segCount - Z);
                          ce = u.glyphIndexArray.get(ge) || 0, ce !== 0 && (ce += te);
                        }
                        ce === i && L.push(m);
                      }
                    }
                    return L;
                  }
                  case 12: {
                    let L = [];
                    for (let Z of u.groups.toArray()) i >= Z.glyphID && i <= Z.glyphID + (Z.endCharCode - Z.startCharCode) && L.push(Z.startCharCode + (i - Z.glyphID));
                    return L;
                  }
                  case 13: {
                    let L = [];
                    for (let Z of u.groups.toArray()) i === Z.glyphID && L.push(...Br(Z.startCharCode, Z.endCharCode + 1));
                    return L;
                  }
                  default:
                    throw new Error(`Unknown cmap format ${u.version}`);
                }
              }
              constructor(i) {
                if (this.encoding = null, this.cmap = this.findSubtable(i, [
                  // 32-bit subtables
                  [
                    3,
                    10
                  ],
                  [
                    0,
                    6
                  ],
                  [
                    0,
                    4
                  ],
                  // 16-bit subtables
                  [
                    3,
                    1
                  ],
                  [
                    0,
                    3
                  ],
                  [
                    0,
                    2
                  ],
                  [
                    0,
                    1
                  ],
                  [
                    0,
                    0
                  ]
                ]), !this.cmap) for (let u of i.tables) {
                  let m = TA(u.platformID, u.encodingID, u.table.language - 1), L = o(m);
                  L && (this.cmap = u.table, this.encoding = L);
                }
                if (!this.cmap) throw new Error("Could not find a supported cmap table");
                this.uvs = this.findSubtable(i, [
                  [
                    0,
                    5
                  ]
                ]), this.uvs && this.uvs.version !== 14 && (this.uvs = null);
              }
            }
            (0, D._)([
              uA
            ], ea.prototype, "getCharacterSet", null), (0, D._)([
              uA
            ], ea.prototype, "codePointsForGlyph", null);
            class Dg {
              process(i, u) {
                for (let m = 0; m < i.length - 1; m++) {
                  let L = i[m].id, Z = i[m + 1].id;
                  u[m].xAdvance += this.getKerning(L, Z);
                }
              }
              getKerning(i, u) {
                let m = 0;
                for (let L of this.kern.tables) {
                  if (L.coverage.crossStream) continue;
                  switch (L.version) {
                    case 0:
                      if (!L.coverage.horizontal) continue;
                      break;
                    case 1:
                      if (L.coverage.vertical || L.coverage.variation) continue;
                      break;
                    default:
                      throw new Error(`Unsupported kerning table version ${L.version}`);
                  }
                  let Z = 0, O = L.subtable;
                  switch (L.format) {
                    case 0:
                      let PA = cs(O.pairs, function(ge) {
                        return i - ge.left || u - ge.right;
                      });
                      PA >= 0 && (Z = O.pairs[PA].value);
                      break;
                    case 2:
                      let XA = 0, te = 0;
                      i >= O.leftTable.firstGlyph && i < O.leftTable.firstGlyph + O.leftTable.nGlyphs ? XA = O.leftTable.offsets[i - O.leftTable.firstGlyph] : XA = O.array.off, u >= O.rightTable.firstGlyph && u < O.rightTable.firstGlyph + O.rightTable.nGlyphs && (te = O.rightTable.offsets[u - O.rightTable.firstGlyph]);
                      let ce = (XA + te - O.array.off) / 2;
                      Z = O.array.values.get(ce);
                      break;
                    case 3:
                      if (i >= O.glyphCount || u >= O.glyphCount) return 0;
                      Z = O.kernValue[O.kernIndex[O.leftClass[i] * O.rightClassCount + O.rightClass[u]]];
                      break;
                    default:
                      throw new Error(`Unsupported kerning sub-table format ${L.format}`);
                  }
                  L.coverage.override ? m = Z : m += Z;
                }
                return m;
              }
              constructor(i) {
                this.kern = i.kern;
              }
            }
            class dg {
              positionGlyphs(i, u) {
                let m = 0, L = 0;
                for (let Z = 0; Z < i.length; Z++)
                  i[Z].isMark ? L = Z : (m !== L && this.positionCluster(i, u, m, L), m = L = Z);
                return m !== L && this.positionCluster(i, u, m, L), u;
              }
              positionCluster(i, u, m, L) {
                let Z = i[m], O = Z.cbox.copy();
                Z.codePoints.length > 1 && (O.minX += (Z.codePoints.length - 1) * O.width / Z.codePoints.length);
                let PA = -u[m].xAdvance, XA = 0, te = this.font.unitsPerEm / 16;
                for (let ce = m + 1; ce <= L; ce++) {
                  let ge = i[ce], Ge = ge.cbox, nt = u[ce], ot = this.getCombiningClass(ge.codePoints[0]);
                  if (ot !== "Not_Reordered") {
                    switch (nt.xOffset = nt.yOffset = 0, ot) {
                      case "Double_Above":
                      case "Double_Below":
                        nt.xOffset += O.minX - Ge.width / 2 - Ge.minX;
                        break;
                      case "Attached_Below_Left":
                      case "Below_Left":
                      case "Above_Left":
                        nt.xOffset += O.minX - Ge.minX;
                        break;
                      case "Attached_Above_Right":
                      case "Below_Right":
                      case "Above_Right":
                        nt.xOffset += O.maxX - Ge.width - Ge.minX;
                        break;
                      default:
                        nt.xOffset += O.minX + (O.width - Ge.width) / 2 - Ge.minX;
                    }
                    switch (ot) {
                      case "Double_Below":
                      case "Below_Left":
                      case "Below":
                      case "Below_Right":
                      case "Attached_Below_Left":
                      case "Attached_Below":
                        (ot === "Attached_Below_Left" || ot === "Attached_Below") && (O.minY += te), nt.yOffset = -O.minY - Ge.maxY, O.minY += Ge.height;
                        break;
                      case "Double_Above":
                      case "Above_Left":
                      case "Above":
                      case "Above_Right":
                      case "Attached_Above":
                      case "Attached_Above_Right":
                        (ot === "Attached_Above" || ot === "Attached_Above_Right") && (O.maxY += te), nt.yOffset = O.maxY - Ge.minY, O.maxY += Ge.height;
                        break;
                    }
                    nt.xAdvance = nt.yAdvance = 0, nt.xOffset += PA, nt.yOffset += XA;
                  } else
                    PA -= nt.xAdvance, XA -= nt.yAdvance;
                }
              }
              getCombiningClass(i) {
                let u = (0, N.getCombiningClass)(i);
                if ((i & -256) === 3584) {
                  if (u === "Not_Reordered") switch (i) {
                    case 3633:
                    case 3636:
                    case 3637:
                    case 3638:
                    case 3639:
                    case 3655:
                    case 3660:
                    case 3645:
                    case 3662:
                      return "Above_Right";
                    case 3761:
                    case 3764:
                    case 3765:
                    case 3766:
                    case 3767:
                    case 3771:
                    case 3788:
                    case 3789:
                      return "Above";
                    case 3772:
                      return "Below";
                  }
                  else if (i === 3642) return "Below_Right";
                }
                switch (u) {
                  // Hebrew
                  case "CCC10":
                  case "CCC11":
                  case "CCC12":
                  case "CCC13":
                  case "CCC14":
                  case "CCC15":
                  case "CCC16":
                  case "CCC17":
                  case "CCC18":
                  case "CCC20":
                  case "CCC22":
                    return "Below";
                  case "CCC23":
                    return "Attached_Above";
                  case "CCC24":
                    return "Above_Right";
                  case "CCC25":
                  case "CCC19":
                    return "Above_Left";
                  case "CCC26":
                    return "Above";
                  case "CCC21":
                    break;
                  // Arabic and Syriac
                  case "CCC27":
                  case "CCC28":
                  case "CCC30":
                  case "CCC31":
                  case "CCC33":
                  case "CCC34":
                  case "CCC35":
                  case "CCC36":
                    return "Above";
                  case "CCC29":
                  case "CCC32":
                    return "Below";
                  // Thai
                  case "CCC103":
                    return "Below_Right";
                  case "CCC107":
                    return "Above_Right";
                  // Lao
                  case "CCC118":
                    return "Below";
                  case "CCC122":
                    return "Above";
                  // Tibetan
                  case "CCC129":
                  case "CCC132":
                    return "Below";
                  case "CCC130":
                    return "Above";
                }
                return u;
              }
              constructor(i) {
                this.font = i;
              }
            }
            class Tn {
              /**
              * The width of the bounding box
              * @type {number}
              */
              get width() {
                return this.maxX - this.minX;
              }
              /**
              * The height of the bounding box
              * @type {number}
              */
              get height() {
                return this.maxY - this.minY;
              }
              addPoint(i, u) {
                Math.abs(i) !== 1 / 0 && (i < this.minX && (this.minX = i), i > this.maxX && (this.maxX = i)), Math.abs(u) !== 1 / 0 && (u < this.minY && (this.minY = u), u > this.maxY && (this.maxY = u));
              }
              copy() {
                return new Tn(this.minX, this.minY, this.maxX, this.maxY);
              }
              constructor(i = 1 / 0, u = 1 / 0, m = -1 / 0, L = -1 / 0) {
                this.minX = i, this.minY = u, this.maxX = m, this.maxY = L;
              }
            }
            const gr = {
              Caucasian_Albanian: "aghb",
              Arabic: "arab",
              Imperial_Aramaic: "armi",
              Armenian: "armn",
              Avestan: "avst",
              Balinese: "bali",
              Bamum: "bamu",
              Bassa_Vah: "bass",
              Batak: "batk",
              Bengali: [
                "bng2",
                "beng"
              ],
              Bopomofo: "bopo",
              Brahmi: "brah",
              Braille: "brai",
              Buginese: "bugi",
              Buhid: "buhd",
              Chakma: "cakm",
              Canadian_Aboriginal: "cans",
              Carian: "cari",
              Cham: "cham",
              Cherokee: "cher",
              Coptic: "copt",
              Cypriot: "cprt",
              Cyrillic: "cyrl",
              Devanagari: [
                "dev2",
                "deva"
              ],
              Deseret: "dsrt",
              Duployan: "dupl",
              Egyptian_Hieroglyphs: "egyp",
              Elbasan: "elba",
              Ethiopic: "ethi",
              Georgian: "geor",
              Glagolitic: "glag",
              Gothic: "goth",
              Grantha: "gran",
              Greek: "grek",
              Gujarati: [
                "gjr2",
                "gujr"
              ],
              Gurmukhi: [
                "gur2",
                "guru"
              ],
              Hangul: "hang",
              Han: "hani",
              Hanunoo: "hano",
              Hebrew: "hebr",
              Hiragana: "hira",
              Pahawh_Hmong: "hmng",
              Katakana_Or_Hiragana: "hrkt",
              Old_Italic: "ital",
              Javanese: "java",
              Kayah_Li: "kali",
              Katakana: "kana",
              Kharoshthi: "khar",
              Khmer: "khmr",
              Khojki: "khoj",
              Kannada: [
                "knd2",
                "knda"
              ],
              Kaithi: "kthi",
              Tai_Tham: "lana",
              Lao: "lao ",
              Latin: "latn",
              Lepcha: "lepc",
              Limbu: "limb",
              Linear_A: "lina",
              Linear_B: "linb",
              Lisu: "lisu",
              Lycian: "lyci",
              Lydian: "lydi",
              Mahajani: "mahj",
              Mandaic: "mand",
              Manichaean: "mani",
              Mende_Kikakui: "mend",
              Meroitic_Cursive: "merc",
              Meroitic_Hieroglyphs: "mero",
              Malayalam: [
                "mlm2",
                "mlym"
              ],
              Modi: "modi",
              Mongolian: "mong",
              Mro: "mroo",
              Meetei_Mayek: "mtei",
              Myanmar: [
                "mym2",
                "mymr"
              ],
              Old_North_Arabian: "narb",
              Nabataean: "nbat",
              Nko: "nko ",
              Ogham: "ogam",
              Ol_Chiki: "olck",
              Old_Turkic: "orkh",
              Oriya: [
                "ory2",
                "orya"
              ],
              Osmanya: "osma",
              Palmyrene: "palm",
              Pau_Cin_Hau: "pauc",
              Old_Permic: "perm",
              Phags_Pa: "phag",
              Inscriptional_Pahlavi: "phli",
              Psalter_Pahlavi: "phlp",
              Phoenician: "phnx",
              Miao: "plrd",
              Inscriptional_Parthian: "prti",
              Rejang: "rjng",
              Runic: "runr",
              Samaritan: "samr",
              Old_South_Arabian: "sarb",
              Saurashtra: "saur",
              Shavian: "shaw",
              Sharada: "shrd",
              Siddham: "sidd",
              Khudawadi: "sind",
              Sinhala: "sinh",
              Sora_Sompeng: "sora",
              Sundanese: "sund",
              Syloti_Nagri: "sylo",
              Syriac: "syrc",
              Tagbanwa: "tagb",
              Takri: "takr",
              Tai_Le: "tale",
              New_Tai_Lue: "talu",
              Tamil: [
                "tml2",
                "taml"
              ],
              Tai_Viet: "tavt",
              Telugu: [
                "tel2",
                "telu"
              ],
              Tifinagh: "tfng",
              Tagalog: "tglg",
              Thaana: "thaa",
              Thai: "thai",
              Tibetan: "tibt",
              Tirhuta: "tirh",
              Ugaritic: "ugar",
              Vai: "vai ",
              Warang_Citi: "wara",
              Old_Persian: "xpeo",
              Cuneiform: "xsux",
              Yi: "yi  ",
              Inherited: "zinh",
              Common: "zyyy",
              Unknown: "zzzz"
            }, ta = {};
            for (let BA in gr) {
              let i = gr[BA];
              if (Array.isArray(i)) for (let u of i) ta[u] = BA;
              else ta[i] = BA;
            }
            function Ig(BA) {
              return ta[BA];
            }
            function yg(BA) {
              let i = BA.length, u = 0;
              for (; u < i; ) {
                let m = BA.charCodeAt(u++);
                if (55296 <= m && m <= 56319 && u < i) {
                  let Z = BA.charCodeAt(u);
                  56320 <= Z && Z <= 57343 && (u++, m = ((m & 1023) << 10) + (Z & 1023) + 65536);
                }
                let L = (0, N.getScript)(m);
                if (L !== "Common" && L !== "Inherited" && L !== "Unknown") return gr[L];
              }
              return gr.Unknown;
            }
            function Fg(BA) {
              for (let i = 0; i < BA.length; i++) {
                let u = BA[i], m = (0, N.getScript)(u);
                if (m !== "Common" && m !== "Inherited" && m !== "Unknown") return gr[m];
              }
              return gr.Unknown;
            }
            const xg = {
              arab: !0,
              hebr: !0,
              syrc: !0,
              thaa: !0,
              cprt: !0,
              khar: !0,
              phnx: !0,
              "nko ": !0,
              lydi: !0,
              avst: !0,
              armi: !0,
              phli: !0,
              prti: !0,
              sarb: !0,
              orkh: !0,
              samr: !0,
              mand: !0,
              merc: !0,
              mero: !0,
              // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)
              mani: !0,
              mend: !0,
              nbat: !0,
              narb: !0,
              palm: !0,
              phlp: !0
              // Psalter Pahlavi
            };
            function ja(BA) {
              return xg[BA] ? "rtl" : "ltr";
            }
            class pg {
              /**
              * The total advance width of the run.
              * @type {number}
              */
              get advanceWidth() {
                let i = 0;
                for (let u of this.positions) i += u.xAdvance;
                return i;
              }
              /**
              * The total advance height of the run.
              * @type {number}
              */
              get advanceHeight() {
                let i = 0;
                for (let u of this.positions) i += u.yAdvance;
                return i;
              }
              /**
              * The bounding box containing all glyphs in the run.
              * @type {BBox}
              */
              get bbox() {
                let i = new Tn(), u = 0, m = 0;
                for (let L = 0; L < this.glyphs.length; L++) {
                  let Z = this.glyphs[L], O = this.positions[L], PA = Z.bbox;
                  i.addPoint(PA.minX + u + O.xOffset, PA.minY + m + O.yOffset), i.addPoint(PA.maxX + u + O.xOffset, PA.maxY + m + O.yOffset), u += O.xAdvance, m += O.yAdvance;
                }
                return i;
              }
              constructor(i, u, m, L, Z) {
                if (this.glyphs = i, this.positions = null, this.script = m, this.language = L || null, this.direction = Z || ja(m), this.features = {}, Array.isArray(u)) for (let O of u) this.features[O] = !0;
                else typeof u == "object" && (this.features = u);
              }
            }
            class mg {
              constructor(i = 0, u = 0, m = 0, L = 0) {
                this.xAdvance = i, this.yAdvance = u, this.xOffset = m, this.yOffset = L;
              }
            }
            const Jn = {
              allTypographicFeatures: {
                code: 0,
                exclusive: !1,
                allTypeFeatures: 0
              },
              ligatures: {
                code: 1,
                exclusive: !1,
                requiredLigatures: 0,
                commonLigatures: 2,
                rareLigatures: 4,
                // logos: 6
                rebusPictures: 8,
                diphthongLigatures: 10,
                squaredLigatures: 12,
                abbrevSquaredLigatures: 14,
                symbolLigatures: 16,
                contextualLigatures: 18,
                historicalLigatures: 20
              },
              cursiveConnection: {
                code: 2,
                exclusive: !0,
                unconnected: 0,
                partiallyConnected: 1,
                cursive: 2
              },
              letterCase: {
                code: 3,
                exclusive: !0
              },
              // upperAndLowerCase: 0          # deprecated
              // allCaps: 1                    # deprecated
              // allLowerCase: 2               # deprecated
              // smallCaps: 3                  # deprecated
              // initialCaps: 4                # deprecated
              // initialCapsAndSmallCaps: 5    # deprecated
              verticalSubstitution: {
                code: 4,
                exclusive: !1,
                substituteVerticalForms: 0
              },
              linguisticRearrangement: {
                code: 5,
                exclusive: !1,
                linguisticRearrangement: 0
              },
              numberSpacing: {
                code: 6,
                exclusive: !0,
                monospacedNumbers: 0,
                proportionalNumbers: 1,
                thirdWidthNumbers: 2,
                quarterWidthNumbers: 3
              },
              smartSwash: {
                code: 8,
                exclusive: !1,
                wordInitialSwashes: 0,
                wordFinalSwashes: 2,
                // lineInitialSwashes: 4
                // lineFinalSwashes: 6
                nonFinalSwashes: 8
              },
              diacritics: {
                code: 9,
                exclusive: !0,
                showDiacritics: 0,
                hideDiacritics: 1,
                decomposeDiacritics: 2
              },
              verticalPosition: {
                code: 10,
                exclusive: !0,
                normalPosition: 0,
                superiors: 1,
                inferiors: 2,
                ordinals: 3,
                scientificInferiors: 4
              },
              fractions: {
                code: 11,
                exclusive: !0,
                noFractions: 0,
                verticalFractions: 1,
                diagonalFractions: 2
              },
              overlappingCharacters: {
                code: 13,
                exclusive: !1,
                preventOverlap: 0
              },
              typographicExtras: {
                code: 14,
                exclusive: !1,
                // hyphensToEmDash: 0
                // hyphenToEnDash: 2
                slashedZero: 4
              },
              // formInterrobang: 6
              // smartQuotes: 8
              // periodsToEllipsis: 10
              mathematicalExtras: {
                code: 15,
                exclusive: !1,
                // hyphenToMinus: 0
                // asteristoMultiply: 2
                // slashToDivide: 4
                // inequalityLigatures: 6
                // exponents: 8
                mathematicalGreek: 10
              },
              ornamentSets: {
                code: 16,
                exclusive: !0,
                noOrnaments: 0,
                dingbats: 1,
                piCharacters: 2,
                fleurons: 3,
                decorativeBorders: 4,
                internationalSymbols: 5,
                mathSymbols: 6
              },
              characterAlternatives: {
                code: 17,
                exclusive: !0,
                noAlternates: 0
              },
              // user defined options
              designComplexity: {
                code: 18,
                exclusive: !0,
                designLevel1: 0,
                designLevel2: 1,
                designLevel3: 2,
                designLevel4: 3,
                designLevel5: 4
              },
              styleOptions: {
                code: 19,
                exclusive: !0,
                noStyleOptions: 0,
                displayText: 1,
                engravedText: 2,
                illuminatedCaps: 3,
                titlingCaps: 4,
                tallCaps: 5
              },
              characterShape: {
                code: 20,
                exclusive: !0,
                traditionalCharacters: 0,
                simplifiedCharacters: 1,
                JIS1978Characters: 2,
                JIS1983Characters: 3,
                JIS1990Characters: 4,
                traditionalAltOne: 5,
                traditionalAltTwo: 6,
                traditionalAltThree: 7,
                traditionalAltFour: 8,
                traditionalAltFive: 9,
                expertCharacters: 10,
                JIS2004Characters: 11,
                hojoCharacters: 12,
                NLCCharacters: 13,
                traditionalNamesCharacters: 14
              },
              numberCase: {
                code: 21,
                exclusive: !0,
                lowerCaseNumbers: 0,
                upperCaseNumbers: 1
              },
              textSpacing: {
                code: 22,
                exclusive: !0,
                proportionalText: 0,
                monospacedText: 1,
                halfWidthText: 2,
                thirdWidthText: 3,
                quarterWidthText: 4,
                altProportionalText: 5,
                altHalfWidthText: 6
              },
              transliteration: {
                code: 23,
                exclusive: !0,
                noTransliteration: 0
              },
              // hanjaToHangul: 1
              // hiraganaToKatakana: 2
              // katakanaToHiragana: 3
              // kanaToRomanization: 4
              // romanizationToHiragana: 5
              // romanizationToKatakana: 6
              // hanjaToHangulAltOne: 7
              // hanjaToHangulAltTwo: 8
              // hanjaToHangulAltThree: 9
              annotation: {
                code: 24,
                exclusive: !0,
                noAnnotation: 0,
                boxAnnotation: 1,
                roundedBoxAnnotation: 2,
                circleAnnotation: 3,
                invertedCircleAnnotation: 4,
                parenthesisAnnotation: 5,
                periodAnnotation: 6,
                romanNumeralAnnotation: 7,
                diamondAnnotation: 8,
                invertedBoxAnnotation: 9,
                invertedRoundedBoxAnnotation: 10
              },
              kanaSpacing: {
                code: 25,
                exclusive: !0,
                fullWidthKana: 0,
                proportionalKana: 1
              },
              ideographicSpacing: {
                code: 26,
                exclusive: !0,
                fullWidthIdeographs: 0,
                proportionalIdeographs: 1,
                halfWidthIdeographs: 2
              },
              unicodeDecomposition: {
                code: 27,
                exclusive: !1,
                canonicalComposition: 0,
                compatibilityComposition: 2,
                transcodingComposition: 4
              },
              rubyKana: {
                code: 28,
                exclusive: !1,
                // noRubyKana: 0     # deprecated - use rubyKanaOff instead
                // rubyKana: 1     # deprecated - use rubyKanaOn instead
                rubyKana: 2
              },
              CJKSymbolAlternatives: {
                code: 29,
                exclusive: !0,
                noCJKSymbolAlternatives: 0,
                CJKSymbolAltOne: 1,
                CJKSymbolAltTwo: 2,
                CJKSymbolAltThree: 3,
                CJKSymbolAltFour: 4,
                CJKSymbolAltFive: 5
              },
              ideographicAlternatives: {
                code: 30,
                exclusive: !0,
                noIdeographicAlternatives: 0,
                ideographicAltOne: 1,
                ideographicAltTwo: 2,
                ideographicAltThree: 3,
                ideographicAltFour: 4,
                ideographicAltFive: 5
              },
              CJKVerticalRomanPlacement: {
                code: 31,
                exclusive: !0,
                CJKVerticalRomanCentered: 0,
                CJKVerticalRomanHBaseline: 1
              },
              italicCJKRoman: {
                code: 32,
                exclusive: !1,
                // noCJKItalicRoman: 0     # deprecated - use CJKItalicRomanOff instead
                // CJKItalicRoman: 1     # deprecated - use CJKItalicRomanOn instead
                CJKItalicRoman: 2
              },
              caseSensitiveLayout: {
                code: 33,
                exclusive: !1,
                caseSensitiveLayout: 0,
                caseSensitiveSpacing: 2
              },
              alternateKana: {
                code: 34,
                exclusive: !1,
                alternateHorizKana: 0,
                alternateVertKana: 2
              },
              stylisticAlternatives: {
                code: 35,
                exclusive: !1,
                noStylisticAlternates: 0,
                stylisticAltOne: 2,
                stylisticAltTwo: 4,
                stylisticAltThree: 6,
                stylisticAltFour: 8,
                stylisticAltFive: 10,
                stylisticAltSix: 12,
                stylisticAltSeven: 14,
                stylisticAltEight: 16,
                stylisticAltNine: 18,
                stylisticAltTen: 20,
                stylisticAltEleven: 22,
                stylisticAltTwelve: 24,
                stylisticAltThirteen: 26,
                stylisticAltFourteen: 28,
                stylisticAltFifteen: 30,
                stylisticAltSixteen: 32,
                stylisticAltSeventeen: 34,
                stylisticAltEighteen: 36,
                stylisticAltNineteen: 38,
                stylisticAltTwenty: 40
              },
              contextualAlternates: {
                code: 36,
                exclusive: !1,
                contextualAlternates: 0,
                swashAlternates: 2,
                contextualSwashAlternates: 4
              },
              lowerCase: {
                code: 37,
                exclusive: !0,
                defaultLowerCase: 0,
                lowerCaseSmallCaps: 1,
                lowerCasePetiteCaps: 2
              },
              upperCase: {
                code: 38,
                exclusive: !0,
                defaultUpperCase: 0,
                upperCaseSmallCaps: 1,
                upperCasePetiteCaps: 2
              },
              languageTag: {
                code: 39,
                exclusive: !0
              },
              CJKRomanSpacing: {
                code: 103,
                exclusive: !0,
                halfWidthCJKRoman: 0,
                proportionalCJKRoman: 1,
                defaultCJKRoman: 2,
                fullWidthCJKRoman: 3
              }
            }, Ve = (BA, i) => [
              Jn[BA].code,
              Jn[BA][i]
            ], Es = {
              rlig: Ve("ligatures", "requiredLigatures"),
              clig: Ve("ligatures", "contextualLigatures"),
              dlig: Ve("ligatures", "rareLigatures"),
              hlig: Ve("ligatures", "historicalLigatures"),
              liga: Ve("ligatures", "commonLigatures"),
              hist: Ve("ligatures", "historicalLigatures"),
              smcp: Ve("lowerCase", "lowerCaseSmallCaps"),
              pcap: Ve("lowerCase", "lowerCasePetiteCaps"),
              frac: Ve("fractions", "diagonalFractions"),
              dnom: Ve("fractions", "diagonalFractions"),
              numr: Ve("fractions", "diagonalFractions"),
              afrc: Ve("fractions", "verticalFractions"),
              // aalt
              // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?
              // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?
              // unic, vatu, vhal, vjmo, vpal, vrt2
              // dist -> trak table?
              // kern, vkrn -> kern table
              // lfbd + opbd + rtbd -> opbd table?
              // mark, mkmk -> acnt table?
              // locl -> languageTag + ltag table
              case: Ve("caseSensitiveLayout", "caseSensitiveLayout"),
              ccmp: Ve("unicodeDecomposition", "canonicalComposition"),
              cpct: Ve("CJKVerticalRomanPlacement", "CJKVerticalRomanCentered"),
              valt: Ve("CJKVerticalRomanPlacement", "CJKVerticalRomanCentered"),
              swsh: Ve("contextualAlternates", "swashAlternates"),
              cswh: Ve("contextualAlternates", "contextualSwashAlternates"),
              curs: Ve("cursiveConnection", "cursive"),
              c2pc: Ve("upperCase", "upperCasePetiteCaps"),
              c2sc: Ve("upperCase", "upperCaseSmallCaps"),
              init: Ve("smartSwash", "wordInitialSwashes"),
              fin2: Ve("smartSwash", "wordFinalSwashes"),
              medi: Ve("smartSwash", "nonFinalSwashes"),
              med2: Ve("smartSwash", "nonFinalSwashes"),
              fin3: Ve("smartSwash", "wordFinalSwashes"),
              fina: Ve("smartSwash", "wordFinalSwashes"),
              pkna: Ve("kanaSpacing", "proportionalKana"),
              half: Ve("textSpacing", "halfWidthText"),
              halt: Ve("textSpacing", "altHalfWidthText"),
              hkna: Ve("alternateKana", "alternateHorizKana"),
              vkna: Ve("alternateKana", "alternateVertKana"),
              // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated
              ital: Ve("italicCJKRoman", "CJKItalicRoman"),
              lnum: Ve("numberCase", "upperCaseNumbers"),
              onum: Ve("numberCase", "lowerCaseNumbers"),
              mgrk: Ve("mathematicalExtras", "mathematicalGreek"),
              // nalt: not enough info. what type of annotation?
              // ornm: ditto, which ornament style?
              calt: Ve("contextualAlternates", "contextualAlternates"),
              vrt2: Ve("verticalSubstitution", "substituteVerticalForms"),
              vert: Ve("verticalSubstitution", "substituteVerticalForms"),
              tnum: Ve("numberSpacing", "monospacedNumbers"),
              pnum: Ve("numberSpacing", "proportionalNumbers"),
              sups: Ve("verticalPosition", "superiors"),
              subs: Ve("verticalPosition", "inferiors"),
              ordn: Ve("verticalPosition", "ordinals"),
              pwid: Ve("textSpacing", "proportionalText"),
              hwid: Ve("textSpacing", "halfWidthText"),
              qwid: Ve("textSpacing", "quarterWidthText"),
              twid: Ve("textSpacing", "thirdWidthText"),
              fwid: Ve("textSpacing", "proportionalText"),
              palt: Ve("textSpacing", "altProportionalText"),
              trad: Ve("characterShape", "traditionalCharacters"),
              smpl: Ve("characterShape", "simplifiedCharacters"),
              jp78: Ve("characterShape", "JIS1978Characters"),
              jp83: Ve("characterShape", "JIS1983Characters"),
              jp90: Ve("characterShape", "JIS1990Characters"),
              jp04: Ve("characterShape", "JIS2004Characters"),
              expt: Ve("characterShape", "expertCharacters"),
              hojo: Ve("characterShape", "hojoCharacters"),
              nlck: Ve("characterShape", "NLCCharacters"),
              tnam: Ve("characterShape", "traditionalNamesCharacters"),
              ruby: Ve("rubyKana", "rubyKana"),
              titl: Ve("styleOptions", "titlingCaps"),
              zero: Ve("typographicExtras", "slashedZero"),
              ss01: Ve("stylisticAlternatives", "stylisticAltOne"),
              ss02: Ve("stylisticAlternatives", "stylisticAltTwo"),
              ss03: Ve("stylisticAlternatives", "stylisticAltThree"),
              ss04: Ve("stylisticAlternatives", "stylisticAltFour"),
              ss05: Ve("stylisticAlternatives", "stylisticAltFive"),
              ss06: Ve("stylisticAlternatives", "stylisticAltSix"),
              ss07: Ve("stylisticAlternatives", "stylisticAltSeven"),
              ss08: Ve("stylisticAlternatives", "stylisticAltEight"),
              ss09: Ve("stylisticAlternatives", "stylisticAltNine"),
              ss10: Ve("stylisticAlternatives", "stylisticAltTen"),
              ss11: Ve("stylisticAlternatives", "stylisticAltEleven"),
              ss12: Ve("stylisticAlternatives", "stylisticAltTwelve"),
              ss13: Ve("stylisticAlternatives", "stylisticAltThirteen"),
              ss14: Ve("stylisticAlternatives", "stylisticAltFourteen"),
              ss15: Ve("stylisticAlternatives", "stylisticAltFifteen"),
              ss16: Ve("stylisticAlternatives", "stylisticAltSixteen"),
              ss17: Ve("stylisticAlternatives", "stylisticAltSeventeen"),
              ss18: Ve("stylisticAlternatives", "stylisticAltEighteen"),
              ss19: Ve("stylisticAlternatives", "stylisticAltNineteen"),
              ss20: Ve("stylisticAlternatives", "stylisticAltTwenty")
            };
            for (let BA = 1; BA <= 99; BA++) Es[`cv${`00${BA}`.slice(-2)}`] = [
              Jn.characterAlternatives.code,
              BA
            ];
            let Kn = {};
            for (let BA in Es) {
              let i = Es[BA];
              Kn[i[0]] == null && (Kn[i[0]] = {}), Kn[i[0]][i[1]] = BA;
            }
            function Yg(BA) {
              let i = {};
              for (let u in BA) {
                let m;
                (m = Es[u]) && (i[m[0]] == null && (i[m[0]] = {}), i[m[0]][m[1]] = BA[u]);
              }
              return i;
            }
            function Oa(BA) {
              let [i, u] = BA;
              if (isNaN(i)) var m = Jn[i] && Jn[i].code;
              else var m = i;
              if (isNaN(u)) var L = Jn[i] && Jn[i][u];
              else var L = u;
              return [
                m,
                L
              ];
            }
            function Pg(BA) {
              let i = {};
              if (Array.isArray(BA)) for (let u = 0; u < BA.length; u++) {
                let m, L = Oa(BA[u]);
                (m = Kn[L[0]] && Kn[L[0]][L[1]]) && (i[m] = !0);
              }
              else if (typeof BA == "object") for (let u in BA) {
                let m = BA[u];
                for (let L in m) {
                  let Z, O = Oa([
                    u,
                    L
                  ]);
                  m[L] && (Z = Kn[O[0]] && Kn[O[0]][O[1]]) && (i[Z] = !0);
                }
              }
              return Object.keys(i);
            }
            class Kr {
              lookup(i) {
                switch (this.table.version) {
                  case 0:
                    return this.table.values.getItem(i);
                  case 2:
                  case 4: {
                    let L = 0, Z = this.table.binarySearchHeader.nUnits - 1;
                    for (; L <= Z; ) {
                      var u = L + Z >> 1, m = this.table.segments[u];
                      if (m.firstGlyph === 65535) return null;
                      if (i < m.firstGlyph) Z = u - 1;
                      else if (i > m.lastGlyph) L = u + 1;
                      else
                        return this.table.version === 2 ? m.value : m.values[i - m.firstGlyph];
                    }
                    return null;
                  }
                  case 6: {
                    let L = 0, Z = this.table.binarySearchHeader.nUnits - 1;
                    for (; L <= Z; ) {
                      var u = L + Z >> 1, m = this.table.segments[u];
                      if (m.glyph === 65535) return null;
                      if (i < m.glyph) Z = u - 1;
                      else if (i > m.glyph) L = u + 1;
                      else return m.value;
                    }
                    return null;
                  }
                  case 8:
                    return this.table.values[i - this.table.firstGlyph];
                  default:
                    throw new Error(`Unknown lookup table format: ${this.table.version}`);
                }
              }
              glyphsForValue(i) {
                let u = [];
                switch (this.table.version) {
                  case 2:
                  case 4:
                    for (let m of this.table.segments) if (this.table.version === 2 && m.value === i) u.push(...Br(m.firstGlyph, m.lastGlyph + 1));
                    else
                      for (let L = 0; L < m.values.length; L++) m.values[L] === i && u.push(m.firstGlyph + L);
                    break;
                  case 6:
                    for (let m of this.table.segments) m.value === i && u.push(m.glyph);
                    break;
                  case 8:
                    for (let m = 0; m < this.table.values.length; m++) this.table.values[m] === i && u.push(this.table.firstGlyph + m);
                    break;
                  default:
                    throw new Error(`Unknown lookup table format: ${this.table.version}`);
                }
                return u;
              }
              constructor(i) {
                this.table = i;
              }
            }
            (0, D._)([
              uA
            ], Kr.prototype, "glyphsForValue", null);
            const vg = 0, Ja = 0, Ka = 1, Wa = 2, bg = 16384;
            class zg {
              process(i, u, m) {
                let L = vg, Z = u ? i.length - 1 : 0, O = u ? -1 : 1;
                for (; O === 1 && Z <= i.length || O === -1 && Z >= -1; ) {
                  let PA = null, XA = Ka, te = !0;
                  Z === i.length || Z === -1 ? XA = Ja : (PA = i[Z], PA.id === 65535 ? XA = Wa : (XA = this.lookupTable.lookup(PA.id), XA == null && (XA = Ka)));
                  let ge = this.stateTable.stateArray.getItem(L)[XA], Ge = this.stateTable.entryTable.getItem(ge);
                  XA !== Ja && XA !== Wa && (m(PA, Ge, Z), te = !(Ge.flags & bg)), L = Ge.newState, te && (Z += O);
                }
                return i;
              }
              /**
              * Performs a depth-first traversal of the glyph strings
              * represented by the state machine.
              */
              traverse(i, u = 0, m = /* @__PURE__ */ new Set()) {
                if (m.has(u)) return;
                m.add(u);
                let { nClasses: L, stateArray: Z, entryTable: O } = this.stateTable, PA = Z.getItem(u);
                for (let XA = 4; XA < L; XA++) {
                  let te = PA[XA], ce = O.getItem(te);
                  for (let ge of this.lookupTable.glyphsForValue(XA))
                    i.enter && i.enter(ge, ce), ce.newState !== 0 && this.traverse(i, ce.newState, m), i.exit && i.exit(ge, ce);
                }
              }
              constructor(i) {
                this.stateTable = i, this.lookupTable = new Kr(i.classTable);
              }
            }
            const Tg = 32768, Ug = 8192, Ng = 15, Va = 32768, Rg = 32768, Sg = 8192, Gg = 2147483648, Hg = 1073741824, Lg = 1073741823, Xa = 4194304, kg = 2048, jg = 1024, Og = 992, Jg = 31;
            class Za {
              // Processes an array of glyphs and applies the specified features
              // Features should be in the form of {featureType:{featureSetting:boolean}}
              process(i, u = {}) {
                for (let L of this.morx.chains) {
                  let Z = L.defaultFlags;
                  for (let O of L.features) {
                    let PA;
                    (PA = u[O.featureType]) && (PA[O.featureSetting] ? (Z &= O.disableFlags, Z |= O.enableFlags) : PA[O.featureSetting] === !1 && (Z |= ~O.disableFlags, Z &= ~O.enableFlags));
                  }
                  for (let O of L.subtables) O.subFeatureFlags & Z && this.processSubtable(O, i);
                }
                let m = i.length - 1;
                for (; m >= 0; )
                  i[m].id === 65535 && i.splice(m, 1), m--;
                return i;
              }
              processSubtable(i, u) {
                if (this.subtable = i, this.glyphs = u, this.subtable.type === 4) {
                  this.processNoncontextualSubstitutions(this.subtable, this.glyphs);
                  return;
                }
                this.ligatureStack = [], this.markedGlyph = null, this.firstGlyph = null, this.lastGlyph = null, this.markedIndex = null;
                let m = this.getStateMachine(i), L = this.getProcessor(), Z = !!(this.subtable.coverage & Xa);
                return m.process(this.glyphs, Z, L);
              }
              getStateMachine(i) {
                return new zg(i.table.stateTable);
              }
              getProcessor() {
                switch (this.subtable.type) {
                  case 0:
                    return this.processIndicRearragement;
                  case 1:
                    return this.processContextualSubstitution;
                  case 2:
                    return this.processLigature;
                  case 4:
                    return this.processNoncontextualSubstitutions;
                  case 5:
                    return this.processGlyphInsertion;
                  default:
                    throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);
                }
              }
              processIndicRearragement(i, u, m) {
                u.flags & Tg && (this.firstGlyph = m), u.flags & Ug && (this.lastGlyph = m), Kg(this.glyphs, u.flags & Ng, this.firstGlyph, this.lastGlyph);
              }
              processContextualSubstitution(i, u, m) {
                let L = this.subtable.table.substitutionTable.items;
                if (u.markIndex !== 65535) {
                  let O = L.getItem(u.markIndex), PA = new Kr(O);
                  i = this.glyphs[this.markedGlyph];
                  var Z = PA.lookup(i.id);
                  Z && (this.glyphs[this.markedGlyph] = this.font.getGlyph(Z, i.codePoints));
                }
                if (u.currentIndex !== 65535) {
                  let O = L.getItem(u.currentIndex), PA = new Kr(O);
                  i = this.glyphs[m];
                  var Z = PA.lookup(i.id);
                  Z && (this.glyphs[m] = this.font.getGlyph(Z, i.codePoints));
                }
                u.flags & Va && (this.markedGlyph = m);
              }
              processLigature(i, u, m) {
                if (u.flags & Rg && this.ligatureStack.push(m), u.flags & Sg) {
                  let L = this.subtable.table.ligatureActions, Z = this.subtable.table.components, O = this.subtable.table.ligatureList, PA = u.action, XA = !1, te = 0, ce = [], ge = [];
                  for (; !XA; ) {
                    let Ge = this.ligatureStack.pop();
                    ce.unshift(...this.glyphs[Ge].codePoints);
                    let nt = L.getItem(PA++);
                    XA = !!(nt & Gg);
                    let ot = !!(nt & Hg), Ut = (nt & Lg) << 2 >> 2;
                    Ut += this.glyphs[Ge].id;
                    let ui = Z.getItem(Ut);
                    if (te += ui, XA || ot) {
                      let zt = O.getItem(te);
                      this.glyphs[Ge] = this.font.getGlyph(zt, ce), ge.push(Ge), te = 0, ce = [];
                    } else this.glyphs[Ge] = this.font.getGlyph(65535);
                  }
                  this.ligatureStack.push(...ge);
                }
              }
              processNoncontextualSubstitutions(i, u, m) {
                let L = new Kr(i.table.lookupTable);
                for (m = 0; m < u.length; m++) {
                  let Z = u[m];
                  if (Z.id !== 65535) {
                    let O = L.lookup(Z.id);
                    O && (u[m] = this.font.getGlyph(O, Z.codePoints));
                  }
                }
              }
              _insertGlyphs(i, u, m, L) {
                let Z = [];
                for (; m--; ) {
                  let O = this.subtable.table.insertionActions.getItem(u++);
                  Z.push(this.font.getGlyph(O));
                }
                L || i++, this.glyphs.splice(i, 0, ...Z);
              }
              processGlyphInsertion(i, u, m) {
                if (u.flags & Va && (this.markedIndex = m), u.markedInsertIndex !== 65535) {
                  let L = (u.flags & Jg) >>> 5, Z = !!(u.flags & jg);
                  this._insertGlyphs(this.markedIndex, u.markedInsertIndex, L, Z);
                }
                if (u.currentInsertIndex !== 65535) {
                  let L = (u.flags & Og) >>> 5, Z = !!(u.flags & kg);
                  this._insertGlyphs(m, u.currentInsertIndex, L, Z);
                }
              }
              getSupportedFeatures() {
                let i = [];
                for (let u of this.morx.chains) for (let m of u.features) i.push([
                  m.featureType,
                  m.featureSetting
                ]);
                return i;
              }
              generateInputs(i) {
                return this.inputCache || this.generateInputCache(), this.inputCache[i] || [];
              }
              generateInputCache() {
                this.inputCache = {};
                for (let i of this.morx.chains) {
                  let u = i.defaultFlags;
                  for (let m of i.subtables) m.subFeatureFlags & u && this.generateInputsForSubtable(m);
                }
              }
              generateInputsForSubtable(i) {
                if (i.type !== 2) return;
                if (!!(i.coverage & Xa)) throw new Error("Reverse subtable, not supported.");
                this.subtable = i, this.ligatureStack = [];
                let m = this.getStateMachine(i), L = this.getProcessor(), Z = [], O = [];
                this.glyphs = [], m.traverse({
                  enter: (PA, XA) => {
                    let te = this.glyphs;
                    O.push({
                      glyphs: te.slice(),
                      ligatureStack: this.ligatureStack.slice()
                    });
                    let ce = this.font.getGlyph(PA);
                    Z.push(ce), te.push(Z[Z.length - 1]), L(te[te.length - 1], XA, te.length - 1);
                    let ge = 0, Ge = 0;
                    for (let nt = 0; nt < te.length && ge <= 1; nt++) te[nt].id !== 65535 && (ge++, Ge = te[nt].id);
                    if (ge === 1) {
                      let nt = Z.map((Ut) => Ut.id), ot = this.inputCache[Ge];
                      ot ? ot.push(nt) : this.inputCache[Ge] = [
                        nt
                      ];
                    }
                  },
                  exit: () => {
                    ({ glyphs: this.glyphs, ligatureStack: this.ligatureStack } = O.pop()), Z.pop();
                  }
                });
              }
              constructor(i) {
                this.processIndicRearragement = this.processIndicRearragement.bind(this), this.processContextualSubstitution = this.processContextualSubstitution.bind(this), this.processLigature = this.processLigature.bind(this), this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this), this.processGlyphInsertion = this.processGlyphInsertion.bind(this), this.font = i, this.morx = i.morx, this.inputCache = null;
              }
            }
            (0, D._)([
              uA
            ], Za.prototype, "getStateMachine", null);
            function ji(BA, i, u, m = !1, L = !1) {
              let Z = BA.splice(u[0] - (u[1] - 1), u[1]);
              L && Z.reverse();
              let O = BA.splice(i[0], i[1], ...Z);
              return m && O.reverse(), BA.splice(u[0] - (i[1] - 1), 0, ...O), BA;
            }
            function Kg(BA, i, u, m) {
              switch (i) {
                case 0:
                  return BA;
                case 1:
                  return ji(BA, [
                    u,
                    1
                  ], [
                    m,
                    0
                  ]);
                case 2:
                  return ji(BA, [
                    u,
                    0
                  ], [
                    m,
                    1
                  ]);
                case 3:
                  return ji(BA, [
                    u,
                    1
                  ], [
                    m,
                    1
                  ]);
                case 4:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    0
                  ]);
                case 5:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    0
                  ], !0, !1);
                case 6:
                  return ji(BA, [
                    u,
                    0
                  ], [
                    m,
                    2
                  ]);
                case 7:
                  return ji(BA, [
                    u,
                    0
                  ], [
                    m,
                    2
                  ], !1, !0);
                case 8:
                  return ji(BA, [
                    u,
                    1
                  ], [
                    m,
                    2
                  ]);
                case 9:
                  return ji(BA, [
                    u,
                    1
                  ], [
                    m,
                    2
                  ], !1, !0);
                case 10:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    1
                  ]);
                case 11:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    1
                  ], !0, !1);
                case 12:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    2
                  ]);
                case 13:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    2
                  ], !0, !1);
                case 14:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    2
                  ], !1, !0);
                case 15:
                  return ji(BA, [
                    u,
                    2
                  ], [
                    m,
                    2
                  ], !0, !0);
                default:
                  throw new Error(`Unknown verb: ${i}`);
              }
            }
            class Wg {
              substitute(i) {
                i.direction === "rtl" && i.glyphs.reverse(), this.morxProcessor.process(i.glyphs, Yg(i.features));
              }
              getAvailableFeatures(i, u) {
                return Pg(this.morxProcessor.getSupportedFeatures());
              }
              stringsForGlyph(i) {
                let u = this.morxProcessor.generateInputs(i), m = /* @__PURE__ */ new Set();
                for (let L of u) this._addStrings(L, 0, m, "");
                return m;
              }
              _addStrings(i, u, m, L) {
                let Z = this.font._cmapProcessor.codePointsForGlyph(i[u]);
                for (let O of Z) {
                  let PA = L + String.fromCodePoint(O);
                  u < i.length - 1 ? this._addStrings(i, u + 1, m, PA) : m.add(PA);
                }
              }
              constructor(i) {
                this.font = i, this.morxProcessor = new Za(i), this.fallbackPosition = !1;
              }
            }
            class Vg {
              /**
              * Adds the given features to the last stage.
              * Ignores features that have already been applied.
              */
              _addFeatures(i, u) {
                let m = this.stages.length - 1, L = this.stages[m];
                for (let Z of i) this.allFeatures[Z] == null && (L.push(Z), this.allFeatures[Z] = m, u && (this.globalFeatures[Z] = !0));
              }
              /**
              * Add features to the last stage
              */
              add(i, u = !0) {
                if (this.stages.length === 0 && this.stages.push([]), typeof i == "string" && (i = [
                  i
                ]), Array.isArray(i)) this._addFeatures(i, u);
                else if (typeof i == "object")
                  this._addFeatures(i.global || [], !0), this._addFeatures(i.local || [], !1);
                else throw new Error("Unsupported argument to ShapingPlan#add");
              }
              /**
              * Add a new stage
              */
              addStage(i, u) {
                typeof i == "function" ? this.stages.push(i, []) : (this.stages.push([]), this.add(i, u));
              }
              setFeatureOverrides(i) {
                if (Array.isArray(i)) this.add(i);
                else if (typeof i == "object") {
                  for (let u in i)
                    if (i[u]) this.add(u);
                    else if (this.allFeatures[u] != null) {
                      let m = this.stages[this.allFeatures[u]];
                      m.splice(m.indexOf(u), 1), delete this.allFeatures[u], delete this.globalFeatures[u];
                    }
                }
              }
              /**
              * Assigns the global features to the given glyphs
              */
              assignGlobalFeatures(i) {
                for (let u of i) for (let m in this.globalFeatures) u.features[m] = !0;
              }
              /**
              * Executes the planned stages using the given OTProcessor
              */
              process(i, u, m) {
                for (let L of this.stages)
                  typeof L == "function" ? m || L(this.font, u, this) : L.length > 0 && i.applyFeatures(L, u, m);
              }
              constructor(i, u, m) {
                this.font = i, this.script = u, this.direction = m, this.stages = [], this.globalFeatures = {}, this.allFeatures = {};
              }
            }
            const Xg = [
              "rvrn"
            ], Zg = [
              "ccmp",
              "locl",
              "rlig",
              "mark",
              "mkmk"
            ], qg = [
              "frac",
              "numr",
              "dnom"
            ], _g = [
              "calt",
              "clig",
              "liga",
              "rclt",
              "curs",
              "kern"
            ], $g = {
              ltr: [
                "ltra",
                "ltrm"
              ],
              rtl: [
                "rtla",
                "rtlm"
              ]
            };
            class Un {
              static plan(i, u, m) {
                this.planPreprocessing(i), this.planFeatures(i), this.planPostprocessing(i, m), i.assignGlobalFeatures(u), this.assignFeatures(i, u);
              }
              static planPreprocessing(i) {
                i.add({
                  global: [
                    ...Xg,
                    ...$g[i.direction]
                  ],
                  local: qg
                });
              }
              static planFeatures(i) {
              }
              static planPostprocessing(i, u) {
                i.add([
                  ...Zg,
                  ..._g
                ]), i.setFeatureOverrides(u);
              }
              static assignFeatures(i, u) {
                for (let m = 0; m < u.length; m++) {
                  let L = u[m];
                  if (L.codePoints[0] === 8260) {
                    let Z = m, O = m + 1;
                    for (; Z > 0 && (0, N.isDigit)(u[Z - 1].codePoints[0]); )
                      u[Z - 1].features.numr = !0, u[Z - 1].features.frac = !0, Z--;
                    for (; O < u.length && (0, N.isDigit)(u[O].codePoints[0]); )
                      u[O].features.dnom = !0, u[O].features.frac = !0, O++;
                    L.features.frac = !0, m = O - 1;
                  }
                }
              }
            }
            (0, a._)(Un, "zeroMarkWidths", "AFTER_GPOS");
            const Ac = new (T(P))(Aa("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==")), qa = [
              "isol",
              "fina",
              "fin2",
              "fin3",
              "medi",
              "med2",
              "init"
            ], ia = {
              Non_Joining: 0,
              Transparent: 6
            }, si = "isol", Nn = "fina", na = "fin2", ec = "fin3", ws = "medi", us = "med2", fs = "init", Kt = null, tc = [
              //   Non_Joining,        Left_Joining,       Right_Joining,     Dual_Joining,           ALAPH,            DALATH RISH
              // State 0: prev was U,  not willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  si,
                  1
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  si,
                  1
                ],
                [
                  Kt,
                  si,
                  6
                ]
              ],
              // State 1: prev was R or ISOL/ALAPH,  not willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  si,
                  1
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  na,
                  5
                ],
                [
                  Kt,
                  si,
                  6
                ]
              ],
              // State 2: prev was D/L in ISOL form,  willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  fs,
                  Nn,
                  1
                ],
                [
                  fs,
                  Nn,
                  3
                ],
                [
                  fs,
                  Nn,
                  4
                ],
                [
                  fs,
                  Nn,
                  6
                ]
              ],
              // State 3: prev was D in FINA form,  willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  ws,
                  Nn,
                  1
                ],
                [
                  ws,
                  Nn,
                  3
                ],
                [
                  ws,
                  Nn,
                  4
                ],
                [
                  ws,
                  Nn,
                  6
                ]
              ],
              // State 4: prev was FINA ALAPH,  not willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  us,
                  si,
                  1
                ],
                [
                  us,
                  si,
                  2
                ],
                [
                  us,
                  na,
                  5
                ],
                [
                  us,
                  si,
                  6
                ]
              ],
              // State 5: prev was FIN2/FIN3 ALAPH,  not willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  si,
                  si,
                  1
                ],
                [
                  si,
                  si,
                  2
                ],
                [
                  si,
                  na,
                  5
                ],
                [
                  si,
                  si,
                  6
                ]
              ],
              // State 6: prev was DALATH/RISH,  not willing to join.
              [
                [
                  Kt,
                  Kt,
                  0
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  si,
                  1
                ],
                [
                  Kt,
                  si,
                  2
                ],
                [
                  Kt,
                  ec,
                  5
                ],
                [
                  Kt,
                  si,
                  6
                ]
              ]
            ];
            class Rn extends Un {
              static planFeatures(i) {
                i.add([
                  "ccmp",
                  "locl"
                ]);
                for (let u = 0; u < qa.length; u++) {
                  let m = qa[u];
                  i.addStage(m, !1);
                }
                i.addStage("mset");
              }
              static assignFeatures(i, u) {
                super.assignFeatures(i, u);
                let m = -1, L = 0, Z = [];
                for (let PA = 0; PA < u.length; PA++) {
                  let XA, te;
                  var O = u[PA];
                  let ce = ic(O.codePoints[0]);
                  if (ce === ia.Transparent) {
                    Z[PA] = Kt;
                    continue;
                  }
                  [te, XA, L] = tc[L][ce], te !== Kt && m !== -1 && (Z[m] = te), Z[PA] = XA, m = PA;
                }
                for (let PA = 0; PA < u.length; PA++) {
                  let XA;
                  var O = u[PA];
                  (XA = Z[PA]) && (O.features[XA] = !0);
                }
              }
            }
            function ic(BA) {
              let i = Ac.get(BA);
              if (i) return i - 1;
              let u = (0, N.getCategory)(BA);
              return u === "Mn" || u === "Me" || u === "Cf" ? ia.Transparent : ia.Non_Joining;
            }
            class nc {
              reset(i = {}, u = 0) {
                this.options = i, this.flags = i.flags || {}, this.markAttachmentType = i.markAttachmentType || 0, this.index = u;
              }
              get cur() {
                return this.glyphs[this.index] || null;
              }
              shouldIgnore(i) {
                return this.flags.ignoreMarks && i.isMark || this.flags.ignoreBaseGlyphs && i.isBase || this.flags.ignoreLigatures && i.isLigature || this.markAttachmentType && i.isMark && i.markAttachmentType !== this.markAttachmentType;
              }
              move(i) {
                for (this.index += i; 0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index]); ) this.index += i;
                return 0 > this.index || this.index >= this.glyphs.length ? null : this.glyphs[this.index];
              }
              next() {
                return this.move(1);
              }
              prev() {
                return this.move(-1);
              }
              peek(i = 1) {
                let u = this.index, m = this.increment(i);
                return this.index = u, m;
              }
              peekIndex(i = 1) {
                let u = this.index;
                this.increment(i);
                let m = this.index;
                return this.index = u, m;
              }
              increment(i = 1) {
                let u = i < 0 ? -1 : 1;
                for (i = Math.abs(i); i--; ) this.move(u);
                return this.glyphs[this.index];
              }
              constructor(i, u) {
                this.glyphs = i, this.reset(u);
              }
            }
            const rc = [
              "DFLT",
              "dflt",
              "latn"
            ];
            class Qs {
              findScript(i) {
                if (this.table.scriptList == null) return null;
                Array.isArray(i) || (i = [
                  i
                ]);
                for (let u of i) for (let m of this.table.scriptList)
                  if (m.tag === u) return m;
                return null;
              }
              selectScript(i, u, m) {
                let L = !1, Z;
                if (!this.script || i !== this.scriptTag) {
                  if (Z = this.findScript(i), Z || (Z = this.findScript(rc)), !Z) return this.scriptTag;
                  this.scriptTag = Z.tag, this.script = Z.script, this.language = null, this.languageTag = null, L = !0;
                }
                if ((!m || m !== this.direction) && (this.direction = m || ja(i)), u && u.length < 4 && (u += " ".repeat(4 - u.length)), !u || u !== this.languageTag) {
                  this.language = null;
                  for (let O of this.script.langSysRecords) if (O.tag === u) {
                    this.language = O.langSys, this.languageTag = O.tag;
                    break;
                  }
                  this.language || (this.language = this.script.defaultLangSys, this.languageTag = null), L = !0;
                }
                if (L && (this.features = {}, this.language))
                  for (let O of this.language.featureIndexes) {
                    let PA = this.table.featureList[O], XA = this.substituteFeatureForVariations(O);
                    this.features[PA.tag] = XA || PA.feature;
                  }
                return this.scriptTag;
              }
              lookupsForFeatures(i = [], u) {
                let m = [];
                for (let L of i) {
                  let Z = this.features[L];
                  if (Z)
                    for (let O of Z.lookupListIndexes)
                      u && u.indexOf(O) !== -1 || m.push({
                        feature: L,
                        index: O,
                        lookup: this.table.lookupList.get(O)
                      });
                }
                return m.sort((L, Z) => L.index - Z.index), m;
              }
              substituteFeatureForVariations(i) {
                if (this.variationsIndex === -1) return null;
                let m = this.table.featureVariations.featureVariationRecords[this.variationsIndex].featureTableSubstitution.substitutions;
                for (let L of m)
                  if (L.featureIndex === i) return L.alternateFeatureTable;
                return null;
              }
              findVariationsIndex(i) {
                let u = this.table.featureVariations;
                if (!u) return -1;
                let m = u.featureVariationRecords;
                for (let L = 0; L < m.length; L++) {
                  let Z = m[L].conditionSet.conditionTable;
                  if (this.variationConditionsMatch(Z, i)) return L;
                }
                return -1;
              }
              variationConditionsMatch(i, u) {
                return i.every((m) => {
                  let L = m.axisIndex < u.length ? u[m.axisIndex] : 0;
                  return m.filterRangeMinValue <= L && L <= m.filterRangeMaxValue;
                });
              }
              applyFeatures(i, u, m) {
                let L = this.lookupsForFeatures(i);
                this.applyLookups(L, u, m);
              }
              applyLookups(i, u, m) {
                this.glyphs = u, this.positions = m, this.glyphIterator = new nc(u);
                for (let { feature: L, lookup: Z } of i)
                  for (this.currentFeature = L, this.glyphIterator.reset(Z.flags); this.glyphIterator.index < u.length; ) {
                    if (!(L in this.glyphIterator.cur.features)) {
                      this.glyphIterator.next();
                      continue;
                    }
                    for (let O of Z.subTables)
                      if (this.applyLookup(Z.lookupType, O)) break;
                    this.glyphIterator.next();
                  }
              }
              applyLookup(i, u) {
                throw new Error("applyLookup must be implemented by subclasses");
              }
              applyLookupList(i) {
                let u = this.glyphIterator.options, m = this.glyphIterator.index;
                for (let L of i) {
                  this.glyphIterator.reset(u, m), this.glyphIterator.increment(L.sequenceIndex);
                  let Z = this.table.lookupList.get(L.lookupListIndex);
                  this.glyphIterator.reset(Z.flags, this.glyphIterator.index);
                  for (let O of Z.subTables)
                    if (this.applyLookup(Z.lookupType, O)) break;
                }
                return this.glyphIterator.reset(u, m), !0;
              }
              coverageIndex(i, u) {
                switch (u == null && (u = this.glyphIterator.cur.id), i.version) {
                  case 1:
                    return i.glyphs.indexOf(u);
                  case 2:
                    for (let m of i.rangeRecords)
                      if (m.start <= u && u <= m.end) return m.startCoverageIndex + u - m.start;
                    break;
                }
                return -1;
              }
              match(i, u, m, L) {
                let Z = this.glyphIterator.index, O = this.glyphIterator.increment(i), PA = 0;
                for (; PA < u.length && O && m(u[PA], O); )
                  L && L.push(this.glyphIterator.index), PA++, O = this.glyphIterator.next();
                return this.glyphIterator.index = Z, PA < u.length ? !1 : L || !0;
              }
              sequenceMatches(i, u) {
                return this.match(i, u, (m, L) => m === L.id);
              }
              sequenceMatchIndices(i, u) {
                return this.match(i, u, (m, L) => this.currentFeature in L.features ? m === L.id : !1, []);
              }
              coverageSequenceMatches(i, u) {
                return this.match(i, u, (m, L) => this.coverageIndex(m, L.id) >= 0);
              }
              getClassID(i, u) {
                switch (u.version) {
                  case 1:
                    let m = i - u.startGlyph;
                    if (m >= 0 && m < u.classValueArray.length) return u.classValueArray[m];
                    break;
                  case 2:
                    for (let L of u.classRangeRecord)
                      if (L.start <= i && i <= L.end) return L.class;
                    break;
                }
                return 0;
              }
              classSequenceMatches(i, u, m) {
                return this.match(i, u, (L, Z) => L === this.getClassID(Z.id, m));
              }
              applyContext(i) {
                let u, m;
                switch (i.version) {
                  case 1:
                    if (u = this.coverageIndex(i.coverage), u === -1) return !1;
                    m = i.ruleSets[u];
                    for (let L of m)
                      if (this.sequenceMatches(1, L.input)) return this.applyLookupList(L.lookupRecords);
                    break;
                  case 2:
                    if (this.coverageIndex(i.coverage) === -1 || (u = this.getClassID(this.glyphIterator.cur.id, i.classDef), u === -1)) return !1;
                    m = i.classSet[u];
                    for (let L of m)
                      if (this.classSequenceMatches(1, L.classes, i.classDef)) return this.applyLookupList(L.lookupRecords);
                    break;
                  case 3:
                    if (this.coverageSequenceMatches(0, i.coverages)) return this.applyLookupList(i.lookupRecords);
                    break;
                }
                return !1;
              }
              applyChainingContext(i) {
                let u;
                switch (i.version) {
                  case 1:
                    if (u = this.coverageIndex(i.coverage), u === -1) return !1;
                    let m = i.chainRuleSets[u];
                    for (let Z of m)
                      if (this.sequenceMatches(-Z.backtrack.length, Z.backtrack) && this.sequenceMatches(1, Z.input) && this.sequenceMatches(1 + Z.input.length, Z.lookahead)) return this.applyLookupList(Z.lookupRecords);
                    break;
                  case 2:
                    if (this.coverageIndex(i.coverage) === -1) return !1;
                    u = this.getClassID(this.glyphIterator.cur.id, i.inputClassDef);
                    let L = i.chainClassSet[u];
                    if (!L) return !1;
                    for (let Z of L)
                      if (this.classSequenceMatches(-Z.backtrack.length, Z.backtrack, i.backtrackClassDef) && this.classSequenceMatches(1, Z.input, i.inputClassDef) && this.classSequenceMatches(1 + Z.input.length, Z.lookahead, i.lookaheadClassDef)) return this.applyLookupList(Z.lookupRecords);
                    break;
                  case 3:
                    if (this.coverageSequenceMatches(-i.backtrackGlyphCount, i.backtrackCoverage) && this.coverageSequenceMatches(0, i.inputCoverage) && this.coverageSequenceMatches(i.inputGlyphCount, i.lookaheadCoverage)) return this.applyLookupList(i.lookupRecords);
                    break;
                }
                return !1;
              }
              constructor(i, u) {
                this.font = i, this.table = u, this.script = null, this.scriptTag = null, this.language = null, this.languageTag = null, this.features = {}, this.lookups = {}, this.variationsIndex = i._variationProcessor ? this.findVariationsIndex(i._variationProcessor.normalizedCoords) : -1, this.selectScript(), this.glyphs = [], this.positions = [], this.ligatureID = 1, this.currentFeature = null;
              }
            }
            class tn {
              get id() {
                return this._id;
              }
              set id(i) {
                this._id = i, this.substituted = !0;
                let u = this._font.GDEF;
                if (u && u.glyphClassDef) {
                  let m = Qs.prototype.getClassID(i, u.glyphClassDef);
                  this.isBase = m === 1, this.isLigature = m === 2, this.isMark = m === 3, this.markAttachmentType = u.markAttachClassDef ? Qs.prototype.getClassID(i, u.markAttachClassDef) : 0;
                } else
                  this.isMark = this.codePoints.length > 0 && this.codePoints.every(N.isMark), this.isBase = !this.isMark, this.isLigature = this.codePoints.length > 1, this.markAttachmentType = 0;
              }
              copy() {
                return new tn(this._font, this.id, this.codePoints, this.features);
              }
              constructor(i, u, m = [], L) {
                if (this._font = i, this.codePoints = m, this.id = u, this.features = {}, Array.isArray(L)) for (let Z = 0; Z < L.length; Z++) {
                  let O = L[Z];
                  this.features[O] = !0;
                }
                else typeof L == "object" && Object.assign(this.features, L);
                this.ligatureID = null, this.ligatureComponent = null, this.isLigated = !1, this.cursiveAttachment = null, this.markAttachment = null, this.shaperInfo = null, this.substituted = !1, this.isMultiplied = !1;
              }
            }
            class _a extends Un {
              static planFeatures(i) {
                i.add([
                  "ljmo",
                  "vjmo",
                  "tjmo"
                ], !1);
              }
              static assignFeatures(i, u) {
                let m = 0, L = 0;
                for (; L < u.length; ) {
                  let Z, PA = u[L].codePoints[0], XA = Is(PA);
                  switch ([Z, m] = Ic[m][XA], Z) {
                    case yn:
                      i.font.hasGlyphForCodePoint(PA) || (L = to(u, L, i.font));
                      break;
                    case sa:
                      L = yc(u, L, i.font);
                      break;
                    case aa:
                      xc(u, L, i.font);
                      break;
                    case oa:
                      L = pc(u, L, i.font);
                      break;
                  }
                  L++;
                }
              }
            }
            (0, a._)(_a, "zeroMarkWidths", "NONE");
            const cr = 44032, $a = 55204, sc = $a - cr + 1, hs = 4352, Cs = 4449, Wn = 4519, ac = 19, Ms = 21, Wr = 28, oc = hs + ac - 1, Bc = Cs + Ms - 1, gc = Wn + Wr - 1, Ao = 9676, cc = (BA) => 4352 <= BA && BA <= 4447 || 43360 <= BA && BA <= 43388, lc = (BA) => 4448 <= BA && BA <= 4519 || 55216 <= BA && BA <= 55238, Ec = (BA) => 4520 <= BA && BA <= 4607 || 55243 <= BA && BA <= 55291, wc = (BA) => 12334 <= BA && BA <= 12335, uc = (BA) => cr <= BA && BA <= $a, fc = (BA) => BA - cr < sc && (BA - cr) % Wr === 0, Qc = (BA) => hs <= BA && BA <= oc, hc = (BA) => Cs <= BA && BA <= Bc, Cc = (BA) => 1 <= BA && BA <= gc, Mc = 0, Dc = 1, Ds = 2, ra = 3, ds = 4, eo = 5, dc = 6;
            function Is(BA) {
              return cc(BA) ? Dc : lc(BA) ? Ds : Ec(BA) ? ra : fc(BA) ? ds : uc(BA) ? eo : wc(BA) ? dc : Mc;
            }
            const Ji = 0, yn = 1, sa = 2, aa = 4, oa = 5, Ic = [
              //       X                 L                 V                T                  LV                LVT               M
              // State 0: start state
              [
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  1
                ],
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  0
                ],
                [
                  yn,
                  2
                ],
                [
                  yn,
                  3
                ],
                [
                  oa,
                  0
                ]
              ],
              // State 1: <L>
              [
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  1
                ],
                [
                  sa,
                  2
                ],
                [
                  Ji,
                  0
                ],
                [
                  yn,
                  2
                ],
                [
                  yn,
                  3
                ],
                [
                  oa,
                  0
                ]
              ],
              // State 2: <L,V> or <LV>
              [
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  1
                ],
                [
                  Ji,
                  0
                ],
                [
                  sa,
                  3
                ],
                [
                  yn,
                  2
                ],
                [
                  yn,
                  3
                ],
                [
                  aa,
                  0
                ]
              ],
              // State 3: <L,V,T> or <LVT>
              [
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  1
                ],
                [
                  Ji,
                  0
                ],
                [
                  Ji,
                  0
                ],
                [
                  yn,
                  2
                ],
                [
                  yn,
                  3
                ],
                [
                  aa,
                  0
                ]
              ]
            ];
            function Vr(BA, i, u) {
              return new tn(BA, BA.glyphForCodePoint(i).id, [
                i
              ], u);
            }
            function to(BA, i, u) {
              let m = BA[i], Z = m.codePoints[0] - cr, O = Wn + Z % Wr;
              Z = Z / Wr | 0;
              let PA = hs + Z / Ms | 0, XA = Cs + Z % Ms;
              if (!u.hasGlyphForCodePoint(PA) || !u.hasGlyphForCodePoint(XA) || O !== Wn && !u.hasGlyphForCodePoint(O)) return i;
              let te = Vr(u, PA, m.features);
              te.features.ljmo = !0;
              let ce = Vr(u, XA, m.features);
              ce.features.vjmo = !0;
              let ge = [
                te,
                ce
              ];
              if (O > Wn) {
                let Ge = Vr(u, O, m.features);
                Ge.features.tjmo = !0, ge.push(Ge);
              }
              return BA.splice(i, 1, ...ge), i + ge.length - 1;
            }
            function yc(BA, i, u) {
              let m = BA[i], L = BA[i].codePoints[0], Z = Is(L), O = BA[i - 1].codePoints[0], PA = Is(O), XA, te, ce, ge;
              if (PA === ds && Z === ra)
                XA = O, ge = m;
              else {
                Z === Ds ? (te = BA[i - 1], ce = m) : (te = BA[i - 2], ce = BA[i - 1], ge = m);
                let nt = te.codePoints[0], ot = ce.codePoints[0];
                Qc(nt) && hc(ot) && (XA = cr + ((nt - hs) * Ms + (ot - Cs)) * Wr);
              }
              let Ge = ge && ge.codePoints[0] || Wn;
              if (XA != null && (Ge === Wn || Cc(Ge))) {
                let nt = XA + (Ge - Wn);
                if (u.hasGlyphForCodePoint(nt)) {
                  let ot = PA === Ds ? 3 : 2;
                  return BA.splice(i - ot + 1, ot, Vr(u, nt, m.features)), i - ot + 1;
                }
              }
              return te && (te.features.ljmo = !0), ce && (ce.features.vjmo = !0), ge && (ge.features.tjmo = !0), PA === ds ? (to(BA, i - 1, u), i + 1) : i;
            }
            function Fc(BA) {
              switch (Is(BA)) {
                case ds:
                case eo:
                  return 1;
                case Ds:
                  return 2;
                case ra:
                  return 3;
              }
            }
            function xc(BA, i, u) {
              let m = BA[i], L = BA[i].codePoints[0];
              if (u.glyphForCodePoint(L).advanceWidth === 0) return;
              let Z = BA[i - 1].codePoints[0], O = Fc(Z);
              return BA.splice(i, 1), BA.splice(i - O, 0, m);
            }
            function pc(BA, i, u) {
              let m = BA[i], L = BA[i].codePoints[0];
              if (u.hasGlyphForCodePoint(Ao)) {
                let Z = Vr(u, Ao, m.features), O = u.glyphForCodePoint(L).advanceWidth === 0 ? i : i + 1;
                BA.splice(O, 0, Z), i++;
              }
              return i;
            }
            var io = {};
            io = JSON.parse('{"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],"accepting":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],"tags":[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]}');
            var ys = {};
            ys = JSON.parse('{"categories":["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],"decompositions":{"2507":[2503,2494],"2508":[2503,2519],"2888":[2887,2902],"2891":[2887,2878],"2892":[2887,2903],"3018":[3014,3006],"3019":[3015,3006],"3020":[3014,3031],"3144":[3142,3158],"3264":[3263,3285],"3271":[3270,3285],"3272":[3270,3286],"3274":[3270,3266],"3275":[3270,3266,3285],"3402":[3398,3390],"3403":[3399,3390],"3404":[3398,3415],"3546":[3545,3530],"3548":[3545,3535],"3549":[3545,3535,3530],"3550":[3545,3551],"3635":[3661,3634],"3763":[3789,3762],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"6971":[6970,6965],"6973":[6972,6965],"6976":[6974,6965],"6977":[6975,6965],"6979":[6978,6965],"69934":[69937,69927],"69935":[69938,69927],"70475":[70471,70462],"70476":[70471,70487],"70843":[70841,70842],"70844":[70841,70832],"70846":[70841,70845],"71098":[71096,71087],"71099":[71097,71087]},"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],"accepting":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],"tags":[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]}');
            const Lt = {
              X: 1,
              C: 2,
              V: 4,
              N: 8,
              H: 16,
              ZWNJ: 32,
              ZWJ: 64,
              M: 128,
              Placeholder: 2048,
              Dotted_Circle: 4096,
              RS: 8192,
              Coeng: 16384,
              Repha: 32768,
              Ra: 65536,
              CM: 131072
            }, dt = {
              Start: 1,
              Ra_To_Become_Reph: 2,
              Pre_M: 4,
              Pre_C: 8,
              Base_C: 16,
              After_Main: 32,
              Before_Sub: 128,
              Below_C: 256,
              After_Sub: 512,
              Before_Post: 1024,
              Post_C: 2048,
              After_Post: 4096,
              Final_C: 8192,
              SMVD: 16384,
              End: 32768
            }, mc = Lt.C | Lt.Ra | Lt.CM | Lt.V | Lt.Placeholder | Lt.Dotted_Circle, no = Lt.ZWJ | Lt.ZWNJ, Xr = Lt.H | Lt.Coeng, ro = {
              Default: {
                hasOldSpec: !1,
                virama: 0,
                basePos: "Last",
                rephPos: dt.Before_Post,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Devanagari: {
                hasOldSpec: !0,
                virama: 2381,
                basePos: "Last",
                rephPos: dt.Before_Post,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Bengali: {
                hasOldSpec: !0,
                virama: 2509,
                basePos: "Last",
                rephPos: dt.After_Sub,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Gurmukhi: {
                hasOldSpec: !0,
                virama: 2637,
                basePos: "Last",
                rephPos: dt.Before_Sub,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Gujarati: {
                hasOldSpec: !0,
                virama: 2765,
                basePos: "Last",
                rephPos: dt.Before_Post,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Oriya: {
                hasOldSpec: !0,
                virama: 2893,
                basePos: "Last",
                rephPos: dt.After_Main,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Tamil: {
                hasOldSpec: !0,
                virama: 3021,
                basePos: "Last",
                rephPos: dt.After_Post,
                rephMode: "Implicit",
                blwfMode: "Pre_And_Post"
              },
              Telugu: {
                hasOldSpec: !0,
                virama: 3149,
                basePos: "Last",
                rephPos: dt.After_Post,
                rephMode: "Explicit",
                blwfMode: "Post_Only"
              },
              Kannada: {
                hasOldSpec: !0,
                virama: 3277,
                basePos: "Last",
                rephPos: dt.After_Post,
                rephMode: "Implicit",
                blwfMode: "Post_Only"
              },
              Malayalam: {
                hasOldSpec: !0,
                virama: 3405,
                basePos: "Last",
                rephPos: dt.After_Main,
                rephMode: "Log_Repha",
                blwfMode: "Pre_And_Post"
              },
              // Handled by UniversalShaper
              // Sinhala: {
              //   hasOldSpec: false,
              //   virama: 0x0DCA,
              //   basePos: 'Last_Sinhala',
              //   rephPos: POSITIONS.After_Main,
              //   rephMode: 'Explicit',
              //   blwfMode: 'Pre_And_Post'
              // },
              Khmer: {
                hasOldSpec: !1,
                virama: 6098,
                basePos: "First",
                rephPos: dt.Ra_To_Become_Reph,
                rephMode: "Vis_Repha",
                blwfMode: "Pre_And_Post"
              }
            }, Yc = {
              // Khmer
              6078: [
                6081,
                6078
              ],
              6079: [
                6081,
                6079
              ],
              6080: [
                6081,
                6080
              ],
              6084: [
                6081,
                6084
              ],
              6085: [
                6081,
                6085
              ]
            }, { decompositions: Pc } = /* @__PURE__ */ T(ys), so = new (T(P))(Aa(" ")), vc = new (T(d))(/* @__PURE__ */ T(io));
            class Di extends Un {
              static planFeatures(i) {
                i.addStage(bc), i.addStage([
                  "locl",
                  "ccmp"
                ]), i.addStage(Tc), i.addStage("nukt"), i.addStage("akhn"), i.addStage("rphf", !1), i.addStage("rkrf"), i.addStage("pref", !1), i.addStage("blwf", !1), i.addStage("abvf", !1), i.addStage("half", !1), i.addStage("pstf", !1), i.addStage("vatu"), i.addStage("cjct"), i.addStage("cfar", !1), i.addStage(Uc), i.addStage({
                  local: [
                    "init"
                  ],
                  global: [
                    "pres",
                    "abvs",
                    "blws",
                    "psts",
                    "haln",
                    "dist",
                    "abvm",
                    "blwm",
                    "calt",
                    "clig"
                  ]
                }), i.unicodeScript = Ig(i.script), i.indicConfig = ro[i.unicodeScript] || ro.Default, i.isOldSpec = i.indicConfig.hasOldSpec && i.script[i.script.length - 1] !== "2";
              }
              static assignFeatures(i, u) {
                for (let m = u.length - 1; m >= 0; m--) {
                  let L = u[m].codePoints[0], Z = Yc[L] || Pc[L];
                  if (Z) {
                    let O = Z.map((PA) => {
                      let XA = i.font.glyphForCodePoint(PA);
                      return new tn(i.font, XA.id, [
                        PA
                      ], u[m].features);
                    });
                    u.splice(m, 1, ...O);
                  }
                }
              }
            }
            (0, a._)(Di, "zeroMarkWidths", "NONE");
            function Ba(BA) {
              return so.get(BA.codePoints[0]) >> 8;
            }
            function ao(BA) {
              return 1 << (so.get(BA.codePoints[0]) & 255);
            }
            class Fs {
              constructor(i, u, m, L) {
                this.category = i, this.position = u, this.syllableType = m, this.syllable = L;
              }
            }
            function bc(BA, i) {
              let u = 0, m = 0;
              for (let [L, Z, O] of vc.match(i.map(Ba))) {
                if (L > m) {
                  ++u;
                  for (let PA = m; PA < L; PA++) i[PA].shaperInfo = new Fs(Lt.X, dt.End, "non_indic_cluster", u);
                }
                ++u;
                for (let PA = L; PA <= Z; PA++) i[PA].shaperInfo = new Fs(1 << Ba(i[PA]), ao(i[PA]), O[0], u);
                m = Z + 1;
              }
              if (m < i.length) {
                ++u;
                for (let L = m; L < i.length; L++) i[L].shaperInfo = new Fs(Lt.X, dt.End, "non_indic_cluster", u);
              }
            }
            function Vn(BA) {
              return BA.shaperInfo.category & mc;
            }
            function cn(BA) {
              return BA.shaperInfo.category & no;
            }
            function Fn(BA) {
              return BA.shaperInfo.category & Xr;
            }
            function xn(BA, i) {
              for (let m of BA) m.features = {
                [i]: !0
              };
              return BA[0]._font._layoutEngine.engine.GSUBProcessor.applyFeatures([
                i
              ], BA), BA.length === 1;
            }
            function zc(BA, i, u) {
              let m = [
                u,
                i,
                u
              ];
              return xn(m.slice(0, 2), "blwf") || xn(m.slice(1, 3), "blwf") ? dt.Below_C : xn(m.slice(0, 2), "pstf") || xn(m.slice(1, 3), "pstf") || xn(m.slice(0, 2), "pref") || xn(m.slice(1, 3), "pref") ? dt.Post_C : dt.Base_C;
            }
            function Tc(BA, i, u) {
              let m = u.indicConfig, L = BA._layoutEngine.engine.GSUBProcessor.features, Z = BA.glyphForCodePoint(9676).id, O = BA.glyphForCodePoint(m.virama).id;
              if (O) {
                let PA = new tn(BA, O, [
                  m.virama
                ]);
                for (let XA = 0; XA < i.length; XA++) i[XA].shaperInfo.position === dt.Base_C && (i[XA].shaperInfo.position = zc(BA, i[XA].copy(), PA));
              }
              for (let PA = 0, XA = xs(i, 0); PA < i.length; PA = XA, XA = xs(i, PA)) {
                let { category: te, syllableType: ce } = i[PA].shaperInfo;
                if (ce === "symbol_cluster" || ce === "non_indic_cluster") continue;
                if (ce === "broken_cluster" && Z) {
                  let Ue = new tn(BA, Z, [
                    9676
                  ]);
                  Ue.shaperInfo = new Fs(1 << Ba(Ue), ao(Ue), i[PA].shaperInfo.syllableType, i[PA].shaperInfo.syllable);
                  let ht = PA;
                  for (; ht < XA && i[ht].shaperInfo.category === Lt.Repha; ) ht++;
                  i.splice(ht++, 0, Ue), XA++;
                }
                let ge = XA, Ge = PA, nt = !1;
                if (m.rephPos !== dt.Ra_To_Become_Reph && L.rphf && PA + 3 <= XA && (m.rephMode === "Implicit" && !cn(i[PA + 2]) || m.rephMode === "Explicit" && i[PA + 2].shaperInfo.category === Lt.ZWJ)) {
                  let Ue = [
                    i[PA].copy(),
                    i[PA + 1].copy(),
                    i[PA + 2].copy()
                  ];
                  if (xn(Ue.slice(0, 2), "rphf") || m.rephMode === "Explicit" && xn(Ue, "rphf")) {
                    for (Ge += 2; Ge < XA && cn(i[Ge]); ) Ge++;
                    ge = PA, nt = !0;
                  }
                } else if (m.rephMode === "Log_Repha" && i[PA].shaperInfo.category === Lt.Repha) {
                  for (Ge++; Ge < XA && cn(i[Ge]); ) Ge++;
                  ge = PA, nt = !0;
                }
                switch (m.basePos) {
                  case "Last": {
                    let Ue = XA, ht = !1;
                    do {
                      let Nt = i[--Ue].shaperInfo;
                      if (Vn(i[Ue])) {
                        if (Nt.position !== dt.Below_C && (Nt.position !== dt.Post_C || ht)) {
                          ge = Ue;
                          break;
                        }
                        Nt.position === dt.Below_C && (ht = !0), ge = Ue;
                      } else if (PA < Ue && Nt.category === Lt.ZWJ && i[Ue - 1].shaperInfo.category === Lt.H) break;
                    } while (Ue > Ge);
                    break;
                  }
                  case "First":
                    ge = PA;
                    for (let Ue = ge + 1; Ue < XA; Ue++) Vn(i[Ue]) && (i[Ue].shaperInfo.position = dt.Below_C);
                }
                nt && ge === PA && Ge - ge <= 2 && (nt = !1);
                for (let Ue = PA; Ue < ge; Ue++) {
                  let ht = i[Ue].shaperInfo;
                  ht.position = Math.min(dt.Pre_C, ht.position);
                }
                ge < XA && (i[ge].shaperInfo.position = dt.Base_C);
                for (let Ue = ge + 1; Ue < XA; Ue++) if (i[Ue].shaperInfo.category === Lt.M) {
                  for (let ht = Ue + 1; ht < XA; ht++) if (Vn(i[ht])) {
                    i[ht].shaperInfo.position = dt.Final_C;
                    break;
                  }
                  break;
                }
                if (nt && (i[PA].shaperInfo.position = dt.Ra_To_Become_Reph), u.isOldSpec) {
                  let Ue = u.unicodeScript !== "Malayalam";
                  for (let ht = ge + 1; ht < XA; ht++) if (i[ht].shaperInfo.category === Lt.H) {
                    let Nt;
                    for (Nt = XA - 1; Nt > ht && !(Vn(i[Nt]) || Ue && i[Nt].shaperInfo.category === Lt.H); Nt--)
                      ;
                    if (i[Nt].shaperInfo.category !== Lt.H && Nt > ht) {
                      let di = i[ht];
                      i.splice(ht, 0, ...i.splice(ht + 1, Nt - ht)), i[Nt] = di;
                    }
                    break;
                  }
                }
                let ot = dt.Start;
                for (let Ue = PA; Ue < XA; Ue++) {
                  let ht = i[Ue].shaperInfo;
                  if (ht.category & (no | Lt.N | Lt.RS | Lt.CM | Xr & ht.category)) {
                    if (ht.position = ot, ht.category === Lt.H && ht.position === dt.Pre_M) {
                      for (let Nt = Ue; Nt > PA; Nt--) if (i[Nt - 1].shaperInfo.position !== dt.Pre_M) {
                        ht.position = i[Nt - 1].shaperInfo.position;
                        break;
                      }
                    }
                  } else ht.position !== dt.SMVD && (ot = ht.position);
                }
                let Ut = ge;
                for (let Ue = ge + 1; Ue < XA; Ue++)
                  if (Vn(i[Ue])) {
                    for (let ht = Ut + 1; ht < Ue; ht++) i[ht].shaperInfo.position < dt.SMVD && (i[ht].shaperInfo.position = i[Ue].shaperInfo.position);
                    Ut = Ue;
                  } else i[Ue].shaperInfo.category === Lt.M && (Ut = Ue);
                let ui = i.slice(PA, XA);
                ui.sort((Ue, ht) => Ue.shaperInfo.position - ht.shaperInfo.position), i.splice(PA, ui.length, ...ui);
                for (let Ue = PA; Ue < XA; Ue++) if (i[Ue].shaperInfo.position === dt.Base_C) {
                  ge = Ue;
                  break;
                }
                for (let Ue = PA; Ue < XA && i[Ue].shaperInfo.position === dt.Ra_To_Become_Reph; Ue++) i[Ue].features.rphf = !0;
                let zt = !u.isOldSpec && m.blwfMode === "Pre_And_Post";
                for (let Ue = PA; Ue < ge; Ue++)
                  i[Ue].features.half = !0, zt && (i[Ue].features.blwf = !0);
                for (let Ue = ge + 1; Ue < XA; Ue++)
                  i[Ue].features.abvf = !0, i[Ue].features.pstf = !0, i[Ue].features.blwf = !0;
                if (u.isOldSpec && u.unicodeScript === "Devanagari")
                  for (let Ue = PA; Ue + 1 < ge; Ue++) i[Ue].shaperInfo.category === Lt.Ra && i[Ue + 1].shaperInfo.category === Lt.H && (Ue + 1 === ge || i[Ue + 2].shaperInfo.category === Lt.ZWJ) && (i[Ue].features.blwf = !0, i[Ue + 1].features.blwf = !0);
                let Jt = 2;
                if (L.pref && ge + Jt < XA)
                  for (let Ue = ge + 1; Ue + Jt - 1 < XA; Ue++) {
                    let ht = [
                      i[Ue].copy(),
                      i[Ue + 1].copy()
                    ];
                    if (xn(ht, "pref")) {
                      for (let Nt = 0; Nt < Jt; Nt++) i[Ue++].features.pref = !0;
                      if (L.cfar) for (; Ue < XA; Ue++) i[Ue].features.cfar = !0;
                      break;
                    }
                  }
                for (let Ue = PA + 1; Ue < XA; Ue++) if (cn(i[Ue])) {
                  let ht = i[Ue].shaperInfo.category === Lt.ZWNJ, Nt = Ue;
                  do
                    Nt--, ht && delete i[Nt].features.half;
                  while (Nt > PA && !Vn(i[Nt]));
                }
              }
            }
            function Uc(BA, i, u) {
              let m = u.indicConfig, L = BA._layoutEngine.engine.GSUBProcessor.features;
              for (let Z = 0, O = xs(i, 0); Z < i.length; Z = O, O = xs(i, Z)) {
                let PA = !!L.pref, XA = Z;
                for (; XA < O; XA++) if (i[XA].shaperInfo.position >= dt.Base_C) {
                  if (PA && XA + 1 < O) {
                    for (let te = XA + 1; te < O; te++) if (i[te].features.pref) {
                      if (!(i[te].substituted && i[te].isLigated && !i[te].isMultiplied)) {
                        for (XA = te; XA < O && Fn(i[XA]); ) XA++;
                        i[XA].shaperInfo.position = dt.BASE_C, PA = !1;
                      }
                      break;
                    }
                  }
                  if (u.unicodeScript === "Malayalam") for (let te = XA + 1; te < O; te++) {
                    for (; te < O && cn(i[te]); ) te++;
                    if (te === O || !Fn(i[te])) break;
                    for (te++; te < O && cn(i[te]); ) te++;
                    te < O && Vn(i[te]) && i[te].shaperInfo.position === dt.Below_C && (XA = te, i[XA].shaperInfo.position = dt.Base_C);
                  }
                  Z < XA && i[XA].shaperInfo.position > dt.Base_C && XA--;
                  break;
                }
                if (XA === O && Z < XA && i[XA - 1].shaperInfo.category === Lt.ZWJ && XA--, XA < O) for (; Z < XA && i[XA].shaperInfo.category & (Lt.N | Xr); ) XA--;
                if (Z + 1 < O && Z < XA) {
                  let te = XA === O ? XA - 2 : XA - 1;
                  if (u.unicodeScript !== "Malayalam" && u.unicodeScript !== "Tamil") {
                    for (; te > Z && !(i[te].shaperInfo.category & (Lt.M | Xr)); ) te--;
                    Fn(i[te]) && i[te].shaperInfo.position !== dt.Pre_M ? te + 1 < O && cn(i[te + 1]) && te++ : te = Z;
                  }
                  if (Z < te && i[te].shaperInfo.position !== dt.Pre_M) {
                    for (let ce = te; ce > Z; ce--) if (i[ce - 1].shaperInfo.position === dt.Pre_M) {
                      let ge = ce - 1;
                      ge < XA && XA <= te && XA--;
                      let Ge = i[ge];
                      i.splice(ge, 0, ...i.splice(ge + 1, te - ge)), i[te] = Ge, te--;
                    }
                  }
                }
                if (Z + 1 < O && i[Z].shaperInfo.position === dt.Ra_To_Become_Reph && i[Z].shaperInfo.category === Lt.Repha !== (i[Z].isLigated && !i[Z].isMultiplied)) {
                  let te, ce = m.rephPos, ge = !1;
                  if (ce !== dt.After_Post) {
                    for (te = Z + 1; te < XA && !Fn(i[te]); ) te++;
                    if (te < XA && Fn(i[te]) && (te + 1 < XA && cn(i[te + 1]) && te++, ge = !0), !ge && ce === dt.After_Main) {
                      for (te = XA; te + 1 < O && i[te + 1].shaperInfo.position <= dt.After_Main; ) te++;
                      ge = te < O;
                    }
                    if (!ge && ce === dt.After_Sub) {
                      for (te = XA; te + 1 < O && !(i[te + 1].shaperInfo.position & (dt.Post_C | dt.After_Post | dt.SMVD)); ) te++;
                      ge = te < O;
                    }
                  }
                  if (!ge) {
                    for (te = Z + 1; te < XA && !Fn(i[te]); ) te++;
                    te < XA && Fn(i[te]) && (te + 1 < XA && cn(i[te + 1]) && te++, ge = !0);
                  }
                  if (!ge) {
                    for (te = O - 1; te > Z && i[te].shaperInfo.position === dt.SMVD; ) te--;
                    if (Fn(i[te]))
                      for (let nt = XA + 1; nt < te; nt++) i[nt].shaperInfo.category === Lt.M && te--;
                  }
                  let Ge = i[Z];
                  i.splice(Z, 0, ...i.splice(Z + 1, te - Z)), i[te] = Ge, Z < XA && XA <= te && XA--;
                }
                if (PA && XA + 1 < O) {
                  for (let te = XA + 1; te < O; te++) if (i[te].features.pref) {
                    if (i[te].isLigated && !i[te].isMultiplied) {
                      let ce = XA;
                      if (u.unicodeScript !== "Malayalam" && u.unicodeScript !== "Tamil") {
                        for (; ce > Z && !(i[ce - 1].shaperInfo.category & (Lt.M | Xr)); ) ce--;
                        if (ce > Z && i[ce - 1].shaperInfo.category === Lt.M) {
                          let nt = te;
                          for (let ot = XA + 1; ot < nt; ot++) if (i[ot].shaperInfo.category === Lt.M) {
                            ce--;
                            break;
                          }
                        }
                      }
                      ce > Z && Fn(i[ce - 1]) && ce < O && cn(i[ce]) && ce++;
                      let ge = te, Ge = i[ge];
                      i.splice(ce + 1, 0, ...i.splice(ce, ge - ce)), i[ce] = Ge, ce <= XA && XA < ge && XA++;
                    }
                    break;
                  }
                }
                i[Z].shaperInfo.position === dt.Pre_M && (!Z || !/Cf|Mn/.test((0, N.getCategory)(i[Z - 1].codePoints[0]))) && (i[Z].features.init = !0);
              }
            }
            function xs(BA, i) {
              if (i >= BA.length) return i;
              let u = BA[i].shaperInfo.syllable;
              for (; ++i < BA.length && BA[i].shaperInfo.syllable === u; ) ;
              return i;
            }
            const { categories: Nc, decompositions: oo } = /* @__PURE__ */ T(ys), Rc = new (T(P))(Aa(" ")), Sc = new (T(d))(/* @__PURE__ */ T(ys));
            class Ht extends Un {
              static planFeatures(i) {
                i.addStage(Hc), i.addStage([
                  "locl",
                  "ccmp",
                  "nukt",
                  "akhn"
                ]), i.addStage(go), i.addStage([
                  "rphf"
                ], !1), i.addStage(Lc), i.addStage(go), i.addStage([
                  "pref"
                ]), i.addStage(kc), i.addStage([
                  "rkrf",
                  "abvf",
                  "blwf",
                  "half",
                  "pstf",
                  "vatu",
                  "cjct"
                ]), i.addStage(jc), i.addStage([
                  "abvs",
                  "blws",
                  "pres",
                  "psts",
                  "dist",
                  "abvm",
                  "blwm"
                ]);
              }
              static assignFeatures(i, u) {
                for (let m = u.length - 1; m >= 0; m--) {
                  let L = u[m].codePoints[0];
                  if (oo[L]) {
                    let Z = oo[L].map((O) => {
                      let PA = i.font.glyphForCodePoint(O);
                      return new tn(i.font, PA.id, [
                        O
                      ], u[m].features);
                    });
                    u.splice(m, 1, ...Z);
                  }
                }
              }
            }
            (0, a._)(Ht, "zeroMarkWidths", "BEFORE_GPOS");
            function Bo(BA) {
              return Rc.get(BA.codePoints[0]);
            }
            class Gc {
              constructor(i, u, m) {
                this.category = i, this.syllableType = u, this.syllable = m;
              }
            }
            function Hc(BA, i) {
              let u = 0;
              for (let [m, L, Z] of Sc.match(i.map(Bo))) {
                ++u;
                for (let PA = m; PA <= L; PA++) i[PA].shaperInfo = new Gc(Nc[Bo(i[PA])], Z[0], u);
                let O = i[m].shaperInfo.category === "R" ? 1 : Math.min(3, L - m);
                for (let PA = m; PA < m + O; PA++) i[PA].features.rphf = !0;
              }
            }
            function go(BA, i) {
              for (let u of i) u.substituted = !1;
            }
            function Lc(BA, i) {
              for (let u of i) u.substituted && u.features.rphf && (u.shaperInfo.category = "R");
            }
            function kc(BA, i) {
              for (let u of i) u.substituted && (u.shaperInfo.category = "VPre");
            }
            function jc(BA, i) {
              let u = BA.glyphForCodePoint(9676).id;
              for (let m = 0, L = co(i, 0); m < i.length; m = L, L = co(i, m)) {
                let Z, O, PA = i[m].shaperInfo, XA = PA.syllableType;
                if (!(XA !== "virama_terminated_cluster" && XA !== "standard_cluster" && XA !== "broken_cluster")) {
                  if (XA === "broken_cluster" && u) {
                    let te = new tn(BA, u, [
                      9676
                    ]);
                    for (te.shaperInfo = PA, Z = m; Z < L && i[Z].shaperInfo.category === "R"; Z++) ;
                    i.splice(++Z, 0, te), L++;
                  }
                  if (PA.category === "R" && L - m > 1) {
                    for (Z = m + 1; Z < L; Z++)
                      if (PA = i[Z].shaperInfo, lo(PA) || ps(i[Z])) {
                        ps(i[Z]) && Z--, i.splice(m, 0, ...i.splice(m + 1, Z - m), i[Z]);
                        break;
                      }
                  }
                  for (Z = m, O = L; Z < L; Z++)
                    PA = i[Z].shaperInfo, lo(PA) || ps(i[Z]) ? O = ps(i[Z]) ? Z + 1 : Z : (PA.category === "VPre" || PA.category === "VMPre") && O < Z && i.splice(O, 1, i[Z], ...i.splice(O, Z - O));
                }
              }
            }
            function co(BA, i) {
              if (i >= BA.length) return i;
              let u = BA[i].shaperInfo.syllable;
              for (; ++i < BA.length && BA[i].shaperInfo.syllable === u; ) ;
              return i;
            }
            function ps(BA) {
              return BA.shaperInfo.category === "H" && !BA.isLigated;
            }
            function lo(BA) {
              return BA.category === "B" || BA.category === "GB";
            }
            const Oc = {
              arab: Rn,
              mong: Rn,
              syrc: Rn,
              "nko ": Rn,
              phag: Rn,
              mand: Rn,
              mani: Rn,
              phlp: Rn,
              hang: _a,
              bng2: Di,
              beng: Di,
              dev2: Di,
              deva: Di,
              gjr2: Di,
              gujr: Di,
              guru: Di,
              gur2: Di,
              knda: Di,
              knd2: Di,
              mlm2: Di,
              mlym: Di,
              ory2: Di,
              orya: Di,
              taml: Di,
              tml2: Di,
              telu: Di,
              tel2: Di,
              khmr: Di,
              bali: Ht,
              batk: Ht,
              brah: Ht,
              bugi: Ht,
              buhd: Ht,
              cakm: Ht,
              cham: Ht,
              dupl: Ht,
              egyp: Ht,
              gran: Ht,
              hano: Ht,
              java: Ht,
              kthi: Ht,
              kali: Ht,
              khar: Ht,
              khoj: Ht,
              sind: Ht,
              lepc: Ht,
              limb: Ht,
              mahj: Ht,
              // mand: UniversalShaper, // Mandaic
              // mani: UniversalShaper, // Manichaean
              mtei: Ht,
              modi: Ht,
              // mong: UniversalShaper, // Mongolian
              // 'nko ': UniversalShaper, // N’Ko
              hmng: Ht,
              // phag: UniversalShaper, // Phags-pa
              // phlp: UniversalShaper, // Psalter Pahlavi
              rjng: Ht,
              saur: Ht,
              shrd: Ht,
              sidd: Ht,
              sinh: Di,
              sund: Ht,
              sylo: Ht,
              tglg: Ht,
              tagb: Ht,
              tale: Ht,
              lana: Ht,
              tavt: Ht,
              takr: Ht,
              tibt: Ht,
              tfng: Ht,
              tirh: Ht,
              latn: Un,
              DFLT: Un
            };
            function Jc(BA) {
              Array.isArray(BA) || (BA = [
                BA
              ]);
              for (let i of BA) {
                let u = Oc[i];
                if (u) return u;
              }
              return Un;
            }
            class Kc extends Qs {
              applyLookup(i, u) {
                switch (i) {
                  case 1: {
                    let L = this.coverageIndex(u.coverage);
                    if (L === -1) return !1;
                    let Z = this.glyphIterator.cur;
                    switch (u.version) {
                      case 1:
                        Z.id = Z.id + u.deltaGlyphID & 65535;
                        break;
                      case 2:
                        Z.id = u.substitute.get(L);
                        break;
                    }
                    return !0;
                  }
                  case 2: {
                    let L = this.coverageIndex(u.coverage);
                    if (L !== -1) {
                      let Z = u.sequences.get(L);
                      if (Z.length === 0)
                        return this.glyphs.splice(this.glyphIterator.index, 1), !0;
                      this.glyphIterator.cur.id = Z[0], this.glyphIterator.cur.ligatureComponent = 0;
                      let O = this.glyphIterator.cur.features, PA = this.glyphIterator.cur, XA = Z.slice(1).map((te, ce) => {
                        let ge = new tn(this.font, te, void 0, O);
                        return ge.shaperInfo = PA.shaperInfo, ge.isLigated = PA.isLigated, ge.ligatureComponent = ce + 1, ge.substituted = !0, ge.isMultiplied = !0, ge;
                      });
                      return this.glyphs.splice(this.glyphIterator.index + 1, 0, ...XA), !0;
                    }
                    return !1;
                  }
                  case 3: {
                    let L = this.coverageIndex(u.coverage);
                    if (L !== -1) {
                      let Z = 0;
                      return this.glyphIterator.cur.id = u.alternateSet.get(L)[Z], !0;
                    }
                    return !1;
                  }
                  case 4: {
                    let L = this.coverageIndex(u.coverage);
                    if (L === -1) return !1;
                    for (let Z of u.ligatureSets.get(L)) {
                      let O = this.sequenceMatchIndices(1, Z.components);
                      if (!O) continue;
                      let PA = this.glyphIterator.cur, XA = PA.codePoints.slice();
                      for (let Ut of O) XA.push(...this.glyphs[Ut].codePoints);
                      let te = new tn(this.font, Z.glyph, XA, PA.features);
                      te.shaperInfo = PA.shaperInfo, te.isLigated = !0, te.substituted = !0;
                      let ce = PA.isMark;
                      for (let Ut = 0; Ut < O.length && ce; Ut++) ce = this.glyphs[O[Ut]].isMark;
                      te.ligatureID = ce ? null : this.ligatureID++;
                      let ge = PA.ligatureID, Ge = PA.codePoints.length, nt = Ge, ot = this.glyphIterator.index + 1;
                      for (let Ut of O) {
                        if (ce) ot = Ut;
                        else for (; ot < Ut; ) {
                          var m = nt - Ge + Math.min(this.glyphs[ot].ligatureComponent || 1, Ge);
                          this.glyphs[ot].ligatureID = te.ligatureID, this.glyphs[ot].ligatureComponent = m, ot++;
                        }
                        ge = this.glyphs[ot].ligatureID, Ge = this.glyphs[ot].codePoints.length, nt += Ge, ot++;
                      }
                      if (ge && !ce) for (let Ut = ot; Ut < this.glyphs.length && this.glyphs[Ut].ligatureID === ge; Ut++) {
                        var m = nt - Ge + Math.min(this.glyphs[Ut].ligatureComponent || 1, Ge);
                        this.glyphs[Ut].ligatureComponent = m;
                      }
                      for (let Ut = O.length - 1; Ut >= 0; Ut--) this.glyphs.splice(O[Ut], 1);
                      return this.glyphs[this.glyphIterator.index] = te, !0;
                    }
                    return !1;
                  }
                  case 5:
                    return this.applyContext(u);
                  case 6:
                    return this.applyChainingContext(u);
                  case 7:
                    return this.applyLookup(u.lookupType, u.extension);
                  default:
                    throw new Error(`GSUB lookupType ${i} is not supported`);
                }
              }
            }
            class Wc extends Qs {
              applyPositionValue(i, u) {
                let m = this.positions[this.glyphIterator.peekIndex(i)];
                u.xAdvance != null && (m.xAdvance += u.xAdvance), u.yAdvance != null && (m.yAdvance += u.yAdvance), u.xPlacement != null && (m.xOffset += u.xPlacement), u.yPlacement != null && (m.yOffset += u.yPlacement);
                let L = this.font._variationProcessor, Z = this.font.GDEF && this.font.GDEF.itemVariationStore;
                L && Z && (u.xPlaDevice && (m.xOffset += L.getDelta(Z, u.xPlaDevice.a, u.xPlaDevice.b)), u.yPlaDevice && (m.yOffset += L.getDelta(Z, u.yPlaDevice.a, u.yPlaDevice.b)), u.xAdvDevice && (m.xAdvance += L.getDelta(Z, u.xAdvDevice.a, u.xAdvDevice.b)), u.yAdvDevice && (m.yAdvance += L.getDelta(Z, u.yAdvDevice.a, u.yAdvDevice.b)));
              }
              applyLookup(i, u) {
                switch (i) {
                  case 1: {
                    let L = this.coverageIndex(u.coverage);
                    if (L === -1) return !1;
                    switch (u.version) {
                      case 1:
                        this.applyPositionValue(0, u.value);
                        break;
                      case 2:
                        this.applyPositionValue(0, u.values.get(L));
                        break;
                    }
                    return !0;
                  }
                  case 2: {
                    let L = this.glyphIterator.peek();
                    if (!L) return !1;
                    let Z = this.coverageIndex(u.coverage);
                    if (Z === -1) return !1;
                    switch (u.version) {
                      case 1:
                        let O = u.pairSets.get(Z);
                        for (let te of O) if (te.secondGlyph === L.id)
                          return this.applyPositionValue(0, te.value1), this.applyPositionValue(1, te.value2), !0;
                        return !1;
                      case 2:
                        let PA = this.getClassID(this.glyphIterator.cur.id, u.classDef1), XA = this.getClassID(L.id, u.classDef2);
                        if (PA === -1 || XA === -1) return !1;
                        var m = u.classRecords.get(PA).get(XA);
                        return this.applyPositionValue(0, m.value1), this.applyPositionValue(1, m.value2), !0;
                    }
                  }
                  case 3: {
                    let L = this.glyphIterator.peekIndex(), Z = this.glyphs[L];
                    if (!Z) return !1;
                    let O = u.entryExitRecords[this.coverageIndex(u.coverage)];
                    if (!O || !O.exitAnchor) return !1;
                    let PA = u.entryExitRecords[this.coverageIndex(u.coverage, Z.id)];
                    if (!PA || !PA.entryAnchor) return !1;
                    let XA = this.getAnchor(PA.entryAnchor), te = this.getAnchor(O.exitAnchor), ce = this.positions[this.glyphIterator.index], ge = this.positions[L], Ge;
                    switch (this.direction) {
                      case "ltr":
                        ce.xAdvance = te.x + ce.xOffset, Ge = XA.x + ge.xOffset, ge.xAdvance -= Ge, ge.xOffset -= Ge;
                        break;
                      case "rtl":
                        Ge = te.x + ce.xOffset, ce.xAdvance -= Ge, ce.xOffset -= Ge, ge.xAdvance = XA.x + ge.xOffset;
                        break;
                    }
                    return this.glyphIterator.flags.rightToLeft ? (this.glyphIterator.cur.cursiveAttachment = L, ce.yOffset = XA.y - te.y) : (Z.cursiveAttachment = this.glyphIterator.index, ce.yOffset = te.y - XA.y), !0;
                  }
                  case 4: {
                    let L = this.coverageIndex(u.markCoverage);
                    if (L === -1) return !1;
                    let Z = this.glyphIterator.index;
                    for (; --Z >= 0 && (this.glyphs[Z].isMark || this.glyphs[Z].ligatureComponent > 0); ) ;
                    if (Z < 0) return !1;
                    let O = this.coverageIndex(u.baseCoverage, this.glyphs[Z].id);
                    if (O === -1) return !1;
                    let PA = u.markArray[L], XA = u.baseArray[O][PA.class];
                    return this.applyAnchor(PA, XA, Z), !0;
                  }
                  case 5: {
                    let L = this.coverageIndex(u.markCoverage);
                    if (L === -1) return !1;
                    let Z = this.glyphIterator.index;
                    for (; --Z >= 0 && this.glyphs[Z].isMark; ) ;
                    if (Z < 0) return !1;
                    let O = this.coverageIndex(u.ligatureCoverage, this.glyphs[Z].id);
                    if (O === -1) return !1;
                    let PA = u.ligatureArray[O], XA = this.glyphIterator.cur, te = this.glyphs[Z], ce = te.ligatureID && te.ligatureID === XA.ligatureID && XA.ligatureComponent > 0 ? Math.min(XA.ligatureComponent, te.codePoints.length) - 1 : te.codePoints.length - 1, ge = u.markArray[L], Ge = PA[ce][ge.class];
                    return this.applyAnchor(ge, Ge, Z), !0;
                  }
                  case 6: {
                    let L = this.coverageIndex(u.mark1Coverage);
                    if (L === -1) return !1;
                    let Z = this.glyphIterator.peekIndex(-1), O = this.glyphs[Z];
                    if (!O || !O.isMark) return !1;
                    let PA = this.glyphIterator.cur, XA = !1;
                    if (PA.ligatureID === O.ligatureID ? PA.ligatureID ? PA.ligatureComponent === O.ligatureComponent && (XA = !0) : XA = !0 : (PA.ligatureID && !PA.ligatureComponent || O.ligatureID && !O.ligatureComponent) && (XA = !0), !XA) return !1;
                    let te = this.coverageIndex(u.mark2Coverage, O.id);
                    if (te === -1) return !1;
                    let ce = u.mark1Array[L], ge = u.mark2Array[te][ce.class];
                    return this.applyAnchor(ce, ge, Z), !0;
                  }
                  case 7:
                    return this.applyContext(u);
                  case 8:
                    return this.applyChainingContext(u);
                  case 9:
                    return this.applyLookup(u.lookupType, u.extension);
                  default:
                    throw new Error(`Unsupported GPOS table: ${i}`);
                }
              }
              applyAnchor(i, u, m) {
                let L = this.getAnchor(u), Z = this.getAnchor(i.markAnchor);
                this.positions[m];
                let O = this.positions[this.glyphIterator.index];
                O.xOffset = L.x - Z.x, O.yOffset = L.y - Z.y, this.glyphIterator.cur.markAttachment = m;
              }
              getAnchor(i) {
                let u = i.xCoordinate, m = i.yCoordinate, L = this.font._variationProcessor, Z = this.font.GDEF && this.font.GDEF.itemVariationStore;
                return L && Z && (i.xDeviceTable && (u += L.getDelta(Z, i.xDeviceTable.a, i.xDeviceTable.b)), i.yDeviceTable && (m += L.getDelta(Z, i.yDeviceTable.a, i.yDeviceTable.b))), {
                  x: u,
                  y: m
                };
              }
              applyFeatures(i, u, m) {
                super.applyFeatures(i, u, m);
                for (var L = 0; L < this.glyphs.length; L++) this.fixCursiveAttachment(L);
                this.fixMarkAttachment();
              }
              fixCursiveAttachment(i) {
                let u = this.glyphs[i];
                if (u.cursiveAttachment != null) {
                  let m = u.cursiveAttachment;
                  u.cursiveAttachment = null, this.fixCursiveAttachment(m), this.positions[i].yOffset += this.positions[m].yOffset;
                }
              }
              fixMarkAttachment() {
                for (let i = 0; i < this.glyphs.length; i++) {
                  let u = this.glyphs[i];
                  if (u.markAttachment != null) {
                    let m = u.markAttachment;
                    if (this.positions[i].xOffset += this.positions[m].xOffset, this.positions[i].yOffset += this.positions[m].yOffset, this.direction === "ltr") for (let L = m; L < i; L++)
                      this.positions[i].xOffset -= this.positions[L].xAdvance, this.positions[i].yOffset -= this.positions[L].yAdvance;
                    else for (let L = m + 1; L < i + 1; L++)
                      this.positions[i].xOffset += this.positions[L].xAdvance, this.positions[i].yOffset += this.positions[L].yAdvance;
                  }
                }
              }
            }
            class Vc {
              setup(i) {
                this.glyphInfos = i.glyphs.map((m) => new tn(this.font, m.id, [
                  ...m.codePoints
                ]));
                let u = null;
                this.GPOSProcessor && (u = this.GPOSProcessor.selectScript(i.script, i.language, i.direction)), this.GSUBProcessor && (u = this.GSUBProcessor.selectScript(i.script, i.language, i.direction)), this.shaper = Jc(u), this.plan = new Vg(this.font, u, i.direction), this.shaper.plan(this.plan, this.glyphInfos, i.features);
                for (let m in this.plan.allFeatures) i.features[m] = !0;
              }
              substitute(i) {
                this.GSUBProcessor && (this.plan.process(this.GSUBProcessor, this.glyphInfos), i.glyphs = this.glyphInfos.map((u) => this.font.getGlyph(u.id, u.codePoints)));
              }
              position(i) {
                return this.shaper.zeroMarkWidths === "BEFORE_GPOS" && this.zeroMarkAdvances(i.positions), this.GPOSProcessor && this.plan.process(this.GPOSProcessor, this.glyphInfos, i.positions), this.shaper.zeroMarkWidths === "AFTER_GPOS" && this.zeroMarkAdvances(i.positions), i.direction === "rtl" && (i.glyphs.reverse(), i.positions.reverse()), this.GPOSProcessor && this.GPOSProcessor.features;
              }
              zeroMarkAdvances(i) {
                for (let u = 0; u < this.glyphInfos.length; u++) this.glyphInfos[u].isMark && (i[u].xAdvance = 0, i[u].yAdvance = 0);
              }
              cleanup() {
                this.glyphInfos = null, this.plan = null, this.shaper = null;
              }
              getAvailableFeatures(i, u) {
                let m = [];
                return this.GSUBProcessor && (this.GSUBProcessor.selectScript(i, u), m.push(...Object.keys(this.GSUBProcessor.features))), this.GPOSProcessor && (this.GPOSProcessor.selectScript(i, u), m.push(...Object.keys(this.GPOSProcessor.features))), m;
              }
              constructor(i) {
                this.font = i, this.glyphInfos = null, this.plan = null, this.GSUBProcessor = null, this.GPOSProcessor = null, this.fallbackPosition = !0, i.GSUB && (this.GSUBProcessor = new Kc(i, i.GSUB)), i.GPOS && (this.GPOSProcessor = new Wc(i, i.GPOS));
              }
            }
            class Xc {
              layout(i, u, m, L, Z) {
                if (typeof u == "string" && (Z = L, L = m, m = u, u = []), typeof i == "string") {
                  m == null && (m = yg(i));
                  var O = this.font.glyphsForString(i);
                } else {
                  if (m == null) {
                    let te = [];
                    for (let ce of i) te.push(...ce.codePoints);
                    m = Fg(te);
                  }
                  var O = i;
                }
                let PA = new pg(O, u, m, L, Z);
                return O.length === 0 ? (PA.positions = [], PA) : (this.engine && this.engine.setup && this.engine.setup(PA), this.substitute(PA), this.position(PA), this.hideDefaultIgnorables(PA.glyphs, PA.positions), this.engine && this.engine.cleanup && this.engine.cleanup(), PA);
              }
              substitute(i) {
                this.engine && this.engine.substitute && this.engine.substitute(i);
              }
              position(i) {
                i.positions = i.glyphs.map((m) => new mg(m.advanceWidth));
                let u = null;
                this.engine && this.engine.position && (u = this.engine.position(i)), !u && (!this.engine || this.engine.fallbackPosition) && (this.unicodeLayoutEngine || (this.unicodeLayoutEngine = new dg(this.font)), this.unicodeLayoutEngine.positionGlyphs(i.glyphs, i.positions)), (!u || !u.kern) && i.features.kern !== !1 && this.font.kern && (this.kernProcessor || (this.kernProcessor = new Dg(this.font)), this.kernProcessor.process(i.glyphs, i.positions), i.features.kern = !0);
              }
              hideDefaultIgnorables(i, u) {
                let m = this.font.glyphForCodePoint(32);
                for (let L = 0; L < i.length; L++) this.isDefaultIgnorable(i[L].codePoints[0]) && (i[L] = m, u[L].xAdvance = 0, u[L].yAdvance = 0);
              }
              isDefaultIgnorable(i) {
                let u = i >> 16;
                if (u === 0)
                  switch (i >> 8) {
                    case 0:
                      return i === 173;
                    case 3:
                      return i === 847;
                    case 6:
                      return i === 1564;
                    case 23:
                      return 6068 <= i && i <= 6069;
                    case 24:
                      return 6155 <= i && i <= 6158;
                    case 32:
                      return 8203 <= i && i <= 8207 || 8234 <= i && i <= 8238 || 8288 <= i && i <= 8303;
                    case 254:
                      return 65024 <= i && i <= 65039 || i === 65279;
                    case 255:
                      return 65520 <= i && i <= 65528;
                    default:
                      return !1;
                  }
                else
                  switch (u) {
                    case 1:
                      return 113824 <= i && i <= 113827 || 119155 <= i && i <= 119162;
                    case 14:
                      return 917504 <= i && i <= 921599;
                    default:
                      return !1;
                  }
              }
              getAvailableFeatures(i, u) {
                let m = [];
                return this.engine && m.push(...this.engine.getAvailableFeatures(i, u)), this.font.kern && m.indexOf("kern") === -1 && m.push("kern"), m;
              }
              stringsForGlyph(i) {
                let u = /* @__PURE__ */ new Set(), m = this.font._cmapProcessor.codePointsForGlyph(i);
                for (let L of m) u.add(String.fromCodePoint(L));
                if (this.engine && this.engine.stringsForGlyph) for (let L of this.engine.stringsForGlyph(i)) u.add(L);
                return Array.from(u);
              }
              constructor(i) {
                this.font = i, this.unicodeLayoutEngine = null, this.kernProcessor = null, this.font.morx ? this.engine = new Wg(this.font) : (this.font.GSUB || this.font.GPOS) && (this.engine = new Vc(this.font));
              }
            }
            const Zc = {
              moveTo: "M",
              lineTo: "L",
              quadraticCurveTo: "Q",
              bezierCurveTo: "C",
              closePath: "Z"
            };
            class lr {
              /**
              * Compiles the path to a JavaScript function that can be applied with
              * a graphics context in order to render the path.
              * @return {string}
              */
              toFunction() {
                return (i) => {
                  this.commands.forEach((u) => i[u.command].apply(i, u.args));
                };
              }
              /**
              * Converts the path to an SVG path data string
              * @return {string}
              */
              toSVG() {
                return this.commands.map((u) => {
                  let m = u.args.map((L) => Math.round(L * 100) / 100);
                  return `${Zc[u.command]}${m.join(" ")}`;
                }).join("");
              }
              /**
              * Gets the "control box" of a path.
              * This is like the bounding box, but it includes all points including
              * control points of bezier segments and is much faster to compute than
              * the real bounding box.
              * @type {BBox}
              */
              get cbox() {
                if (!this._cbox) {
                  let i = new Tn();
                  for (let u of this.commands) for (let m = 0; m < u.args.length; m += 2) i.addPoint(u.args[m], u.args[m + 1]);
                  this._cbox = Object.freeze(i);
                }
                return this._cbox;
              }
              /**
              * Gets the exact bounding box of the path by evaluating curve segments.
              * Slower to compute than the control box, but more accurate.
              * @type {BBox}
              */
              get bbox() {
                if (this._bbox) return this._bbox;
                let i = new Tn(), u = 0, m = 0, L = (Jt) => Math.pow(1 - Jt, 3) * nt[zt] + 3 * Math.pow(1 - Jt, 2) * Jt * ot[zt] + 3 * (1 - Jt) * Math.pow(Jt, 2) * Ut[zt] + Math.pow(Jt, 3) * ui[zt];
                for (let Jt of this.commands) switch (Jt.command) {
                  case "moveTo":
                  case "lineTo":
                    let [Ue, ht] = Jt.args;
                    i.addPoint(Ue, ht), u = Ue, m = ht;
                    break;
                  case "quadraticCurveTo":
                  case "bezierCurveTo":
                    if (Jt.command === "quadraticCurveTo")
                      var [Z, O, ge, Ge] = Jt.args, PA = u + 2 / 3 * (Z - u), XA = m + 2 / 3 * (O - m), te = ge + 2 / 3 * (Z - ge), ce = Ge + 2 / 3 * (O - Ge);
                    else var [PA, XA, te, ce, ge, Ge] = Jt.args;
                    i.addPoint(ge, Ge);
                    for (var nt = [
                      u,
                      m
                    ], ot = [
                      PA,
                      XA
                    ], Ut = [
                      te,
                      ce
                    ], ui = [
                      ge,
                      Ge
                    ], zt = 0; zt <= 1; zt++) {
                      let Nt = 6 * nt[zt] - 12 * ot[zt] + 6 * Ut[zt], di = -3 * nt[zt] + 9 * ot[zt] - 9 * Ut[zt] + 3 * ui[zt];
                      if (Jt = 3 * ot[zt] - 3 * nt[zt], di === 0) {
                        if (Nt === 0) continue;
                        let ai = -Jt / Nt;
                        0 < ai && ai < 1 && (zt === 0 ? i.addPoint(L(ai), i.maxY) : zt === 1 && i.addPoint(i.maxX, L(ai)));
                        continue;
                      }
                      let vi = Math.pow(Nt, 2) - 4 * Jt * di;
                      if (vi < 0) continue;
                      let ii = (-Nt + Math.sqrt(vi)) / (2 * di);
                      0 < ii && ii < 1 && (zt === 0 ? i.addPoint(L(ii), i.maxY) : zt === 1 && i.addPoint(i.maxX, L(ii)));
                      let Zi = (-Nt - Math.sqrt(vi)) / (2 * di);
                      0 < Zi && Zi < 1 && (zt === 0 ? i.addPoint(L(Zi), i.maxY) : zt === 1 && i.addPoint(i.maxX, L(Zi)));
                    }
                    u = ge, m = Ge;
                    break;
                }
                return this._bbox = Object.freeze(i);
              }
              /**
              * Applies a mapping function to each point in the path.
              * @param {function} fn
              * @return {Path}
              */
              mapPoints(i) {
                let u = new lr();
                for (let m of this.commands) {
                  let L = [];
                  for (let Z = 0; Z < m.args.length; Z += 2) {
                    let [O, PA] = i(m.args[Z], m.args[Z + 1]);
                    L.push(O, PA);
                  }
                  u[m.command](...L);
                }
                return u;
              }
              /**
              * Transforms the path by the given matrix.
              */
              transform(i, u, m, L, Z, O) {
                return this.mapPoints((PA, XA) => {
                  const te = i * PA + m * XA + Z, ce = u * PA + L * XA + O;
                  return [
                    te,
                    ce
                  ];
                });
              }
              /**
              * Translates the path by the given offset.
              */
              translate(i, u) {
                return this.transform(1, 0, 0, 1, i, u);
              }
              /**
              * Rotates the path by the given angle (in radians).
              */
              rotate(i) {
                let u = Math.cos(i), m = Math.sin(i);
                return this.transform(u, m, -m, u, 0, 0);
              }
              /**
              * Scales the path.
              */
              scale(i, u = i) {
                return this.transform(i, 0, 0, u, 0, 0);
              }
              constructor() {
                this.commands = [], this._bbox = null, this._cbox = null;
              }
            }
            for (let BA of [
              "moveTo",
              "lineTo",
              "quadraticCurveTo",
              "bezierCurveTo",
              "closePath"
            ]) lr.prototype[BA] = function(...i) {
              return this._bbox = this._cbox = null, this.commands.push({
                command: BA,
                args: i
              }), this;
            };
            var Zr = [
              ".notdef",
              ".null",
              "nonmarkingreturn",
              "space",
              "exclam",
              "quotedbl",
              "numbersign",
              "dollar",
              "percent",
              "ampersand",
              "quotesingle",
              "parenleft",
              "parenright",
              "asterisk",
              "plus",
              "comma",
              "hyphen",
              "period",
              "slash",
              "zero",
              "one",
              "two",
              "three",
              "four",
              "five",
              "six",
              "seven",
              "eight",
              "nine",
              "colon",
              "semicolon",
              "less",
              "equal",
              "greater",
              "question",
              "at",
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "H",
              "I",
              "J",
              "K",
              "L",
              "M",
              "N",
              "O",
              "P",
              "Q",
              "R",
              "S",
              "T",
              "U",
              "V",
              "W",
              "X",
              "Y",
              "Z",
              "bracketleft",
              "backslash",
              "bracketright",
              "asciicircum",
              "underscore",
              "grave",
              "a",
              "b",
              "c",
              "d",
              "e",
              "f",
              "g",
              "h",
              "i",
              "j",
              "k",
              "l",
              "m",
              "n",
              "o",
              "p",
              "q",
              "r",
              "s",
              "t",
              "u",
              "v",
              "w",
              "x",
              "y",
              "z",
              "braceleft",
              "bar",
              "braceright",
              "asciitilde",
              "Adieresis",
              "Aring",
              "Ccedilla",
              "Eacute",
              "Ntilde",
              "Odieresis",
              "Udieresis",
              "aacute",
              "agrave",
              "acircumflex",
              "adieresis",
              "atilde",
              "aring",
              "ccedilla",
              "eacute",
              "egrave",
              "ecircumflex",
              "edieresis",
              "iacute",
              "igrave",
              "icircumflex",
              "idieresis",
              "ntilde",
              "oacute",
              "ograve",
              "ocircumflex",
              "odieresis",
              "otilde",
              "uacute",
              "ugrave",
              "ucircumflex",
              "udieresis",
              "dagger",
              "degree",
              "cent",
              "sterling",
              "section",
              "bullet",
              "paragraph",
              "germandbls",
              "registered",
              "copyright",
              "trademark",
              "acute",
              "dieresis",
              "notequal",
              "AE",
              "Oslash",
              "infinity",
              "plusminus",
              "lessequal",
              "greaterequal",
              "yen",
              "mu",
              "partialdiff",
              "summation",
              "product",
              "pi",
              "integral",
              "ordfeminine",
              "ordmasculine",
              "Omega",
              "ae",
              "oslash",
              "questiondown",
              "exclamdown",
              "logicalnot",
              "radical",
              "florin",
              "approxequal",
              "Delta",
              "guillemotleft",
              "guillemotright",
              "ellipsis",
              "nonbreakingspace",
              "Agrave",
              "Atilde",
              "Otilde",
              "OE",
              "oe",
              "endash",
              "emdash",
              "quotedblleft",
              "quotedblright",
              "quoteleft",
              "quoteright",
              "divide",
              "lozenge",
              "ydieresis",
              "Ydieresis",
              "fraction",
              "currency",
              "guilsinglleft",
              "guilsinglright",
              "fi",
              "fl",
              "daggerdbl",
              "periodcentered",
              "quotesinglbase",
              "quotedblbase",
              "perthousand",
              "Acircumflex",
              "Ecircumflex",
              "Aacute",
              "Edieresis",
              "Egrave",
              "Iacute",
              "Icircumflex",
              "Idieresis",
              "Igrave",
              "Oacute",
              "Ocircumflex",
              "apple",
              "Ograve",
              "Uacute",
              "Ucircumflex",
              "Ugrave",
              "dotlessi",
              "circumflex",
              "tilde",
              "macron",
              "breve",
              "dotaccent",
              "ring",
              "cedilla",
              "hungarumlaut",
              "ogonek",
              "caron",
              "Lslash",
              "lslash",
              "Scaron",
              "scaron",
              "Zcaron",
              "zcaron",
              "brokenbar",
              "Eth",
              "eth",
              "Yacute",
              "yacute",
              "Thorn",
              "thorn",
              "minus",
              "multiply",
              "onesuperior",
              "twosuperior",
              "threesuperior",
              "onehalf",
              "onequarter",
              "threequarters",
              "franc",
              "Gbreve",
              "gbreve",
              "Idotaccent",
              "Scedilla",
              "scedilla",
              "Cacute",
              "cacute",
              "Ccaron",
              "ccaron",
              "dcroat"
            ];
            class ln {
              _getPath() {
                return new lr();
              }
              _getCBox() {
                return this.path.cbox;
              }
              _getBBox() {
                return this.path.bbox;
              }
              _getTableMetrics(i) {
                if (this.id < i.metrics.length) return i.metrics.get(this.id);
                let u = i.metrics.get(i.metrics.length - 1);
                return {
                  advance: u ? u.advance : 0,
                  bearing: i.bearings.get(this.id - i.metrics.length) || 0
                };
              }
              _getMetrics(i) {
                if (this._metrics) return this._metrics;
                let { advance: u, bearing: m } = this._getTableMetrics(this._font.hmtx);
                if (this._font.vmtx) var { advance: L, bearing: Z } = this._getTableMetrics(this._font.vmtx);
                else {
                  let O;
                  if ((typeof i > "u" || i === null) && ({ cbox: i } = this), (O = this._font["OS/2"]) && O.version > 0)
                    var L = Math.abs(O.typoAscender - O.typoDescender), Z = O.typoAscender - i.maxY;
                  else {
                    let { hhea: PA } = this._font;
                    var L = Math.abs(PA.ascent - PA.descent), Z = PA.ascent - i.maxY;
                  }
                }
                return this._font._variationProcessor && this._font.HVAR && (u += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR)), this._metrics = {
                  advanceWidth: u,
                  advanceHeight: L,
                  leftBearing: m,
                  topBearing: Z
                };
              }
              /**
              * The glyph’s control box.
              * This is often the same as the bounding box, but is faster to compute.
              * Because of the way bezier curves are defined, some of the control points
              * can be outside of the bounding box. Where `bbox` takes this into account,
              * `cbox` does not. Thus, cbox is less accurate, but faster to compute.
              * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)
              * for a more detailed description.
              *
              * @type {BBox}
              */
              get cbox() {
                return this._getCBox();
              }
              /**
              * The glyph’s bounding box, i.e. the rectangle that encloses the
              * glyph outline as tightly as possible.
              * @type {BBox}
              */
              get bbox() {
                return this._getBBox();
              }
              /**
              * A vector Path object representing the glyph outline.
              * @type {Path}
              */
              get path() {
                return this._getPath();
              }
              /**
              * Returns a path scaled to the given font size.
              * @param {number} size
              * @return {Path}
              */
              getScaledPath(i) {
                let u = 1 / this._font.unitsPerEm * i;
                return this.path.scale(u);
              }
              /**
              * The glyph's advance width.
              * @type {number}
              */
              get advanceWidth() {
                return this._getMetrics().advanceWidth;
              }
              /**
              * The glyph's advance height.
              * @type {number}
              */
              get advanceHeight() {
                return this._getMetrics().advanceHeight;
              }
              get ligatureCaretPositions() {
              }
              _getName() {
                let { post: i } = this._font;
                if (!i) return null;
                switch (i.version) {
                  case 1:
                    return Zr[this.id];
                  case 2:
                    let u = i.glyphNameIndex[this.id];
                    return u < Zr.length ? Zr[u] : i.names[u - Zr.length];
                  case 2.5:
                    return Zr[this.id + i.offsets[this.id]];
                  case 4:
                    return String.fromCharCode(i.map[this.id]);
                }
              }
              /**
              * The glyph's name
              * @type {string}
              */
              get name() {
                return this._getName();
              }
              /**
              * Renders the glyph to the given graphics context, at the specified font size.
              * @param {CanvasRenderingContext2d} ctx
              * @param {number} size
              */
              render(i, u) {
                i.save();
                let m = 1 / this._font.head.unitsPerEm * u;
                i.scale(m, m), this.path.toFunction()(i), i.fill(), i.restore();
              }
              constructor(i, u, m) {
                this.id = i, this.codePoints = u, this._font = m, this.isMark = this.codePoints.length > 0 && this.codePoints.every(N.isMark), this.isLigature = this.codePoints.length > 1;
              }
            }
            (0, D._)([
              uA
            ], ln.prototype, "cbox", null), (0, D._)([
              uA
            ], ln.prototype, "bbox", null), (0, D._)([
              uA
            ], ln.prototype, "path", null), (0, D._)([
              uA
            ], ln.prototype, "advanceWidth", null), (0, D._)([
              uA
            ], ln.prototype, "advanceHeight", null), (0, D._)([
              uA
            ], ln.prototype, "name", null);
            let Eo = new A.Struct({
              numberOfContours: A.int16,
              xMin: A.int16,
              yMin: A.int16,
              xMax: A.int16,
              yMax: A.int16
            });
            const qc = 1, _c = 2, $c = 4, A0 = 8, e0 = 16, t0 = 32, i0 = 1, n0 = 8, wo = 32, r0 = 64, s0 = 128, a0 = 256;
            class nn {
              copy() {
                return new nn(this.onCurve, this.endContour, this.x, this.y);
              }
              constructor(i, u, m = 0, L = 0) {
                this.onCurve = i, this.endContour = u, this.x = m, this.y = L;
              }
            }
            class o0 {
              constructor(i, u, m) {
                this.glyphID = i, this.dx = u, this.dy = m, this.pos = 0, this.scaleX = this.scaleY = 1, this.scale01 = this.scale10 = 0;
              }
            }
            class ms extends ln {
              // Parses just the glyph header and returns the bounding box
              _getCBox(i) {
                if (this._font._variationProcessor && !i) return this.path.cbox;
                let u = this._font._getTableStream("glyf");
                u.pos += this._font.loca.offsets[this.id];
                let m = Eo.decode(u), L = new Tn(m.xMin, m.yMin, m.xMax, m.yMax);
                return Object.freeze(L);
              }
              // Parses a single glyph coordinate
              _parseGlyphCoord(i, u, m, L) {
                if (m) {
                  var Z = i.readUInt8();
                  L || (Z = -Z), Z += u;
                } else if (L) var Z = u;
                else var Z = u + i.readInt16BE();
                return Z;
              }
              // Decodes the glyph data into points for simple glyphs,
              // or components for composite glyphs
              _decode() {
                let i = this._font.loca.offsets[this.id], u = this._font.loca.offsets[this.id + 1];
                if (i === u) return null;
                let m = this._font._getTableStream("glyf");
                m.pos += i;
                let L = m.pos, Z = Eo.decode(m);
                return Z.numberOfContours > 0 ? this._decodeSimple(Z, m) : Z.numberOfContours < 0 && this._decodeComposite(Z, m, L), Z;
              }
              _decodeSimple(i, u) {
                i.points = [];
                let m = new A.Array(A.uint16, i.numberOfContours).decode(u);
                i.instructions = new A.Array(A.uint8, A.uint16).decode(u);
                let L = [], Z = m[m.length - 1] + 1;
                for (; L.length < Z; ) {
                  var O = u.readUInt8();
                  if (L.push(O), O & A0) {
                    let ce = u.readUInt8();
                    for (let ge = 0; ge < ce; ge++) L.push(O);
                  }
                }
                for (var PA = 0; PA < L.length; PA++) {
                  var O = L[PA];
                  let ge = new nn(!!(O & qc), m.indexOf(PA) >= 0, 0, 0);
                  i.points.push(ge);
                }
                let XA = 0;
                for (var PA = 0; PA < L.length; PA++) {
                  var O = L[PA];
                  i.points[PA].x = XA = this._parseGlyphCoord(u, XA, O & _c, O & e0);
                }
                let te = 0;
                for (var PA = 0; PA < L.length; PA++) {
                  var O = L[PA];
                  i.points[PA].y = te = this._parseGlyphCoord(u, te, O & $c, O & t0);
                }
                if (this._font._variationProcessor) {
                  let ce = i.points.slice();
                  ce.push(...this._getPhantomPoints(i)), this._font._variationProcessor.transformPoints(this.id, ce), i.phantomPoints = ce.slice(-4);
                }
              }
              _decodeComposite(i, u, m = 0) {
                i.components = [];
                let L = !1, Z = wo;
                for (; Z & wo; ) {
                  Z = u.readUInt16BE();
                  let te = u.pos - m, ce = u.readUInt16BE();
                  if (L || (L = (Z & a0) !== 0), Z & i0)
                    var O = u.readInt16BE(), PA = u.readInt16BE();
                  else
                    var O = u.readInt8(), PA = u.readInt8();
                  var XA = new o0(ce, O, PA);
                  XA.pos = te, Z & n0 ? XA.scaleX = XA.scaleY = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824 : Z & r0 ? (XA.scaleX = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824, XA.scaleY = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824) : Z & s0 && (XA.scaleX = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824, XA.scale01 = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824, XA.scale10 = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824, XA.scaleY = (u.readUInt8() << 24 | u.readUInt8() << 16) / 1073741824), i.components.push(XA);
                }
                if (this._font._variationProcessor) {
                  let te = [];
                  for (let ce = 0; ce < i.components.length; ce++) {
                    var XA = i.components[ce];
                    te.push(new nn(!0, !0, XA.dx, XA.dy));
                  }
                  te.push(...this._getPhantomPoints(i)), this._font._variationProcessor.transformPoints(this.id, te), i.phantomPoints = te.splice(-4, 4);
                  for (let ce = 0; ce < te.length; ce++) {
                    let ge = te[ce];
                    i.components[ce].dx = ge.x, i.components[ce].dy = ge.y;
                  }
                }
                return L;
              }
              _getPhantomPoints(i) {
                let u = this._getCBox(!0);
                this._metrics == null && (this._metrics = ln.prototype._getMetrics.call(this, u));
                let { advanceWidth: m, advanceHeight: L, leftBearing: Z, topBearing: O } = this._metrics;
                return [
                  new nn(!1, !0, i.xMin - Z, 0),
                  new nn(!1, !0, i.xMin - Z + m, 0),
                  new nn(!1, !0, 0, i.yMax + O),
                  new nn(!1, !0, 0, i.yMax + O + L)
                ];
              }
              // Decodes font data, resolves composite glyphs, and returns an array of contours
              _getContours() {
                let i = this._decode();
                if (!i) return [];
                let u = [];
                if (i.numberOfContours < 0)
                  for (let O of i.components) {
                    let PA = this._font.getGlyph(O.glyphID)._getContours();
                    for (let XA = 0; XA < PA.length; XA++) {
                      let te = PA[XA];
                      for (let ce = 0; ce < te.length; ce++) {
                        let ge = te[ce], Ge = ge.x * O.scaleX + ge.y * O.scale01 + O.dx, nt = ge.y * O.scaleY + ge.x * O.scale10 + O.dy;
                        u.push(new nn(ge.onCurve, ge.endContour, Ge, nt));
                      }
                    }
                  }
                else u = i.points || [];
                i.phantomPoints && !this._font.directory.tables.HVAR && (this._metrics.advanceWidth = i.phantomPoints[1].x - i.phantomPoints[0].x, this._metrics.advanceHeight = i.phantomPoints[3].y - i.phantomPoints[2].y, this._metrics.leftBearing = i.xMin - i.phantomPoints[0].x, this._metrics.topBearing = i.phantomPoints[2].y - i.yMax);
                let m = [], L = [];
                for (let O = 0; O < u.length; O++) {
                  var Z = u[O];
                  L.push(Z), Z.endContour && (m.push(L), L = []);
                }
                return m;
              }
              _getMetrics() {
                if (this._metrics) return this._metrics;
                let i = this._getCBox(!0);
                return super._getMetrics(i), this._font._variationProcessor && !this._font.HVAR && this.path, this._metrics;
              }
              // Converts contours to a Path object that can be rendered
              _getPath() {
                let i = this._getContours(), u = new lr();
                for (let L = 0; L < i.length; L++) {
                  let Z = i[L], O = Z[0], PA = Z[Z.length - 1], XA = 0;
                  if (O.onCurve) {
                    var m = null;
                    XA = 1;
                  } else {
                    PA.onCurve ? O = PA : O = new nn(!1, !1, (O.x + PA.x) / 2, (O.y + PA.y) / 2);
                    var m = O;
                  }
                  u.moveTo(O.x, O.y);
                  for (let te = XA; te < Z.length; te++) {
                    let ce = Z[te], ge = te === 0 ? O : Z[te - 1];
                    if (ge.onCurve && ce.onCurve) u.lineTo(ce.x, ce.y);
                    else if (ge.onCurve && !ce.onCurve) var m = ce;
                    else if (!ge.onCurve && !ce.onCurve) {
                      let nt = (ge.x + ce.x) / 2, ot = (ge.y + ce.y) / 2;
                      u.quadraticCurveTo(ge.x, ge.y, nt, ot);
                      var m = ce;
                    } else if (!ge.onCurve && ce.onCurve) {
                      u.quadraticCurveTo(m.x, m.y, ce.x, ce.y);
                      var m = null;
                    } else throw new Error("Unknown TTF path state");
                  }
                  m && u.quadraticCurveTo(m.x, m.y, O.x, O.y), u.closePath();
                }
                return u;
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "TTF");
              }
            }
            class B0 extends ln {
              _getName() {
                return this._font.CFF2 ? super._getName() : this._font["CFF "].getGlyphName(this.id);
              }
              bias(i) {
                return i.length < 1240 ? 107 : i.length < 33900 ? 1131 : 32768;
              }
              _getPath() {
                let i = this._font.CFF2 || this._font["CFF "], { stream: u } = i, m = i.topDict.CharStrings[this.id], L = m.offset + m.length;
                u.pos = m.offset;
                let Z = new lr(), O = [], PA = [], XA = null, te = 0, ce = 0, ge = 0, Ge, nt, ot = !1;
                this._usedGsubrs = Ge = {}, this._usedSubrs = nt = {};
                let Ut = i.globalSubrIndex || [], ui = this.bias(Ut), zt = i.privateDictForGlyph(this.id) || {}, Jt = zt.Subrs || [], Ue = this.bias(Jt), ht = i.topDict.vstore && i.topDict.vstore.itemVariationStore, Nt = zt.vsindex, di = this._font._variationProcessor;
                function vi() {
                  XA == null && (XA = O.shift() + zt.nominalWidthX);
                }
                function ii() {
                  return O.length % 2 !== 0 && vi(), te += O.length >> 1, O.length = 0;
                }
                function Zi(rn, wn) {
                  ot && Z.closePath(), Z.moveTo(rn, wn), ot = !0;
                }
                let ai = function() {
                  for (; u.pos < L; ) {
                    let Ki = u.readUInt8();
                    if (Ki < 32) {
                      let Er, un, Sn, Bi, gi, ci, li, wr, ur, fr, Qr, hr, Cr, Mr, Dr, pn;
                      switch (Ki) {
                        case 1:
                        case 3:
                        case 18:
                        case 23:
                          ii();
                          break;
                        case 4:
                          O.length > 1 && vi(), ge += O.shift(), Zi(ce, ge);
                          break;
                        case 5:
                          for (; O.length >= 2; )
                            ce += O.shift(), ge += O.shift(), Z.lineTo(ce, ge);
                          break;
                        case 6:
                        case 7:
                          for (Sn = Ki === 6; O.length >= 1; )
                            Sn ? ce += O.shift() : ge += O.shift(), Z.lineTo(ce, ge), Sn = !Sn;
                          break;
                        case 8:
                          for (; O.length > 0; )
                            Bi = ce + O.shift(), gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), ce = ci + O.shift(), ge = li + O.shift(), Z.bezierCurveTo(Bi, gi, ci, li, ce, ge);
                          break;
                        case 10:
                          if (Er = O.pop() + Ue, un = Jt[Er], un) {
                            nt[Er] = !0;
                            let Xt = u.pos, Qi = L;
                            u.pos = un.offset, L = un.offset + un.length, ai(), u.pos = Xt, L = Qi;
                          }
                          break;
                        case 11:
                          if (i.version >= 2) break;
                          return;
                        case 14:
                          if (i.version >= 2) break;
                          O.length > 0 && vi(), ot && (Z.closePath(), ot = !1);
                          break;
                        case 15:
                          if (i.version < 2) throw new Error("vsindex operator not supported in CFF v1");
                          Nt = O.pop();
                          break;
                        case 16: {
                          if (i.version < 2) throw new Error("blend operator not supported in CFF v1");
                          if (!di) throw new Error("blend operator in non-variation font");
                          let Xt = di.getBlendVector(ht, Nt), Qi = O.pop(), Ys = Qi * Xt.length, _i = O.length - Ys, Ps = _i - Qi;
                          for (let dr = 0; dr < Qi; dr++) {
                            let vs = O[Ps + dr];
                            for (let qr = 0; qr < Xt.length; qr++) vs += Xt[qr] * O[_i++];
                            O[Ps + dr] = vs;
                          }
                          for (; Ys--; ) O.pop();
                          break;
                        }
                        case 19:
                        case 20:
                          ii(), u.pos += te + 7 >> 3;
                          break;
                        case 21:
                          O.length > 2 && vi(), ce += O.shift(), ge += O.shift(), Zi(ce, ge);
                          break;
                        case 22:
                          O.length > 1 && vi(), ce += O.shift(), Zi(ce, ge);
                          break;
                        case 24:
                          for (; O.length >= 8; )
                            Bi = ce + O.shift(), gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), ce = ci + O.shift(), ge = li + O.shift(), Z.bezierCurveTo(Bi, gi, ci, li, ce, ge);
                          ce += O.shift(), ge += O.shift(), Z.lineTo(ce, ge);
                          break;
                        case 25:
                          for (; O.length >= 8; )
                            ce += O.shift(), ge += O.shift(), Z.lineTo(ce, ge);
                          Bi = ce + O.shift(), gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), ce = ci + O.shift(), ge = li + O.shift(), Z.bezierCurveTo(Bi, gi, ci, li, ce, ge);
                          break;
                        case 26:
                          for (O.length % 2 && (ce += O.shift()); O.length >= 4; )
                            Bi = ce, gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), ce = ci, ge = li + O.shift(), Z.bezierCurveTo(Bi, gi, ci, li, ce, ge);
                          break;
                        case 27:
                          for (O.length % 2 && (ge += O.shift()); O.length >= 4; )
                            Bi = ce + O.shift(), gi = ge, ci = Bi + O.shift(), li = gi + O.shift(), ce = ci + O.shift(), ge = li, Z.bezierCurveTo(Bi, gi, ci, li, ce, ge);
                          break;
                        case 28:
                          O.push(u.readInt16BE());
                          break;
                        case 29:
                          if (Er = O.pop() + ui, un = Ut[Er], un) {
                            Ge[Er] = !0;
                            let Xt = u.pos, Qi = L;
                            u.pos = un.offset, L = un.offset + un.length, ai(), u.pos = Xt, L = Qi;
                          }
                          break;
                        case 30:
                        case 31:
                          for (Sn = Ki === 31; O.length >= 4; )
                            Sn ? (Bi = ce + O.shift(), gi = ge, ci = Bi + O.shift(), li = gi + O.shift(), ge = li + O.shift(), ce = ci + (O.length === 1 ? O.shift() : 0)) : (Bi = ce, gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), ce = ci + O.shift(), ge = li + (O.length === 1 ? O.shift() : 0)), Z.bezierCurveTo(Bi, gi, ci, li, ce, ge), Sn = !Sn;
                          break;
                        case 12:
                          switch (Ki = u.readUInt8(), Ki) {
                            case 3:
                              let Xt = O.pop(), Qi = O.pop();
                              O.push(Xt && Qi ? 1 : 0);
                              break;
                            case 4:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt || Qi ? 1 : 0);
                              break;
                            case 5:
                              Xt = O.pop(), O.push(Xt ? 0 : 1);
                              break;
                            case 9:
                              Xt = O.pop(), O.push(Math.abs(Xt));
                              break;
                            case 10:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt + Qi);
                              break;
                            case 11:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt - Qi);
                              break;
                            case 12:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt / Qi);
                              break;
                            case 14:
                              Xt = O.pop(), O.push(-Xt);
                              break;
                            case 15:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt === Qi ? 1 : 0);
                              break;
                            case 18:
                              O.pop();
                              break;
                            case 20:
                              let Ys = O.pop(), _i = O.pop();
                              PA[_i] = Ys;
                              break;
                            case 21:
                              _i = O.pop(), O.push(PA[_i] || 0);
                              break;
                            case 22:
                              let Ps = O.pop(), dr = O.pop(), vs = O.pop(), qr = O.pop();
                              O.push(vs <= qr ? Ps : dr);
                              break;
                            case 23:
                              O.push(Math.random());
                              break;
                            case 24:
                              Xt = O.pop(), Qi = O.pop(), O.push(Xt * Qi);
                              break;
                            case 26:
                              Xt = O.pop(), O.push(Math.sqrt(Xt));
                              break;
                            case 27:
                              Xt = O.pop(), O.push(Xt, Xt);
                              break;
                            case 28:
                              Xt = O.pop(), Qi = O.pop(), O.push(Qi, Xt);
                              break;
                            case 29:
                              _i = O.pop(), _i < 0 ? _i = 0 : _i > O.length - 1 && (_i = O.length - 1), O.push(O[_i]);
                              break;
                            case 30:
                              let bs = O.pop(), _r = O.pop();
                              if (_r >= 0) for (; _r > 0; ) {
                                var rn = O[bs - 1];
                                for (let fn = bs - 2; fn >= 0; fn--) O[fn + 1] = O[fn];
                                O[0] = rn, _r--;
                              }
                              else for (; _r < 0; ) {
                                var rn = O[0];
                                for (let zs = 0; zs <= bs; zs++) O[zs] = O[zs + 1];
                                O[bs - 1] = rn, _r++;
                              }
                              break;
                            case 34:
                              Bi = ce + O.shift(), gi = ge, ci = Bi + O.shift(), li = gi + O.shift(), wr = ci + O.shift(), ur = li, fr = wr + O.shift(), Qr = ur, hr = fr + O.shift(), Cr = Qr, Mr = hr + O.shift(), Dr = Cr, ce = Mr, ge = Dr, Z.bezierCurveTo(Bi, gi, ci, li, wr, ur), Z.bezierCurveTo(fr, Qr, hr, Cr, Mr, Dr);
                              break;
                            case 35:
                              pn = [];
                              for (let fn = 0; fn <= 5; fn++)
                                ce += O.shift(), ge += O.shift(), pn.push(ce, ge);
                              Z.bezierCurveTo(...pn.slice(0, 6)), Z.bezierCurveTo(...pn.slice(6)), O.shift();
                              break;
                            case 36:
                              Bi = ce + O.shift(), gi = ge + O.shift(), ci = Bi + O.shift(), li = gi + O.shift(), wr = ci + O.shift(), ur = li, fr = wr + O.shift(), Qr = ur, hr = fr + O.shift(), Cr = Qr + O.shift(), Mr = hr + O.shift(), Dr = Cr, ce = Mr, ge = Dr, Z.bezierCurveTo(Bi, gi, ci, li, wr, ur), Z.bezierCurveTo(fr, Qr, hr, Cr, Mr, Dr);
                              break;
                            case 37:
                              let Yo = ce, Po = ge;
                              pn = [];
                              for (let fn = 0; fn <= 4; fn++)
                                ce += O.shift(), ge += O.shift(), pn.push(ce, ge);
                              Math.abs(ce - Yo) > Math.abs(ge - Po) ? (ce += O.shift(), ge = Po) : (ce = Yo, ge += O.shift()), pn.push(ce, ge), Z.bezierCurveTo(...pn.slice(0, 6)), Z.bezierCurveTo(...pn.slice(6));
                              break;
                            default:
                              throw new Error(`Unknown op: 12 ${Ki}`);
                          }
                          break;
                        default:
                          throw new Error(`Unknown op: ${Ki}`);
                      }
                    } else if (Ki < 247) O.push(Ki - 139);
                    else if (Ki < 251) {
                      var wn = u.readUInt8();
                      O.push((Ki - 247) * 256 + wn + 108);
                    } else if (Ki < 255) {
                      var wn = u.readUInt8();
                      O.push(-(Ki - 251) * 256 - wn - 108);
                    } else O.push(u.readInt32BE() / 65536);
                  }
                };
                return ai(), ot && Z.closePath(), Z;
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "CFF");
              }
            }
            let g0 = new A.Struct({
              originX: A.uint16,
              originY: A.uint16,
              type: new A.String(4),
              data: new A.Buffer((BA) => BA.parent.buflen - BA._currentOffset)
            });
            class c0 extends ms {
              /**
              * Returns an object representing a glyph image at the given point size.
              * The object has a data property with a Buffer containing the actual image data,
              * along with the image type, and origin.
              *
              * @param {number} size
              * @return {object}
              */
              getImageForSize(i) {
                for (let O = 0; O < this._font.sbix.imageTables.length; O++) {
                  var u = this._font.sbix.imageTables[O];
                  if (u.ppem >= i) break;
                }
                let m = u.imageOffsets, L = m[this.id], Z = m[this.id + 1];
                return L === Z ? null : (this._font.stream.pos = L, g0.decode(this._font.stream, {
                  buflen: Z - L
                }));
              }
              render(i, u) {
                let m = this.getImageForSize(u);
                if (m != null) {
                  let L = u / this._font.unitsPerEm;
                  i.image(m.data, {
                    height: u,
                    x: m.originX,
                    y: (this.bbox.minY - m.originY) * L
                  });
                }
                this._font.sbix.flags.renderOutlines && super.render(i, u);
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "SBIX");
              }
            }
            class uo {
              constructor(i, u) {
                this.glyph = i, this.color = u;
              }
            }
            class l0 extends ln {
              _getBBox() {
                let i = new Tn();
                for (let u = 0; u < this.layers.length; u++) {
                  let L = this.layers[u].glyph.bbox;
                  i.addPoint(L.minX, L.minY), i.addPoint(L.maxX, L.maxY);
                }
                return i;
              }
              /**
              * Returns an array of objects containing the glyph and color for
              * each layer in the composite color glyph.
              * @type {object[]}
              */
              get layers() {
                let i = this._font.CPAL, u = this._font.COLR, m = 0, L = u.baseGlyphRecord.length - 1;
                for (; m <= L; ) {
                  let ce = m + L >> 1;
                  var Z = u.baseGlyphRecord[ce];
                  if (this.id < Z.gid) L = ce - 1;
                  else if (this.id > Z.gid) m = ce + 1;
                  else {
                    var O = Z;
                    break;
                  }
                }
                if (O == null) {
                  var PA = this._font._getBaseGlyph(this.id), XA = {
                    red: 0,
                    green: 0,
                    blue: 0,
                    alpha: 255
                  };
                  return [
                    new uo(PA, XA)
                  ];
                }
                let te = [];
                for (let ce = O.firstLayerIndex; ce < O.firstLayerIndex + O.numLayers; ce++) {
                  var Z = u.layerRecords[ce], XA = i.colorRecords[Z.paletteIndex], PA = this._font._getBaseGlyph(Z.gid);
                  te.push(new uo(PA, XA));
                }
                return te;
              }
              render(i, u) {
                for (let { glyph: m, color: L } of this.layers)
                  i.fillColor([
                    L.red,
                    L.green,
                    L.blue
                  ], L.alpha / 255 * 100), m.render(i, u);
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "COLR");
              }
            }
            const E0 = 32768, w0 = 4095, u0 = 32768, fo = 16384, f0 = 8192, Qo = 4095, ho = 128, Co = 127, Q0 = 128, h0 = 64, C0 = 63;
            class M0 {
              normalizeCoords(i) {
                let u = [];
                for (var m = 0; m < this.font.fvar.axis.length; m++) {
                  let L = this.font.fvar.axis[m];
                  i[m] < L.defaultValue ? u.push((i[m] - L.defaultValue + Number.EPSILON) / (L.defaultValue - L.minValue + Number.EPSILON)) : u.push((i[m] - L.defaultValue + Number.EPSILON) / (L.maxValue - L.defaultValue + Number.EPSILON));
                }
                if (this.font.avar) for (var m = 0; m < this.font.avar.segment.length; m++) {
                  let Z = this.font.avar.segment[m];
                  for (let O = 0; O < Z.correspondence.length; O++) {
                    let PA = Z.correspondence[O];
                    if (O >= 1 && u[m] < PA.fromCoord) {
                      let XA = Z.correspondence[O - 1];
                      u[m] = ((u[m] - XA.fromCoord) * (PA.toCoord - XA.toCoord) + Number.EPSILON) / (PA.fromCoord - XA.fromCoord + Number.EPSILON) + XA.toCoord;
                      break;
                    }
                  }
                }
                return u;
              }
              transformPoints(i, u) {
                if (!this.font.fvar || !this.font.gvar) return;
                let { gvar: m } = this.font;
                if (i >= m.glyphCount) return;
                let L = m.offsets[i];
                if (L === m.offsets[i + 1]) return;
                let { stream: Z } = this.font;
                if (Z.pos = L, Z.pos >= Z.length) return;
                let O = Z.readUInt16BE(), PA = L + Z.readUInt16BE();
                if (O & E0) {
                  var XA = Z.pos;
                  Z.pos = PA;
                  var te = this.decodePoints();
                  PA = Z.pos, Z.pos = XA;
                }
                let ce = u.map((ui) => ui.copy());
                O &= w0;
                for (let ui = 0; ui < O; ui++) {
                  let zt = Z.readUInt16BE(), Jt = Z.readUInt16BE();
                  if (Jt & u0) {
                    var ge = [];
                    for (let ii = 0; ii < m.axisCount; ii++) ge.push(Z.readInt16BE() / 16384);
                  } else {
                    if ((Jt & Qo) >= m.globalCoordCount) throw new Error("Invalid gvar table");
                    var ge = m.globalCoords[Jt & Qo];
                  }
                  if (Jt & fo) {
                    var Ge = [];
                    for (let ii = 0; ii < m.axisCount; ii++) Ge.push(Z.readInt16BE() / 16384);
                    var nt = [];
                    for (let ii = 0; ii < m.axisCount; ii++) nt.push(Z.readInt16BE() / 16384);
                  }
                  let Ue = this.tupleFactor(Jt, ge, Ge, nt);
                  if (Ue === 0) {
                    PA += zt;
                    continue;
                  }
                  var XA = Z.pos;
                  if (Z.pos = PA, Jt & f0) var ot = this.decodePoints();
                  else var ot = te;
                  let Nt = ot.length === 0 ? u.length : ot.length, di = this.decodeDeltas(Nt), vi = this.decodeDeltas(Nt);
                  if (ot.length === 0) for (let ii = 0; ii < u.length; ii++) {
                    var Ut = u[ii];
                    Ut.x += Math.round(di[ii] * Ue), Ut.y += Math.round(vi[ii] * Ue);
                  }
                  else {
                    let ii = ce.map((ai) => ai.copy()), Zi = u.map(() => !1);
                    for (let ai = 0; ai < ot.length; ai++) {
                      let rn = ot[ai];
                      if (rn < u.length) {
                        let wn = ii[rn];
                        Zi[rn] = !0, wn.x += di[ai] * Ue, wn.y += vi[ai] * Ue;
                      }
                    }
                    this.interpolateMissingDeltas(ii, ce, Zi);
                    for (let ai = 0; ai < u.length; ai++) {
                      let rn = ii[ai].x - ce[ai].x, wn = ii[ai].y - ce[ai].y;
                      u[ai].x = Math.round(u[ai].x + rn), u[ai].y = Math.round(u[ai].y + wn);
                    }
                  }
                  PA += zt, Z.pos = XA;
                }
              }
              decodePoints() {
                let i = this.font.stream, u = i.readUInt8();
                u & ho && (u = (u & Co) << 8 | i.readUInt8());
                let m = new Uint16Array(u), L = 0, Z = 0;
                for (; L < u; ) {
                  let O = i.readUInt8(), PA = (O & Co) + 1, XA = O & ho ? i.readUInt16 : i.readUInt8;
                  for (let te = 0; te < PA && L < u; te++)
                    Z += XA.call(i), m[L++] = Z;
                }
                return m;
              }
              decodeDeltas(i) {
                let u = this.font.stream, m = 0, L = new Int16Array(i);
                for (; m < i; ) {
                  let Z = u.readUInt8(), O = (Z & C0) + 1;
                  if (Z & Q0) m += O;
                  else {
                    let PA = Z & h0 ? u.readInt16BE : u.readInt8;
                    for (let XA = 0; XA < O && m < i; XA++) L[m++] = PA.call(u);
                  }
                }
                return L;
              }
              tupleFactor(i, u, m, L) {
                let Z = this.normalizedCoords, { gvar: O } = this.font, PA = 1;
                for (let XA = 0; XA < O.axisCount; XA++)
                  if (u[XA] !== 0) {
                    if (Z[XA] === 0) return 0;
                    if ((i & fo) === 0) {
                      if (Z[XA] < Math.min(0, u[XA]) || Z[XA] > Math.max(0, u[XA])) return 0;
                      PA = (PA * Z[XA] + Number.EPSILON) / (u[XA] + Number.EPSILON);
                    } else {
                      if (Z[XA] < m[XA] || Z[XA] > L[XA]) return 0;
                      Z[XA] < u[XA] ? PA = PA * (Z[XA] - m[XA] + Number.EPSILON) / (u[XA] - m[XA] + Number.EPSILON) : PA = PA * (L[XA] - Z[XA] + Number.EPSILON) / (L[XA] - u[XA] + Number.EPSILON);
                    }
                  }
                return PA;
              }
              // Interpolates points without delta values.
              // Needed for the Ø and Q glyphs in Skia.
              // Algorithm from Freetype.
              interpolateMissingDeltas(i, u, m) {
                if (i.length === 0) return;
                let L = 0;
                for (; L < i.length; ) {
                  let Z = L, O = L, PA = i[O];
                  for (; !PA.endContour; ) PA = i[++O];
                  for (; L <= O && !m[L]; ) L++;
                  if (L > O) continue;
                  let XA = L, te = L;
                  for (L++; L <= O; )
                    m[L] && (this.deltaInterpolate(te + 1, L - 1, te, L, u, i), te = L), L++;
                  te === XA ? this.deltaShift(Z, O, te, u, i) : (this.deltaInterpolate(te + 1, O, te, XA, u, i), XA > 0 && this.deltaInterpolate(Z, XA - 1, te, XA, u, i)), L = O + 1;
                }
              }
              deltaInterpolate(i, u, m, L, Z, O) {
                if (i > u) return;
                let PA = [
                  "x",
                  "y"
                ];
                for (let te = 0; te < PA.length; te++) {
                  let ce = PA[te];
                  if (Z[m][ce] > Z[L][ce]) {
                    var XA = m;
                    m = L, L = XA;
                  }
                  let ge = Z[m][ce], Ge = Z[L][ce], nt = O[m][ce], ot = O[L][ce];
                  if (ge !== Ge || nt === ot) {
                    let Ut = ge === Ge ? 0 : (ot - nt) / (Ge - ge);
                    for (let ui = i; ui <= u; ui++) {
                      let zt = Z[ui][ce];
                      zt <= ge ? zt += nt - ge : zt >= Ge ? zt += ot - Ge : zt = nt + (zt - ge) * Ut, O[ui][ce] = zt;
                    }
                  }
                }
              }
              deltaShift(i, u, m, L, Z) {
                let O = Z[m].x - L[m].x, PA = Z[m].y - L[m].y;
                if (!(O === 0 && PA === 0))
                  for (let XA = i; XA <= u; XA++) XA !== m && (Z[XA].x += O, Z[XA].y += PA);
              }
              getAdvanceAdjustment(i, u) {
                let m, L;
                if (u.advanceWidthMapping) {
                  let Z = i;
                  Z >= u.advanceWidthMapping.mapCount && (Z = u.advanceWidthMapping.mapCount - 1), u.advanceWidthMapping.entryFormat, { outerIndex: m, innerIndex: L } = u.advanceWidthMapping.mapData[Z];
                } else
                  m = 0, L = i;
                return this.getDelta(u.itemVariationStore, m, L);
              }
              // See pseudo code from `Font Variations Overview'
              // in the OpenType specification.
              getDelta(i, u, m) {
                if (u >= i.itemVariationData.length) return 0;
                let L = i.itemVariationData[u];
                if (m >= L.deltaSets.length) return 0;
                let Z = L.deltaSets[m], O = this.getBlendVector(i, u), PA = 0;
                for (let XA = 0; XA < L.regionIndexCount; XA++) PA += Z.deltas[XA] * O[XA];
                return PA;
              }
              getBlendVector(i, u) {
                let m = i.itemVariationData[u];
                if (this.blendVectors.has(m)) return this.blendVectors.get(m);
                let L = this.normalizedCoords, Z = [];
                for (let O = 0; O < m.regionIndexCount; O++) {
                  let PA = 1, XA = m.regionIndexes[O], te = i.variationRegionList.variationRegions[XA];
                  for (let ce = 0; ce < te.length; ce++) {
                    let ge = te[ce], Ge;
                    ge.startCoord > ge.peakCoord || ge.peakCoord > ge.endCoord || ge.startCoord < 0 && ge.endCoord > 0 && ge.peakCoord !== 0 || ge.peakCoord === 0 ? Ge = 1 : L[ce] < ge.startCoord || L[ce] > ge.endCoord ? Ge = 0 : L[ce] === ge.peakCoord ? Ge = 1 : L[ce] < ge.peakCoord ? Ge = (L[ce] - ge.startCoord + Number.EPSILON) / (ge.peakCoord - ge.startCoord + Number.EPSILON) : Ge = (ge.endCoord - L[ce] + Number.EPSILON) / (ge.endCoord - ge.peakCoord + Number.EPSILON), PA *= Ge;
                  }
                  Z[O] = PA;
                }
                return this.blendVectors.set(m, Z), Z;
              }
              constructor(i, u) {
                this.font = i, this.normalizedCoords = this.normalizeCoords(u), this.blendVectors = /* @__PURE__ */ new Map();
              }
            }
            Promise.resolve();
            class Mo {
              includeGlyph(i) {
                return typeof i == "object" && (i = i.id), this.mapping[i] == null && (this.glyphs.push(i), this.mapping[i] = this.glyphs.length - 1), this.mapping[i];
              }
              constructor(i) {
                this.font = i, this.glyphs = [], this.mapping = {}, this.includeGlyph(0);
              }
            }
            const D0 = 1, d0 = 2, I0 = 4, y0 = 8, F0 = 16, x0 = 32;
            class Do {
              static size(i) {
                return i >= 0 && i <= 255 ? 1 : 2;
              }
              static encode(i, u) {
                u >= 0 && u <= 255 ? i.writeUInt8(u) : i.writeInt16BE(u);
              }
            }
            let Io = new A.Struct({
              numberOfContours: A.int16,
              xMin: A.int16,
              yMin: A.int16,
              xMax: A.int16,
              yMax: A.int16,
              endPtsOfContours: new A.Array(A.uint16, "numberOfContours"),
              instructions: new A.Array(A.uint8, A.uint16),
              flags: new A.Array(A.uint8, 0),
              xPoints: new A.Array(Do, 0),
              yPoints: new A.Array(Do, 0)
            });
            class p0 {
              encodeSimple(i, u = []) {
                let m = [], L = [], Z = [], O = [], PA = 0, XA = 0, te = 0, ce = 0, ge = 0;
                for (let zt = 0; zt < i.commands.length; zt++) {
                  let Jt = i.commands[zt];
                  for (let Ue = 0; Ue < Jt.args.length; Ue += 2) {
                    let ht = Jt.args[Ue], Nt = Jt.args[Ue + 1], di = 0;
                    if (Jt.command === "quadraticCurveTo" && Ue === 2) {
                      let vi = i.commands[zt + 1];
                      if (vi && vi.command === "quadraticCurveTo") {
                        let ii = (XA + vi.args[0]) / 2, Zi = (te + vi.args[1]) / 2;
                        if (ht === ii && Nt === Zi) continue;
                      }
                    }
                    Jt.command === "quadraticCurveTo" && Ue === 0 || (di |= D0), di = this._encodePoint(ht, XA, L, di, d0, F0), di = this._encodePoint(Nt, te, Z, di, I0, x0), di === ce && PA < 255 ? (O[O.length - 1] |= y0, PA++) : (PA > 0 && (O.push(PA), PA = 0), O.push(di), ce = di), XA = ht, te = Nt, ge++;
                  }
                  Jt.command === "closePath" && m.push(ge - 1);
                }
                i.commands.length > 1 && i.commands[i.commands.length - 1].command !== "closePath" && m.push(ge - 1);
                let Ge = i.bbox, nt = {
                  numberOfContours: m.length,
                  xMin: Ge.minX,
                  yMin: Ge.minY,
                  xMax: Ge.maxX,
                  yMax: Ge.maxY,
                  endPtsOfContours: m,
                  instructions: u,
                  flags: O,
                  xPoints: L,
                  yPoints: Z
                }, ot = Io.size(nt), Ut = 4 - ot % 4, ui = new A.EncodeStream(ot + Ut);
                return Io.encode(ui, nt), Ut !== 0 && ui.fill(0, Ut), ui.buffer;
              }
              _encodePoint(i, u, m, L, Z, O) {
                let PA = i - u;
                return i === u ? L |= O : (-255 <= PA && PA <= 255 && (L |= Z, PA < 0 ? PA = -PA : L |= O), m.push(PA)), L;
              }
            }
            class m0 extends Mo {
              _addGlyph(i) {
                let u = this.font.getGlyph(i), m = u._decode(), L = this.font.loca.offsets[i], Z = this.font.loca.offsets[i + 1], O = this.font._getTableStream("glyf");
                O.pos += L;
                let PA = O.readBuffer(Z - L);
                if (m && m.numberOfContours < 0) {
                  PA = new Uint8Array(PA);
                  let XA = new DataView(PA.buffer);
                  for (let te of m.components)
                    i = this.includeGlyph(te.glyphID), XA.setUint16(te.pos, i);
                } else m && this.font._variationProcessor && (PA = this.glyphEncoder.encodeSimple(u.path, m.instructions));
                return this.glyf.push(PA), this.loca.offsets.push(this.offset), this.hmtx.metrics.push({
                  advance: u.advanceWidth,
                  bearing: u._getMetrics().leftBearing
                }), this.offset += PA.length, this.glyf.length - 1;
              }
              encode() {
                this.glyf = [], this.offset = 0, this.loca = {
                  offsets: [],
                  version: this.font.loca.version
                }, this.hmtx = {
                  metrics: [],
                  bearings: []
                };
                let i = 0;
                for (; i < this.glyphs.length; ) this._addGlyph(this.glyphs[i++]);
                let u = T(J)(this.font.maxp);
                u.numGlyphs = this.glyf.length, this.loca.offsets.push(this.offset);
                let m = T(J)(this.font.head);
                m.indexToLocFormat = this.loca.version;
                let L = T(J)(this.font.hhea);
                return L.numberOfMetrics = this.hmtx.metrics.length, La.toBuffer({
                  tables: {
                    head: m,
                    hhea: L,
                    loca: this.loca,
                    maxp: u,
                    "cvt ": this.font["cvt "],
                    prep: this.font.prep,
                    glyf: this.glyf,
                    hmtx: this.hmtx,
                    fpgm: this.font.fpgm
                  }
                });
              }
              constructor(i) {
                super(i), this.glyphEncoder = new p0();
              }
            }
            class Y0 extends Mo {
              subsetCharstrings() {
                this.charstrings = [];
                let i = {};
                for (let u of this.glyphs) {
                  this.charstrings.push(this.cff.getCharString(u));
                  let m = this.font.getGlyph(u);
                  m.path;
                  for (let L in m._usedGsubrs) i[L] = !0;
                }
                this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, i);
              }
              subsetSubrs(i, u) {
                let m = [];
                for (let L = 0; L < i.length; L++) {
                  let Z = i[L];
                  u[L] ? (this.cff.stream.pos = Z.offset, m.push(this.cff.stream.readBuffer(Z.length))) : m.push(new Uint8Array([
                    11
                  ]));
                }
                return m;
              }
              subsetFontdict(i) {
                i.FDArray = [], i.FDSelect = {
                  version: 0,
                  fds: []
                };
                let u = {}, m = [], L = {};
                for (let Z of this.glyphs) {
                  let O = this.cff.fdForGlyph(Z);
                  if (O == null) continue;
                  u[O] || (i.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[O])), m.push({}), L[O] = i.FDArray.length - 1), u[O] = !0, i.FDSelect.fds.push(L[O]);
                  let PA = this.font.getGlyph(Z);
                  PA.path;
                  for (let XA in PA._usedSubrs) m[L[O]][XA] = !0;
                }
                for (let Z = 0; Z < i.FDArray.length; Z++) {
                  let O = i.FDArray[Z];
                  delete O.FontName, O.Private && O.Private.Subrs && (O.Private = Object.assign({}, O.Private), O.Private.Subrs = this.subsetSubrs(O.Private.Subrs, m[Z]));
                }
              }
              createCIDFontdict(i) {
                let u = {};
                for (let L of this.glyphs) {
                  let Z = this.font.getGlyph(L);
                  Z.path;
                  for (let O in Z._usedSubrs) u[O] = !0;
                }
                let m = Object.assign({}, this.cff.topDict.Private);
                return this.cff.topDict.Private && this.cff.topDict.Private.Subrs && (m.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, u)), i.FDArray = [
                  {
                    Private: m
                  }
                ], i.FDSelect = {
                  version: 3,
                  nRanges: 1,
                  ranges: [
                    {
                      first: 0,
                      fd: 0
                    }
                  ],
                  sentinel: this.charstrings.length
                };
              }
              addString(i) {
                return i ? (this.strings || (this.strings = []), this.strings.push(i), Be.length + this.strings.length - 1) : null;
              }
              encode() {
                this.subsetCharstrings();
                let i = {
                  version: this.charstrings.length > 255 ? 2 : 1,
                  ranges: [
                    {
                      first: 1,
                      nLeft: this.charstrings.length - 2
                    }
                  ]
                }, u = Object.assign({}, this.cff.topDict);
                u.Private = null, u.charset = i, u.Encoding = null, u.CharStrings = this.charstrings;
                for (let L of [
                  "version",
                  "Notice",
                  "Copyright",
                  "FullName",
                  "FamilyName",
                  "Weight",
                  "PostScript",
                  "BaseFontName",
                  "FontName"
                ]) u[L] = this.addString(this.cff.string(u[L]));
                u.ROS = [
                  this.addString("Adobe"),
                  this.addString("Identity"),
                  0
                ], u.CIDCount = this.charstrings.length, this.cff.isCIDFont ? this.subsetFontdict(u) : this.createCIDFontdict(u);
                let m = {
                  version: 1,
                  hdrSize: this.cff.hdrSize,
                  offSize: 4,
                  header: this.cff.header,
                  nameIndex: [
                    this.cff.postscriptName
                  ],
                  topDictIndex: [
                    u
                  ],
                  stringIndex: this.strings,
                  globalSubrIndex: this.gsubrs
                };
                return $t.toBuffer(m);
              }
              constructor(i) {
                if (super(i), this.cff = this.font["CFF "], !this.cff) throw new Error("Not a CFF Font");
              }
            }
            class Ni {
              static probe(i) {
                let u = ls.decode(i.slice(0, 4));
                return u === "true" || u === "OTTO" || u === "\0\0\0";
              }
              setDefaultLanguage(i = null) {
                this.defaultLanguage = i;
              }
              _getTable(i) {
                if (!(i.tag in this._tables)) try {
                  this._tables[i.tag] = this._decodeTable(i);
                } catch {
                }
                return this._tables[i.tag];
              }
              _getTableStream(i) {
                let u = this.directory.tables[i];
                return u ? (this.stream.pos = u.offset, this.stream) : null;
              }
              _decodeDirectory() {
                return this.directory = La.decode(this.stream, {
                  _startOffset: 0
                });
              }
              _decodeTable(i) {
                let u = this.stream.pos, m = this._getTableStream(i.tag), L = gs[i.tag].decode(m, this, i.length);
                return this.stream.pos = u, L;
              }
              /**
              * Gets a string from the font's `name` table
              * `lang` is a BCP-47 language code.
              * @return {string}
              */
              getName(i, u = this.defaultLanguage || tA) {
                let m = this.name && this.name.records[i];
                return m && (m[u] || m[this.defaultLanguage] || m[tA] || m.en || m[Object.keys(m)[0]]) || null;
              }
              /**
              * The unique PostScript name for this font, e.g. "Helvetica-Bold"
              * @type {string}
              */
              get postscriptName() {
                return this.getName("postscriptName");
              }
              /**
              * The font's full name, e.g. "Helvetica Bold"
              * @type {string}
              */
              get fullName() {
                return this.getName("fullName");
              }
              /**
              * The font's family name, e.g. "Helvetica"
              * @type {string}
              */
              get familyName() {
                return this.getName("fontFamily");
              }
              /**
              * The font's sub-family, e.g. "Bold".
              * @type {string}
              */
              get subfamilyName() {
                return this.getName("fontSubfamily");
              }
              /**
              * The font's copyright information
              * @type {string}
              */
              get copyright() {
                return this.getName("copyright");
              }
              /**
              * The font's version number
              * @type {string}
              */
              get version() {
                return this.getName("version");
              }
              /**
              * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))
              * @type {number}
              */
              get ascent() {
                return this.hhea.ascent;
              }
              /**
              * The font’s [descender](https://en.wikipedia.org/wiki/Descender)
              * @type {number}
              */
              get descent() {
                return this.hhea.descent;
              }
              /**
              * The amount of space that should be included between lines
              * @type {number}
              */
              get lineGap() {
                return this.hhea.lineGap;
              }
              /**
              * The offset from the normal underline position that should be used
              * @type {number}
              */
              get underlinePosition() {
                return this.post.underlinePosition;
              }
              /**
              * The weight of the underline that should be used
              * @type {number}
              */
              get underlineThickness() {
                return this.post.underlineThickness;
              }
              /**
              * If this is an italic font, the angle the cursor should be drawn at to match the font design
              * @type {number}
              */
              get italicAngle() {
                return this.post.italicAngle;
              }
              /**
              * The height of capital letters above the baseline.
              * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.
              * @type {number}
              */
              get capHeight() {
                let i = this["OS/2"];
                return i ? i.capHeight : this.ascent;
              }
              /**
              * The height of lower case letters in the font.
              * See [here](https://en.wikipedia.org/wiki/X-height) for more details.
              * @type {number}
              */
              get xHeight() {
                let i = this["OS/2"];
                return i ? i.xHeight : 0;
              }
              /**
              * The number of glyphs in the font.
              * @type {number}
              */
              get numGlyphs() {
                return this.maxp.numGlyphs;
              }
              /**
              * The size of the font’s internal coordinate grid
              * @type {number}
              */
              get unitsPerEm() {
                return this.head.unitsPerEm;
              }
              /**
              * The font’s bounding box, i.e. the box that encloses all glyphs in the font.
              * @type {BBox}
              */
              get bbox() {
                return Object.freeze(new Tn(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));
              }
              get _cmapProcessor() {
                return new ea(this.cmap);
              }
              /**
              * An array of all of the unicode code points supported by the font.
              * @type {number[]}
              */
              get characterSet() {
                return this._cmapProcessor.getCharacterSet();
              }
              /**
              * Returns whether there is glyph in the font for the given unicode code point.
              *
              * @param {number} codePoint
              * @return {boolean}
              */
              hasGlyphForCodePoint(i) {
                return !!this._cmapProcessor.lookup(i);
              }
              /**
              * Maps a single unicode code point to a Glyph object.
              * Does not perform any advanced substitutions (there is no context to do so).
              *
              * @param {number} codePoint
              * @return {Glyph}
              */
              glyphForCodePoint(i) {
                return this.getGlyph(this._cmapProcessor.lookup(i), [
                  i
                ]);
              }
              /**
              * Returns an array of Glyph objects for the given string.
              * This is only a one-to-one mapping from characters to glyphs.
              * For most uses, you should use font.layout (described below), which
              * provides a much more advanced mapping supporting AAT and OpenType shaping.
              *
              * @param {string} string
              * @return {Glyph[]}
              */
              glyphsForString(i) {
                let u = [], m = i.length, L = 0, Z = -1, O = -1;
                for (; L <= m; ) {
                  let PA = 0, XA = 0;
                  if (L < m) {
                    if (PA = i.charCodeAt(L++), 55296 <= PA && PA <= 56319 && L < m) {
                      let te = i.charCodeAt(L);
                      56320 <= te && te <= 57343 && (L++, PA = ((PA & 1023) << 10) + (te & 1023) + 65536);
                    }
                    XA = 65024 <= PA && PA <= 65039 || 917760 <= PA && PA <= 917999 ? 1 : 0;
                  } else L++;
                  O === 0 && XA === 1 ? u.push(this.getGlyph(this._cmapProcessor.lookup(Z, PA), [
                    Z,
                    PA
                  ])) : O === 0 && XA === 0 && u.push(this.glyphForCodePoint(Z)), Z = PA, O = XA;
                }
                return u;
              }
              get _layoutEngine() {
                return new Xc(this);
              }
              /**
              * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.
              *
              * @param {string} string
              * @param {string[]} [userFeatures]
              * @param {string} [script]
              * @param {string} [language]
              * @param {string} [direction]
              * @return {GlyphRun}
              */
              layout(i, u, m, L, Z) {
                return this._layoutEngine.layout(i, u, m, L, Z);
              }
              /**
              * Returns an array of strings that map to the given glyph id.
              * @param {number} gid - glyph id
              */
              stringsForGlyph(i) {
                return this._layoutEngine.stringsForGlyph(i);
              }
              /**
              * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)
              * (or mapped AAT tags) supported by the font.
              * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.
              * If this is an AAT font, the OpenType feature tags are mapped to AAT features.
              *
              * @type {string[]}
              */
              get availableFeatures() {
                return this._layoutEngine.getAvailableFeatures();
              }
              getAvailableFeatures(i, u) {
                return this._layoutEngine.getAvailableFeatures(i, u);
              }
              _getBaseGlyph(i, u = []) {
                return this._glyphs[i] || (this.directory.tables.glyf ? this._glyphs[i] = new ms(i, u, this) : (this.directory.tables["CFF "] || this.directory.tables.CFF2) && (this._glyphs[i] = new B0(i, u, this))), this._glyphs[i] || null;
              }
              /**
              * Returns a glyph object for the given glyph id.
              * You can pass the array of code points this glyph represents for
              * your use later, and it will be stored in the glyph object.
              *
              * @param {number} glyph
              * @param {number[]} characters
              * @return {Glyph}
              */
              getGlyph(i, u = []) {
                return this._glyphs[i] || (this.directory.tables.sbix ? this._glyphs[i] = new c0(i, u, this) : this.directory.tables.COLR && this.directory.tables.CPAL ? this._glyphs[i] = new l0(i, u, this) : this._getBaseGlyph(i, u)), this._glyphs[i] || null;
              }
              /**
              * Returns a Subset for this font.
              * @return {Subset}
              */
              createSubset() {
                return this.directory.tables["CFF "] ? new Y0(this) : new m0(this);
              }
              /**
              * Returns an object describing the available variation axes
              * that this font supports. Keys are setting tags, and values
              * contain the axis name, range, and default value.
              *
              * @type {object}
              */
              get variationAxes() {
                let i = {};
                if (!this.fvar) return i;
                for (let u of this.fvar.axis) i[u.axisTag.trim()] = {
                  name: u.name.en,
                  min: u.minValue,
                  default: u.defaultValue,
                  max: u.maxValue
                };
                return i;
              }
              /**
              * Returns an object describing the named variation instances
              * that the font designer has specified. Keys are variation names
              * and values are the variation settings for this instance.
              *
              * @type {object}
              */
              get namedVariations() {
                let i = {};
                if (!this.fvar) return i;
                for (let u of this.fvar.instance) {
                  let m = {};
                  for (let L = 0; L < this.fvar.axis.length; L++) {
                    let Z = this.fvar.axis[L];
                    m[Z.axisTag.trim()] = u.coord[L];
                  }
                  i[u.name.en] = m;
                }
                return i;
              }
              /**
              * Returns a new font with the given variation settings applied.
              * Settings can either be an instance name, or an object containing
              * variation tags as specified by the `variationAxes` property.
              *
              * @param {object} settings
              * @return {TTFFont}
              */
              getVariation(i) {
                if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) throw new Error("Variations require a font with the fvar, gvar and glyf, or CFF2 tables.");
                if (typeof i == "string" && (i = this.namedVariations[i]), typeof i != "object") throw new Error("Variation settings must be either a variation name or settings object.");
                let u = this.fvar.axis.map((Z, O) => {
                  let PA = Z.axisTag.trim();
                  return PA in i ? Math.max(Z.minValue, Math.min(Z.maxValue, i[PA])) : Z.defaultValue;
                }), m = new A.DecodeStream(this.stream.buffer);
                m.pos = this._directoryPos;
                let L = new Ni(m, u);
                return L._tables = this._tables, L;
              }
              get _variationProcessor() {
                if (!this.fvar) return null;
                let i = this.variationCoords;
                return !i && !this.CFF2 ? null : (i || (i = this.fvar.axis.map((u) => u.defaultValue)), new M0(this, i));
              }
              // Standardized format plugin API
              getFont(i) {
                return this.getVariation(i);
              }
              constructor(i, u = null) {
                (0, a._)(this, "type", "TTF"), this.defaultLanguage = null, this.stream = i, this.variationCoords = u, this._directoryPos = this.stream.pos, this._tables = {}, this._glyphs = {}, this._decodeDirectory();
                for (let m in this.directory.tables) {
                  let L = this.directory.tables[m];
                  gs[m] && L.length > 0 && Object.defineProperty(this, m, {
                    get: this._getTable.bind(this, L)
                  });
                }
              }
            }
            (0, D._)([
              uA
            ], Ni.prototype, "bbox", null), (0, D._)([
              uA
            ], Ni.prototype, "_cmapProcessor", null), (0, D._)([
              uA
            ], Ni.prototype, "characterSet", null), (0, D._)([
              uA
            ], Ni.prototype, "_layoutEngine", null), (0, D._)([
              uA
            ], Ni.prototype, "variationAxes", null), (0, D._)([
              uA
            ], Ni.prototype, "namedVariations", null), (0, D._)([
              uA
            ], Ni.prototype, "_variationProcessor", null);
            let P0 = new A.Struct({
              tag: new A.String(4),
              offset: new A.Pointer(A.uint32, "void", {
                type: "global"
              }),
              compLength: A.uint32,
              length: A.uint32,
              origChecksum: A.uint32
            }), yo = new A.Struct({
              tag: new A.String(4),
              flavor: A.uint32,
              length: A.uint32,
              numTables: A.uint16,
              reserved: new A.Reserved(A.uint16),
              totalSfntSize: A.uint32,
              majorVersion: A.uint16,
              minorVersion: A.uint16,
              metaOffset: A.uint32,
              metaLength: A.uint32,
              metaOrigLength: A.uint32,
              privOffset: A.uint32,
              privLength: A.uint32,
              tables: new A.Array(P0, "numTables")
            });
            yo.process = function() {
              let BA = {};
              for (let i of this.tables) BA[i.tag] = i;
              this.tables = BA;
            };
            var v0 = yo;
            class b0 extends Ni {
              static probe(i) {
                return ls.decode(i.slice(0, 4)) === "wOFF";
              }
              _decodeDirectory() {
                this.directory = v0.decode(this.stream, {
                  _startOffset: 0
                });
              }
              _getTableStream(i) {
                let u = this.directory.tables[i];
                if (u)
                  if (this.stream.pos = u.offset, u.compLength < u.length) {
                    this.stream.pos += 2;
                    let m = new Uint8Array(u.length), L = T(q)(this.stream.readBuffer(u.compLength - 2), m);
                    return new A.DecodeStream(L);
                  } else return this.stream;
                return null;
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "WOFF");
              }
            }
            class z0 extends ms {
              _decode() {
                return this._font._transformedGlyphs[this.id];
              }
              _getCBox() {
                return this.path.bbox;
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "WOFF2");
              }
            }
            const Fo = {
              decode(BA) {
                let i = 0, u = [
                  0,
                  1,
                  2,
                  3,
                  4
                ];
                for (let m = 0; m < u.length; m++) {
                  let L = BA.readUInt8();
                  if (i & 3758096384) throw new Error("Overflow");
                  if (i = i << 7 | L & 127, (L & 128) === 0) return i;
                }
                throw new Error("Bad base 128 number");
              }
            };
            let T0 = [
              "cmap",
              "head",
              "hhea",
              "hmtx",
              "maxp",
              "name",
              "OS/2",
              "post",
              "cvt ",
              "fpgm",
              "glyf",
              "loca",
              "prep",
              "CFF ",
              "VORG",
              "EBDT",
              "EBLC",
              "gasp",
              "hdmx",
              "kern",
              "LTSH",
              "PCLT",
              "VDMX",
              "vhea",
              "vmtx",
              "BASE",
              "GDEF",
              "GPOS",
              "GSUB",
              "EBSC",
              "JSTF",
              "MATH",
              "CBDT",
              "CBLC",
              "COLR",
              "CPAL",
              "SVG ",
              "sbix",
              "acnt",
              "avar",
              "bdat",
              "bloc",
              "bsln",
              "cvar",
              "fdsc",
              "feat",
              "fmtx",
              "fvar",
              "gvar",
              "hsty",
              "just",
              "lcar",
              "mort",
              "morx",
              "opbd",
              "prop",
              "trak",
              "Zapf",
              "Silf",
              "Glat",
              "Gloc",
              "Feat",
              "Sill"
            ], U0 = new A.Struct({
              flags: A.uint8,
              customTag: new A.Optional(new A.String(4), (BA) => (BA.flags & 63) === 63),
              tag: (BA) => BA.customTag || T0[BA.flags & 63],
              length: Fo,
              transformVersion: (BA) => BA.flags >>> 6 & 3,
              transformed: (BA) => BA.tag === "glyf" || BA.tag === "loca" ? BA.transformVersion === 0 : BA.transformVersion !== 0,
              transformLength: new A.Optional(Fo, (BA) => BA.transformed)
            }), xo = new A.Struct({
              tag: new A.String(4),
              flavor: A.uint32,
              length: A.uint32,
              numTables: A.uint16,
              reserved: new A.Reserved(A.uint16),
              totalSfntSize: A.uint32,
              totalCompressedSize: A.uint32,
              majorVersion: A.uint16,
              minorVersion: A.uint16,
              metaOffset: A.uint32,
              metaLength: A.uint32,
              metaOrigLength: A.uint32,
              privOffset: A.uint32,
              privLength: A.uint32,
              tables: new A.Array(U0, "numTables")
            });
            xo.process = function() {
              let BA = {};
              for (let i = 0; i < this.tables.length; i++) {
                let u = this.tables[i];
                BA[u.tag] = u;
              }
              return this.tables = BA;
            };
            var N0 = xo;
            class R0 extends Ni {
              static probe(i) {
                return ls.decode(i.slice(0, 4)) === "wOF2";
              }
              _decodeDirectory() {
                this.directory = N0.decode(this.stream), this._dataPos = this.stream.pos;
              }
              _decompress() {
                if (!this._decompressed) {
                  this.stream.pos = this._dataPos;
                  let i = this.stream.readBuffer(this.directory.totalCompressedSize), u = 0;
                  for (let L in this.directory.tables) {
                    let Z = this.directory.tables[L];
                    Z.offset = u, u += Z.transformLength != null ? Z.transformLength : Z.length;
                  }
                  let m = T(AA)(i, u);
                  if (!m) throw new Error("Error decoding compressed data in WOFF2");
                  this.stream = new A.DecodeStream(m), this._decompressed = !0;
                }
              }
              _decodeTable(i) {
                return this._decompress(), super._decodeTable(i);
              }
              // Override this method to get a glyph and return our
              // custom subclass if there is a glyf table.
              _getBaseGlyph(i, u = []) {
                if (!this._glyphs[i])
                  return this.directory.tables.glyf && this.directory.tables.glyf.transformed ? (this._transformedGlyphs || this._transformGlyfTable(), this._glyphs[i] = new z0(i, u, this)) : super._getBaseGlyph(i, u);
              }
              _transformGlyfTable() {
                this._decompress(), this.stream.pos = this.directory.tables.glyf.offset;
                let i = S0.decode(this.stream), u = [];
                for (let L = 0; L < i.numGlyphs; L++) {
                  let Z = {}, O = i.nContours.readInt16BE();
                  if (Z.numberOfContours = O, O > 0) {
                    let PA = [], XA = 0;
                    for (let te = 0; te < O; te++) {
                      let ce = ga(i.nPoints);
                      XA += ce, PA.push(XA);
                    }
                    Z.points = k0(i.flags, i.glyphs, XA);
                    for (let te = 0; te < O; te++) Z.points[PA[te] - 1].endContour = !0;
                    var m = ga(i.glyphs);
                  } else if (O < 0 && ms.prototype._decodeComposite.call({
                    _font: this
                  }, Z, i.composites))
                    var m = ga(i.glyphs);
                  u.push(Z);
                }
                this._transformedGlyphs = u;
              }
              constructor(...i) {
                super(...i), (0, a._)(this, "type", "WOFF2");
              }
            }
            class Xn {
              decode(i, u) {
                return new A.DecodeStream(this._buf.decode(i, u));
              }
              constructor(i) {
                this.length = i, this._buf = new A.Buffer(i);
              }
            }
            let S0 = new A.Struct({
              version: A.uint32,
              numGlyphs: A.uint16,
              indexFormat: A.uint16,
              nContourStreamSize: A.uint32,
              nPointsStreamSize: A.uint32,
              flagStreamSize: A.uint32,
              glyphStreamSize: A.uint32,
              compositeStreamSize: A.uint32,
              bboxStreamSize: A.uint32,
              instructionStreamSize: A.uint32,
              nContours: new Xn("nContourStreamSize"),
              nPoints: new Xn("nPointsStreamSize"),
              flags: new Xn("flagStreamSize"),
              glyphs: new Xn("glyphStreamSize"),
              composites: new Xn("compositeStreamSize"),
              bboxes: new Xn("bboxStreamSize"),
              instructions: new Xn("instructionStreamSize")
            });
            const G0 = 253, H0 = 254, L0 = 255, po = 253;
            function ga(BA) {
              let i = BA.readUInt8();
              return i === G0 ? BA.readUInt16BE() : i === L0 ? BA.readUInt8() + po : i === H0 ? BA.readUInt8() + po * 2 : i;
            }
            function En(BA, i) {
              return BA & 1 ? i : -i;
            }
            function k0(BA, i, u) {
              let m, L = m = 0, Z = [];
              for (let XA = 0; XA < u; XA++) {
                let te = 0, ce = 0, ge = BA.readUInt8(), Ge = !(ge >> 7);
                if (ge &= 127, ge < 10)
                  te = 0, ce = En(ge, ((ge & 14) << 7) + i.readUInt8());
                else if (ge < 20)
                  te = En(ge, ((ge - 10 & 14) << 7) + i.readUInt8()), ce = 0;
                else if (ge < 84) {
                  var O = ge - 20, PA = i.readUInt8();
                  te = En(ge, 1 + (O & 48) + (PA >> 4)), ce = En(ge >> 1, 1 + ((O & 12) << 2) + (PA & 15));
                } else if (ge < 120) {
                  var O = ge - 84;
                  te = En(ge, 1 + (O / 12 << 8) + i.readUInt8()), ce = En(ge >> 1, 1 + (O % 12 >> 2 << 8) + i.readUInt8());
                } else if (ge < 124) {
                  var PA = i.readUInt8();
                  let ot = i.readUInt8();
                  te = En(ge, (PA << 4) + (ot >> 4)), ce = En(ge >> 1, ((ot & 15) << 8) + i.readUInt8());
                } else
                  te = En(ge, i.readUInt16BE()), ce = En(ge >> 1, i.readUInt16BE());
                L += te, m += ce, Z.push(new nn(Ge, !1, L, m));
              }
              return Z;
            }
            let j0 = new A.VersionedStruct(A.uint32, {
              65536: {
                numFonts: A.uint32,
                offsets: new A.Array(A.uint32, "numFonts")
              },
              131072: {
                numFonts: A.uint32,
                offsets: new A.Array(A.uint32, "numFonts"),
                dsigTag: A.uint32,
                dsigLength: A.uint32,
                dsigOffset: A.uint32
              }
            });
            class O0 {
              static probe(i) {
                return ls.decode(i.slice(0, 4)) === "ttcf";
              }
              getFont(i) {
                for (let u of this.header.offsets) {
                  let m = new A.DecodeStream(this.stream.buffer);
                  m.pos = u;
                  let L = new Ni(m);
                  if (L.postscriptName === i || L.postscriptName instanceof Uint8Array && i instanceof Uint8Array && L.postscriptName.every((Z, O) => i[O] === Z)) return L;
                }
                return null;
              }
              get fonts() {
                let i = [];
                for (let u of this.header.offsets) {
                  let m = new A.DecodeStream(this.stream.buffer);
                  m.pos = u, i.push(new Ni(m));
                }
                return i;
              }
              constructor(i) {
                if ((0, a._)(this, "type", "TTC"), this.stream = i, i.readString(4) !== "ttcf") throw new Error("Not a TrueType collection");
                this.header = j0.decode(i);
              }
            }
            let J0 = new A.String(A.uint8);
            new A.Struct({
              len: A.uint32,
              buf: new A.Buffer("len")
            });
            let K0 = new A.Struct({
              id: A.uint16,
              nameOffset: A.int16,
              attr: A.uint8,
              dataOffset: A.uint24,
              handle: A.uint32
            }), W0 = new A.Struct({
              name: new A.String(4),
              maxTypeIndex: A.uint16,
              refList: new A.Pointer(A.uint16, new A.Array(K0, (BA) => BA.maxTypeIndex + 1), {
                type: "parent"
              })
            }), V0 = new A.Struct({
              length: A.uint16,
              types: new A.Array(W0, (BA) => BA.length + 1)
            }), X0 = new A.Struct({
              reserved: new A.Reserved(A.uint8, 24),
              typeList: new A.Pointer(A.uint16, V0),
              nameListOffset: new A.Pointer(A.uint16, "void")
            }), mo = new A.Struct({
              dataOffset: A.uint32,
              map: new A.Pointer(A.uint32, X0),
              dataLength: A.uint32,
              mapLength: A.uint32
            });
            class Z0 {
              static probe(i) {
                let u = new A.DecodeStream(i);
                try {
                  var m = mo.decode(u);
                } catch {
                  return !1;
                }
                for (let L of m.map.typeList.types)
                  if (L.name === "sfnt") return !0;
                return !1;
              }
              getFont(i) {
                if (!this.sfnt) return null;
                for (let u of this.sfnt.refList) {
                  let m = this.header.dataOffset + u.dataOffset + 4, L = new A.DecodeStream(this.stream.buffer.slice(m)), Z = new Ni(L);
                  if (Z.postscriptName === i || Z.postscriptName instanceof Uint8Array && i instanceof Uint8Array && Z.postscriptName.every((O, PA) => i[PA] === O)) return Z;
                }
                return null;
              }
              get fonts() {
                let i = [];
                for (let u of this.sfnt.refList) {
                  let m = this.header.dataOffset + u.dataOffset + 4, L = new A.DecodeStream(this.stream.buffer.slice(m));
                  i.push(new Ni(L));
                }
                return i;
              }
              constructor(i) {
                (0, a._)(this, "type", "DFont"), this.stream = i, this.header = mo.decode(this.stream);
                for (let u of this.header.map.typeList.types) {
                  for (let m of u.refList) m.nameOffset >= 0 ? (this.stream.pos = m.nameOffset + this.header.map.nameListOffset, m.name = J0.decode(this.stream)) : m.name = null;
                  u.name === "sfnt" && (this.sfnt = u);
                }
              }
            }
            IA(Ni), IA(b0), IA(R0), IA(O0), IA(Z0), K(Q.exports, H);
          },
          /***/
          2532(Q, B, r) {
            var A = r(7571), a = r(3915);
            function D(xA) {
              return xA && xA.__esModule ? xA.default : xA;
            }
            const x = 5, N = 12, P = 13, d = 16, J = 17, q = 22, AA = 28, K = 31, z = 33, T = 34, H = 35, eA = 36, CA = 37, IA = 38, k = 39, tA = 40, lA = 41, uA = 42, w = 0, v = 1, RA = 2, DA = 3, $ = 4, cA = [
              //OP   , CL    , CP    , QU    , GL    , NS    , EX    , SY    , IS    , PR    , PO    , NU    , AL    , HL    , ID    , IN    , HY    , BA    , BB    , B2    , ZW    , CM    , WJ    , H2    , H3    , JL    , JV    , JT    , RI    , EB    , EM    , ZWJ   , CB
              [
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                DA,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $,
                $
              ],
              [
                w,
                $,
                $,
                v,
                v,
                $,
                $,
                $,
                $,
                v,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                $,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                $,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                v,
                w,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                w,
                v,
                $,
                $,
                $,
                w,
                w,
                v,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                w,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                $,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v,
                v
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                v,
                v,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                v,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                v,
                v,
                v,
                v,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                v,
                v,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                v,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                v,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                w,
                v,
                w,
                w,
                w,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                v,
                $,
                $,
                v,
                v,
                v,
                $,
                $,
                $,
                v,
                v,
                v,
                v,
                v,
                w,
                v,
                v,
                v,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ],
              [
                w,
                $,
                $,
                v,
                v,
                w,
                $,
                $,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                $,
                RA,
                $,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                w,
                v,
                w
              ]
              // CB
            ], Ae = D(a).toByteArray(" "), kA = new (D(A))(Ae), VA = function(xA) {
              switch (xA) {
                case z:
                  return N;
                case k:
                case tA:
                case uA:
                  return N;
                case H:
                  return x;
                default:
                  return xA;
              }
            }, EA = function(xA) {
              switch (xA) {
                case CA:
                case IA:
                  return T;
                case lA:
                  return q;
                default:
                  return xA;
              }
            };
            class zA {
              constructor(LA, yA = !1) {
                this.position = LA, this.required = yA;
              }
            }
            class OA {
              nextCodePoint() {
                const LA = this.string.charCodeAt(this.pos++), yA = this.string.charCodeAt(this.pos);
                return 55296 <= LA && LA <= 56319 && 56320 <= yA && yA <= 57343 ? (this.pos++, (LA - 55296) * 1024 + (yA - 56320) + 65536) : LA;
              }
              nextCharClass() {
                return VA(kA.get(this.nextCodePoint()));
              }
              getSimpleBreak() {
                switch (this.nextClass) {
                  case lA:
                    return !1;
                  case T:
                  case CA:
                  case IA:
                    return this.curClass = T, !1;
                  case eA:
                    return this.curClass = eA, !1;
                }
                return null;
              }
              getPairTableBreak(LA) {
                let yA = !1;
                switch (cA[this.curClass][this.nextClass]) {
                  case w:
                    yA = !0;
                    break;
                  case v:
                    yA = LA === lA;
                    break;
                  case RA:
                    if (yA = LA === lA, !yA)
                      return yA = !1, yA;
                    break;
                  case DA:
                    if (LA !== lA) return yA;
                    break;
                }
                return this.LB8a && (yA = !1), this.LB21a && (this.curClass === d || this.curClass === J) ? (yA = !1, this.LB21a = !1) : this.LB21a = this.curClass === P, this.curClass === AA ? (this.LB30a++, this.LB30a == 2 && this.nextClass === AA && (yA = !0, this.LB30a = 0)) : this.LB30a = 0, this.curClass = this.nextClass, yA;
              }
              nextBreak() {
                if (this.curClass == null) {
                  let LA = this.nextCharClass();
                  this.curClass = EA(LA), this.nextClass = LA, this.LB8a = LA === K, this.LB30a = 0;
                }
                for (; this.pos < this.string.length; ) {
                  this.lastPos = this.pos;
                  const LA = this.nextClass;
                  if (this.nextClass = this.nextCharClass(), this.curClass === T || this.curClass === eA && this.nextClass !== CA)
                    return this.curClass = EA(VA(this.nextClass)), new zA(this.lastPos, !0);
                  let yA = this.getSimpleBreak();
                  if (yA === null && (yA = this.getPairTableBreak(LA)), this.LB8a = this.nextClass === K, yA) return new zA(this.lastPos);
                }
                return this.lastPos < this.string.length ? (this.lastPos = this.string.length, new zA(this.string.length)) : null;
              }
              constructor(LA) {
                this.string = LA, this.pos = 0, this.lastPos = 0, this.curClass = null, this.nextClass = null, this.LB8a = !1, this.LB21a = !1, this.LB30a = 0;
              }
            }
            Q.exports = OA;
          },
          /***/
          5233(Q) {
            function B(G, W) {
              return Object.keys(W).forEach(function(aA) {
                aA === "default" || aA === "__esModule" || Object.prototype.hasOwnProperty.call(G, aA) || Object.defineProperty(G, aA, {
                  enumerable: !0,
                  get: function() {
                    return W[aA];
                  }
                });
              }), G;
            }
            function r(G, W, aA, j) {
              Object.defineProperty(G, W, { get: aA, set: j, enumerable: !0, configurable: !0 });
            }
            r(Q.exports, "EncodeStream", () => N), r(Q.exports, "DecodeStream", () => a), r(Q.exports, "Array", () => QA), r(Q.exports, "LazyArray", () => bA), r(Q.exports, "Bitfield", () => M), r(Q.exports, "Boolean", () => FA), r(Q.exports, "Buffer", () => dA), r(Q.exports, "Enum", () => he), r(Q.exports, "Optional", () => ie), r(Q.exports, "Reserved", () => KA), r(Q.exports, "String", () => Pe), r(Q.exports, "Struct", () => Re), r(Q.exports, "VersionedStruct", () => se);
            const A = {
              utf16le: "utf-16le",
              ucs2: "utf-16le",
              utf16be: "utf-16be"
            };
            class a {
              constructor(W) {
                this.buffer = W, this.view = new DataView(W.buffer, W.byteOffset, W.byteLength), this.pos = 0, this.length = this.buffer.length;
              }
              readString(W, aA = "ascii") {
                aA = A[aA] || aA;
                let j = this.readBuffer(W);
                try {
                  return new TextDecoder(aA).decode(j);
                } catch {
                  return j;
                }
              }
              readBuffer(W) {
                return this.buffer.slice(this.pos, this.pos += W);
              }
              readUInt24BE() {
                return (this.readUInt16BE() << 8) + this.readUInt8();
              }
              readUInt24LE() {
                return this.readUInt16LE() + (this.readUInt8() << 16);
              }
              readInt24BE() {
                return (this.readInt16BE() << 8) + this.readUInt8();
              }
              readInt24LE() {
                return this.readUInt16LE() + (this.readInt8() << 16);
              }
            }
            a.TYPES = {
              UInt8: 1,
              UInt16: 2,
              UInt24: 3,
              UInt32: 4,
              Int8: 1,
              Int16: 2,
              Int24: 3,
              Int32: 4,
              Float: 4,
              Double: 8
            };
            for (let G of Object.getOwnPropertyNames(DataView.prototype)) if (G.slice(0, 3) === "get") {
              let W = G.slice(3).replace("Ui", "UI");
              W === "Float32" ? W = "Float" : W === "Float64" && (W = "Double");
              let aA = a.TYPES[W];
              a.prototype["read" + W + (aA === 1 ? "" : "BE")] = function() {
                const j = this.view[G](this.pos, !1);
                return this.pos += aA, j;
              }, aA !== 1 && (a.prototype["read" + W + "LE"] = function() {
                const j = this.view[G](this.pos, !0);
                return this.pos += aA, j;
              });
            }
            const D = new TextEncoder(), x = new Uint8Array(new Uint16Array([
              4660
            ]).buffer)[0] == 18;
            class N {
              constructor(W) {
                this.buffer = W, this.view = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength), this.pos = 0;
              }
              writeBuffer(W) {
                this.buffer.set(W, this.pos), this.pos += W.length;
              }
              writeString(W, aA = "ascii") {
                let j;
                switch (aA) {
                  case "utf16le":
                  case "utf16-le":
                  case "ucs2":
                    j = P(W, x);
                    break;
                  case "utf16be":
                  case "utf16-be":
                    j = P(W, !x);
                    break;
                  case "utf8":
                    j = D.encode(W);
                    break;
                  case "ascii":
                    j = d(W);
                    break;
                  default:
                    throw new Error(`Unsupported encoding: ${aA}`);
                }
                this.writeBuffer(j);
              }
              writeUInt24BE(W) {
                this.buffer[this.pos++] = W >>> 16 & 255, this.buffer[this.pos++] = W >>> 8 & 255, this.buffer[this.pos++] = W & 255;
              }
              writeUInt24LE(W) {
                this.buffer[this.pos++] = W & 255, this.buffer[this.pos++] = W >>> 8 & 255, this.buffer[this.pos++] = W >>> 16 & 255;
              }
              writeInt24BE(W) {
                W >= 0 ? this.writeUInt24BE(W) : this.writeUInt24BE(W + 16777215 + 1);
              }
              writeInt24LE(W) {
                W >= 0 ? this.writeUInt24LE(W) : this.writeUInt24LE(W + 16777215 + 1);
              }
              fill(W, aA) {
                if (aA < this.buffer.length)
                  this.buffer.fill(W, this.pos, this.pos + aA), this.pos += aA;
                else {
                  const j = new Uint8Array(aA);
                  j.fill(W), this.writeBuffer(j);
                }
              }
            }
            function P(G, W) {
              let aA = new Uint16Array(G.length);
              for (let j = 0; j < G.length; j++) {
                let pA = G.charCodeAt(j);
                W && (pA = pA >> 8 | (pA & 255) << 8), aA[j] = pA;
              }
              return new Uint8Array(aA.buffer);
            }
            function d(G) {
              let W = new Uint8Array(G.length);
              for (let aA = 0; aA < G.length; aA++)
                W[aA] = G.charCodeAt(aA);
              return W;
            }
            for (let G of Object.getOwnPropertyNames(DataView.prototype)) if (G.slice(0, 3) === "set") {
              let W = G.slice(3).replace("Ui", "UI");
              W === "Float32" ? W = "Float" : W === "Float64" && (W = "Double");
              let aA = a.TYPES[W];
              N.prototype["write" + W + (aA === 1 ? "" : "BE")] = function(j) {
                this.view[G](this.pos, j, !1), this.pos += aA;
              }, aA !== 1 && (N.prototype["write" + W + "LE"] = function(j) {
                this.view[G](this.pos, j, !0), this.pos += aA;
              });
            }
            class J {
              fromBuffer(W) {
                let aA = new a(W);
                return this.decode(aA);
              }
              toBuffer(W) {
                let aA = this.size(W), j = new Uint8Array(aA), pA = new N(j);
                return this.encode(pA, W), j;
              }
            }
            var q = {};
            r(q, "Number", () => AA), r(q, "uint8", () => K), r(q, "uint16be", () => z), r(q, "uint16", () => T), r(q, "uint16le", () => H), r(q, "uint24be", () => eA), r(q, "uint24", () => CA), r(q, "uint24le", () => IA), r(q, "uint32be", () => k), r(q, "uint32", () => tA), r(q, "uint32le", () => lA), r(q, "int8", () => uA), r(q, "int16be", () => w), r(q, "int16", () => v), r(q, "int16le", () => RA), r(q, "int24be", () => DA), r(q, "int24", () => $), r(q, "int24le", () => cA), r(q, "int32be", () => Ae), r(q, "int32", () => kA), r(q, "int32le", () => VA), r(q, "floatbe", () => EA), r(q, "float", () => zA), r(q, "floatle", () => OA), r(q, "doublebe", () => xA), r(q, "double", () => LA), r(q, "doublele", () => yA), r(q, "Fixed", () => TA), r(q, "fixed16be", () => fA), r(q, "fixed16", () => sA), r(q, "fixed16le", () => F), r(q, "fixed32be", () => o), r(q, "fixed32", () => h), r(q, "fixed32le", () => _);
            class AA extends J {
              constructor(W, aA = "BE") {
                super(), this.type = W, this.endian = aA, this.fn = this.type, this.type[this.type.length - 1] !== "8" && (this.fn += this.endian);
              }
              size() {
                return a.TYPES[this.type];
              }
              decode(W) {
                return W[`read${this.fn}`]();
              }
              encode(W, aA) {
                return W[`write${this.fn}`](aA);
              }
            }
            const K = new AA("UInt8"), z = new AA("UInt16", "BE"), T = z, H = new AA("UInt16", "LE"), eA = new AA("UInt24", "BE"), CA = eA, IA = new AA("UInt24", "LE"), k = new AA("UInt32", "BE"), tA = k, lA = new AA("UInt32", "LE"), uA = new AA("Int8"), w = new AA("Int16", "BE"), v = w, RA = new AA("Int16", "LE"), DA = new AA("Int24", "BE"), $ = DA, cA = new AA("Int24", "LE"), Ae = new AA("Int32", "BE"), kA = Ae, VA = new AA("Int32", "LE"), EA = new AA("Float", "BE"), zA = EA, OA = new AA("Float", "LE"), xA = new AA("Double", "BE"), LA = xA, yA = new AA("Double", "LE");
            class TA extends AA {
              constructor(W, aA, j = W >> 1) {
                super(`Int${W}`, aA), this._point = 1 << j;
              }
              decode(W) {
                return super.decode(W) / this._point;
              }
              encode(W, aA) {
                return super.encode(W, aA * this._point | 0);
              }
            }
            const fA = new TA(16, "BE"), sA = fA, F = new TA(16, "LE"), o = new TA(32, "BE"), h = o, _ = new TA(32, "LE");
            var oA = {};
            r(oA, "resolveLength", () => p), r(oA, "PropertyDescriptor", () => rA);
            function p(G, W, aA) {
              let j;
              if (typeof G == "number" ? j = G : typeof G == "function" ? j = G.call(aA, aA) : aA && typeof G == "string" ? j = aA[G] : W && G instanceof AA && (j = G.decode(W)), isNaN(j)) throw new Error("Not a fixed size");
              return j;
            }
            class rA {
              constructor(W = {}) {
                this.enumerable = !0, this.configurable = !0;
                for (let aA in W) {
                  const j = W[aA];
                  this[aA] = j;
                }
              }
            }
            class QA extends J {
              constructor(W, aA, j = "count") {
                super(), this.type = W, this.length = aA, this.lengthType = j;
              }
              decode(W, aA) {
                let j;
                const { pos: pA } = W, Be = [];
                let Ie = aA;
                if (this.length != null && (j = p(this.length, W, aA)), this.length instanceof AA && (Object.defineProperties(Be, {
                  parent: {
                    value: aA
                  },
                  _startOffset: {
                    value: pA
                  },
                  _currentOffset: {
                    value: 0,
                    writable: !0
                  },
                  _length: {
                    value: j
                  }
                }), Ie = Be), j == null || this.lengthType === "bytes") {
                  const ee = j != null ? W.pos + j : aA?._length ? aA._startOffset + aA._length : W.length;
                  for (; W.pos < ee; ) Be.push(this.type.decode(W, Ie));
                } else for (let ee = 0, Me = j; ee < Me; ee++) Be.push(this.type.decode(W, Ie));
                return Be;
              }
              size(W, aA, j = !0) {
                if (!W) return this.type.size(null, aA) * p(this.length, null, aA);
                let pA = 0;
                this.length instanceof AA && (pA += this.length.size(), aA = {
                  parent: aA,
                  pointerSize: 0
                });
                for (let Be of W) pA += this.type.size(Be, aA);
                return aA && j && this.length instanceof AA && (pA += aA.pointerSize), pA;
              }
              encode(W, aA, j) {
                let pA = j;
                this.length instanceof AA && (pA = {
                  pointers: [],
                  startOffset: W.pos,
                  parent: j
                }, pA.pointerOffset = W.pos + this.size(aA, pA, !1), this.length.encode(W, aA.length));
                for (let Be of aA) this.type.encode(W, Be, pA);
                if (this.length instanceof AA) {
                  let Be = 0;
                  for (; Be < pA.pointers.length; ) {
                    const Ie = pA.pointers[Be++];
                    Ie.type.encode(W, Ie.val, Ie.parent);
                  }
                }
              }
            }
            class bA extends QA {
              decode(W, aA) {
                const { pos: j } = W, pA = p(this.length, W, aA);
                this.length instanceof AA && (aA = {
                  parent: aA,
                  _startOffset: j,
                  _currentOffset: 0,
                  _length: pA
                });
                const Be = new y(this.type, pA, W, aA);
                return W.pos += pA * this.type.size(null, aA), Be;
              }
              size(W, aA) {
                return W instanceof y && (W = W.toArray()), super.size(W, aA);
              }
              encode(W, aA, j) {
                return aA instanceof y && (aA = aA.toArray()), super.encode(W, aA, j);
              }
            }
            class y {
              constructor(W, aA, j, pA) {
                this.type = W, this.length = aA, this.stream = j, this.ctx = pA, this.base = this.stream.pos, this.items = [];
              }
              get(W) {
                if (!(W < 0 || W >= this.length)) {
                  if (this.items[W] == null) {
                    const { pos: aA } = this.stream;
                    this.stream.pos = this.base + this.type.size(null, this.ctx) * W, this.items[W] = this.type.decode(this.stream, this.ctx), this.stream.pos = aA;
                  }
                  return this.items[W];
                }
              }
              toArray() {
                const W = [];
                for (let aA = 0, j = this.length; aA < j; aA++) W.push(this.get(aA));
                return W;
              }
            }
            class M extends J {
              constructor(W, aA = []) {
                super(), this.type = W, this.flags = aA;
              }
              decode(W) {
                const aA = this.type.decode(W), j = {};
                for (let pA = 0; pA < this.flags.length; pA++) {
                  const Be = this.flags[pA];
                  Be != null && (j[Be] = !!(aA & 1 << pA));
                }
                return j;
              }
              size() {
                return this.type.size();
              }
              encode(W, aA) {
                let j = 0;
                for (let pA = 0; pA < this.flags.length; pA++) {
                  const Be = this.flags[pA];
                  Be != null && aA[Be] && (j |= 1 << pA);
                }
                return this.type.encode(W, j);
              }
            }
            class FA extends J {
              constructor(W) {
                super(), this.type = W;
              }
              decode(W, aA) {
                return !!this.type.decode(W, aA);
              }
              size(W, aA) {
                return this.type.size(W, aA);
              }
              encode(W, aA, j) {
                return this.type.encode(W, +aA, j);
              }
            }
            class dA extends J {
              constructor(W) {
                super(), this.length = W;
              }
              decode(W, aA) {
                const j = p(this.length, W, aA);
                return W.readBuffer(j);
              }
              size(W, aA) {
                if (!W) return p(this.length, null, aA);
                let j = W.length;
                return this.length instanceof AA && (j += this.length.size()), j;
              }
              encode(W, aA, j) {
                return this.length instanceof AA && this.length.encode(W, aA.length), W.writeBuffer(aA);
              }
            }
            class he extends J {
              constructor(W, aA = []) {
                super(), this.type = W, this.options = aA;
              }
              decode(W) {
                const aA = this.type.decode(W);
                return this.options[aA] || aA;
              }
              size() {
                return this.type.size();
              }
              encode(W, aA) {
                const j = this.options.indexOf(aA);
                if (j === -1) throw new Error(`Unknown option in enum: ${aA}`);
                return this.type.encode(W, j);
              }
            }
            class ie extends J {
              constructor(W, aA = !0) {
                super(), this.type = W, this.condition = aA;
              }
              decode(W, aA) {
                let { condition: j } = this;
                if (typeof j == "function" && (j = j.call(aA, aA)), j) return this.type.decode(W, aA);
              }
              size(W, aA) {
                let { condition: j } = this;
                return typeof j == "function" && (j = j.call(aA, aA)), j ? this.type.size(W, aA) : 0;
              }
              encode(W, aA, j) {
                let { condition: pA } = this;
                if (typeof pA == "function" && (pA = pA.call(j, j)), pA) return this.type.encode(W, aA, j);
              }
            }
            class KA extends J {
              constructor(W, aA = 1) {
                super(), this.type = W, this.count = aA;
              }
              decode(W, aA) {
                W.pos += this.size(null, aA);
              }
              size(W, aA) {
                const j = p(this.count, null, aA);
                return this.type.size() * j;
              }
              encode(W, aA, j) {
                return W.fill(0, this.size(aA, j));
              }
            }
            class Pe extends J {
              constructor(W, aA = "ascii") {
                super(), this.length = W, this.encoding = aA;
              }
              decode(W, aA) {
                let j, pA, { encoding: Be } = this;
                typeof Be == "function" && (Be = Be.call(aA, aA) || "ascii");
                let Ie = Je(Be);
                if (this.length != null) j = p(this.length, W, aA);
                else {
                  let Me;
                  for ({ buffer: Me, length: j, pos: pA } = W; pA < j - Ie + 1 && (Me[pA] !== 0 || Ie === 2 && Me[pA + 1] !== 0); ) pA += Ie;
                  j = pA - W.pos;
                }
                const ee = W.readString(j, Be);
                return this.length == null && W.pos < W.length && (W.pos += Ie), ee;
              }
              size(W, aA) {
                if (W == null) return p(this.length, null, aA);
                let { encoding: j } = this;
                typeof j == "function" && (j = j.call(aA?.val, aA?.val) || "ascii"), j === "utf16be" && (j = "utf16le");
                let pA = Le(W, j);
                return this.length instanceof AA && (pA += this.length.size()), this.length == null && (pA += Je(j)), pA;
              }
              encode(W, aA, j) {
                let { encoding: pA } = this;
                if (typeof pA == "function" && (pA = pA.call(j?.val, j?.val) || "ascii"), this.length instanceof AA && this.length.encode(W, Le(aA, pA)), W.writeString(aA, pA), this.length == null) return Je(pA) == 2 ? W.writeUInt16LE(0) : W.writeUInt8(0);
              }
            }
            function Je(G) {
              switch (G) {
                case "ascii":
                case "utf8":
                  return 1;
                case "utf16le":
                case "utf16-le":
                case "utf-16be":
                case "utf-16le":
                case "utf16be":
                case "utf16-be":
                case "ucs2":
                  return 2;
                default:
                  return 1;
              }
            }
            function Le(G, W) {
              switch (W) {
                case "ascii":
                  return G.length;
                case "utf8":
                  let aA = 0;
                  for (let j = 0; j < G.length; j++) {
                    let pA = G.charCodeAt(j);
                    if (pA >= 55296 && pA <= 56319 && j < G.length - 1) {
                      let Be = G.charCodeAt(++j);
                      (Be & 64512) === 56320 ? pA = ((pA & 1023) << 10) + (Be & 1023) + 65536 : j--;
                    }
                    (pA & 4294967168) === 0 ? aA++ : (pA & 4294965248) === 0 ? aA += 2 : (pA & 4294901760) === 0 ? aA += 3 : (pA & 4292870144) === 0 && (aA += 4);
                  }
                  return aA;
                case "utf16le":
                case "utf16-le":
                case "utf16be":
                case "utf16-be":
                case "ucs2":
                  return G.length * 2;
                default:
                  throw new Error("Unknown encoding " + W);
              }
            }
            class Re extends J {
              constructor(W = {}) {
                super(), this.fields = W;
              }
              decode(W, aA, j = 0) {
                const pA = this._setup(W, aA, j);
                return this._parseFields(W, pA, this.fields), this.process != null && this.process.call(pA, W), pA;
              }
              _setup(W, aA, j) {
                const pA = {};
                return Object.defineProperties(pA, {
                  parent: {
                    value: aA
                  },
                  _startOffset: {
                    value: W.pos
                  },
                  _currentOffset: {
                    value: 0,
                    writable: !0
                  },
                  _length: {
                    value: j
                  }
                }), pA;
              }
              _parseFields(W, aA, j) {
                for (let Be in j) {
                  var pA;
                  const Ie = j[Be];
                  typeof Ie == "function" ? pA = Ie.call(aA, aA) : pA = Ie.decode(W, aA), pA !== void 0 && (pA instanceof rA ? Object.defineProperty(aA, Be, pA) : aA[Be] = pA), aA._currentOffset = W.pos - aA._startOffset;
                }
              }
              size(W, aA, j = !0) {
                W == null && (W = {});
                const pA = {
                  parent: aA,
                  val: W,
                  pointerSize: 0
                };
                this.preEncode != null && this.preEncode.call(W);
                let Be = 0;
                for (let Ie in this.fields) {
                  const ee = this.fields[Ie];
                  ee.size != null && (Be += ee.size(W[Ie], pA));
                }
                return j && (Be += pA.pointerSize), Be;
              }
              encode(W, aA, j) {
                let pA;
                this.preEncode != null && this.preEncode.call(aA, W);
                const Be = {
                  pointers: [],
                  startOffset: W.pos,
                  parent: j,
                  val: aA,
                  pointerSize: 0
                };
                Be.pointerOffset = W.pos + this.size(aA, Be, !1);
                for (let ee in this.fields)
                  pA = this.fields[ee], pA.encode != null && pA.encode(W, aA[ee], Be);
                let Ie = 0;
                for (; Ie < Be.pointers.length; ) {
                  const ee = Be.pointers[Ie++];
                  ee.type.encode(W, ee.val, ee.parent);
                }
              }
            }
            const _e = (G, W) => W.reduce((aA, j) => aA && aA[j], G);
            class se extends Re {
              constructor(W, aA = {}) {
                super(), this.type = W, this.versions = aA, typeof W == "string" && (this.versionPath = W.split("."));
              }
              decode(W, aA, j = 0) {
                const pA = this._setup(W, aA, j);
                typeof this.type == "string" ? pA.version = _e(aA, this.versionPath) : pA.version = this.type.decode(W), this.versions.header && this._parseFields(W, pA, this.versions.header);
                const Be = this.versions[pA.version];
                if (Be == null) throw new Error(`Unknown version ${pA.version}`);
                return Be instanceof se ? Be.decode(W, aA) : (this._parseFields(W, pA, Be), this.process != null && this.process.call(pA, W), pA);
              }
              size(W, aA, j = !0) {
                let pA, Be;
                if (!W) throw new Error("Not a fixed size");
                this.preEncode != null && this.preEncode.call(W);
                const Ie = {
                  parent: aA,
                  val: W,
                  pointerSize: 0
                };
                let ee = 0;
                if (typeof this.type != "string" && (ee += this.type.size(W.version, Ie)), this.versions.header) for (pA in this.versions.header)
                  Be = this.versions.header[pA], Be.size != null && (ee += Be.size(W[pA], Ie));
                const Me = this.versions[W.version];
                if (Me == null) throw new Error(`Unknown version ${W.version}`);
                for (pA in Me)
                  Be = Me[pA], Be.size != null && (ee += Be.size(W[pA], Ie));
                return j && (ee += Ie.pointerSize), ee;
              }
              encode(W, aA, j) {
                let pA, Be;
                this.preEncode != null && this.preEncode.call(aA, W);
                const Ie = {
                  pointers: [],
                  startOffset: W.pos,
                  parent: j,
                  val: aA,
                  pointerSize: 0
                };
                if (Ie.pointerOffset = W.pos + this.size(aA, Ie, !1), typeof this.type != "string" && this.type.encode(W, aA.version), this.versions.header) for (pA in this.versions.header)
                  Be = this.versions.header[pA], Be.encode != null && Be.encode(W, aA[pA], Ie);
                const ee = this.versions[aA.version];
                for (pA in ee)
                  Be = ee[pA], Be.encode != null && Be.encode(W, aA[pA], Ie);
                let Me = 0;
                for (; Me < Ie.pointers.length; ) {
                  const MA = Ie.pointers[Me++];
                  MA.type.encode(W, MA.val, MA.parent);
                }
              }
            }
            var Ee = {};
            r(Ee, "Pointer", () => wA), r(Ee, "VoidPointer", () => R);
            class wA extends J {
              constructor(W, aA, j = {}) {
                if (super(), this.offsetType = W, this.type = aA, this.options = j, this.type === "void" && (this.type = null), this.options.type == null && (this.options.type = "local"), this.options.allowNull == null && (this.options.allowNull = !0), this.options.nullValue == null && (this.options.nullValue = 0), this.options.lazy == null && (this.options.lazy = !1), this.options.relativeTo) {
                  if (typeof this.options.relativeTo != "function") throw new Error("relativeTo option must be a function");
                  this.relativeToGetter = j.relativeTo;
                }
              }
              decode(W, aA) {
                const j = this.offsetType.decode(W, aA);
                if (j === this.options.nullValue && this.options.allowNull) return null;
                let pA;
                switch (this.options.type) {
                  case "local":
                    pA = aA._startOffset;
                    break;
                  case "immediate":
                    pA = W.pos - this.offsetType.size();
                    break;
                  case "parent":
                    pA = aA.parent._startOffset;
                    break;
                  default:
                    for (var Be = aA; Be.parent; ) Be = Be.parent;
                    pA = Be._startOffset || 0;
                }
                this.options.relativeTo && (pA += this.relativeToGetter(aA));
                const Ie = j + pA;
                if (this.type != null) {
                  let ee = null;
                  const Me = () => {
                    if (ee != null) return ee;
                    const { pos: MA } = W;
                    return W.pos = Ie, ee = this.type.decode(W, aA), W.pos = MA, ee;
                  };
                  return this.options.lazy ? new rA({
                    get: Me
                  }) : Me();
                } else return Ie;
              }
              size(W, aA) {
                const j = aA;
                switch (this.options.type) {
                  case "local":
                  case "immediate":
                    break;
                  case "parent":
                    aA = aA.parent;
                    break;
                  default:
                    for (; aA.parent; ) aA = aA.parent;
                }
                let { type: pA } = this;
                if (pA == null) {
                  if (!(W instanceof R)) throw new Error("Must be a VoidPointer");
                  ({ type: pA } = W), W = W.value;
                }
                if (W && aA) {
                  let Be = pA.size(W, j);
                  aA.pointerSize += Be;
                }
                return this.offsetType.size();
              }
              encode(W, aA, j) {
                let pA;
                const Be = j;
                if (aA == null) {
                  this.offsetType.encode(W, this.options.nullValue);
                  return;
                }
                switch (this.options.type) {
                  case "local":
                    pA = j.startOffset;
                    break;
                  case "immediate":
                    pA = W.pos + this.offsetType.size(aA, Be);
                    break;
                  case "parent":
                    j = j.parent, pA = j.startOffset;
                    break;
                  default:
                    for (pA = 0; j.parent; ) j = j.parent;
                }
                this.options.relativeTo && (pA += this.relativeToGetter(Be.val)), this.offsetType.encode(W, j.pointerOffset - pA);
                let { type: Ie } = this;
                if (Ie == null) {
                  if (!(aA instanceof R)) throw new Error("Must be a VoidPointer");
                  ({ type: Ie } = aA), aA = aA.value;
                }
                return j.pointers.push({
                  type: Ie,
                  val: aA,
                  parent: Be
                }), j.pointerOffset += Ie.size(aA, Be);
              }
            }
            class R {
              constructor(W, aA) {
                this.type = W, this.value = aA;
              }
            }
            B(Q.exports, oA), B(Q.exports, q), B(Q.exports, Ee);
          },
          /***/
          4766(Q, B, r) {
            var A = r(2504), a = r(7571);
            function D(sA) {
              return sA && sA.__esModule ? sA.default : sA;
            }
            function x(sA) {
              Object.defineProperty(sA, "__esModule", { value: !0, configurable: !0 });
            }
            function N(sA, F, o, h) {
              Object.defineProperty(sA, F, { get: o, set: h, enumerable: !0, configurable: !0 });
            }
            x(Q.exports), N(Q.exports, "getCategory", () => RA), N(Q.exports, "getCombiningClass", () => DA), N(Q.exports, "getScript", () => $), N(Q.exports, "getEastAsianWidth", () => cA), N(Q.exports, "getNumericValue", () => Ae), N(Q.exports, "isAlphabetic", () => kA), N(Q.exports, "isDigit", () => VA), N(Q.exports, "isPunctuation", () => EA), N(Q.exports, "isLowerCase", () => zA), N(Q.exports, "isUpperCase", () => OA), N(Q.exports, "isTitleCase", () => xA), N(Q.exports, "isWhiteSpace", () => LA), N(Q.exports, "isBaseForm", () => yA), N(Q.exports, "isMark", () => TA), N(Q.exports, "default", () => fA);
            var P = {};
            P = JSON.parse('{"categories":["Cc","Zs","Po","Sc","Ps","Pe","Sm","Pd","Nd","Lu","Sk","Pc","Ll","So","Lo","Pi","Cf","No","Pf","Lt","Lm","Mn","Me","Mc","Nl","Zl","Zp","Cs","Co"],"combiningClasses":["Not_Reordered","Above","Above_Right","Below","Attached_Above_Right","Attached_Below","Overlay","Iota_Subscript","Double_Below","Double_Above","Below_Right","Above_Left","CCC10","CCC11","CCC12","CCC13","CCC14","CCC15","CCC16","CCC17","CCC18","CCC19","CCC20","CCC21","CCC22","CCC23","CCC24","CCC25","CCC30","CCC31","CCC32","CCC27","CCC28","CCC29","CCC33","CCC34","CCC35","CCC36","Nukta","Virama","CCC84","CCC91","CCC103","CCC107","CCC118","CCC122","CCC129","CCC130","CCC132","Attached_Above","Below_Left","Left","Kana_Voicing","CCC26","Right"],"scripts":["Common","Latin","Bopomofo","Inherited","Greek","Coptic","Cyrillic","Armenian","Hebrew","Arabic","Syriac","Thaana","Nko","Samaritan","Mandaic","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","Hangul","Ethiopic","Cherokee","Canadian_Aboriginal","Ogham","Runic","Tagalog","Hanunoo","Buhid","Tagbanwa","Khmer","Mongolian","Limbu","Tai_Le","New_Tai_Lue","Buginese","Tai_Tham","Balinese","Sundanese","Batak","Lepcha","Ol_Chiki","Braille","Glagolitic","Tifinagh","Han","Hiragana","Katakana","Yi","Lisu","Vai","Bamum","Syloti_Nagri","Phags_Pa","Saurashtra","Kayah_Li","Rejang","Javanese","Cham","Tai_Viet","Meetei_Mayek","null","Linear_B","Lycian","Carian","Old_Italic","Gothic","Old_Permic","Ugaritic","Old_Persian","Deseret","Shavian","Osmanya","Osage","Elbasan","Caucasian_Albanian","Linear_A","Cypriot","Imperial_Aramaic","Palmyrene","Nabataean","Hatran","Phoenician","Lydian","Meroitic_Hieroglyphs","Meroitic_Cursive","Kharoshthi","Old_South_Arabian","Old_North_Arabian","Manichaean","Avestan","Inscriptional_Parthian","Inscriptional_Pahlavi","Psalter_Pahlavi","Old_Turkic","Old_Hungarian","Hanifi_Rohingya","Old_Sogdian","Sogdian","Elymaic","Brahmi","Kaithi","Sora_Sompeng","Chakma","Mahajani","Sharada","Khojki","Multani","Khudawadi","Grantha","Newa","Tirhuta","Siddham","Modi","Takri","Ahom","Dogra","Warang_Citi","Nandinagari","Zanabazar_Square","Soyombo","Pau_Cin_Hau","Bhaiksuki","Marchen","Masaram_Gondi","Gunjala_Gondi","Makasar","Cuneiform","Egyptian_Hieroglyphs","Anatolian_Hieroglyphs","Mro","Bassa_Vah","Pahawh_Hmong","Medefaidrin","Miao","Tangut","Nushu","Duployan","SignWriting","Nyiakeng_Puachue_Hmong","Wancho","Mende_Kikakui","Adlam"],"eaw":["N","Na","A","W","H","F"]}');
            const d = new (D(a))(D(A).toByteArray(" ")), J = Math.log2 || ((sA) => Math.log(sA) / Math.LN2), q = (sA) => J(sA) + 1 | 0, AA = q((/* @__PURE__ */ D(P)).categories.length - 1), K = q((/* @__PURE__ */ D(P)).combiningClasses.length - 1), z = q((/* @__PURE__ */ D(P)).scripts.length - 1), T = q((/* @__PURE__ */ D(P)).eaw.length - 1), H = 10, eA = K + z + T + H, CA = z + T + H, IA = T + H, k = H, tA = (1 << AA) - 1, lA = (1 << K) - 1, uA = (1 << z) - 1, w = (1 << T) - 1, v = (1 << H) - 1;
            function RA(sA) {
              const F = d.get(sA);
              return (/* @__PURE__ */ D(P)).categories[F >> eA & tA];
            }
            function DA(sA) {
              const F = d.get(sA);
              return (/* @__PURE__ */ D(P)).combiningClasses[F >> CA & lA];
            }
            function $(sA) {
              const F = d.get(sA);
              return (/* @__PURE__ */ D(P)).scripts[F >> IA & uA];
            }
            function cA(sA) {
              const F = d.get(sA);
              return (/* @__PURE__ */ D(P)).eaw[F >> k & w];
            }
            function Ae(sA) {
              let F = d.get(sA), o = F & v;
              if (o === 0) return null;
              if (o <= 50) return o - 1;
              if (o < 480) {
                const h = (o >> 4) - 12, _ = (o & 15) + 1;
                return h / _;
              } else if (o < 768) {
                F = (o >> 5) - 14;
                let h = (o & 31) + 2;
                for (; h > 0; )
                  F *= 10, h--;
                return F;
              } else {
                F = (o >> 2) - 191;
                let h = (o & 3) + 1;
                for (; h > 0; )
                  F *= 60, h--;
                return F;
              }
            }
            function kA(sA) {
              const F = RA(sA);
              return F === "Lu" || F === "Ll" || F === "Lt" || F === "Lm" || F === "Lo" || F === "Nl";
            }
            function VA(sA) {
              return RA(sA) === "Nd";
            }
            function EA(sA) {
              const F = RA(sA);
              return F === "Pc" || F === "Pd" || F === "Pe" || F === "Pf" || F === "Pi" || F === "Po" || F === "Ps";
            }
            function zA(sA) {
              return RA(sA) === "Ll";
            }
            function OA(sA) {
              return RA(sA) === "Lu";
            }
            function xA(sA) {
              return RA(sA) === "Lt";
            }
            function LA(sA) {
              const F = RA(sA);
              return F === "Zs" || F === "Zl" || F === "Zp";
            }
            function yA(sA) {
              const F = RA(sA);
              return F === "Nd" || F === "No" || F === "Nl" || F === "Lu" || F === "Ll" || F === "Lt" || F === "Lm" || F === "Lo" || F === "Me" || F === "Mc";
            }
            function TA(sA) {
              const F = RA(sA);
              return F === "Mn" || F === "Me" || F === "Mc";
            }
            var fA = {
              getCategory: RA,
              getCombiningClass: DA,
              getScript: $,
              getEastAsianWidth: cA,
              getNumericValue: Ae,
              isAlphabetic: kA,
              isDigit: VA,
              isPunctuation: EA,
              isLowerCase: zA,
              isUpperCase: OA,
              isTitleCase: xA,
              isWhiteSpace: LA,
              isBaseForm: yA,
              isMark: TA
            };
          },
          /***/
          7507(Q, B, r) {
            var A = this && this.__importDefault || function(z) {
              return z && z.__esModule ? z : { default: z };
            };
            Object.defineProperty(B, "__esModule", { value: !0 }), B.XmlDocument = B.XmlElement = B.XmlCommentNode = B.XmlCDataNode = B.XmlTextNode = void 0;
            const a = A(r(1733));
            class D {
              /**
               * Creates a new text node
               * @param text The text content
               */
              constructor(T) {
                this.text = T, this.type = "text";
              }
              /**
               * Converts the text node to a string
               * @param options Formatting options
               * @returns String representation of the text node
               */
              toString(T) {
                return K(AA(this.text), T);
              }
              /**
               * Converts the text node to a string with indentation
               * @param indent The indentation to use
               * @param options Formatting options
               * @returns String representation of the text node with indentation
               */
              toStringWithIndent(T, H) {
                return T + this.toString(H);
              }
            }
            B.XmlTextNode = D;
            class x {
              /**
               * Creates a new CDATA node
               * @param cdata The CDATA content
               */
              constructor(T) {
                this.cdata = T, this.type = "cdata";
              }
              /**
               * Converts the CDATA node to a string
               * @param options Formatting options
               * @returns String representation of the CDATA node
               */
              toString(T) {
                return `<![CDATA[${K(this.cdata, T)}]]>`;
              }
              /**
               * Converts the CDATA node to a string with indentation
               * @param indent The indentation to use
               * @param options Formatting options
               * @returns String representation of the CDATA node with indentation
               */
              toStringWithIndent(T, H) {
                return T + this.toString(H);
              }
            }
            B.XmlCDataNode = x;
            class N {
              /**
               * Creates a new comment node
               * @param comment The comment content
               */
              constructor(T) {
                this.comment = T, this.type = "comment";
              }
              /**
               * Converts the comment node to a string
               * @param options Formatting options
               * @returns String representation of the comment node
               */
              toString(T) {
                return `<!--${K(AA(this.comment), T)}-->`;
              }
              /**
               * Converts the comment node to a string with indentation
               * @param indent The indentation to use
               * @param options Formatting options
               * @returns String representation of the comment node with indentation
               */
              toStringWithIndent(T, H) {
                return T + this.toString(H);
              }
            }
            B.XmlCommentNode = N;
            class P {
              /**
               * Creates a new XML element
               * @param tag The tag name and attributes
               * @param parser Optional SAX parser instance with position information
               */
              constructor(T, H) {
                if (this.type = "element", !H && J.length) {
                  var eA = J[J.length - 1];
                  "parser" in eA && (H = eA.parser);
                }
                this.name = T.name, this.attr = T.attributes, this.val = "", this.children = [], this.firstChild = null, this.lastChild = null, this.line = H ? H.line : null, this.column = H ? H.column : null, this.position = H ? H.position : null, this.startTagPosition = H ? H.startTagPosition : null;
              }
              /**
               * Adds a child node to this element
               * @param child The child node to add
               */
              _addChild(T) {
                this.children.push(T), this.firstChild || (this.firstChild = T), this.lastChild = T;
              }
              _opentag(T) {
                const H = new P(T);
                this._addChild(H), J.unshift(H);
              }
              _closetag() {
                J.shift();
              }
              _text(T) {
                this.val += T, this._addChild(new D(T));
              }
              _cdata(T) {
                this.val += T, this._addChild(new x(T));
              }
              _comment(T) {
                this._addChild(new N(T));
              }
              _error(T) {
                throw T;
              }
              /**
               * Iterates through each child element of this node
               * @param iterator Function to call for each child element
               * @param context Optional context to use for the iterator function
               */
              eachChild(T, H) {
                for (let eA = 0, CA = this.children.length; eA < CA; eA++) {
                  const IA = this.children[eA];
                  if (IA.type === "element" && T.call(H, IA, eA, this.children) === !1)
                    return;
                }
              }
              /**
               * Finds the first child element with the given name
               * @param name The name of the child element to find
               * @returns The first matching child element, or undefined if not found
               */
              childNamed(T) {
                for (let H = 0, eA = this.children.length; H < eA; H++) {
                  const CA = this.children[H];
                  if (CA.type === "element" && CA.name === T)
                    return CA;
                }
              }
              /**
               * Finds all child elements with the given name
               * @param name The name of the child elements to find
               * @returns Array of matching child elements
               */
              childrenNamed(T) {
                const H = [];
                for (let eA = 0, CA = this.children.length; eA < CA; eA++) {
                  const IA = this.children[eA];
                  IA.type === "element" && IA.name === T && H.push(IA);
                }
                return H;
              }
              /**
               * Finds the first child element with the given attribute
               * @param name The name of the attribute to find
               * @param value Optional value the attribute should have
               * @returns The first matching child element, or undefined if not found
               */
              childWithAttribute(T, H) {
                for (let eA = 0, CA = this.children.length; eA < CA; eA++) {
                  const IA = this.children[eA];
                  if (IA.type === "element" && (H !== void 0 && IA.attr[T] === H || H === void 0 && IA.attr[T]))
                    return IA;
                }
              }
              /**
               * Finds all descendant elements with the given name, searching recursively
               * @param name The name of the descendant elements to find
               * @returns Array of matching descendant elements
               */
              descendantsNamed(T) {
                const H = [];
                for (let eA = 0, CA = this.children.length; eA < CA; eA++) {
                  const IA = this.children[eA];
                  if (IA.type === "element") {
                    const k = IA;
                    k.name === T && H.push(k), H.push(...k.descendantsNamed(T));
                  }
                }
                return H;
              }
              /**
               * Finds a descendant element using a dot-notation path
               * @param path The path to the descendant, e.g. "author.name"
               * @returns The matching descendant element, or undefined if not found
               * @example
               * // For XML: <book><author><name>John</name></author></book>
               * bookNode.descendantWithPath("author.name") // returns the <name> element
               */
              descendantWithPath(T) {
                let H = this;
                const eA = T.split(".");
                for (let CA = 0, IA = eA.length; CA < IA; CA++)
                  if (H && H.type === "element")
                    H = H.childNamed(eA[CA]);
                  else
                    return;
                return H;
              }
              /**
               * Gets the value of a descendant element or attribute using a path
               * @param path The path to the descendant or attribute, e.g. "author.name" or "author.name@id"
               * @returns The value of the descendant or attribute, or undefined if not found
               * @example
               * // For XML: <book><author><name id="1">John</name></author></book>
               * bookNode.valueWithPath("author.name")    // returns "John"
               * bookNode.valueWithPath("author.name@id") // returns "1"
               */
              valueWithPath(T) {
                const H = T.split("@"), eA = this.descendantWithPath(H[0]);
                if (eA)
                  return H.length > 1 ? eA.attr[H[1]] : eA.val;
              }
              /**
               * Converts the element to a string representation
               * @param options Formatting options
               * @returns String representation of the element
               */
              toString(T) {
                return this.toStringWithIndent("", T);
              }
              /**
               * Converts the element to a string with the specified indentation
               * @param indent The indentation to use
               * @param options Formatting options
               * @returns String representation of the element with indentation
               */
              toStringWithIndent(T, H) {
                let eA = `${T}<${this.name}`;
                const CA = H?.compressed ? "" : `
`;
                for (const IA in this.attr)
                  Object.prototype.hasOwnProperty.call(this.attr, IA) && (eA += ` ${IA}="${AA(this.attr[IA])}"`);
                if (this.children.length === 1 && this.children[0].type !== "element")
                  eA += `>${this.children[0].toString(H)}</${this.name}>`;
                else if (this.children.length) {
                  eA += `>${CA}`;
                  const IA = T + (H?.compressed ? "" : "  ");
                  for (let k = 0, tA = this.children.length; k < tA; k++)
                    eA += `${this.children[k].toStringWithIndent(IA, H)}${CA}`;
                  eA += `${T}</${this.name}>`;
                } else H?.html ? [
                  "area",
                  "base",
                  "br",
                  "col",
                  "embed",
                  "frame",
                  "hr",
                  "img",
                  "input",
                  "keygen",
                  "link",
                  "menuitem",
                  "meta",
                  "param",
                  "source",
                  "track",
                  "wbr"
                ].includes(this.name) ? eA += "/>" : eA += `></${this.name}>` : eA += "/>";
                return eA;
              }
            }
            B.XmlElement = P;
            class d extends P {
              /**
               * Creates a new XML document from an XML string
               * @param xml The XML string to parse
               * @throws {Error} If the XML is empty or invalid
               * @example
               * ```ts
               * import { XmlDocument } from 'xmldoc';
               *
               * const doc = new XmlDocument("<root><child>value</child></root>");
               * console.log(doc.childNamed("child")?.val); // "value"
               * ```
               */
              constructor(T) {
                if (super({ name: "", attributes: {} }), T = T.toString().trim(), !T)
                  throw new Error("No XML to parse!");
                this.doctype = "", this.parser = a.default.parser(!0), q(this.parser), J = [this];
                try {
                  this.parser.write(T);
                } finally {
                  delete this.parser;
                }
              }
              _opentag(T) {
                this.name === "" ? (this.name = T.name, this.attr = T.attributes) : super._opentag(T);
              }
              _doctype(T) {
                this.doctype += T;
              }
            }
            B.XmlDocument = d;
            let J = [];
            function q(z) {
              z.onopentag = (T) => {
                var H;
                return (H = J[0]) === null || H === void 0 ? void 0 : H._opentag(T);
              }, z.onclosetag = () => {
                var T;
                return (T = J[0]) === null || T === void 0 ? void 0 : T._closetag();
              }, z.ontext = (T) => {
                var H;
                return (H = J[0]) === null || H === void 0 ? void 0 : H._text(T);
              }, z.oncdata = (T) => {
                var H;
                return (H = J[0]) === null || H === void 0 ? void 0 : H._cdata(T);
              }, z.oncomment = (T) => {
                var H;
                return (H = J[0]) === null || H === void 0 ? void 0 : H._comment(T);
              }, z.ondoctype = (T) => {
                const H = J[0];
                H._doctype && H._doctype(T);
              }, z.onerror = (T) => {
                var H;
                return (H = J[0]) === null || H === void 0 ? void 0 : H._error(T);
              };
            }
            function AA(z) {
              return z.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&apos;").replace(/"/g, "&quot;");
            }
            function K(z, T) {
              let H = z;
              return T?.trimmed && z.length > 25 && (H = H.substring(0, 25).trim() + "…"), T?.preserveWhitespace || (H = H.trim()), H;
            }
            B.default = d;
          },
          /***/
          1635(Q, B, r) {
            r.d(B, {
              /* harmony export */
              __decorate: () => (
                /* binding */
                A
              )
              /* harmony export */
            });
            function A(a, D, x, N) {
              var P = arguments.length, d = P < 3 ? D : N === null ? N = Object.getOwnPropertyDescriptor(D, x) : N, J;
              if (typeof Reflect == "object" && typeof Reflect.decorate == "function") d = Reflect.decorate(a, D, x, N);
              else for (var q = a.length - 1; q >= 0; q--) (J = a[q]) && (d = (P < 3 ? J(d) : P > 3 ? J(D, x, d) : J(D, x)) || d);
              return P > 3 && d && Object.defineProperty(D, x, d), d;
            }
            typeof SuppressedError == "function" && SuppressedError;
          }
          /******/
        }, E = {};
        function Y(Q) {
          var B = E[Q];
          if (B !== void 0)
            return B.exports;
          var r = E[Q] = {
            /******/
            id: Q,
            /******/
            loaded: !1,
            /******/
            exports: {}
            /******/
          };
          return c[Q].call(r.exports, r, r.exports, Y), r.loaded = !0, r.exports;
        }
        Y.amdO = {}, Y.n = (Q) => {
          var B = Q && Q.__esModule ? (
            /******/
            () => Q.default
          ) : (
            /******/
            () => Q
          );
          return Y.d(B, { a: B }), B;
        }, Y.d = (Q, B) => {
          for (var r in B)
            Y.o(B, r) && !Y.o(Q, r) && Object.defineProperty(Q, r, { enumerable: !0, get: B[r] });
        }, Y.g = (function() {
          if (typeof globalThis == "object") return globalThis;
          try {
            return this || new Function("return this")();
          } catch {
            if (typeof window == "object") return window;
          }
        })(), Y.o = (Q, B) => Object.prototype.hasOwnProperty.call(Q, B), Y.nmd = (Q) => (Q.paths = [], Q.children || (Q.children = []), Q);
        var X = Y(6092);
        return X;
      })()
    ));
  })(Us)), Us.exports;
}
var Ml = Cl();
const Yn = /* @__PURE__ */ mB(Ml);
var xt = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(xt || {}), ma = /* @__PURE__ */ ((e) => (e.TRUE = "Tak", e.FALSE = "Nie", e))(ma || {}), U = /* @__PURE__ */ ((e) => (e.Bold = "Bold", e.Boolean = "Boolean", e.Currency = "Currency", e.CurrencyAbs = "CurrencyAbs", e.CurrencyGreater = "CurrencyGreater", e.CurrencyGreaterWithSeparator = "CurrencyGreaterWithSeparator", e.Currency6 = "Currency6", e.Default = "Default", e.Description = "Description", e.GrayBoldTitle = "GrayBoldTitle", e.Label = "Label", e.LabelMedium = "LabelMedium", e.LabelMargin = "LabelMargin", e.LabelSmallMargin = "LabelSmallMargin", e.LabelGreater = "LabelGreater", e.Link = "Link", e.MarginBottom4 = "MarginBottom4", e.MarginBottom8 = "MarginBottom8", e.MarginTop4 = "MarginTop4", e.MarginTop8 = "MarginTop8", e.Value = "Value", e.ValueMedium = "ValueMedium", e.GrayTitle = "GrayTitle", e.HeaderContent = "HeaderContent", e.SubHeaderContent = "SubHeaderContent", e.TitleContent = "TitleContent", e.HeaderPosition = "HeaderPosition", e.Right = "Right", e.DateTime = "DateTime", e.Date = "Date", e.Time = "Time", e.FormOfPayment = "FormOfPayment", e.AccountNumber = "AccountNumber", e.Percentage = "Percentage", e.Number = "Number", e))(U || {}), YB = /* @__PURE__ */ ((e) => (e.VAT = "Faktura podstawowa", e.KOR = "Faktura korygująca", e.ZAL = "Faktura dokumentująca otrzymanie zapłaty lub jej części przed dokonaniem czynności oraz faktura wystawiona w związku z art. 106f ust. 4 ustawy", e.ROZ = "Faktura wystawiona w związku z art. 106f ust. 3 ustawy", e.UPR = "Faktura, o której mowa w art. 106e ust. 5 pkt 3 ustawy", e.KOR_ZAL = "Faktura korygująca fakturę dokumentującą otrzymanie zapłaty lub jej części przed dokonaniem czynności oraz fakturę wystawioną w związku z art. 106f ust. 4 ustawy", e.KOR_ROZ = "Faktura korygująca fakturę wystawioną w związku z art. 106f ust. 3 ustawy", e.VAT_RR = "Faktura pierwotna", e.KOR_VAT_RR = "Faktura korygująca", e))(YB || {});
const mt = Object.keys(YB).reduce(
  (e, n) => {
    const c = n;
    return e[c] = c, e;
  },
  {}
), Dl = {
  1: "const.farr.correctionOriginalDate",
  2: "const.farr.correctionInvoiceDate",
  3: "const.fa.correctionOtherDate"
}, dl = {
  23: "const.fa.taxRate23",
  22: "const.fa.taxRate22",
  8: "const.fa.taxRate8",
  7: "const.fa.taxRate7",
  5: "const.fa.taxRate5",
  4: "const.fa.taxRate4oo",
  3: "const.fa.taxRate4oo",
  0: "const.fa.taxRate0",
  zw: "const.fa.taxRateZw",
  oo: "const.fa.taxRateOo",
  np: "const.fa.taxRateNp"
}, Il = {
  23: "const.fa.taxRate23",
  22: "const.fa.taxRate22",
  8: "const.fa.taxRate8",
  7: "const.fa.taxRate7",
  5: "const.fa.taxRate5",
  4: "const.fa.taxRate4",
  3: "const.fa.taxRate3",
  0: "const.fa.taxRate0",
  zw: "const.fa.taxRateZw2",
  oo: "const.fa.taxRateRevOo",
  np: "const.fa.taxRateNp"
}, yl = {
  23: "const.fa.taxRate23",
  22: "const.fa.taxRate22",
  8: "const.fa.taxRate8",
  7: "const.fa.taxRate7",
  5: "const.fa.taxRate5",
  4: "const.fa.taxRate4",
  3: "const.fa.taxRate3",
  "0 KR": "const.fa.taxRate0KR",
  "0 WDT": "const.fa.taxRate0WDT",
  "0 EX": "const.fa.taxRate0EX",
  zw: "const.fa.zw",
  oo: "const.fa.oo",
  "np I": "const.fa.taxRateNpI",
  "np II": "const.fa.taxRateNpII"
}, Gn = {
  AF: "const.countries.AF",
  AX: "const.countries.AX",
  AL: "const.countries.AL",
  DZ: "const.countries.DZ",
  AD: "const.countries.AD",
  AO: "const.countries.AO",
  AI: "const.countries.AI",
  AQ: "const.countries.AQ",
  AG: "const.countries.AG",
  AN: "const.countries.AN",
  SA: "const.countries.SA",
  AR: "const.countries.AR",
  AM: "const.countries.AM",
  AW: "const.countries.AW",
  AU: "const.countries.AU",
  AT: "const.countries.AT",
  AZ: "const.countries.AZ",
  BS: "const.countries.BS",
  BH: "const.countries.BH",
  BD: "const.countries.BD",
  BB: "const.countries.BB",
  BE: "const.countries.BE",
  BZ: "const.countries.BZ",
  BJ: "const.countries.BJ",
  BM: "const.countries.BM",
  BT: "const.countries.BT",
  BY: "const.countries.BY",
  BO: "const.countries.BO",
  BQ: "const.countries.BQ",
  BA: "const.countries.BA",
  BW: "const.countries.BW",
  BR: "const.countries.BR",
  BN: "const.countries.BN",
  IO: "const.countries.IO",
  BG: "const.countries.BG",
  BF: "const.countries.BF",
  BI: "const.countries.BI",
  XC: "const.countries.XC",
  CL: "const.countries.CL",
  CN: "const.countries.CN",
  HR: "const.countries.HR",
  CW: "const.countries.CW",
  CY: "const.countries.CY",
  TD: "const.countries.TD",
  ME: "const.countries.ME",
  DK: "const.countries.DK",
  DM: "const.countries.DM",
  DO: "const.countries.DO",
  DJ: "const.countries.DJ",
  EG: "const.countries.EG",
  EC: "const.countries.EC",
  ER: "const.countries.ER",
  EE: "const.countries.EE",
  ET: "const.countries.ET",
  FK: "const.countries.FK",
  FJ: "const.countries.FJ",
  PH: "const.countries.PH",
  FI: "const.countries.FI",
  FR: "const.countries.FR",
  TF: "const.countries.TF",
  GA: "const.countries.GA",
  GM: "const.countries.GM",
  GH: "const.countries.GH",
  GI: "const.countries.GI",
  GR: "const.countries.GR",
  GD: "const.countries.GD",
  GL: "const.countries.GL",
  GE: "const.countries.GE",
  GU: "const.countries.GU",
  GG: "const.countries.GG",
  GY: "const.countries.GY",
  GF: "const.countries.GF",
  GP: "const.countries.GP",
  GT: "const.countries.GT",
  GN: "const.countries.GN",
  GQ: "const.countries.GQ",
  GW: "const.countries.GW",
  HT: "const.countries.HT",
  ES: "const.countries.ES",
  HN: "const.countries.HN",
  HK: "const.countries.HK",
  IN: "const.countries.IN",
  ID: "const.countries.ID",
  IQ: "const.countries.IQ",
  IR: "const.countries.IR",
  IE: "const.countries.IE",
  IS: "const.countries.IS",
  IL: "const.countries.IL",
  JM: "const.countries.JM",
  JP: "const.countries.JP",
  YE: "const.countries.YE",
  JE: "const.countries.JE",
  JO: "const.countries.JO",
  KY: "const.countries.KY",
  KH: "const.countries.KH",
  CM: "const.countries.CM",
  CA: "const.countries.CA",
  QA: "const.countries.QA",
  KZ: "const.countries.KZ",
  KE: "const.countries.KE",
  KG: "const.countries.KG",
  KI: "const.countries.KI",
  CO: "const.countries.CO",
  KM: "const.countries.KM",
  CG: "const.countries.CG",
  CD: "const.countries.CD",
  KP: "const.countries.KP",
  XK: "const.countries.XK",
  CR: "const.countries.CR",
  CU: "const.countries.CU",
  KW: "const.countries.KW",
  LA: "const.countries.LA",
  LS: "const.countries.LS",
  LB: "const.countries.LB",
  LR: "const.countries.LR",
  LY: "const.countries.LY",
  LI: "const.countries.LI",
  LT: "const.countries.LT",
  LV: "const.countries.LV",
  LU: "const.countries.LU",
  MK: "const.countries.MK",
  MG: "const.countries.MG",
  YT: "const.countries.YT",
  MO: "const.countries.MO",
  MW: "const.countries.MW",
  MV: "const.countries.MV",
  MY: "const.countries.MY",
  ML: "const.countries.ML",
  MT: "const.countries.MT",
  MP: "const.countries.MP",
  MA: "const.countries.MA",
  MQ: "const.countries.MQ",
  MR: "const.countries.MR",
  MU: "const.countries.MU",
  MX: "const.countries.MX",
  XL: "const.countries.XL",
  FM: "const.countries.FM",
  UM: "const.countries.UM",
  MD: "const.countries.MD",
  MC: "const.countries.MC",
  MN: "const.countries.MN",
  MS: "const.countries.MS",
  MZ: "const.countries.MZ",
  MM: "const.countries.MM",
  NA: "const.countries.NA",
  NR: "const.countries.NR",
  NP: "const.countries.NP",
  NL: "const.countries.NL",
  DE: "const.countries.DE",
  NE: "const.countries.NE",
  NG: "const.countries.NG",
  NI: "const.countries.NI",
  NU: "const.countries.NU",
  NF: "const.countries.NF",
  NO: "const.countries.NO",
  NC: "const.countries.NC",
  NZ: "const.countries.NZ",
  PS: "const.countries.PS",
  OM: "const.countries.OM",
  PK: "const.countries.PK",
  PW: "const.countries.PW",
  PA: "const.countries.PA",
  PG: "const.countries.PG",
  PY: "const.countries.PY",
  PE: "const.countries.PE",
  PN: "const.countries.PN",
  PF: "const.countries.PF",
  PL: "const.countries.PL",
  GS: "const.countries.GS",
  PT: "const.countries.PT",
  PR: "const.countries.PR",
  CF: "const.countries.CF",
  CZ: "const.countries.CZ",
  KR: "const.countries.KR",
  ZA: "const.countries.ZA",
  RE: "const.countries.RE",
  RU: "const.countries.RU",
  RO: "const.countries.RO",
  RW: "const.countries.RW",
  EH: "const.countries.EH",
  BL: "const.countries.BL",
  KN: "const.countries.KN",
  LC: "const.countries.LC",
  MF: "const.countries.MF",
  VC: "const.countries.VC",
  SV: "const.countries.SV",
  WS: "const.countries.WS",
  AS: "const.countries.AS",
  SM: "const.countries.SM",
  SN: "const.countries.SN",
  RS: "const.countries.RS",
  SC: "const.countries.SC",
  SL: "const.countries.SL",
  SG: "const.countries.SG",
  SK: "const.countries.SK",
  SI: "const.countries.SI",
  SO: "const.countries.SO",
  LK: "const.countries.LK",
  PM: "const.countries.PM",
  US: "const.countries.US",
  SZ: "const.countries.SZ",
  SD: "const.countries.SD",
  SS: "const.countries.SS",
  SR: "const.countries.SR",
  SJ: "const.countries.SJ",
  SH: "const.countries.SH",
  SY: "const.countries.SY",
  CH: "const.countries.CH",
  SE: "const.countries.SE",
  TJ: "const.countries.TJ",
  TH: "const.countries.TH",
  TW: "const.countries.TW",
  TZ: "const.countries.TZ",
  TG: "const.countries.TG",
  TK: "const.countries.TK",
  TO: "const.countries.TO",
  TT: "const.countries.TT",
  TN: "const.countries.TN",
  TR: "const.countries.TR",
  TM: "const.countries.TM",
  TV: "const.countries.TV",
  UG: "const.countries.UG",
  UA: "const.countries.UA",
  UY: "const.countries.UY",
  UZ: "const.countries.UZ",
  VU: "const.countries.VU",
  WF: "const.countries.WF",
  VA: "const.countries.VA",
  HU: "const.countries.HU",
  VE: "const.countries.VE",
  GB: "const.countries.GB",
  VN: "const.countries.VN",
  IT: "const.countries.IT",
  TL: "const.countries.TL",
  CI: "const.countries.CI",
  BV: "const.countries.BV",
  CX: "const.countries.CX",
  IM: "const.countries.IM",
  SX: "const.countries.SX",
  CK: "const.countries.CK",
  VI: "const.countries.VI",
  VG: "const.countries.VG",
  HM: "const.countries.HM",
  CC: "const.countries.CC",
  MH: "const.countries.MH",
  FO: "const.countries.FO",
  SB: "const.countries.SB",
  ST: "const.countries.ST",
  TC: "const.countries.TC",
  ZM: "const.countries.ZM",
  CV: "const.countries.CV",
  ZW: "const.countries.ZW",
  AE: "const.countries.AE",
  XI: "const.countries.XI"
}, PB = {
  1: "const.fa.factor",
  2: "const.fa.recipient",
  3: "const.fa.primaryEntity",
  4: "const.fa.additionalBuyer",
  5: "const.fa.invoiceIssuer",
  6: "const.fa.payer",
  7: "const.fa.localGovernmentIssuer",
  8: "const.fa.localGovernmentRecipient",
  9: "const.fa.vatGroupIssuer",
  10: "const.fa.vatGroupRecipient",
  11: "const.fa.employee"
}, vB = {
  1: "const.fa.factor",
  2: "const.fa.recipient",
  3: "const.fa.primaryEntity",
  4: "const.fa.additionalBuyer",
  5: "const.fa.invoiceIssuer",
  6: "const.fa.payer",
  7: "const.fa.localGovernmentIssuer",
  8: "const.fa.localGovernmentRecipient",
  9: "const.fa.vatGroupIssuer",
  10: "const.fa.vatGroupRecipient"
}, bB = {
  1: "const.fa.factor",
  2: "const.fa.recipient",
  3: "const.fa.primaryEntity",
  4: "const.fa.additionalBuyer",
  5: "const.fa.invoiceIssuer",
  6: "const.fa.payer"
}, Fl = {
  1: "const.fa.enforcementAuthority",
  2: "const.fa.courtBailiff",
  3: "const.fa.taxRepresentative"
}, xl = {
  1: "const.fa.enforcementAuthorityArt106c1",
  2: "const.fa.courtBailiffArt106c2",
  3: "const.fa.taxRepresentativeArt18"
}, pl = {
  1: "const.fa.enforcementAuthorityArt106c1",
  2: "const.fa.courtBailiffArt106c2",
  3: "const.fa.taxRepresentativeArt18"
}, Os = {
  1: "const.fa.cash",
  2: "const.fa.card",
  3: "const.fa.voucher",
  4: "const.fa.check",
  5: "const.fa.credit",
  6: "const.fa.transfer",
  7: "const.fa.mobile"
}, Pa = {
  1: "const.fa.seaTransport",
  2: "const.fa.railTransport",
  3: "const.fa.roadTransport",
  4: "const.fa.airTransport",
  5: "const.fa.postalShipment",
  7: "const.fa.fixedPipeline",
  8: "const.fa.inlandNavigation"
}, va = {
  1: "const.fa.ownAccountSettlement",
  2: "const.fa.ownAccountCollection",
  3: "const.fa.ownAccountInternal"
}, zB = {
  1: "const.fa.domesticZeroRate",
  2: "const.fa.intraCommunitySupply",
  3: "const.fa.exportZeroRate",
  4: "const.fa.supplyOutsideCountry",
  5: "const.fa.servicesArt100",
  6: "const.fa.goodsServicesAttachment15",
  7: "const.fa.otherDomesticSales"
}, ml = {
  date: U.Date,
  datetime: U.DateTime,
  dec: U.Currency,
  int: U.Currency,
  time: U.Time,
  txt: U.Value
}, ba = {
  1: "const.fa.bubble",
  2: "const.fa.barrel",
  3: "const.fa.cylinder",
  4: "const.fa.carton",
  5: "const.fa.canister",
  6: "const.fa.cage",
  7: "const.fa.container",
  8: "const.fa.basket",
  9: "const.fa.punnet",
  10: "const.fa.bulkPackage",
  11: "const.fa.package",
  12: "const.fa.packet",
  13: "const.fa.pallet",
  14: "const.fa.bin",
  15: "const.fa.bulkSolidContainer",
  16: "const.fa.bulkLiquidContainer",
  17: "const.fa.box",
  18: "const.fa.tin",
  19: "const.fa.crate",
  20: "const.fa.bag"
}, Cn = {
  hLineWidth: () => 1,
  hLineColor: () => "#BABABA",
  vLineWidth: () => 1,
  vLineColor: () => "#BABABA"
}, Ln = {
  1: "const.fa.liquidation",
  2: "const.fa.restructuring",
  3: "const.fa.bankruptcy",
  4: "const.fa.inheritedBusiness"
}, Yl = "1.1.19", Pl = {
  version: Yl
};
function _t(e, n) {
  let c = typeof e == "string" ? e : e?._text;
  return c = c?.trim(), !c || !n[c] ? "" : l.t(n[c]);
}
function $i(e, n, c) {
  if (!e)
    return "";
  const E = new Date(e);
  if (isNaN(E.getTime()))
    return e;
  const Y = E.getFullYear(), X = (E.getMonth() + 1).toString().padStart(2, "0"), Q = E.getDate().toString().padStart(2, "0");
  return E.getHours().toString().padStart(2, "0"), E.getMinutes().toString().padStart(2, "0"), E.getSeconds().toString().padStart(2, "0"), `${Q}.${X}.${Y}`;
}
function Ya(e, n, c) {
  const E = { year: "numeric", month: "2-digit", day: "2-digit" }, Y = {
    hour: "2-digit",
    minute: "2-digit"
  }, X = { second: "2-digit" };
  if (!e)
    return "";
  const Q = new Date(e);
  return isNaN(Q.getTime()) ? e : new Intl.DateTimeFormat("pl-PL", {
    timeZone: "Europe/Warsaw",
    ...E,
    ...n && Y,
    ...c && X
  }).format(Q).replace(", ", " ");
}
function xr(e) {
  return e?._text ? Ya(e._text, !0) : "";
}
function vl(e, n) {
  if (!e)
    return "";
  const c = new Date(e);
  if (isNaN(c.getTime()))
    return e;
  const E = c.getHours().toString().padStart(2, "0"), Y = c.getMinutes().toString().padStart(2, "0"), X = c.getSeconds().toString().padStart(2, "0");
  return `${E}:${Y}:${X}`;
}
function bl(e) {
  return `${e || l.t("invoice.footer.appName")} (ksef-pdf-generator - ${l.t("invoice.footer.version")} ${Pl.version})`;
}
const zl = {
  1: "const.farr.factor",
  2: "const.farr.recipientInternalUnit",
  3: "const.farr.originalEntity",
  5: "const.farr.invoiceIssuer",
  6: "const.farr.paymentEntity",
  7: "const.farr.localGovIssuer",
  8: "const.farr.localGovRecipient",
  9: "const.farr.vatGroupMemberIssuer",
  10: "const.farr.vatGroupMemberRecipient",
  11: "const.farr.employee"
}, Tl = {
  1: "const.farr.correctionOriginalDate",
  2: "const.farr.correctionInvoiceDate",
  3: "const.farr.correctionOtherDate",
  4: "const.farr.correctionRefundDate"
}, Ul = {
  7: "const.farr.taxRate7",
  "6.5": "const.farr.taxRate65"
};
function re(e, n = null, c = {}, E = "") {
  if (!e)
    return "";
  const Y = { text: e.toString() };
  return Object.assign(Y, c), n && (Y.style = n, Array.isArray(n) ? n.forEach((X) => {
    Ko(X, Y, e, E);
  }) : Ko(n, Y, e, E)), Y;
}
function Ko(e, n, c, E = "") {
  switch (e) {
    case U.Currency:
      n.text = isNaN(Number(c)) ? c : `${ts(c)} ${E}`, n.alignment = xt.RIGHT;
      break;
    case U.CurrencyAbs:
      n.text = isNaN(Number(c)) ? c : `${is(Math.abs(Number(c)).toFixed(2))} ${E}`, n.alignment = xt.RIGHT;
      break;
    case U.CurrencyGreater:
      n.text = isNaN(Number(c)) ? c : `${is(Number(c).toFixed(2))} ${E}`, n.fontSize = 10;
      break;
    case U.CurrencyGreaterWithSeparator:
      n.text = isNaN(Number(c)) ? c : `${ts(c)} ${E}`, n.fontSize = 10;
      break;
    case U.Currency6:
      n.text = isNaN(Number(c)) ? c : `${is(Number(c).toFixed(6))} ${E}`, n.alignment = xt.RIGHT;
      break;
    case U.DateTime:
      n.text = Ya(c, !0, !0);
      break;
    case U.Date:
      n.text = Ya(c);
      break;
    case U.Time:
      n.text = vl(c);
      break;
    case U.FormOfPayment:
      n.text = _t({ _text: c }, Os);
      break;
    case U.Boolean:
      n.text = c?.trim() === "1" ? ma.TRUE : ma.FALSE;
      break;
    case U.Percentage:
      n.text = `${c}%`;
      break;
    case U.Number:
      n.text = Nl(c), n.alignment = xt.RIGHT;
      break;
    case U.AccountNumber:
      n.text = Gl(c);
      break;
  }
}
function ts(e) {
  if (!e)
    return "";
  const n = is(typeof e == "string" ? e : e.toString());
  if (n === "0")
    return n;
  if (n.includes(",")) {
    const c = n.split(",");
    return Wo(c[1].length > 1 ? n : n + "0");
  } else
    return Wo(n + ",00");
}
function Nl(e) {
  let n = "";
  return typeof e == "number" && (n = e.toString()), typeof e == "string" && (n = e), n.includes(".") ? is(n) : n;
}
function is(e) {
  return e.replace(".", ",");
}
function WA(e, n = !0) {
  return !!(typeof e != "object" && e || typeof e == "object" && e._text) || n && e === 0;
}
function de(e) {
  return typeof e == "object" ? e._text : e;
}
function Rl(e) {
  const n = de(e);
  return n ? typeof n == "number" ? n : parseFloat(n.toString()) : 0;
}
function Se(e) {
  const n = Rl(e);
  return Math.round(n * 100) / 100;
}
function Wt(e) {
  return [
    {
      text: e.map(
        (n) => re(de(n.value) ?? "", n.formatTyp ?? U.Label, {}, n.currency)
      )
    }
  ];
}
function Wo(e, n = " ", c = ",") {
  const E = /\B(?=(\d{3})+(?!\d))/g;
  if (e.includes(c)) {
    const Y = e.split(c);
    return `${Y[0].replace(E, n)}${c}${Y[1]}`;
  } else
    return e.replace(E, n);
}
function qA(e, n, c = U.Value, E = {}) {
  return !n || typeof n == "object" && !n._text ? [] : typeof n == "object" ? [
    {
      text: [re(e, U.Label), re(n._text, c)],
      ...E
    }
  ] : [
    {
      text: [re(e, U.Label), re(n, c)],
      ...E
    }
  ];
}
function Yt(e, n, c) {
  return [
    {
      stack: [
        ...e.length ? [...n ? [{ stack: [zi()], margin: [0, 8, 0, 0] }] : [], e] : []
      ],
      margin: c ?? [0, 0, 0, 8]
    }
  ];
}
function Ne(e, n) {
  return [
    {
      stack: [re(e, U.HeaderContent)],
      margin: n ?? [0, 8, 0, 8]
    }
  ];
}
function kt(e, n) {
  return [
    {
      stack: [re(e, U.SubHeaderContent)],
      margin: n ?? [0, 4, 0, 4]
    }
  ];
}
function rs() {
  return {
    styles: {
      columnMarginLeft: {
        margin: [4, 0, 0, 0]
      },
      columnMarginRight: {
        margin: [0, 0, 4, 0]
      },
      GrayBoldTitle: {
        fillColor: "#F6F7FA",
        bold: !0
      },
      GrayTitle: {
        fillColor: "#F6F7FA"
      },
      Label: {
        color: "#343A40",
        bold: !0
      },
      LabelMargin: {
        margin: [0, 12, 0, 1.3]
      },
      LabelSmallMargin: {
        margin: [0, 6, 0, 1.3]
      },
      LabelMedium: {
        color: "#343A40",
        bold: !0,
        fontSize: 9
      },
      LabelGreater: {
        color: "#343A40",
        bold: !0,
        fontSize: 10
      },
      Value: {
        color: "#343A40"
      },
      ValueMedium: {
        color: "#343A40",
        fontSize: 9
      },
      Bold: {
        fontSize: 9,
        bold: !0
      },
      Description: {
        color: "blue",
        bold: !1
      },
      HeaderPosition: {
        fontSize: 16,
        bold: !0
      },
      Right: {
        alignment: xt.RIGHT
      },
      header: {
        fontSize: 12,
        bold: !0,
        margin: [0, 12, 0, 5]
      },
      HeaderContent: {
        fontSize: 10,
        bold: !0,
        color: "#343A40"
      },
      SubHeaderContent: {
        fontSize: 7,
        bold: !0,
        color: "#343A40"
      },
      TitleContent: {
        fontSize: 10,
        bold: !0
      },
      Link: {
        color: "blue"
      },
      MarginBottom4: {
        marginBottom: 4
      },
      MarginBottom8: {
        marginBottom: 8
      },
      MarginTop4: {
        marginTop: 4
      }
    },
    defaultStyle: {
      font: "Roboto",
      fontSize: 7,
      lineHeight: 1.2
    }
  };
}
function Te(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Sl(e, n) {
  return e.map((c, E) => Array.isArray(n) ? re(c, n[E] ?? U.Default) : re(c, n ?? U.Default));
}
function pr(e, n) {
  return n.some((c) => WA(c[e]));
}
function mn(e, n) {
  const c = [];
  return n.forEach((E) => {
    const Y = de(E[e]);
    if (Y) {
      const X = c.findIndex((Q) => Q.value === Y);
      X < 0 ? c.push({ value: Y, count: 1 }) : c[X].count++;
    }
  }), c;
}
function ft(e, n, c, E, Y) {
  const X = e.filter((r) => n.some((A) => {
    const a = r.name;
    return a === "" && A?._text ? !0 : a === "" ? !1 : typeof A[a] == "object" && A[a]?._text ? !0 : !!(typeof A[a] != "object" && A[a]);
  }));
  if (X.length < 1)
    return { content: null, fieldsWithValue: [] };
  const Q = Sl(
    X.map((r) => r.title),
    U.GrayBoldTitle
  ), B = n.map((r) => X.map((A) => {
    const a = A.name ? r[A.name] : r, D = typeof a == "object" ? a?._text : a;
    return re(
      bi(
        A.mappingData && D ? _t(D, A.mappingData) : D ?? "",
        Y ?? 40
      ),
      A.format ?? U.Default,
      { rowSpan: a?._rowSpan ?? 1 }
    );
  }));
  return {
    fieldsWithValue: X.map((r) => r.name),
    content: {
      table: {
        headerRows: 1,
        keepWithHeaderRows: 1,
        widths: X.map((r) => r.width ?? c),
        body: [Q, ...B]
      },
      margin: E ?? [0, 0, 0, 8],
      layout: Cn
    }
  };
}
function It(e, n, c, E = !0) {
  return {
    columns: [
      { stack: [e], width: "50%" },
      { stack: [n], width: "50%" }
    ],
    margin: c ?? [0, 0, 0, 0],
    columnGap: 20,
    unbreakable: E
  };
}
function Gi(e, n = void 0) {
  const c = (100 / e.length).toFixed(0) + "%", E = e.map((X) => ({ stack: X, width: c })), Y = n ? { ...n } : { columnGap: 20 };
  return {
    columns: E,
    ...Y
  };
}
function TB(e) {
  return e ? {
    qr: e,
    fit: 150,
    foreground: "black",
    background: "white",
    eccLevel: "M"
  } : void 0;
}
function Ei(e) {
  return { text: `
`, fontSize: e };
}
function za(e) {
  return Gn[e] ? Gn[e] : e;
}
function _n(e, n, c) {
  let E = {};
  switch (n) {
    case 1:
      E = dl;
      break;
    case 2:
      E = Il;
      break;
    case 3:
      E = yl;
      break;
    case "RR":
      E = Ul;
      break;
  }
  return !e && c === "1" ? "marża" : E[e] ? _t(e, E) : e;
}
function zi() {
  return {
    table: {
      widths: ["*"],
      body: [[{ text: " ", fontSize: 1 }]]
    },
    layout: {
      hLineWidth: (e) => e === 0 ? 1 : 0,
      vLineWidth: () => 0,
      hLineColor: function() {
        return "#c0bfc1";
      },
      paddingTop: () => 0,
      paddingBottom: () => 0
    }
  };
}
function bi(e, n = 40) {
  return typeof e == "string" ? e.replace(new RegExp(`(.{${n}})`, "g"), "$1​") : e;
}
function Vo(e, n) {
  return e.split("").reduce((c, E, Y) => (Y % n === 0 && c.push(""), c[c.length - 1] += E, c), []);
}
function Gl(e) {
  if (e.length <= 12) return e;
  if (/\s/.test(e.trim())) return e.trim();
  const n = /^[a-z!-\/:-@[-`{-~]/i;
  return e.charAt(0).match(n) ? e = Vo(e.replace(/ /g, ""), 4).join(" ") : e = `${e.substring(0, 2)} ${Vo(e.substring(2).replace(/ /g, ""), 4).join(" ")}`, e;
}
var hn = /* @__PURE__ */ ((e) => (e.BeforeCorrection = "Zamówienie przed korektą", e.AfterCorrection = "Zamówienie po korekcie", e.Order = "Zamówienie", e))(hn || {});
function Hl(e) {
  const n = [];
  let c = [];
  const E = [];
  if (e) {
    if (e?.P_19?._text === "1" && (qi(
      c,
      E,
      {
        text: l.t("invoice.annotations.noTaxDelivery")
      },
      !0
    ), e.P_19A?._text && (qi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument")
      ),
      !0
    ), qi(
      c,
      E,
      qA(l.t("invoice.annotations.law"), e.P_19A._text),
      !0
    )), e.P_19B?._text && (qi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument2")
      ),
      !0
    ), qi(
      c,
      E,
      qA(l.t("invoice.annotations.directiveLaw"), e.P_19B._text),
      !0
    )), e.P_19C?._text && (qi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument3")
      ),
      !0
    ), qi(
      c,
      E,
      qA(l.t("invoice.annotations.otherLaw"), e.P_19C._text),
      !0
    ))), e.P_18A?._text === "1" && qi(c, E, { text: l.t("invoice.annotations.partialPayMechanism") }), e.P_16?._text === "1" && qi(c, E, { text: l.t("invoice.annotations.cashMethod") }), e.P_18?._text === "1" && qi(c, E, { text: l.t("invoice.annotations.reverseTax") }), e.P_23?._text === "1" && qi(c, E, { text: l.t("invoice.annotations.threePartsSimplerMethod") }), e.P_PMarzy?._text === "1") {
      let Y = "";
      e.P_PMarzy_3_1?._text === "1" ? Y = l.t("invoice.annotations.usedGoods") : e.P_PMarzy_3_2?._text === "1" ? Y = l.t("invoice.annotations.artPieces") : e.P_PMarzy_2?._text === "1" ? Y = l.t("invoice.annotations.travelAgencies") : e.P_PMarzy_3_3?._text === "1" && (Y = l.t("invoice.annotations.antiques")), qi(
        c,
        E,
        qA(l.t("invoice.annotations.marginProcedure"), Y)
      );
    }
    if (e.P_17?._text === "1" && qi(c, E, { text: l.t("invoice.annotations.selfInvoice") }), e.P_22?._text === "1") {
      let Y = [];
      Y = [...qA(l.t("invoice.annotations.newTransportsDelivery"), " ")], Y && (c = [c, ...Y]);
    }
    (c.length || E.length) && n.push(Gi([c, E])), n.length && (n.unshift(Ei(1)), n.unshift(Ne(l.t("invoice.annotations.header"))), n.unshift(Ei(1)), n.push(Ei(1))), e.P_22?._text === "1" && n.push(Ll(e));
  }
  return n;
}
function Ll(e) {
  const n = [], c = [], E = WA(e.P_22B) || WA(e.P_22BT) || WA(e.P_22B1) || WA(e.P_22B2) || WA(e.P_22B3) || WA(e.P_22B4), Y = WA(e.P_22C) || WA(e.P_22C1), X = WA(e.P_22D) || WA(e.P_22D1);
  return WA(e.P_22A) && c.push([
    re(l.t("invoice.annotations.transportApprovalDate"), U.GrayBoldTitle),
    re(e.P_22A?._text, U.Default)
  ]), WA(e.P_22BMK) && c.push([
    re(l.t("invoice.annotations.transportBrand"), U.GrayBoldTitle),
    re(e.P_22BMK?._text, U.Default)
  ]), WA(e.P_22BMD) && c.push([
    re(l.t("invoice.annotations.transportModel"), U.GrayBoldTitle),
    re(e.P_22BMD?._text, U.Default)
  ]), WA(e.P_22BK) && c.push([
    re(l.t("invoice.annotations.transportColor"), U.GrayBoldTitle),
    re(e.P_22BK?._text, U.Default)
  ]), WA(e.P_22BNR) && c.push([
    re(l.t("invoice.annotations.transportRegistrationNumber"), U.GrayBoldTitle),
    re(e.P_22BNR?._text, U.Default)
  ]), WA(e.P_22BRP) && c.push([
    re(l.t("invoice.annotations.transportProductionYear"), U.GrayBoldTitle),
    re(e.P_22BRP?._text, U.Default)
  ]), E ? (c.push([
    re(l.t("invoice.annotations.transportType"), U.GrayBoldTitle),
    re(l.t("invoice.annotations.landDelivery"), U.Default)
  ]), WA(e.P_22B) && c.push([
    re(l.t("invoice.annotations.transportMileage"), U.GrayBoldTitle),
    re(e.P_22B?._text, U.Default)
  ]), WA(e.P_22B1) && c.push([
    re(l.t("invoice.annotations.vin"), U.GrayBoldTitle),
    re(e.P_22B1?._text, U.Default)
  ]), WA(e.P_22B2) && c.push([
    re(l.t("invoice.annotations.bodyNumber"), U.GrayBoldTitle),
    re(e.P_22B2?._text, U.Default)
  ]), WA(e.P_22B3) && c.push([
    re(l.t("invoice.annotations.chassisNumber"), U.GrayBoldTitle),
    re(e.P_22B3?._text, U.Default)
  ]), WA(e.P_22B4) && c.push([
    re(l.t("invoice.annotations.frameNumber"), U.GrayBoldTitle),
    re(e.P_22B4?._text, U.Default)
  ]), WA(e.P_22BT) && c.push([
    re(l.t("invoice.annotations.newTransportType"), U.GrayBoldTitle),
    re(e.P_22BT?._text, U.Default)
  ])) : Y ? (c.push([
    re(l.t("invoice.annotations.transportType"), U.GrayBoldTitle),
    re(l.t("invoice.annotations.boatDelivery"), U.Default)
  ]), WA(e.P_22C) && c.push([
    re(l.t("invoice.annotations.transportMileage"), U.GrayBoldTitle),
    re(e.P_22C?._text, U.Default)
  ]), WA(e.P_22C1) && c.push([
    re(l.t("invoice.annotations.hullNumber"), U.GrayBoldTitle),
    re(e.P_22C1?._text, U.Default)
  ])) : X && (c.push([
    re(l.t("invoice.annotations.transportType"), U.GrayBoldTitle),
    re(l.t("invoice.annotations.airDelivery"), U.Default)
  ]), WA(e.P_22D) && c.push([
    re(l.t("invoice.annotations.transportMileage"), U.GrayBoldTitle),
    re(e.P_22D?._text, U.Default)
  ]), WA(e.P_22D1) && c.push([
    re(l.t("invoice.annotations.factoryNumber"), U.GrayBoldTitle),
    re(e.P_22D1?._text, U.Default)
  ])), c.length && n.push([
    {
      unbreakable: !0,
      table: {
        body: c,
        widths: ["*", "*"]
      },
      layout: Cn
    }
  ]), n;
}
function qi(e, n, c, E) {
  if (e.length > n.length && E) {
    n.push(c);
    return;
  }
  e.push(c);
}
function kl(e) {
  const n = [];
  de(e.TP) === "1" && n.push(re(l.t("invoice.additionalInformation.tpLabel")));
  const c = [];
  de(e.FP) === "1" && c.push(re(l.t("invoice.additionalInformation.fpLabel")));
  const E = [];
  de(e.ZwrotAkcyzy) === "1" && E.push(re(l.t("invoice.additionalInformation.exciseTaxRefund")));
  const Y = [n, c, E].filter((Q) => Q.length > 0), X = [
    ...Ne(l.t("invoice.additionalInformation.additionalInformationLabel")),
    ...Y,
    ...jl(e.DodatkowyOpis, l)
  ];
  return X.length > 1 ? Yt(X, !0) : [];
}
function jl(e, n) {
  if (!e)
    return [];
  const c = Te(e)?.map((Q, B) => ({
    ...Q,
    lp: { _text: B + 1 }
  })), E = kt(n.t("invoice.additionalInformation.additionalDescription")), Y = [
    {
      name: "lp",
      title: n.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Klucz",
      title: n.t("invoice.additionalInformation.typeOfInformation"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Wartosc",
      title: n.t("invoice.additionalInformation.informationContent"),
      format: U.Default,
      width: "*"
    }
  ], X = ft(
    Y,
    c,
    "*",
    [0, 0, 0, 0]
  );
  return X.content && E.push(X.content), E;
}
const Xo = (e, n) => {
  const c = [];
  return e?.length ? (e.forEach((E, Y) => {
    const X = [], Q = Ne(
      n ? `${n} ${e?.length > 1 ? ++Y : ""}` : "",
      [0, 12, 0, 8]
    );
    WA(E.NrRBZagr) ? X.push([
      re(l.t("invoice.registers.billFormat"), U.GrayBoldTitle),
      re(l.t("invoice.registers.foreign"), U.Default)
    ]) : WA(E.NrRBPL) && X.push([
      re(l.t("invoice.registers.billFormat"), U.GrayBoldTitle),
      re(l.t("invoice.registers.polish"), U.Default)
    ]), WA(E.NrRBPL) && X.push([
      re(l.t("invoice.registers.fullNrbAccountNumber"), U.GrayBoldTitle),
      re(de(E.NrRBPL), U.Default)
    ]), WA(E.NrRBZagr) && X.push([
      re(l.t("invoice.registers.fullForeignAccountNumber"), U.GrayBoldTitle),
      re(de(E.NrRBZagr), U.Default)
    ]), X.push([
      re(l.t("invoice.registers.swiftCode"), U.GrayBoldTitle),
      re(de(E.SWIFT), U.Default)
    ]), X.push([
      re(l.t("invoice.registers.ownBankAccount"), U.GrayBoldTitle),
      re(
        bi(_t(E.RachunekWlasnyBanku, va), 20),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.bankName"), U.GrayBoldTitle),
      re(bi(de(E.NazwaBanku), 20), U.Default)
    ]), c.push([
      ...Q,
      {
        unbreakable: !0,
        table: {
          body: X,
          widths: ["auto", "*"]
        },
        layout: Cn
      }
    ]);
  }), Yt(c, !1)) : [];
};
function Ol(e) {
  if (!e)
    return [];
  const n = Te(e.TerminyPlatnosci), c = [
    {
      name: "TerminPlatnosci",
      title: l.t("invoice.payment.maturityDate"),
      format: U.Date
    }
  ];
  n.some((x) => x.TerminPlatnosciOpis) && c.push({
    name: "TerminPlatnosciOpis",
    title: l.t("invoice.payment.paymentDescription"),
    format: U.Date
  });
  const E = [
    {
      name: "DataZaplatyCzesciowej",
      title: l.t("invoice.payment.partialPaymentDate"),
      format: U.Date
    },
    {
      name: "KwotaZaplatyCzesciowej",
      title: l.t("invoice.payment.partialPaymentAmount"),
      format: U.Currency
    },
    {
      name: "FormaPlatnosci",
      title: l.t("invoice.payment.paymentMethod"),
      format: U.FormOfPayment
    }
  ], Y = [zi(), ...Ne(l.t("invoice.payment.payment"))];
  e.Zaplacono?._text === "1" ? (Y.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.paidStatus"))
  ), Y.push(qA(l.t("invoice.payment.paymentDate"), e.DataZaplaty, U.Date))) : e.ZaplataCzesciowa?._text === "1" && Y.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.partialPayment"))
  ), WA(e.FormaPlatnosci) ? Y.push(
    qA(
      l.t("invoice.payment.paymentMethod2"),
      _t(e.FormaPlatnosci, Os)
    )
  ) : e.OpisPlatnosci?._text && (Y.push(
    qA(l.t("invoice.payment.paymentMethod2"), l.t("invoice.payment.paymentDifferent"))
  ), Y.push(qA(l.t("invoice.payment.otherPaymentDescription"), e.OpisPlatnosci)));
  const X = Te(e.PlatnosciCzesciowe), Q = ft(
    E,
    X,
    "*"
  ), B = n.map(
    (x) => n.some((N) => N.TerminPlatnosciOpis) ? {
      ...x,
      TerminPlatnosciOpis: {
        _text: `${x.TerminPlatnosciOpis?._text ?? ""}`
      }
    } : x
  ), r = ft(
    c,
    B,
    "*"
  );
  X.length > 0 && n.length > 0 ? Y.push(
    It(
      Q.content ?? [],
      r.content ?? [],
      [0, 4, 0, 0],
      !1
    )
  ) : n.length > 0 ? r.content && Y.push(It(r.content, [], void 0, !1)) : X.length > 0 && Q.content && Y.push(Q.content);
  const A = Te(e.RachunekBankowy).map(
    (x) => Xo([x], l.t("invoice.payment.bankAccountNumber"))
  ), a = Te(e.RachunekBankowyFaktora).map(
    (x) => Xo([x], l.t("invoice.payment.factorsBankAccountNumber"))
  ), D = [...A, ...a];
  return D.length > 0 && D.forEach((x, N) => {
    N % 2 === 0 && Y.push(It(x, D[N + 1] ?? []));
  }), e.Skonto && (Y.push(Ne(l.t("invoice.payment.conditionalDiscount"), [0, 0])), Y.push(qA(l.t("invoice.payment.discountConditions"), e.Skonto.WarunkiSkonta)), Y.push(qA(l.t("invoice.payment.discountAmount"), e.Skonto.WysokoscSkonta))), Y;
}
function Ns(e) {
  const n = [];
  if (e.AdresZagr) {
    const c = e.AdresZagr;
    c.KodKraju && n.push(qA(l.t("invoice.address.countryName"), c.KodKraju)), c.Ulica && n.push(qA(l.t("invoice.address.streetName"), c.Ulica)), c.NrDomu && n.push(qA(l.t("invoice.address.houseNumber"), c.NrDomu)), c.NrLokalu && n.push(qA(l.t("invoice.address.apartmentNumber"), c.NrLokalu)), c.KodPocztowy && n.push(qA(l.t("invoice.address.zipCode"), c.KodPocztowy)), c.Miejscowosc && n.push(qA(l.t("invoice.address.townName"), c.Miejscowosc)), c.GLN && n.push(qA(l.t("invoice.address.GLN"), c.GLN));
  }
  if (e.AdresPol) {
    const c = e.AdresPol;
    c.Wojewodztwo && n.push(qA(l.t("invoice.address.voivodeshipName"), c.Wojewodztwo)), c.Powiat && n.push(qA(l.t("invoice.address.districtName"), c.Powiat)), c.Gmina && n.push(qA(l.t("invoice.address.communeName"), c.Gmina)), c.Ulica && n.push(qA(l.t("invoice.address.streetName"), c.Ulica)), c.NrDomu && n.push(qA(l.t("invoice.address.houseNumber"), c.NrDomu)), c.NrLokalu && n.push(qA(l.t("invoice.address.apartmentNumber"), c.NrLokalu)), c.KodPocztowy && n.push(qA(l.t("invoice.address.zipCode"), c.KodPocztowy)), c.Miejscowosc && n.push(qA(l.t("invoice.address.townName"), c.Miejscowosc)), c.Poczta && n.push(qA(l.t("invoice.address.postName"), c.Poczta)), c.GLN && n.push(qA(l.t("invoice.address.GLN"), c.GLN));
  }
  return n;
}
function Ri(e, n = "Adres", c = !1, E) {
  return e ? [
    ...c ? kt(n, E) : Ne(n, E),
    ...Ns(e)
  ] : [];
}
function sn(e) {
  const n = [];
  return n.push(qA(l.t("invoice.subjectIdentificationData.nip"), e.NIP)), (WA(e.ImiePierwsze) || WA(e.Nazwisko)) && n.push(
    qA(
      l.t("invoice.subjectIdentificationData.nameSurname"),
      `${de(e.ImiePierwsze)} ${de(e.Nazwisko)}`
    )
  ), e.PelnaNazwa && n.push(
    qA(l.t("invoice.subjectIdentificationData.fullName"), e.PelnaNazwa)
  ), e.Nazwisko && n.push(
    qA(
      l.t("invoice.subjectIdentificationData.tradeName"),
      e.NazwaHandlowa
    )
  ), n;
}
function $n(e, n) {
  const c = [];
  return e && c.push(qA(l.t("invoice.subjectContactData.email"), e)), n && n.forEach((E) => {
    c.push(qA(l.t("invoice.subjectContactData.phone"), `${E._text}
`));
  }), c;
}
function Zo(e) {
  const n = Ne(l.t("invoice.subject1.seller"));
  if (n.push(
    qA(l.t("invoice.subject1.eoriNumber"), e.NrEORI),
    qA(l.t("invoice.subject1.vatPrefix"), e.PrefiksPodatnika)
  ), e.DaneIdentyfikacyjne && n.push(...sn(e.DaneIdentyfikacyjne)), e.Adres && n.push(
    Ri(e.Adres, l.t("invoice.subject1.address"), !0, [0, 12, 0, 1.3])
  ), e.AdresKoresp && n.push(
    ...Ri(
      e.AdresKoresp,
      l.t("invoice.subject1.mailingAddress"),
      !0,
      [0, 12, 0, 1.3]
    )
  ), (e.Email || e.Telefon) && n.push(
    re(l.t("invoice.subject1.contactDetails"), [U.Label, U.LabelMargin]),
    ...$n(e.Email, Te(e.Telefon))
  ), WA(e.StatusInfoPodatnika)) {
    const c = _t(e.StatusInfoPodatnika, Ln);
    n.push(qA(l.t("invoice.subject1.taxpayerStatus"), c));
  }
  return n;
}
function Jl(e, n) {
  const c = Ne(l.t("invoice.subject1K.seller"));
  let E = [], Y = [];
  if (E.push(
    kt(l.t("invoice.subject1K.identificationData")),
    qA(l.t("invoice.subject1K.eoriNumber"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...sn(e.DaneIdentyfikacyjne)), (e.Email || e.Telefon) && E.push($n(e.Email, Te(e.Telefon))), e.StatusInfoPodatnika) {
    const X = _t(e.StatusInfoPodatnika, Ln);
    E.push(qA(l.t("invoice.subject1K.taxpayerStatus"), X));
  }
  return E.length && c.push(E), E = qo(n, l.t("invoice.subject1K.correctedContent")), Y = qo(e, l.t("invoice.subject1K.correctiveContent")), e.AdresKoresp && Y.push(
    Ri(
      e.AdresKoresp,
      l.t("invoice.subject1K.mailingAddress"),
      !0,
      [0, 12, 0, 1.3]
    )
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function qo(e, n) {
  const c = [];
  return c.push(kt(n)), e.PrefiksPodatnika?._text && c.push(qA(l.t("invoice.subject1K.vatPrefix"), e.PrefiksPodatnika)), e.DaneIdentyfikacyjne && c.push(...sn(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    Ri(e.Adres, l.t("invoice.subject1K.address"), !0, [0, 12, 0, 1.3])
  ), c;
}
function _o(e) {
  const n = Ne(l.t("invoice.subject2.buyer"));
  return n.push(qA(l.t("invoice.subject2.eoriNumber"), e.NrEORI)), WA(e.PrefiksNabywcy) && n.push(qA(l.t("invoice.subject2.vatPrefix"), e.PrefiksNabywcy)), e.DaneIdentyfikacyjne && (WA(e.DaneIdentyfikacyjne.NrID) && n.push(qA(l.t("invoice.subject2.taxIdOther"), e.DaneIdentyfikacyjne.NrID)), de(e.DaneIdentyfikacyjne.BrakID) === "1" && n.push(qA(l.t("invoice.subject2.noId"), " ")), n.push(
    ...sn(e.DaneIdentyfikacyjne)
  )), e.Adres && n.push(
    Ri(e.Adres, l.t("invoice.subject2.address"), !0, [0, 12, 0, 1.3])
  ), e.AdresKoresp && n.push(
    ...Ri(
      e.AdresKoresp,
      l.t("invoice.subject2.mailingAddress"),
      !0,
      [0, 12, 0, 1.3]
    )
  ), (e.Email || e.Telefon) && n.push(
    re(l.t("invoice.subject2.contactDetails"), [U.Label, U.LabelMargin]),
    ...$n(e.Email, Te(e.Telefon))
  ), e.NrKlienta && n.push(qA(l.t("invoice.subject2.customerNumber"), e.NrKlienta)), n;
}
function Kl(e, n) {
  const c = [];
  c.push(zi()), c.push(Ne(l.t("invoice.subject2.buyer")));
  let E = [], Y = [];
  return E.push(
    kt(l.t("invoice.subject2k.identificationData")),
    qA(l.t("invoice.subject2k.eori"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...sn(e.DaneIdentyfikacyjne)), (e.Email || e.Telefon) && E.push($n(e.Email, Te(e.Telefon))), e.NrKlienta && E.push(qA(l.t("invoice.subject2.customerNumber"), e.NrKlienta)), E.length && c.push({
    columns: [E, []],
    columnGap: 20
  }), n.DaneIdentyfikacyjne && (E = $o(n, l.t("invoice.subject2k.correctedContent")), Y = $o(e, l.t("invoice.subject2k.correctiveContent"))), e.AdresKoresp && Y.push(
    Ri(
      e.AdresKoresp,
      l.t("invoice.subject2.mailingAddress"),
      !0,
      [0, 12, 0, 1.3]
    )
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function $o(e, n) {
  const c = [];
  return c.push(kt(n)), WA(e.PrefiksNabywcy) && c.push(qA(l.t("invoice.subject1K.vatPrefix"), e.PrefiksNabywcy)), e.DaneIdentyfikacyjne && (WA(e.DaneIdentyfikacyjne.NrID) && c.push(qA(l.t("invoice.subject2.taxIdOther"), e.DaneIdentyfikacyjne.NrID)), de(e.DaneIdentyfikacyjne.BrakID) === "1" && c.push(qA(l.t("invoice.subject2.noId"), " ")), c.push(...sn(e.DaneIdentyfikacyjne))), e.Adres && c.push(
    Ri(e.Adres, l.t("invoice.subject2.address"), !0, [0, 12, 0, 1.3])
  ), c;
}
function AB(e, n) {
  const c = [], E = [
    ...Ne(l.t("invoice.subject3.otherEntity", { index: n + 1 })),
    qA(l.t("invoice.subject3.eori"), e.NrEORI)
  ];
  WA(e.DaneIdentyfikacyjne?.NrID) && E.push(qA(l.t("invoice.subject3.otherTaxId"), e.DaneIdentyfikacyjne?.NrID)), de(e.DaneIdentyfikacyjne?.BrakID) === "1" && E.push(qA(l.t("invoice.subject3.noTaxId"), " ")), e.DaneIdentyfikacyjne && E.push(...sn(e.DaneIdentyfikacyjne)), E.push([
    qA(l.t("invoice.subject3.role"), _t(e.Rola, bB)),
    qA(l.t("invoice.subject3.otherRole"), e.OpisRoli),
    qA(l.t("invoice.subject3.share"), e.Udzial, [U.Percentage])
  ]);
  const Y = [];
  return e.Adres && Y.push(
    Ri(e.Adres, l.t("invoice.subject3.address"), !0, [0, 12, 0, 1.3])
  ), e.AdresKoresp && Y.push(
    ...Ri(
      e.AdresKoresp,
      l.t("invoice.subject3.correspondenceAddress"),
      !0,
      [0, 12, 0, 1.3]
    )
  ), (e.Email || e.Telefon) && Y.push(
    re(l.t("invoice.subject3.contactData"), [U.Label, U.LabelMargin]),
    ...$n(e.Email, Te(e.Telefon))
  ), e.NrKlienta && Y.push(qA(l.t("invoice.subject3.clientNumber"), e.NrKlienta)), c.push(It(E, Y)), Yt(c, !0);
}
function Wl(e, n) {
  if (!e)
    return [];
  const c = e.fakturaPodmiotNDto, E = e.podmiot2KDto, Y = Ne(`${l.t("invoice.subject3k.otherEntity")} ${n + 1}`);
  (WA(c.NrEORI) || WA(c.Rola) || WA(c.OpisRoli) || WA(c?.Udzial)) && Y.push(
    ...kt(l.t("invoice.subject3k.identificationData")),
    qA(l.t("invoice.subject3k.eori"), c.NrEORI),
    qA(l.t("invoice.subject3k.role"), _t(c.Rola, bB)),
    qA(l.t("invoice.subject3k.otherRole"), c.OpisRoli),
    qA(l.t("invoice.subject3k.share"), c.Udzial, U.Percentage)
  ), (c.Email || c.Telefon) && Y.push($n(c.Email, Te(c.Telefon))), WA(c.NrKlienta) && Y.push(qA(l.t("invoice.subject3k.clientNumber"), c.NrKlienta));
  const X = [...kt(l.t("invoice.subject3k.correctedContent"))];
  WA(E?.DaneIdentyfikacyjne?.NrID) && X.push(
    qA(l.t("invoice.subject3k.otherTaxId"), E?.DaneIdentyfikacyjne?.NrID)
  ), de(E?.DaneIdentyfikacyjne?.BrakID) === "1" && X.push(qA(l.t("invoice.subject3k.noTaxId"), " ")), E?.DaneIdentyfikacyjne && X.push(sn(E.DaneIdentyfikacyjne)), E?.Adres && X.push(Ri(E.Adres, l.t("invoice.subject3k.address"), !0));
  const Q = [...kt(l.t("invoice.subject3k.correctiveContent"))];
  return WA(c.DaneIdentyfikacyjne?.NrID) && Q.push(
    qA(l.t("invoice.subject3k.otherTaxId"), c.DaneIdentyfikacyjne?.NrID)
  ), de(c.DaneIdentyfikacyjne?.BrakID) === "1" && Q.push(qA(l.t("invoice.subject3k.noTaxId"), " ")), c?.DaneIdentyfikacyjne && Q.push(sn(c.DaneIdentyfikacyjne)), c?.Adres && Q.push(Ri(c.Adres, l.t("invoice.subject3k.address"), !0)), c.AdresKoresp != null && Q.push(
    Ri(c.AdresKoresp, l.t("invoice.subject3k.correspondenceAddress"), !0)
  ), Y.push(It(X, Q)), Y;
}
function Vl(e) {
  if (!e)
    return [];
  const n = Ne(l.t("invoice.authorizedSubject.authorizedSubject")), c = [], E = [];
  return WA(e.RolaPU) && c.push(
    qA(
      l.t("invoice.authorizedSubject.role"),
      _t(e.RolaPU, pl)
    )
  ), WA(e.NrEORI) && c.push(qA(l.t("invoice.authorizedSubject.eori"), e.NrEORI)), e.DaneIdentyfikacyjne && (WA(e.DaneIdentyfikacyjne.NrID) && c.push(
    qA(l.t("invoice.authorizedSubject.otherTaxId"), e.DaneIdentyfikacyjne.NrID)
  ), de(e.DaneIdentyfikacyjne.BrakID) === "1" && c.push(qA(l.t("invoice.authorizedSubject.noTaxId"), " ")), c.push(sn(e.DaneIdentyfikacyjne))), e.Adres && E.push(Ri(e.Adres, l.t("invoice.authorizedSubject.address"), !0)), e.AdresKoresp && E.push(
    Ri(
      e.AdresKoresp,
      l.t("invoice.authorizedSubject.correspondenceAddress"),
      !0
    )
  ), (e.EmailPU || e.TelefonPU) && E.push(
    re(l.t("invoice.authorizedSubject.contactData"), [U.Label]),
    ...$n(e.EmailPU, Te(e.TelefonPU))
  ), n.push(It(c, E)), n;
}
function Xl(e) {
  const n = [], c = Te(e.Fa?.Podmiot2K), E = Te(e.Podmiot3);
  if (e.Fa?.Podmiot1K || c.length > 0 ? (e.Fa?.Podmiot1K ? n.push(Jl(e.Podmiot1 ?? {}, e.Fa?.Podmiot1K)) : e.Podmiot1 != null && n.push(Zo(e.Podmiot1)), c.length > 0 ? c.forEach((Y) => {
    n.push(Kl(e.Podmiot2 ?? {}, Y));
  }) : e.Podmiot2 && n.push(Yt(_o(e.Podmiot2), !0))) : n.push([
    Gi([Zo(e.Podmiot1), _o(e.Podmiot2)], {
      margin: [0, 0, 0, 8],
      columnGap: 20
    })
  ]), E.length > 0) {
    const Y = Zl(c, E);
    Y.length > 0 ? Y.forEach((X, Q) => {
      X.podmiot2KDto ? n.push(Wl(X, Q)) : n.push(AB(X.fakturaPodmiotNDto, Q)), Q < Y.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    }) : E.forEach((X, Q) => {
      n.push(AB(X, Q)), Q < E.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    });
  }
  return n.push(Vl(e.PodmiotUpowazniony)), Yt(n, !0);
}
function Zl(e, n) {
  const c = [];
  if (e.length > 1 && n.filter((E) => de(E.Rola) === "4").length > 0) {
    let E = 1;
    n.forEach((Y) => {
      de(Y.Rola) === "4" ? (e.length > E && c.push({
        fakturaPodmiotNDto: Y,
        podmiot2KDto: e[E]
      }), E++) : c.push({
        fakturaPodmiotNDto: Y
      });
    });
  }
  return c;
}
function ql(e) {
  const n = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) && !WA(e.Fa?.P_14_5, !1) || WA(e.Fa?.P_13_6, !1) || WA(e.Fa?.P_13_7, !1), c = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) || WA(e.Fa?.P_13_7, !1), E = WA(e.Fa?.P_14_1W, !1) || WA(e.Fa?.P_14_2W, !1) || WA(e.Fa?.P_14_3W, !1) || WA(e.Fa?.P_14_4W, !1);
  let Y = [];
  const X = {
    table: {
      headerRows: 1,
      widths: [],
      body: []
    },
    layout: Cn
  }, Q = [
    { text: l.t("invoice.summary.lp"), style: U.GrayBoldTitle },
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxRate"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.netAmount"), style: U.GrayBoldTitle }] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxAmount"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.grossAmount"), style: U.GrayBoldTitle }] : [],
    ...E ? [{ text: l.t("invoice.summary.taxAmountPLN"), style: U.GrayBoldTitle }] : []
  ], B = [
    "auto",
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...E ? ["*"] : []
  ];
  return e?.Fa && (Y = _l(e.Fa).map((A) => {
    const a = [];
    return a.push(A.no ?? ""), n ? A.taxRateString ? a.push(A.taxRateString) : de(e.Fa?.P_13_5) ? a.push(l.t("invoice.summary.oss")) : a.push("") : WA(e.Fa?.P_14_5, !1) && a.push(l.t("invoice.summary.oss")), c && a.push(re(A.net, U.Currency)), n ? a.push(re(A.tax, U.Currency)) : WA(e.Fa?.P_14_5, !1) && a.push(de(e.Fa?.P_14_5) ?? ""), c && a.push(re(A.gross, U.Currency)), E && a.push(re(A.taxPLN, U.Currency)), a;
  })), X.table.body = [[...Q], ...Y], X.table.widths = [...B], Y.length ? Yt([...Ne(l.t("invoice.summary.sectionHeader"), [0, 0, 0, 8]), X], !1) : [];
}
function _l(e) {
  const n = [], c = WA(e?.P_13_1, !1) || WA(e?.P_14_1, !1) || WA(e?.P_14_1W, !1), E = WA(e?.P_13_2, !1) || WA(e?.P_14_2, !1) || WA(e?.P_14_2W, !1), Y = WA(e?.P_13_3, !1) || WA(e?.P_14_3, !1) || WA(e?.P_14_3W, !1), X = WA(e?.P_13_4, !1) || WA(e?.P_14_4, !1) || WA(e?.P_14_4W, !1), Q = WA(e?.P_13_5, !1) || WA(e?.P_14_5, !1), B = WA(e?.P_13_7, !1);
  let r = 1;
  return c && (n.push({
    no: r,
    net: Se(e.P_13_1).toFixed(2),
    gross: (Se(e.P_13_1) + Se(e.P_14_1)).toFixed(2),
    tax: Se(e.P_14_1).toFixed(2),
    taxPLN: Se(e.P_14_1W).toFixed(2),
    taxRateString: l.t("invoice.summary.23or22")
  }), r++), E && (n.push({
    no: r,
    net: Se(e.P_13_2).toFixed(2),
    gross: (Se(e.P_13_2) + Se(e.P_14_2)).toFixed(2),
    tax: Se(e.P_14_2).toFixed(2),
    taxPLN: Se(e.P_14_2W).toFixed(2),
    taxRateString: l.t("invoice.summary.8or7")
  }), r++), Y && (n.push({
    no: r,
    net: Se(e.P_13_3).toFixed(2),
    gross: (Se(e.P_13_3) + Se(e.P_14_3)).toFixed(2),
    tax: Se(e.P_14_3).toFixed(2),
    taxPLN: Se(e.P_14_3W).toFixed(2),
    taxRateString: l.t("invoice.summary.5")
  }), r++), X && (n.push({
    no: r,
    net: Se(e.P_13_4).toFixed(2),
    gross: (Se(e.P_13_4) + Se(e.P_14_4)).toFixed(2),
    tax: Se(e.P_14_4).toFixed(2),
    taxPLN: Se(e.P_14_4W).toFixed(2),
    taxRateString: l.t("invoice.summary.4or3")
  }), r++), Q && (n.push({
    no: r,
    net: Se(e.P_13_5).toFixed(2),
    gross: (Se(e.P_13_5) + Se(e.P_14_5)).toFixed(2),
    tax: Se(e.P_14_5).toFixed(2),
    taxPLN: "",
    taxRateString: de(e.P_14_5) != 0 ? l.t("invoice.summary.oss") : ""
  }), r++), B && (n.push({
    no: r,
    net: Se(e.P_13_7).toFixed(2),
    gross: Se(e.P_13_7).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.taxFree")
  }), r++), n;
}
function $l(e) {
  const n = Te(e.FaWiersze?.FaWiersz), c = [], E = [
    { name: "NrWierszaFa", title: l.t("invoice.discount.lp"), format: U.Default, width: "auto" },
    { name: "P_7", title: l.t("invoice.discount.productName"), format: U.Default },
    { name: "P_8B", title: l.t("invoice.discount.quantity"), format: U.Default },
    { name: "P_8A", title: l.t("invoice.discount.unit"), format: U.Default }
  ], Y = ft(E, n, "*"), X = Y.fieldsWithValue.includes("NrWierszaFa");
  return c.push(
    ...Ne(l.t("invoice.discount.header")),
    ...qA(l.t("invoice.discount.totalValue"), e.P_15, U.Currency, {
      alignment: xt.RIGHT
    }),
    It(
      re(
        l.t(X ? "invoice.discount.notAll" : "invoice.discount.all"),
        U.Default
      ),
      ""
    )
  ), Y.fieldsWithValue.length > 0 && Y.content && c.push(Y.content), Yt(c, !0);
}
function AE(e) {
  const n = Te(e.FaWiersze?.FaWiersz), c = Te(e.Zamowienie?.ZamowienieWiersz), E = [mt.ZAL, mt.KOR_ZAL].includes(
    de(e.RodzajFaktury)
  ) ? l.t("invoice.details.paymentReceivedDate") : l.t("invoice.details.deliveryOrServiceDate"), Y = eE(e.OkresFa?.P_6_Od, e.OkresFa?.P_6_Do, l), X = [], Q = [];
  WA(e.KodWaluty) && Q.push(qA(l.t("invoice.details.currencyCode"), e.KodWaluty));
  const B = [];
  (pr("P_12_XII", n) || pr("P_12_XII", c)) && B.push(qA(l.t("invoice.details.ossProcedure"), " "));
  const r = [], A = [];
  if (WA(e.KodWaluty) && de(e.KodWaluty) != "PLN")
    if (e.Zamowienie?.ZamowienieWiersz?.length) {
      const J = mn(
        "KursWalutyZ",
        e.Zamowienie?.ZamowienieWiersz
      );
      J.length === 1 && (r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(
          l.t("invoice.details.currencyRate"),
          J[0].value,
          U.Currency6
        )
      ));
    } else {
      const J = mn("KursWaluty", n);
      J.length === 1 && (r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(
          l.t("invoice.details.currencyRate"),
          J[0].value,
          U.Currency6
        )
      ));
    }
  const a = [], D = [], x = [
    qA(l.t("invoice.details.invoiceNumber"), e.P_2),
    qA(l.t("invoice.details.issueDate"), e.P_1, U.Date),
    qA(l.t("invoice.details.issuePlace"), e.P_1M),
    qA(l.t("invoice.details.discountPeriod"), e.OkresFaKorygowanej),
    qA(E, e.P_6, U.Date),
    Y,
    X,
    Q,
    B,
    r,
    A,
    a,
    D
  ].filter((J) => J.length > 0), N = [], P = [];
  x.forEach((J, q) => {
    q % 2 ? P.push(J) : N.push(J);
  });
  const d = [
    ...Ne(l.t("invoice.details.header")),
    It(N, P),
    ...tE(Te(e.NrFaZaliczkowej), l)
  ];
  return Yt(d, !0);
}
function eE(e, n, c) {
  const E = [];
  return WA(e) && WA(n) ? E.push(
    Wt([
      {
        value: c.t("invoice.details.deliveryOrServiceDateFrom")
      },
      { value: $i(de(e)), formatTyp: U.Value },
      { value: c.t("invoice.details.to") },
      { value: $i(de(n)), formatTyp: U.Value }
    ])
  ) : WA(e) ? E.push(
    qA(
      c.t("invoice.details.deliveryOrServiceDateFrom"),
      $i(de(e))
    )
  ) : WA(n) && E.push(
    qA(
      c.t("invoice.details.deliveryOrServiceDateTo"),
      $i(de(n))
    )
  ), E;
}
function tE(e, n) {
  if (!e)
    return [];
  const c = [], E = [
    {
      name: "",
      title: n.t("invoice.details.advanceInvoiceNumbers"),
      format: U.Default
    }
  ], Y = ft(
    E,
    e,
    "50%",
    [0, 4, 0, 0]
  );
  return Y.content && c.push(Y.content), c;
}
function iE(e) {
  return e ? [
    ...Ne(l.t("invoice.carrier.carrier")),
    [
      It(
        sn(e.DaneIdentyfikacyjne),
        Ri(
          e.AdresPrzewoznika,
          l.t("invoice.carrier.carrierAddress"),
          !0,
          [0, 0, 0, 0]
        ),
        [0, 0, 0, 8]
      )
    ]
  ] : [];
}
function nE(e, n) {
  const c = [], E = {
    transport: [],
    dane: [],
    wysylkaZ: [],
    wysylkaDo: [],
    wysylkaPrzez: []
  };
  return c.push(
    Ne(
      n ? `${l.t("invoice.transport.header")} ${n}` : l.t("invoice.transport.header")
    )
  ), e.RodzajTransportu?._text ? E.transport.push(
    qA(
      l.t("invoice.transport.type"),
      _t(e.RodzajTransportu, Pa)
    )
  ) : e.TransportInny?._text == "1" && e.OpisInnegoTransportu?._text && (E.transport.push(
    qA(l.t("invoice.transport.type"), l.t("invoice.transport.otherType"))
  ), E.transport.push(
    qA(l.t("invoice.transport.otherTypeDescription"), e.OpisInnegoTransportu)
  )), E.dane.push(qA(l.t("invoice.transport.orderNumber"), e.NrZleceniaTransportu)), WA(e.OpisLadunku) && (E.dane.push(
    qA(
      l.t("invoice.transport.cargoDescription"),
      _t(e.OpisLadunku, ba)
    )
  ), e.LadunekInny?._text === "1" && e.OpisInnegoLadunku?._text && (E.dane.push(
    qA(l.t("invoice.transport.cargoDescription"), l.t("invoice.transport.otherCargo"))
  ), E.dane.push(
    qA(l.t("invoice.transport.otherCargoDescription"), e.OpisInnegoLadunku)
  ))), E.dane.push(qA(l.t("invoice.transport.packageUnit"), e.JednostkaOpakowania)), E.dane.push(
    qA(
      l.t("invoice.transport.startDateTime"),
      xr(e.DataGodzRozpTransportu)
    )
  ), E.dane.push(
    qA(
      l.t("invoice.transport.endDateTime"),
      xr(e.DataGodzZakTransportu)
    )
  ), E.dane.length > 0 && E.dane.unshift(kt(l.t("invoice.transport.dataHeader"), [0, 0, 0, 0])), c.push(It(E.transport, E.dane)), c.push(iE(e.Przewoznik)), e.WysylkaZ && (E.wysylkaZ.push(kt(l.t("invoice.transport.shipFrom"), [0, 0, 0, 0])), E.wysylkaZ.push(Ns(e.WysylkaZ))), e.WysylkaDo && (E.wysylkaDo.push(kt(l.t("invoice.transport.shipTo"), [0, 0, 0, 0])), E.wysylkaDo.push(Ns(e.WysylkaDo))), Te(e.WysylkaPrzez).forEach((X, Q) => {
    Q && E.wysylkaPrzez.push(`
`), E.wysylkaPrzez.push(kt(l.t("invoice.transport.intermediateAddress"), [0, 4, 0, 0])), E.wysylkaPrzez.push(Ns(X));
  }), (e.WysylkaZ || e.WysylkaDo || e.WysylkaPrzez?.length) && (c.push(Ne(l.t("invoice.transport.shipmentHeader"))), c.push(It(E.wysylkaZ, E.wysylkaDo)), c.push(It(E.wysylkaPrzez, []))), Yt(c, !0);
}
function rE(e) {
  if (!e)
    return [];
  const n = [], c = { umowy: [], zamowienia: [] }, E = Te(e?.Umowy), Y = Te(e?.Zamowienia), X = Te(e?.NrPartiiTowaru), Q = [
    { name: "DataUmowy", title: l.t("invoice.transaction.contractDate"), format: U.Date },
    { name: "NrUmowy", title: l.t("invoice.transaction.contractNumber"), format: U.Default }
  ], B = [
    { name: "DataZamowienia", title: l.t("invoice.transaction.orderDate"), format: U.Date },
    { name: "NrZamowienia", title: l.t("invoice.transaction.orderNumber"), format: U.Default }
  ], r = [
    { name: "", title: l.t("invoice.transaction.batchNumber"), format: U.Default }
  ];
  if (n.push(Ne(l.t("invoice.transaction.header"), [0, 8, 0, 4])), E.length > 0) {
    const A = ft(Q, E, "*");
    A.content && (c.umowy = [kt(l.t("invoice.transaction.contract")), A.content]);
  }
  if (Y.length > 0) {
    const A = ft(
      B,
      Y,
      "*"
    );
    A.content && A.fieldsWithValue.length > 0 && (c.zamowienia = [kt(l.t("invoice.transaction.order")), A.content]);
  }
  if ((c.zamowienia.length > 0 || c.umowy.length > 0) && n.push(It(c.umowy, c.zamowienia, 0, !1)), (e.WalutaUmowna?._text || e.KursUmowny?._text) && (n.push(Ne(l.t("invoice.transaction.currencyAndRate"), [0, 8, 0, 4])), n.push(qA(l.t("invoice.transaction.currency"), e.WalutaUmowna)), n.push(qA(l.t("invoice.transaction.rate"), e.KursUmowny))), X.length > 0) {
    const A = ft(
      r,
      X,
      "*",
      [0, 4]
    );
    A.content && n.push(It(A.content, "", 0, !1));
  }
  return n.push(
    qA(
      l.t("invoice.transaction.deliveryTerms"),
      e.WarunkiDostawy,
      U.MarginTop4
    )
  ), e.PodmiotPosredniczacy?._text === "1" && n.push(
    re(l.t("invoice.transaction.intermediaryDelivery"), [U.Label, U.MarginTop4])
  ), e.Transport && Te(e.Transport).forEach((A, a) => {
    n.push(
      nE(A, Te(e.Transport).length !== 0 ? a + 1 : null)
    );
  }), Yt(n, !0);
}
function Ta(e, n, c) {
  if (typeof e == "string") {
    const E = [
      mt.VAT,
      mt.KOR,
      mt.ROZ,
      mt.KOR_ROZ
    ].includes(e), Y = [mt.ZAL, mt.KOR_ZAL].includes(e);
    if (n)
      return E && !de(c.P_12) && !de(c.P_12_XII) ? { P_12: { _text: l.t("invoice.footer.margin") } } : Y && !de(c.P_12Z) && !de(c.P_12Z_XII) ? { P_12Z: { _text: l.t("invoice.footer.margin") } } : {};
  }
  return {};
}
function sE(e) {
  const n = [], c = de(e.RodzajFaktury), E = !!Number(de(e.Adnotacje?.P_PMarzy)), Y = Te(e.FaWiersze?.FaWiersz).map(
    (x) => {
      const N = Ta(c, E, x);
      return de(x.P_12) && (x.P_12._text = _n(de(x.P_12), 1)), { ...x, ...N };
    }
  ), X = [
    { name: "NrWierszaFa", title: l.t("invoice.rows.lp"), format: U.Default, width: "auto" }
  ], Q = [
    {
      name: "UU_ID",
      title: l.t("invoice.rows.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7", title: l.t("invoice.rows.productName"), format: U.Default, width: "*" },
    { name: "P_9A", title: l.t("invoice.rows.netUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_9B", title: l.t("invoice.rows.grossUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_8B", title: l.t("invoice.rows.quantity"), format: U.Number, width: "auto" },
    { name: "P_8A", title: l.t("invoice.rows.unit"), format: U.Default, width: "auto" },
    { name: "P_10", title: l.t("invoice.rows.discount"), format: U.Currency, width: "auto" },
    { name: "P_12", title: l.t("invoice.rows.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12_XII",
      title: l.t("invoice.rows.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    { name: "P_11", title: l.t("invoice.rows.netSalesValue"), format: U.Currency, width: "auto" },
    {
      name: "P_11A",
      title: l.t("invoice.rows.grossSalesValue"),
      format: U.Currency,
      width: "auto"
    }
  ];
  mn("KursWaluty", Y).length !== 1 && Q.push({
    name: "KursWaluty",
    title: l.t("invoice.rows.currencyRate"),
    format: U.Currency6,
    width: "auto"
  });
  const B = [
    { name: "GTIN", title: l.t("invoice.rows.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiU", title: l.t("invoice.rows.pkwiu"), format: U.Default, width: "auto" },
    { name: "CN", title: l.t("invoice.rows.cn"), format: U.Default, width: "auto" },
    { name: "PKOB", title: l.t("invoice.rows.pkob"), format: U.Default, width: "auto" },
    {
      name: "DodatkoweInfo",
      title: l.t("invoice.rows.additionalInfo"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "P_12_Procedura",
      title: l.t("invoice.rows.procedure"),
      format: U.Default,
      mappingData: zB,
      width: "*"
    },
    {
      name: "KwotaAkcyzy",
      title: l.t("invoice.rows.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTU", title: l.t("invoice.rows.gtu"), format: U.Default, width: "auto" },
    {
      name: "Procedura",
      title: l.t("invoice.rows.procedureMarkings"),
      format: U.Default,
      width: "*"
    },
    { name: "P_6A", title: l.t("invoice.rows.deliveryDate"), format: U.Default, width: "auto" }
  ];
  let r = ft(
    [...X, ...Q, ...B],
    Y,
    "*"
  );
  const A = re(
    l.t("invoice.rows.issuedInCurrency", {
      currency: e.KodWaluty?._text
    }),
    [U.Label, U.MarginBottom8]
  ), a = de(e.P_15);
  let D = [];
  return c == mt.ROZ ? D = [
    {
      stack: Wt([
        { value: l.t("invoice.rows.remainingAmount"), formatTyp: U.LabelGreater },
        {
          value: a,
          formatTyp: U.CurrencyGreaterWithSeparator,
          currency: de(e.KodWaluty)?.toString() ?? ""
        }
      ]),
      alignment: xt.RIGHT,
      margin: [0, 8, 0, 0]
    }
  ] : c == mt.KOR ? D = [
    {
      stack: Wt([
        { value: l.t("invoice.rows.totalAmountDueCorrection"), formatTyp: U.LabelGreater },
        {
          value: a,
          formatTyp: [U.CurrencyGreaterWithSeparator],
          currency: de(e.KodWaluty)?.toString() ?? ""
        }
      ]),
      alignment: xt.RIGHT,
      margin: [0, 8, 0, 0]
    }
  ] : c == mt.KOR_ROZ ? D = [
    {
      stack: Wt([
        { value: l.t("invoice.rows.remainingAmountCorrection"), formatTyp: U.LabelGreater },
        {
          value: a,
          formatTyp: [U.CurrencyGreaterWithSeparator],
          currency: de(e.KodWaluty)?.toString() ?? ""
        }
      ]),
      alignment: xt.RIGHT,
      margin: [0, 8, 0, 0]
    }
  ] : (c == mt.VAT || c == mt.UPR) && (D = [
    {
      stack: Wt([
        { value: l.t("invoice.rows.totalAmountDue"), formatTyp: U.LabelGreater },
        {
          value: a,
          formatTyp: [U.CurrencyGreaterWithSeparator],
          currency: de(e.KodWaluty)?.toString() ?? ""
        }
      ]),
      alignment: xt.RIGHT,
      margin: [0, 8, 0, 0]
    }
  ]), r.fieldsWithValue.length <= 9 && r.content ? n.push(r.content) : (r = ft([...X, ...Q], Y, "*"), r.content && n.push(r.content), r = ft([...X, ...B], Y, "*"), r.content && r.fieldsWithValue.length > 1 && (n.push(`
`), n.push(r.content))), n.length < 1 ? [] : Yt([...Ne(l.t("invoice.rows.header")), A, ...n, ...D], !0);
}
function aE(e, n, c, E, Y, X) {
  if (!e)
    return [];
  const Q = n === hn.BeforeCorrection ? U.CurrencyAbs : U.Currency, B = Te(e?.ZamowienieWiersz).map((d, J) => (d.NrWierszaZam._text || (d.NrWierszaZam._text = (J + 1).toString()), d.P_12Z = { _text: _n(de(d.P_12Z), 1, X) }, d)), r = [
    { name: "NrWierszaZam", title: l.t("invoice.order.lp"), format: U.Default, width: "auto" }
  ], A = [
    {
      name: "UU_IDZ",
      title: l.t("invoice.order.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7Z", title: l.t("invoice.order.productName"), format: U.Default, width: "*" },
    {
      name: "P_9AZ",
      title: l.t("invoice.order.netUnitPrice"),
      format: Q
    },
    { name: "P_8BZ", title: l.t("invoice.order.quantity"), format: U.Right, width: "auto" },
    { name: "P_8AZ", title: l.t("invoice.order.unit"), format: U.Default, width: "auto" },
    { name: "P_12Z", title: l.t("invoice.order.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12Z_XII",
      title: l.t("invoice.order.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    { name: "P_11NettoZ", title: l.t("invoice.order.netSalesValue"), format: Q, width: "auto" },
    { name: "P_11VatZ", title: l.t("invoice.order.taxAmount"), format: Q, width: "auto" },
    { name: "KursWalutyZ", title: l.t("invoice.order.currencyRate"), format: Q, width: "auto" }
  ], a = [
    { name: "GTINZ", title: l.t("invoice.order.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiUZ", title: l.t("invoice.order.pkwiu"), format: U.Default, width: "auto" },
    { name: "CNZ", title: l.t("invoice.order.cn"), format: U.Default, width: "auto" },
    { name: "PKOBZ", title: l.t("invoice.order.pkob"), format: U.Default, width: "auto" },
    {
      name: "DodatkoweInfoZ",
      title: l.t("invoice.order.additionalInfo"),
      format: U.Default,
      width: "*"
    },
    {
      name: "P_12Z_Procedura",
      title: l.t("invoice.order.procedure"),
      format: U.Default,
      mappingData: zB,
      width: "*"
    },
    {
      name: "KwotaAkcyzyZ",
      title: l.t("invoice.order.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTUZ", title: l.t("invoice.order.gtu"), format: U.Default, width: "auto" },
    {
      name: "ProceduraZ",
      title: l.t("invoice.order.procedureMarkings"),
      format: U.Default,
      width: "*"
    }
  ];
  let D = ft(
    [...r, ...A, ...a],
    B,
    "*"
  );
  const x = [];
  D.fieldsWithValue.length <= 9 ? D.content && x.push(D.content) : (D = ft(
    [...r, ...A],
    B,
    "*"
  ), D.content && x.push(D.content), D = ft(
    [...r, ...a],
    B,
    "*"
  ), D.content && D.fieldsWithValue.length > 1 && x.push(D.content));
  const N = l.t("invoice.order.issuedInCurrency", {
    currency: Y
  });
  let P = "";
  return E == mt.ZAL ? P = {
    stack: Wt([
      { value: l.t("invoice.order.receivedAdvance"), formatTyp: U.LabelGreater },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : n !== hn.BeforeCorrection && E == mt.KOR_ZAL && (P = {
    stack: Wt([
      { value: l.t("invoice.order.totalAmountDue"), formatTyp: U.LabelGreater },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }), [
    {
      stack: [
        Ne(n),
        N,
        {
          text: [
            l.t("invoice.order.orderValueWithTax"),
            re(e.WartoscZamowienia?._text, U.Currency)
          ],
          marginBottom: 4
        },
        ...x,
        P
      ]
    }
  ];
}
function Js(e) {
  const n = [];
  let c = [], E = [], Y = !1;
  if (e) {
    const X = Te(e.DaneFaKorygowanej ?? []);
    if (e.NrFaKorygowany && c.push(
      qA(l.t("invoice.correctedInvoice.correctInvoiceNumber"), e.NrFaKorygowany)
    ), e.PrzyczynaKorekty && c.push(
      qA(l.t("invoice.correctedInvoice.correctionReason"), e.PrzyczynaKorekty)
    ), e.TypKorekty?._text) {
      const Q = [mt.VAT_RR, mt.KOR_VAT_RR].includes(
        de(e?.RodzajFaktury)
      ), B = de(e.TypKorekty);
      c.push(
        qA(
          l.t("invoice.correctedInvoice.correctionEffectType"),
          l.t(Q ? Tl[B] : Dl[B])
        )
      );
    }
    c.length && c.unshift(Ne(l.t("invoice.correctedInvoice.sectionHeader"))), X?.length === 1 ? (E.push(Ne(l.t("invoice.correctedInvoice.identificationHeader"))), wa(X[0], E), (c.length > 0 || E.length) && (c.length ? n.push(It(c, E)) : n.push(It(E, [])), Y = !0), c = [], E = []) : (c.length > 1 && (n.push(It(c, [])), Y = !0), c = [], X?.forEach((Q, B) => {
      B % 2 === 0 ? (c.push(
        Ne(l.t("invoice.correctedInvoice.identificationHeaderIndexed", { index: B + 1 }))
      ), wa(Q, c)) : (E.push(
        Ne(l.t("invoice.correctedInvoice.identificationHeaderIndexed", { index: B + 1 }))
      ), wa(Q, E));
    }));
  }
  return c.length && E.length && n.push(
    Yt([It(c, E, void 0, !1)], Y)
  ), Yt(n, !0);
}
function wa(e, n) {
  e.DataWystFaKorygowanej && n.push(qA(l.t("invoice.correctedInvoice.issueDate"), e.DataWystFaKorygowanej)), e.NrFaKorygowanej && n.push(qA(l.t("invoice.correctedInvoice.invoiceNumber"), e.NrFaKorygowanej)), e.NrKSeFFaKorygowanej && n.push(qA(l.t("invoice.correctedInvoice.ksefNumber"), e.NrKSeFFaKorygowanej));
}
function Ua(e, n, c) {
  let E = "";
  switch (de(e?.RodzajFaktury)) {
    case mt.VAT:
      E = l.t("invoice.header.vat");
      break;
    case mt.ZAL:
      E = l.t("invoice.header.advance");
      break;
    case mt.ROZ:
      E = l.t("invoice.header.settlement");
      break;
    case mt.KOR_ROZ:
      E = l.t("invoice.header.correctionSettlement");
      break;
    case mt.KOR_ZAL:
      E = l.t("invoice.header.correctionAdvance");
      break;
    case mt.KOR:
      e?.OkresFaKorygowanej != null ? E = l.t("invoice.header.correctionCollective") : E = l.t("invoice.header.correction");
      break;
    case mt.UPR:
      E = l.t("invoice.header.simplified");
      break;
  }
  return [
    {
      text: [
        { text: l.t("invoice.header.ksefPart1"), fontSize: 18 },
        { text: l.t("invoice.header.ksefPart2"), color: "red", bold: !0, fontSize: 18 },
        { text: l.t("invoice.header.ksefPart3"), bold: !0, fontSize: 18 }
      ]
    },
    {
      ...re(l.t("invoice.header.invoiceNumberLabel"), U.ValueMedium),
      alignment: xt.RIGHT
    },
    {
      ...re(de(e?.P_2), U.HeaderPosition),
      alignment: xt.RIGHT
    },
    {
      ...re(E, [U.ValueMedium, U.Default]),
      alignment: xt.RIGHT
    },
    ...n?.nrKSeF ? [
      {
        text: [
          re(l.t("invoice.header.ksefNumberLabel"), U.LabelMedium),
          re(n?.nrKSeF, U.ValueMedium)
        ],
        alignment: xt.RIGHT
      }
    ] : [],
    ...n?.isMobile && c ? [
      { stack: [zi()], margin: [0, 8, 0, 8] },
      {
        text: [re(l.t("invoice.header.attachmentWarning"), U.Bold)]
      }
    ] : []
  ];
}
function Ks(e, n) {
  if (!e)
    return [];
  const c = Te(e?.Obciazenia), E = Te(e?.Odliczenia), Y = [], X = [
    {
      title: l.t("invoice.settlement.deductionReason"),
      name: "Powod",
      format: U.Default,
      width: "*"
    },
    {
      title: l.t("invoice.settlement.amount"),
      name: "Kwota",
      format: U.Currency,
      width: "auto"
    }
  ], Q = [
    {
      name: "Powod",
      title: l.t("invoice.settlement.chargeReason"),
      format: U.Default,
      width: "*"
    },
    {
      name: "Kwota",
      title: l.t("invoice.settlement.amount"),
      format: U.Currency,
      width: "auto"
    }
  ], B = ft(
    Q,
    c,
    "*",
    void 0,
    20
  ), r = ft(
    X,
    E,
    "*",
    void 0,
    20
  ), A = qA(
    l.t("invoice.settlement.totalCharges"),
    e.SumaObciazen,
    U.Currency,
    {
      alignment: xt.RIGHT
    }
  ), a = qA(
    l.t("invoice.settlement.totalDeductions"),
    e?.SumaOdliczen,
    U.Currency,
    {
      alignment: xt.RIGHT
    }
  ), D = [
    kt(l.t("invoice.settlement.charges")),
    B.content ?? [],
    A
  ], x = [
    kt(l.t("invoice.settlement.deductions")),
    r.content ?? [],
    a
  ];
  return Y.push(Ne(l.t("invoice.settlement.header"), [0, 8, 0, 4])), c.length > 0 && E.length > 0 ? Y.push(Gi([D, x])) : c.length > 0 ? Y.push(It([D], [], void 0, !1)) : E.length > 0 && Y.push(It([], [x], void 0, !1)), e?.DoZaplaty?._text ? Y.push({
    stack: Wt([
      { value: l.t("invoice.settlement.toPay"), formatTyp: U.LabelGreater },
      {
        value: e?.DoZaplaty,
        formatTyp: U.CurrencyGreater,
        currency: n
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }) : e?.DoRozliczenia?._text && Y.push({
    stack: Wt([
      { value: l.t("invoice.settlement.toSettle"), formatTyp: U.LabelGreater },
      {
        value: e?.DoRozliczenia,
        formatTyp: U.CurrencyGreater,
        currency: n
      }
    ]),
    alignment: xt.RIGHT,
    marginTop: 8
  }), Yt(Y, !0);
}
function oE(e) {
  if (!Te(e?.BlokDanych).length)
    return [];
  const n = [], c = [
    { name: "PelnaNazwa", title: l.t("invoice.registers.fullName"), format: U.Default },
    { name: "KRS", title: l.t("invoice.registers.krs"), format: U.Default },
    { name: "REGON", title: l.t("invoice.registers.regon"), format: U.Default },
    { name: "BDO", title: l.t("invoice.registers.bdo"), format: U.Default }
  ], E = Te(e?.BlokDanych ?? []), Y = ft(
    [...c],
    E,
    "*"
  );
  return n.push(Ne(l.t("invoice.attachment.header"))), Te(e?.BlokDanych).forEach((X, Q) => {
    n.push(kt(l.t("invoice.attachment.details", { index: Q + 1 }))), X.ZNaglowek && n.push(
      qA(l.t("invoice.attachment.blockHeader"), X.ZNaglowek, U.Value, {
        marginBottom: 8
      })
    ), Te(X.MetaDane)?.length && n.push(eB(Te(X.MetaDane))), X.Tekst?.Akapit && (n.push(qA(l.t("invoice.attachment.description"), " ")), Te(X.Tekst.Akapit).forEach((B) => {
      WA(B) && n.push(re(B._text, U.Value));
    })), Te(X.Tabela).length && Te(X.Tabela).forEach((B, r) => {
      X.ZNaglowek?._text && n.push(kt(`${X.ZNaglowek?._text} ${r + 1}`)), Te(B.TMetaDane)?.length && n.push({
        stack: eB(
          Te(B.TMetaDane).map(
            (A) => ({
              ZKlucz: A.TKlucz,
              ZWartosc: A.TWartosc
            })
          )
        ),
        margin: [0, 8, 0, 0]
      }), B.Opis && n.push(qA(l.t("invoice.attachment.description"), B.Opis)), Te(B.TNaglowek?.Kol).length && (n.push(
        re(l.t("invoice.attachment.tableLabel"), [
          U.GrayBoldTitle,
          U.LabelSmallMargin
        ])
      ), n.push(BE(B))), Te(B.Suma?.SKom).length && n.push(cE(Te(B.Suma?.SKom)));
    });
  }), Y.fieldsWithValue.length && Y.content && n.push(Y.content), Yt(n, !1);
}
function eB(e) {
  const n = [], c = [
    { name: "ZKlucz", title: l.t("invoice.attachment.key"), format: U.Default },
    { name: "ZWartosc", title: l.t("invoice.attachment.value"), format: U.Default }
  ], E = Te(e ?? []), Y = ft(
    [...c],
    E,
    "*"
  );
  return Y.fieldsWithValue.length && Y.content && n.push(Y.content), n;
}
function BE(e) {
  if (!e.TNaglowek?.Kol?.length)
    return [];
  const n = [], c = Te(e.TNaglowek.Kol);
  return UB(c).forEach((Y, X) => {
    n.push(gE(Y, e.Wiersz ?? [], X, c.length));
  }), n;
}
function gE(e, n, c, E) {
  const Y = e.map(
    (B) => re(bi(B.NKom?._text), U.GrayBoldTitle)
  ), X = [];
  return Te(n).forEach((B) => {
    const r = Te(B.WKom);
    for (; r.length < E; )
      r.push({ _text: "" });
    const A = UB(r ?? []);
    A.length >= c + 1 && X.push(
      A[c].map((a, D) => {
        let x = U.Value;
        const N = e[D]._attributes?.Typ, P = N ? ml[N] : void 0;
        return P && ![U.Date, U.DateTime].includes(P) && (x = P), re(a._text ? bi(a._text) : "", x);
      })
    );
  }), {
    table: {
      headerRows: 1,
      widths: [...Y.map((B, r) => r === 0 ? "*" : "auto")],
      body: [[...Y], ...X]
    },
    layout: Cn,
    margin: [0, 8, 0, 0]
  };
}
function cE(e) {
  const n = [], c = [
    { name: "", title: l.t("invoice.attachment.tableSummary"), format: U.Default }
  ], E = Te(e ?? []), Y = ft(
    [...c],
    E,
    "*",
    [0, 8, 0, 0]
  );
  return Y.fieldsWithValue.length && Y.content && n.push(Y.content), n;
}
function UB(e) {
  if (!Array.isArray(e))
    return [];
  const n = e.length;
  if (n <= 7)
    return [e];
  if (n >= 8 && n <= 14) {
    const c = Math.floor(n / 2);
    return n % 2 === 0 ? [e.slice(0, c), [e[0], ...e.slice(c)]] : [e.slice(0, c + 1), [e[0], ...e.slice(c + 1)]];
  } else {
    const c = Math.floor(n / 3), E = n % 3, Y = [c, c, c];
    for (let B = 0; B < E; B++)
      Y[B] += 1;
    const X = [];
    let Q = 0;
    for (const B of Y)
      X.push(e.slice(Q, Q + B)), Q += B;
    return X[1].unshift(e[0]), X[2].unshift(e[0]), X;
  }
}
function Ws(e, n, c, E, Y) {
  const X = lE(E), Q = EE(n), B = wE(n), r = uE(e), A = QE(e), a = e?.isMobile ? [] : oE(Y), D = [
    Ei(1),
    ...X.length ? [zi()] : [],
    ...X.length ? [It(X, [], void 0, !1)] : [],
    ...Q.length || B.length ? [zi()] : [],
    ...Q,
    ...B,
    ...a.length ? a : [],
    { stack: [...r], unbreakable: !0 },
    { stack: [...A], unbreakable: !0 },
    Yt(
      [
        {
          stack: qA(
            l.t("invoice.footer.generatedIn"),
            bl(c?.SystemInfo?._text)
          ),
          margin: [0, 8, 0, 0]
        }
      ],
      !1,
      [0, 0, 0, 0]
    )
  ];
  return Yt(D, !1);
}
function lE(e) {
  const n = [], c = [
    { name: "", title: l.t("invoice.wz.number"), format: U.Default }
  ], E = Te(e ?? []), Y = ft(
    [...c],
    E,
    "*"
  );
  return Y.fieldsWithValue.length && Y.content && (n.push(kt(l.t("invoice.wz.documentsHeader"), [0, 8, 0, 4])), n.push(Y.content)), n;
}
function EE(e) {
  const n = [], c = [
    { name: "PelnaNazwa", title: l.t("invoice.registers.fullName"), format: U.Default },
    { name: "KRS", title: l.t("invoice.registers.krs"), format: U.Default },
    { name: "REGON", title: l.t("invoice.registers.regon"), format: U.Default },
    { name: "BDO", title: l.t("invoice.registers.bdo"), format: U.Default }
  ], E = Te(e?.Rejestry ?? []), Y = ft(
    [...c],
    E,
    "*",
    void 0,
    30
  );
  return Y.fieldsWithValue.length && Y.content && (n.push(Ne(l.t("invoice.registers.header"))), n.push(Y.content)), n;
}
function wE(e) {
  const n = [], c = [
    { name: "StopkaFaktury", title: l.t("invoice.information.invoiceFooter"), format: U.Default }
  ], E = Te(e?.Informacje ?? []), Y = ft(
    [...c],
    E,
    "*"
  );
  return Y.fieldsWithValue.length && Y.content && (n.push(Ne(l.t("invoice.information.header"))), n.push(Y.content)), n;
}
function uE(e) {
  const n = [];
  if (e?.qrCode) {
    const E = TB(e.qrCode);
    n.push(Ne(l.t("invoice.qr1.header"))), E && (E.fit = 150, n.push({
      columns: [
        {
          stack: [
            E,
            {
              text: e.qr2Code ? l.t("invoice.qr1.offline") : e.nrKSeF,
              alignment: "center",
              margin: [0, 8, 0, 0]
            }
          ],
          alignment: "center",
          width: "auto"
        },
        {
          stack: [
            re(l.t("invoice.qr1.description"), U.Label),
            {
              text: re(e.qrCode, U.Link),
              link: e.qrCode,
              margin: [0, 5, 0, 0]
            }
          ],
          margin: [0, 2, 0, 0],
          width: 330,
          alignment: "left"
        }
      ],
      columnGap: 20
    }));
  }
  return Yt(n, !0);
}
function fE(e, n = 60) {
  return e.match(new RegExp(`.{1,${n}}`, "g"))?.join(`
`) || e;
}
function QE(e) {
  const n = [];
  if (e?.qr2Code) {
    const E = TB(e.qr2Code);
    n.push(Ne(l.t("invoice.qr2.header"))), E && (E.fit = 210, n.push({
      columns: [
        {
          stack: [
            E,
            { text: l.t("invoice.qr2.certificate"), alignment: "center", margin: [0, 8, 0, 0] }
          ],
          alignment: "center",
          width: "auto"
        },
        {
          stack: [
            re(l.t("invoice.qr2.description"), U.Label),
            {
              text: re(fE(e.qr2Code), U.Link),
              link: e.qr2Code,
              margin: [0, 5, 0, 0]
            }
          ],
          margin: [0, 2, 0, 0],
          alignment: "left"
        }
      ],
      columnGap: 20
    }));
  }
  return Yt(n, !0);
}
function Vs(e) {
  return typeof e == "string" && e.trim() !== "" ? {
    watermark: {
      text: e,
      color: "#B1B1B1",
      opacity: 0.2,
      bold: !0,
      fontSize: 50
    }
  } : typeof e == "object" && e.text && e.text.trim() !== "" ? {
    watermark: e
  } : null;
}
var Rs = { exports: {} }, hE = Rs.exports, tB;
function CE() {
  return tB || (tB = 1, (function(e) {
    var n = {
      "Roboto-Italic.ttf": " ",
      "Roboto-Medium.ttf": " ",
      "Roboto-MediumItalic.ttf": " ",
      "Roboto-Regular.ttf": " "
    }, c = typeof window == "object" ? window : typeof Oo == "object" ? Oo : typeof self == "object" ? self : hE;
    typeof c.pdfMake < "u" && typeof c.pdfMake.addVirtualFileSystem < "u" && c.pdfMake.addVirtualFileSystem(n), e.exports = n;
  })(Rs)), Rs.exports;
}
var ME = CE();
const Xs = /* @__PURE__ */ mB(ME);
Yn.addVirtualFileSystem(Xs);
function DE(e, n) {
  const E = e.Fa?.RodzajFaktury?._text == mt.KOR && WA(e.Fa?.OkresFaKorygowanej) ? $l(e.Fa) : sE(e.Fa), Y = {
    ...Vs(n?.watermark),
    content: [
      ...Ua(e.Fa, n),
      Js(e.Fa),
      ...Xl(e),
      AE(e.Fa),
      E,
      aE(
        e.Fa?.Zamowienie,
        hn.Order,
        e.Fa?.P_15?._text ?? "",
        e.Fa?.RodzajFaktury?._text ?? "",
        e.Fa?.KodWaluty?._text ?? "",
        de(e.Fa?.Adnotacje?.P_PMarzy)
      ),
      ql(e),
      Hl(e.Fa?.Adnotacje),
      kl(e.Fa),
      Ks(e.Fa?.Rozliczenie, e.Fa?.KodWaluty?._text ?? ""),
      Ol(e.Fa?.Platnosc),
      rE(e.Fa?.WarunkiTransakcji),
      ...Ws(n, e.Stopka, e.Naglowek, e.Fa?.WZ)
    ],
    footer: (X, Q) => ({
      text: `${X.toString()} ${l.t("invoice.footer.pagesTotal")} ${Q}`,
      alignment: xt.RIGHT,
      margin: [0, 0, 40, 0]
    }),
    ...rs()
  };
  return Yn.createPdf(Y);
}
function dE(e) {
  const n = [];
  let c = [];
  const E = [];
  if (e) {
    const Y = e.Zwolnienie;
    if (Y?.P_19?._text === "1" && (c.push({
      text: l.t("invoice.annotations.noTaxDelivery")
    }), Y.P_19A?._text && (c.push(
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument")
      )
    ), c.push(qA(l.t("invoice.annotations.law"), Y.P_19A._text))), Y.P_19B?._text && (c.push(
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument2")
      )
    ), c.push(qA(l.t("invoice.annotations.directiveLaw"), Y.P_19B._text))), Y.P_19C?._text && (c.push(
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument3")
      )
    ), c.push(qA(l.t("invoice.annotations.otherLaw"), Y.P_19C._text)))), e.NoweSrodkiTransportu?.P_42_5?._text === "1" || e.NoweSrodkiTransportu?.P_42_5?._text === "2") {
      let X = [], Q = " ";
      e.NoweSrodkiTransportu.P_42_5?._text === "1" ? Q = l.t("invoice.annotations.vat22DocumentRequired") : e.NoweSrodkiTransportu.P_42_5?._text === "2" && (Q = l.t("invoice.annotations.vat22DocumentNotRequired")), X = [
        ...qA(`${l.t("invoice.annotations.newTransportsDelivery")}: `, Q ?? "")
      ], X && (c = [c, ...X]);
    }
    if (e.P_18A?._text === "1" && E.push({ text: l.t("invoice.annotations.partialPayMechanism") }), e.P_16?._text === "1" && E.push({ text: l.t("invoice.annotations.cashMethod") }), e.P_18?._text === "1" && E.push({ text: l.t("invoice.annotations.reverseTax") }), e.P_23?._text === "1" && E.push({ text: l.t("invoice.annotations.threePartsSimplerMethod") }), e.PMarzy?.P_PMarzy?._text === "1") {
      let X = "";
      e.PMarzy.P_PMarzy_3_1?._text === "1" ? X = l.t("invoice.annotations.usedGoods") : e.PMarzy.P_PMarzy_3_2?._text === "1" ? X = l.t("invoice.annotations.artPieces") : e.PMarzy.P_PMarzy_2?._text === "1" ? X = l.t("invoice.annotations.travelAgencies") : e.PMarzy.P_PMarzy_3_3?._text === "1" && (X = l.t("invoice.annotations.antiques")), E.push(qA(l.t("invoice.annotations.marginProcedure"), X));
    }
    e.P_17?._text === "1" && E.push({ text: l.t("invoice.annotations.selfInvoice") }), (c.length || E.length) && n.push(Gi([c, E])), n.length && (n.unshift(Ei(1)), n.unshift(Ne(l.t("invoice.annotations.header"))), n.unshift(Ei(1)), n.push(Ei(1))), (e.NoweSrodkiTransportu?.P_42_5?._text === "1" || e.NoweSrodkiTransportu?.P_42_5?._text === "2") && n.push(IE(e.NoweSrodkiTransportu));
  }
  return n;
}
function IE(e) {
  const n = Te(e.NowySrodekTransportu);
  let c = [];
  const E = {
    table: {
      headerRows: 1,
      widths: [100, "*"],
      body: []
    },
    layout: Cn,
    marginTop: 4
  };
  if (n?.length) {
    const Y = [
      { text: l.t("invoice.annotations.usePermissionDate"), style: U.GrayBoldTitle },
      { text: l.t("invoice.annotations.description"), style: U.GrayBoldTitle }
    ];
    c = n.map((X) => {
      const Q = [], B = WA(X.P_22B) || WA(X.P_22BT) || WA(X.P_22B1) || WA(X.P_22B2) || WA(X.P_22B3) || WA(X.P_22B4), r = WA(X.P_22C) || WA(X.P_22C1), A = WA(X.P_22D) || WA(X.P_22D1), a = WA(X.P_22B1) || WA(X.P_22B2) || WA(X.P_22B3) || WA(X.P_22B4);
      X.P_NrWierszaNST?._text && Q.push(X.P_NrWierszaNST._text), B ? Q.push(l.t("invoice.annotations.landDelivery")) : r ? Q.push(l.t("invoice.annotations.boatDelivery")) : A && Q.push(l.t("invoice.annotations.airDelivery"));
      const D = [
        de(X.P_22BMK),
        de(X.P_22BMD),
        de(X.P_22BK),
        de(X.P_22BNR),
        de(X.P_22BRP)
      ].filter((x) => !!x);
      return D.length && Q.push(D.join(", ")), X.DetailsString?._text && Q.push(X.DetailsString._text), (B || r || A) && Q.push(X.P_22B?._text ?? X.P_22C?._text ?? X.P_22D?._text ?? ""), X.P_22C1?._text && Q.push(`${l.t("invoice.annotations.hullNumber")}: ${X.P_22C1._text}`), X.P_22D1?._text && Q.push(`${l.t("invoice.annotations.factoryNumber")}: ${X.P_22D1._text}`), a && (X.P_22B1?._text && Q.push(`${l.t("invoice.annotations.vin")}: ${X.P_22B1._text}`), X.P_22B2?._text && Q.push(`${l.t("invoice.annotations.bodyNumber")}: ${X.P_22B2._text}`), X.P_22B3?._text && Q.push(`${l.t("invoice.annotations.chassisNumber")}: ${X.P_22B3._text}`), X.P_22B4?._text && Q.push(`${l.t("invoice.annotations.frameNumber")}: ${X.P_22B4._text}`)), X.P_22BT?._text && Q.push(X.P_22BT._text), [re(X.P_22A?._text), { text: Q.join(`
`) }];
    }), E.table.body = [[...Y], ...c];
  }
  return c.length ? [E, Ei(1)] : [];
}
function yE(e) {
  const n = [];
  de(e.TP) === "1" && n.push(re(l.t("invoice.additionalInformation.tpLabel")));
  const c = [];
  de(e.FP) === "1" && c.push(re(l.t("invoice.additionalInformation.fpLabel")));
  const E = [];
  de(e.ZwrotAkcyzy) === "1" && E.push(re(l.t("invoice.additionalInformation.exciseTaxRefund")));
  const Y = [n, c, E].filter(
    (Q) => Q.length > 0
  ), X = [
    ...Ne(l.t("invoice.additionalInformation.additionalInformationLabel")),
    ...Y,
    ...FE(e.DodatkowyOpis)
  ];
  return X.length > 1 ? Yt(X, !0) : [];
}
function FE(e) {
  if (!e)
    return [];
  const n = Te(e)?.map(
    (X, Q) => ({
      ...X,
      lp: { _text: Q + 1 }
    })
  ), c = kt(l.t("invoice.additionalInformation.additionalDescription")), E = [
    {
      name: "lp",
      title: l.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "NrWiersza",
      title: l.t("invoice.additionalInformation.rowNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Klucz",
      title: l.t("invoice.additionalInformation.infoType"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Wartosc",
      title: l.t("invoice.additionalInformation.infoContent"),
      format: U.Default,
      width: "*"
    }
  ], Y = ft(
    E,
    n,
    "*",
    [0, 0, 0, 0]
  );
  return Y.content && c.push(Y.content), c;
}
const iB = (e, n) => {
  const c = [];
  return e?.length ? (e.forEach((E, Y) => {
    const X = [], Q = Ne(
      n ? `${n} ${e?.length > 1 ? ++Y : ""}` : "",
      [0, 12, 0, 8]
    );
    X.push([
      re(l.t("invoice.registers.fullAccountNumber"), U.GrayBoldTitle),
      re(de(E.NrRB), U.AccountNumber)
    ]), X.push([
      re(l.t("invoice.registers.swiftCode"), U.GrayBoldTitle),
      re(de(E.SWIFT), U.Default)
    ]), X.push([
      re(l.t("invoice.registers.ownBankAccount"), U.GrayBoldTitle),
      re(
        bi(_t(E.RachunekWlasnyBanku, va), 20),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.bankName"), U.GrayBoldTitle),
      re(
        WA(E.NazwaBanku) ? bi(de(E.NazwaBanku), 20) : de(E.NazwaBanku),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.accountDescription"), U.GrayBoldTitle),
      re(
        WA(E.OpisRachunku) ? bi(de(E.OpisRachunku), 20) : de(E.OpisRachunku),
        U.Default
      )
    ]), c.push([
      ...Q,
      {
        unbreakable: !0,
        table: {
          body: X,
          widths: ["auto", "*"]
        },
        layout: Cn
      }
    ]);
  }), Yt(c, !1)) : [];
};
function xE(e) {
  if (!e)
    return [];
  const n = Te(e.TerminPlatnosci), c = [
    {
      name: "Termin",
      title: l.t("invoice.payment.maturityDate"),
      format: U.Date
    }
  ];
  n.some((x) => x.TerminOpis) && c.push({
    name: "TerminOpis",
    title: l.t("invoice.payment.paymentDescription"),
    format: U.Date
  });
  const E = [
    {
      name: "DataZaplatyCzesciowej",
      title: l.t("invoice.payment.partialPaymentDate"),
      format: U.Date
    },
    {
      name: "KwotaZaplatyCzesciowej",
      title: l.t("invoice.payment.partialPaymentAmount"),
      format: U.Currency
    },
    {
      name: "FormaPlatnosci",
      title: l.t("invoice.payment.paymentMethod"),
      format: U.FormOfPayment
    }
  ], Y = [zi(), ...Ne(l.t("invoice.payment.payment"))];
  e.Zaplacono?._text === "1" ? (Y.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.paidStatus"))
  ), Y.push(qA(l.t("invoice.payment.paymentDate"), e.DataZaplaty, U.Date))) : e.ZnacznikZaplatyCzesciowej?._text === "1" && Y.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.partialPayment"))
  ), WA(e.FormaPlatnosci) ? Y.push(
    qA(
      l.t("invoice.payment.paymentMethod2"),
      _t(e.FormaPlatnosci, Os)
    )
  ) : e.OpisPlatnosci?._text && (Y.push(
    qA(l.t("invoice.payment.paymentMethod2"), l.t("invoice.payment.paymentDifferent"))
  ), Y.push(qA(l.t("invoice.payment.otherPaymentDescription"), e.OpisPlatnosci)));
  const X = Te(e.ZaplataCzesciowa), Q = ft(
    E,
    X,
    "*"
  ), B = n.map(
    (x) => n.some((N) => N.TerminOpis) ? {
      ...x,
      TerminOpis: {
        _text: `${x.Termin?._text ?? ""}`
      }
    } : x
  ), r = ft(
    c,
    B,
    "*"
  );
  X.length > 0 && n.length > 0 ? Y.push(
    It(
      Q.content ?? [],
      r.content ?? [],
      [0, 4, 0, 0],
      !1
    )
  ) : n.length > 0 ? r.content && Y.push(It(r.content, [], void 0, !1)) : X.length > 0 && Q.content && Y.push(Q.content);
  const A = Te(e.RachunekBankowy).map(
    (x) => iB([x], l.t("invoice.payment.bankAccountNumber"))
  ), a = Te(
    e.RachunekBankowyFaktora
  ).map((x) => iB([x], l.t("invoice.payment.factorsBankAccountNumber"))), D = [...A, ...a];
  return D.length > 0 && D.forEach((x, N) => {
    N % 2 === 0 && Y.push(It(x, D[N + 1] ?? []));
  }), e.Skonto && (Y.push(Ne(l.t("invoice.payment.conditionalDiscount"), [0, 0])), Y.push(qA(l.t("invoice.payment.discountConditions"), e.Skonto.WarunkiSkonta)), Y.push(qA(l.t("invoice.payment.discountAmount"), e.Skonto.WysokoscSkonta))), Y;
}
function Si(e) {
  const n = [];
  return e?.AdresL1 && n.push(re(e.AdresL1._text, U.Value)), e?.AdresL2 && n.push(re(e.AdresL2._text, U.Value)), e?.KodKraju && n.push(re(l.t(za(e.KodKraju._text ?? "")), U.Value)), n.push(...qA(l.t("invoice.address.GLN"), e.GLN)), n;
}
function Zs(e) {
  return [
    qA(l.t("invoice.subject1.nip"), e.NIP),
    qA(l.t("invoice.subject1.name"), e.Nazwa)
  ];
}
function mr(e) {
  return Te(e)?.map((n) => [
    qA(l.t("invoice.authorizedSubject.email"), n.Email),
    qA(l.t("invoice.authorizedSubject.phone"), n.Telefon)
  ]);
}
function nB(e) {
  const n = Ne(l.t("invoice.subject1.seller"));
  if (n.push(
    qA(l.t("invoice.subject1.eoriNumber"), e.NrEORI),
    qA(l.t("invoice.subject1.vatPrefix"), e.PrefiksPodatnika)
  ), e.DaneIdentyfikacyjne && n.push(...Zs(e.DaneIdentyfikacyjne)), e.Adres && n.push(
    re(l.t("invoice.subject1.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject1.correspondenceAddress"), [U.Label, U.LabelMargin]),
    ...Si(e.AdresKoresp)
  ), e.DaneKontaktowe && n.push(
    re(l.t("invoice.subject1.contactDetails"), [U.Label, U.LabelMargin]),
    ...mr(e.DaneKontaktowe)
  ), WA(e.StatusInfoPodatnika)) {
    const c = _t(e.StatusInfoPodatnika, Ln);
    n.push(qA(l.t("invoice.subject1.taxpayerStatus"), c));
  }
  return n;
}
function pE(e, n) {
  const c = Ne(l.t("invoice.subject1K.seller"));
  let E = [], Y = [];
  if (E.push(
    Ne(l.t("invoice.subject1K.identificationData")),
    qA(l.t("invoice.subject1K.eoriNumber"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...Zs(e.DaneIdentyfikacyjne)), e.DaneKontaktowe && E.push(mr(Te(e.DaneKontaktowe))), e.StatusInfoPodatnika) {
    const X = _t(e.StatusInfoPodatnika, Ln);
    E.push(qA(l.t("invoice.subject1K.taxpayerStatus"), X));
  }
  return E.length && c.push(E), E = rB(n, l.t("invoice.subject1K.correctedContent")), Y = rB(e, l.t("invoice.subject1K.correctiveContent")), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject1K.correspondenceAddress"), [U.Label, U.LabelMargin]),
    Si(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function rB(e, n) {
  const c = [];
  return c.push(Ne(n)), e.PrefiksPodatnika?._text && c.push(qA(l.t("invoice.subject1K.vatPrefix"), e.PrefiksPodatnika)), e.DaneIdentyfikacyjne && c.push(...Zs(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    re(l.t("invoice.subject1K.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), c;
}
function Zn(e) {
  const n = [];
  return n.push(qA(l.t("invoice.subject2.nip"), e.NIP)), e.NrVatUE?._text && n.push(
    Wt([
      { value: l.t("invoice.subject2.vatUeNumber"), formatTyp: U.Label },
      { value: e.KodUE, formatTyp: U.Value },
      { value: " " },
      { value: e.NrVatUE, formatTyp: U.Value }
    ])
  ), e.NrID?._text && n.push(
    Wt([
      { value: l.t("invoice.subject2.taxIdOther"), formatTyp: U.Label },
      { value: e.KodKraju || "", formatTyp: U.Value },
      { value: " " },
      { value: e.NrID, formatTyp: U.Value }
    ])
  ), e.BrakID?._text === "1" && n.push(re(l.t("invoice.subject2.noTaxId"), U.Label)), n.push(qA(l.t("invoice.subject2.name"), e.Nazwa)), n;
}
function ua(e) {
  const n = Ne(l.t("invoice.subject2.buyer"));
  return n.push(
    qA(l.t("invoice.subject2.getterId"), e.IDNabywcy),
    qA(l.t("invoice.subject2.eoriNumber"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && n.push(
    ...Zn(
      e.DaneIdentyfikacyjne
    )
  ), e.Adres && n.push(
    re(l.t("invoice.subject2.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject2.correspondenceAddress"), [U.Label, U.LabelMargin]),
    ...Si(e.AdresKoresp)
  ), e.DaneKontaktowe && n.push(
    re(l.t("invoice.subject2.contactDetails"), [U.Label, U.LabelMargin]),
    ...mr(e.DaneKontaktowe),
    qA(l.t("invoice.subject2.customerNumber"), e.NrKlienta)
  ), n;
}
function mE(e, n) {
  const c = [];
  c.push(zi()), c.push(Ne(l.t("invoice.subject2k.buyer")));
  let E = [], Y = [];
  return E.push(
    Ne(l.t("invoice.subject2k.identificationData")),
    qA(l.t("invoice.subject2k.eori"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...Zn(e.DaneIdentyfikacyjne)), e.DaneKontaktowe && E.push(mr(Te(e.DaneKontaktowe))), e.NrKlienta && E.push(qA(l.t("invoice.subject2k.clientNumber"), e.NrKlienta)), E.length && c.push({
    columns: [E, []],
    columnGap: 20
  }), n.DaneIdentyfikacyjne && (E = Ls(n, l.t("invoice.subject2k.correctedContent")), Y = Ls(e, l.t("invoice.subject2k.correctiveContent"))), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject2k.correspondenceAddress"), [U.Label, U.LabelMargin]),
    Si(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function Ls(e, n) {
  const c = [];
  return c.push(Ne(n)), WA(e.IDNabywcy) && c.push(qA(l.t("invoice.subject2k.buyerId"), e.IDNabywcy)), e.DaneIdentyfikacyjne && c.push(...Zn(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    re(l.t("invoice.subject2k.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), c;
}
function YE(e) {
  if (!e)
    return [];
  const n = [];
  return WA(e.NIP) ? n.push(qA(l.t("invoice.subject2.nip"), e.NIP, U.Default)) : WA(e.IDWew) ? n.push(
    qA(l.t("invoice.subject2.internalId"), e.IDWew, U.Default)
  ) : WA(e.KodUE) ? n.push(
    Wt([
      { value: l.t("invoice.subject2.vatUeNumber"), formatTyp: U.Label },
      { value: e.KodUE, formatTyp: U.Default },
      { value: "" },
      { value: e.NrVatUE, formatTyp: U.Default }
    ])
  ) : WA(e.NrID) ? n.push(
    Wt([
      { value: l.t("invoice.subject2.taxIdOther"), formatTyp: U.Label },
      { value: e.KodKraju, formatTyp: U.Default },
      { value: "" },
      { value: e.NrID, formatTyp: U.Default }
    ])
  ) : e.BrakID?._text === "1" && n.push(qA(l.t("invoice.subject2.noTaxId"), " ", U.Default)), WA(e.Nazwa) && n.push(
    qA(l.t("invoice.subject2.name"), e.Nazwa, U.Default)
  ), n;
}
function sB(e, n) {
  const c = [];
  c.push(zi());
  const E = [
    ...Ne(l.t("invoice.subject3.otherEntity", { index: n + 1 })),
    qA(l.t("invoice.subject3.getterId"), e.IDNabywcy),
    qA(l.t("invoice.subject3.eori"), e.NrEORI),
    ...YE(e.DaneIdentyfikacyjne),
    qA(l.t("invoice.subject3.role"), _t(e.Rola, vB)),
    qA(l.t("invoice.subject3.otherRole"), e.OpisRoli),
    qA(l.t("invoice.subject3.share"), e.Udzial, [U.Percentage])
  ], Y = [];
  return e.Adres && Y.push(
    re(l.t("invoice.subject3.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject3.correspondenceAddress"), [U.Label, U.LabelMargin]),
    ...Si(e.AdresKoresp)
  ), (e.DaneKontaktowe || e.NrKlienta) && (Y.push(
    re(l.t("invoice.subject3.contactData"), [U.Label, U.LabelMargin])
  ), e.DaneKontaktowe && Y.push(...mr(e.DaneKontaktowe)), e.NrKlienta && Y.push(qA(l.t("invoice.subject3.clientNumber"), e.NrKlienta))), c.push(It(E, Y)), c;
}
function yr(e, n = l.t("invoice.subject1.address"), c = !1, E) {
  return e ? [
    ...c ? kt(n, E) : Ne(n, E),
    ...Si(e)
  ] : [];
}
function PE(e, n) {
  if (!e)
    return [];
  const c = e.fakturaPodmiotNDto, E = Te(c.DaneKontaktowe), Y = e.podmiot2KDto, X = [];
  X.push(zi()), X.push(Ne(`${l.t("invoice.subject3k.otherEntity")} ${n + 1}`)), (WA(c.NrEORI) || WA(c.Rola) || WA(c.OpisRoli) || WA(c?.Udzial)) && X.push(
    ...Ne(l.t("invoice.subject3k.identificationData")),
    qA(l.t("invoice.subject3k.eori"), c.NrEORI),
    qA(l.t("invoice.subject3k.role"), _t(c.Rola, vB)),
    qA(l.t("invoice.subject3k.otherRole"), c.OpisRoli),
    qA(l.t("invoice.subject3k.share"), c.Udzial, U.Percentage)
  ), (E.length > 0 || WA(c.NrKlienta)) && (X.push(mr(c.DaneKontaktowe ?? [])), X.push(qA(l.t("invoice.subject3k.clientNumber"), c.NrKlienta)));
  const Q = [
    ...Ne(l.t("invoice.subject3k.correctedContent")),
    qA(l.t("invoice.subject3k.getterId"), Y?.IDNabywcy)
  ];
  Y?.DaneIdentyfikacyjne && Q.push(Zn(Y.DaneIdentyfikacyjne)), Y?.Adres && Q.push(yr(Y.Adres));
  const B = [
    ...Ne(l.t("invoice.subject3k.correctiveContent")),
    qA(l.t("invoice.subject3k.getterId"), c?.IDNabywcy)
  ];
  return c?.DaneIdentyfikacyjne && B.push(Zn(c.DaneIdentyfikacyjne)), c?.Adres && B.push(yr(c.Adres)), c.AdresKoresp != null && B.push(
    yr(c.AdresKoresp, l.t("invoice.subject3k.correspondenceAddress"))
  ), X.push(It(Q, B)), X;
}
function vE(e) {
  if (!e)
    return [];
  const n = [
    re(l.t("invoice.authorizedSubject.contactData"), U.Description)
  ], c = Te(e);
  return c.length === 0 ? [] : (c.forEach((E) => {
    WA(E.EmailPU) && n.push(qA(l.t("invoice.authorizedSubject.email"), E.EmailPU)), WA(E.TelefonPU) && n.push(qA(l.t("invoice.authorizedSubject.phone"), E.TelefonPU)), n.push(Ei(1));
  }), n);
}
function bE(e) {
  if (!e)
    return [];
  const n = Ne(l.t("invoice.authorizedSubject.authorizedSubject"));
  return WA(e.RolaPU) && n.push(
    qA(
      l.t("invoice.authorizedSubject.role"),
      _t(e.RolaPU, xl)
    )
  ), WA(e.NrEORI) && n.push(qA(l.t("invoice.authorizedSubject.eori"), e.NrEORI)), e.DaneIdentyfikacyjne && n.push(Zs(e.DaneIdentyfikacyjne)), n.push([
    ...yr(e.Adres),
    ...yr(
      e.AdresKoresp,
      l.t("invoice.authorizedSubject.correspondenceAddress2")
    ),
    ...vE(e.DaneKontaktowe)
  ]), n;
}
function zE(e) {
  const n = [], c = Te(e.Fa?.Podmiot2K), E = Te(e.Podmiot3);
  if (e.Fa?.Podmiot1K || c.length > 0)
    if (e.Fa?.Podmiot1K ? n.push(pE(e.Podmiot1 ?? {}, e.Fa?.Podmiot1K)) : e.Podmiot1 != null && n.push(nB(e.Podmiot1)), e.Fa?.Podmiot2K) {
      const Y = c.find(
        (X) => de(X.IDNabywcy) === de(e.Podmiot2?.IDNabywcy)
      );
      Y ? n.push(mE(e.Podmiot2 ?? {}, Y)) : n.push(Yt(ua(e.Podmiot2), !0));
    } else e.Podmiot2 && n.push(Yt(ua(e.Podmiot2), !0));
  else
    n.push([
      Gi([nB(e.Podmiot1), ua(e.Podmiot2)], {
        margin: [0, 0, 0, 8],
        columnGap: 20
      })
    ]);
  if (E.length > 0) {
    const Y = TE(c, E);
    Y.filter(
      (X) => X.fakturaPodmiotNDto.IDNabywcy === e.Podmiot2?.IDNabywcy
    ), Y.length > 0 ? Y.forEach((X, Q) => {
      X.podmiot2KDto ? n.push(PE(X, Q)) : n.push(sB(X.fakturaPodmiotNDto, Q)), Q < Y.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    }) : E.forEach((X, Q) => {
      n.push(sB(X, Q)), Q < E.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    });
  }
  return n.push(bE(e.PodmiotUpowazniony)), Yt(n, !0);
}
function TE(e, n) {
  const c = [];
  return n.filter((E) => de(E.Rola) === "4").length > 0 && n.forEach((E) => {
    de(E.Rola) === "4" ? c.push({
      fakturaPodmiotNDto: E,
      podmiot2KDto: e.find(
        (Y) => de(Y.IDNabywcy) === de(E.IDNabywcy)
      )
    }) : c.push({
      fakturaPodmiotNDto: E
    });
  }), c;
}
function UE(e) {
  const n = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) && !WA(e.Fa?.P_14_5, !1) || WA(e.Fa?.P_13_6_1, !1) || WA(e.Fa?.P_13_6_2, !1) || WA(e.Fa?.P_13_6_3, !1) || WA(e.Fa?.P_13_7, !1) || WA(e.Fa?.P_13_8, !1) || WA(e.Fa?.P_13_9, !1) || WA(e.Fa?.P_13_10, !1) || WA(e.Fa?.P_13_11, !1), c = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) || WA(e.Fa?.P_13_6_1, !1) || WA(e.Fa?.P_13_6_2, !1) || WA(e.Fa?.P_13_6_3, !1) || WA(e.Fa?.P_13_7, !1) || WA(e.Fa?.P_13_8, !1) || WA(e.Fa?.P_13_9, !1) || WA(e.Fa?.P_13_10, !1) || WA(e.Fa?.P_13_11, !1), E = WA(e.Fa?.P_14_1W, !1) || WA(e.Fa?.P_14_2W, !1) || WA(e.Fa?.P_14_3W, !1) || WA(e.Fa?.P_14_4W, !1);
  let Y = [];
  const X = {
    table: {
      headerRows: 1,
      widths: [],
      body: []
    },
    layout: Cn
  }, Q = [
    { text: l.t("invoice.summary.lp"), style: U.GrayBoldTitle },
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxRate"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.netAmount"), style: U.GrayBoldTitle }] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxAmount"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.grossAmount"), style: U.GrayBoldTitle }] : [],
    ...E ? [{ text: l.t("invoice.summary.taxAmountPLN"), style: U.GrayBoldTitle }] : []
  ], B = [
    "auto",
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...E ? ["*"] : []
  ];
  return e?.Fa && (Y = NE(e.Fa).map((A) => {
    const a = [];
    return a.push(A.no ?? ""), n ? A.taxRateString ? a.push(A.taxRateString) : de(e.Fa?.P_13_5) ? a.push(l.t("invoice.summary.oss")) : a.push("") : WA(e.Fa?.P_14_5, !1) && a.push(l.t("invoice.summary.oss")), c && a.push(re(A.net, U.Currency)), n ? a.push(re(A.tax, U.Currency)) : WA(e.Fa?.P_14_5, !1) && a.push(de(e.Fa?.P_14_5) ?? ""), c && a.push(re(A.gross, U.Currency)), E && a.push(re(A.taxPLN, U.Currency)), a;
  })), X.table.body = [[...Q], ...Y], X.table.widths = [...B], Y.length ? Yt([...Ne(l.t("invoice.summary.sectionHeader"), [0, 0, 0, 8]), X], !1) : [];
}
function NE(e) {
  const n = [], c = WA(e?.P_13_1, !1) || WA(e?.P_14_1, !1) || WA(e?.P_14_1W, !1), E = WA(e?.P_13_2, !1) || WA(e?.P_14_2, !1) || WA(e?.P_14_2W, !1), Y = WA(e?.P_13_3, !1) || WA(e?.P_14_3, !1) || WA(e?.P_14_3W, !1), X = WA(e?.P_13_4, !1) || WA(e?.P_14_4, !1) || WA(e?.P_14_4W, !1), Q = WA(e?.P_13_5) || WA(e?.P_14_5, !1), B = WA(e?.P_13_6_1, !1), r = WA(e?.P_13_6_2, !1), A = WA(e?.P_13_6_3, !1), a = WA(e?.P_13_7, !1), D = WA(e?.P_13_8, !1), x = WA(e?.P_13_9, !1), N = WA(e?.P_13_10, !1), P = WA(e?.P_13_11, !1);
  let d = 1;
  return c && (n.push({
    no: d,
    net: Se(e.P_13_1).toFixed(2),
    gross: (Se(e.P_13_1) + Se(e.P_14_1)).toFixed(2),
    tax: Se(e.P_14_1).toFixed(2),
    taxPLN: Se(e.P_14_1W).toFixed(2),
    taxRateString: l.t("invoice.summary.23or22")
  }), d++), E && (n.push({
    no: d,
    net: Se(e.P_13_2).toFixed(2),
    gross: (Se(e.P_13_2) + Se(e.P_14_2)).toFixed(2),
    tax: Se(e.P_14_2).toFixed(2),
    taxPLN: Se(e.P_14_2W).toFixed(2),
    taxRateString: l.t("invoice.summary.8or7")
  }), d++), Y && (n.push({
    no: d,
    net: Se(e.P_13_3).toFixed(2),
    gross: (Se(e.P_13_3) + Se(e.P_14_3)).toFixed(2),
    tax: Se(e.P_14_3).toFixed(2),
    taxPLN: Se(e.P_14_3W).toFixed(2),
    taxRateString: l.t("invoice.summary.5")
  }), d++), X && (n.push({
    no: d,
    net: Se(e.P_13_4).toFixed(2),
    gross: (Se(e.P_13_4) + Se(e.P_14_4)).toFixed(2),
    tax: Se(e.P_14_4).toFixed(2),
    taxPLN: Se(e.P_14_4W).toFixed(2),
    taxRateString: l.t("invoice.summary.4or3")
  }), d++), Q && (n.push({
    no: d,
    net: Se(e.P_13_5).toFixed(2),
    gross: (Se(e.P_13_5) + Se(e.P_14_5)).toFixed(2),
    tax: Se(e.P_14_5).toFixed(2),
    taxPLN: "",
    taxRateString: de(e.P_14_5) != 0 ? l.t("invoice.summary.oss") : ""
  }), d++), B && (n.push({
    no: d,
    net: Se(e.P_13_6_1).toFixed(2),
    gross: Se(e.P_13_6_1).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0domestic")
  }), d++), r && (n.push({
    no: d,
    net: Se(e.P_13_6_2).toFixed(2),
    gross: Se(e.P_13_6_2).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0wdt")
  }), d++), A && (n.push({
    no: d,
    net: Se(e.P_13_6_3).toFixed(2),
    gross: Se(e.P_13_6_3).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0export")
  }), d++), a && (n.push({
    no: d,
    net: Se(e.P_13_7).toFixed(2),
    gross: Se(e.P_13_7).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.taxFree")
  }), d++), D && (n.push({
    no: d,
    net: Se(e.P_13_8).toFixed(2),
    gross: Se(e.P_13_8).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.npExcludingArt100")
  }), d++), x && (n.push({
    no: d,
    net: Se(e.P_13_9).toFixed(2),
    gross: Se(e.P_13_9).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.npBasedArt100")
  }), d++), N && (n.push({
    no: d,
    net: Se(e.P_13_10).toFixed(2),
    gross: Se(e.P_13_10).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.reverseTax")
  }), d++), P && (n.push({
    no: d,
    net: Se(e.P_13_11).toFixed(2),
    gross: Se(e.P_13_11).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.margin")
  }), d++), n;
}
function RE(e) {
  const n = Te(e.FaWiersz), c = [], E = [
    { name: "NrWierszaFa", title: l.t("invoice.discount.lp"), format: U.Default, width: "auto" },
    { name: "P_7", title: l.t("invoice.discount.productName"), format: U.Default },
    { name: "P_8B", title: l.t("invoice.discount.quantity"), format: U.Default },
    { name: "P_8A", title: l.t("invoice.discount.unit"), format: U.Default }
  ], Y = ft(E, n, "*"), X = Y.fieldsWithValue.includes("NrWierszaFa");
  return c.push(
    ...Ne(l.t("invoice.discount.header")),
    ...qA(l.t("invoice.discount.totalValue"), e.P_15, U.Currency, {
      alignment: xt.RIGHT
    }),
    It(
      re(
        l.t(X ? "invoice.discount.notAll" : "invoice.discount.all"),
        U.Default
      ),
      ""
    )
  ), Y.fieldsWithValue.length > 0 && Y.content && c.push(Y.content), Yt(c, !0);
}
function SE(e) {
  const n = Te(e.FaWiersz), c = Te(e.Zamowienie?.ZamowienieWiersz), E = [mt.ZAL, mt.KOR_ZAL].includes(
    de(e.RodzajFaktury)
  ) ? l.t("invoice.details.getMoneyDate") : l.t("invoice.details.deliveryOrServiceDate"), Y = GE(e.OkresFa?.P_6_Od, e.OkresFa?.P_6_Do), X = [], Q = [];
  WA(e.KodWaluty) && Q.push(qA(l.t("invoice.details.currencyCode"), e.KodWaluty));
  const B = [];
  (pr("P_12_XII", n) || pr("P_12_XII", c)) && B.push(qA(l.t("invoice.details.ossProcedure"), " "));
  const r = [], A = [];
  if (WA(e.KodWaluty) && de(e.KodWaluty) != "PLN")
    if (WA(e.KursWalutyZ))
      r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(l.t("invoice.details.currencyRate"), e.KursWalutyZ, U.Currency6)
      );
    else {
      const J = mn("KursWaluty", n);
      J.length === 1 && (r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(
          l.t("invoice.details.currencyRate"),
          J[0].value,
          U.Currency6
        )
      ));
    }
  const a = [], D = [], x = [
    qA(l.t("invoice.details.issueDate"), e.P_1, U.Date),
    qA(l.t("invoice.details.issuePlace"), e.P_1M),
    qA(l.t("invoice.details.discountPeriod"), e.OkresFaKorygowanej),
    qA(E, e.P_6, U.Date),
    Y,
    X,
    Q,
    B,
    r,
    A,
    a,
    D
  ].filter((J) => J.length > 0), N = [], P = [];
  x.forEach((J, q) => {
    q % 2 ? P.push(J) : N.push(J);
  });
  const d = [
    ...Ne(l.t("invoice.details.header")),
    It(N, P),
    ...HE(e.ZaliczkaCzesciowa),
    ...LE(e.FakturaZaliczkowa)
  ];
  return Yt(d, !0);
}
function GE(e, n) {
  const c = [];
  return WA(e) && WA(n) ? c.push(
    Wt([
      {
        value: l.t("invoice.details.deliveryOrServiceDateFrom")
      },
      { value: $i(de(e)), formatTyp: U.Value },
      { value: " do " },
      { value: $i(de(n)), formatTyp: U.Value }
    ])
  ) : WA(e) ? c.push(
    qA(
      l.t("invoice.details.deliveryOrServiceDateFrom"),
      $i(de(e))
    )
  ) : WA(n) && c.push(
    qA(
      l.t("invoice.details.deliveryOrServiceDateTo"),
      $i(de(n))
    )
  ), c;
}
function HE(e) {
  if (!e)
    return [];
  const n = Te(e), c = [], E = [
    { name: "P_6Z", title: l.t("invoice.details.getMoneyDate2"), format: U.Date },
    { name: "P_15Z", title: l.t("invoice.details.costAmount"), format: U.Default },
    { name: "KursWalutyZW", title: l.t("invoice.details.currencyRate2"), format: U.Currency6 }
  ], Y = ft(
    E,
    n,
    "auto"
  );
  return Y.content && c.push(Y.content), c;
}
function LE(e) {
  if (!e)
    return [];
  const c = Te(e).map((Q) => "NrFaZaliczkowej" in Q && Q.NrFaZaliczkowej ? { ...Q, NrFaZaliczkowej: Q.NrFaZaliczkowej } : "NrKSeFFaZaliczkowej" in Q && Q.NrKSeFFaZaliczkowej ? { ...Q, NrFaZaliczkowej: Q.NrKSeFFaZaliczkowej } : { ...Q, NrFaZaliczkowej: { _text: "" } }), E = [], Y = [
    {
      name: "NrFaZaliczkowej",
      title: l.t("invoice.details.advanceInvoiceNumbers"),
      format: U.Default
    }
  ], X = ft(
    Y,
    c,
    "auto",
    [0, 4, 0, 0]
  );
  return X.content && E.push(X.content), E;
}
function kE(e) {
  return e ? [
    ...Ne(l.t("invoice.carrier.carrier")),
    [
      It(
        Zn(e.DaneIdentyfikacyjne),
        yr(
          e.AdresPrzewoznika,
          l.t("invoice.carrier.carrierAddress"),
          !0,
          [0, 0, 0, 0]
        ),
        [0, 0, 0, 8]
      )
    ]
  ] : [];
}
function jE(e, n) {
  const c = [], E = {
    transport: [],
    dane: [],
    wysylkaZ: [],
    wysylkaDo: [],
    wysylkaPrzez: []
  }, Y = l.t("invoice.transport.header");
  return c.push(Ne(n ? `${Y} ${n}` : Y)), e.RodzajTransportu?._text ? E.transport.push(
    qA(
      l.t("invoice.transport.type"),
      _t(e.RodzajTransportu, Pa)
    )
  ) : e.TransportInny?._text == "1" && e.OpisInnegoTransportu?._text && (E.transport.push(
    qA(l.t("invoice.transport.type"), l.t("invoice.transport.otherType"))
  ), E.transport.push(
    qA(l.t("invoice.transport.otherTypeDescription"), e.OpisInnegoTransportu)
  )), E.dane.push(qA(l.t("invoice.transport.orderNumber"), e.NrZleceniaTransportu)), WA(e.OpisLadunku) && (E.dane.push(
    qA(
      l.t("invoice.transport.cargoDescription"),
      _t(e.OpisLadunku, ba)
    )
  ), e.LadunekInny?._text === "1" && e.OpisInnegoLadunku?._text && (E.dane.push(
    qA(l.t("invoice.transport.cargoDescription"), l.t("invoice.transport.otherCargo"))
  ), E.dane.push(
    qA(l.t("invoice.transport.otherCargoDescription"), e.OpisInnegoLadunku)
  ))), E.dane.push(qA(l.t("invoice.transport.packageUnit"), e.JednostkaOpakowania)), E.dane.push(
    qA(
      l.t("invoice.transport.startDateTime"),
      xr(e.DataGodzRozpTransportu)
    )
  ), E.dane.push(
    qA(
      l.t("invoice.transport.endDateTime"),
      xr(e.DataGodzZakTransportu)
    )
  ), E.dane.length > 0 && E.dane.unshift(kt(l.t("invoice.transport.dataHeader"), [0, 0, 0, 0])), c.push(It(E.transport, E.dane)), c.push(kE(e.Przewoznik)), e.WysylkaZ?.AdresL1 && (E.wysylkaZ.push(kt(l.t("invoice.transport.shipFrom"), [0, 0, 0, 0])), E.wysylkaZ.push(re(e.WysylkaZ?.AdresL1?._text, U.Default)), E.wysylkaZ.push(re(e.WysylkaZ?.AdresL2?._text, U.Default)), E.wysylkaZ.push(
    re(l.t(Gn[e.WysylkaZ?.KodKraju?._text ?? ""]), U.Default)
  ), E.wysylkaZ.push(qA(l.t("invoice.transport.gln"), e.WysylkaZ?.GLN?._text))), e.WysylkaDo?.AdresL1 && (E.wysylkaDo.push(kt(l.t("invoice.transport.shipTo"), [0, 0, 0, 0])), E.wysylkaDo.push(re(e.WysylkaDo?.AdresL1?._text, U.Default)), E.wysylkaDo.push(re(e.WysylkaDo?.AdresL2?._text, U.Default)), E.wysylkaDo.push(
    re(l.t(Gn[e.WysylkaDo?.KodKraju?._text ?? ""]), U.Default)
  ), E.wysylkaDo.push(qA(l.t("invoice.transport.gln"), e.WysylkaDo?.GLN?._text))), Te(e.WysylkaPrzez).forEach((Q, B) => {
    B && E.wysylkaPrzez.push(`
`), E.wysylkaPrzez.push(kt(l.t("invoice.transport.intermediateAddress"), [0, 4, 0, 0])), E.wysylkaPrzez.push(re(Q.AdresL1?._text, U.Default)), E.wysylkaPrzez.push(re(Q?.AdresL2?._text, U.Default)), E.wysylkaPrzez.push(re(l.t(Gn[Q?.KodKraju?._text ?? ""]), U.Default)), E.wysylkaPrzez.push(qA(l.t("invoice.transport.gln"), Q?.GLN?._text));
  }), (e.WysylkaZ?.AdresL1 || e.WysylkaDo?.AdresL1 || e.WysylkaPrzez?.length) && (c.push(Ne(l.t("invoice.transport.shipmentHeader"))), c.push(It(E.wysylkaZ, E.wysylkaDo)), c.push(It(E.wysylkaPrzez, []))), Yt(c, !0);
}
function OE(e) {
  if (!e)
    return [];
  const n = [], c = { umowy: [], zamowienia: [] }, E = Te(e?.Umowy), Y = Te(e?.Zamowienia), X = Te(e?.NrPartiiTowaru), Q = [
    { name: "DataUmowy", title: l.t("invoice.transaction.contractDate"), format: U.Date },
    { name: "NrUmowy", title: l.t("invoice.transaction.contractNumber"), format: U.Default }
  ], B = [
    { name: "DataZamowienia", title: l.t("invoice.transaction.orderDate"), format: U.Date },
    { name: "NrZamowienia", title: l.t("invoice.transaction.orderNumber"), format: U.Default }
  ], r = [
    { name: "", title: l.t("invoice.transaction.batchNumber"), format: U.Default }
  ];
  if (n.push(Ne(l.t("invoice.transaction.header"), [0, 8, 0, 4])), E.length > 0) {
    const A = ft(Q, E, "*");
    A.content && (c.umowy = [kt(l.t("invoice.transaction.contract")), A.content]);
  }
  if (Y.length > 0) {
    const A = ft(
      B,
      Y,
      "*"
    );
    A.content && A.fieldsWithValue.length > 0 && (c.zamowienia = [kt(l.t("invoice.transaction.order")), A.content]);
  }
  if ((c.zamowienia.length > 0 || c.umowy.length > 0) && n.push(It(c.umowy, c.zamowienia, 0, !1)), (e.WalutaUmowna?._text || e.KursUmowny?._text) && (n.push(Ne(l.t("invoice.transaction.currencyAndRate"), [0, 8, 0, 4])), n.push(qA(l.t("invoice.transaction.currency"), e.WalutaUmowna)), n.push(qA(l.t("invoice.transaction.rate"), e.KursUmowny))), X.length > 0) {
    const A = ft(
      r,
      X,
      "*",
      [0, 4]
    );
    A.content && n.push(It(A.content, "", 0, !1));
  }
  return n.push(
    qA(
      l.t("invoice.transaction.deliveryTerms"),
      e.WarunkiDostawy,
      U.MarginTop4
    )
  ), e.PodmiotPosredniczacy?._text === "1" && n.push(
    re(l.t("invoice.transaction.intermediaryDelivery"), [U.Label, U.MarginTop4])
  ), e.Transport && Te(e.Transport).forEach((A, a) => {
    n.push(
      jE(A, Te(e.Transport).length !== 0 ? a + 1 : null)
    );
  }), Yt(n, !0);
}
function JE(e) {
  const n = [], c = de(e.RodzajFaktury), E = !!Number(de(e.Adnotacje?.PMarzy?.P_PMarzy)), Y = Te(e.FaWiersz).map((x) => {
    const N = Ta(c, E, x);
    return de(x.P_12) && (x.P_12._text = _n(de(x.P_12), 2)), { ...x, ...N };
  }), X = [
    { name: "NrWierszaFa", title: l.t("invoice.rows.lp"), format: U.Default, width: "auto" }
  ], Q = [
    {
      name: "UU_ID",
      title: l.t("invoice.rows.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7", title: l.t("invoice.rows.productName"), format: U.Default, width: "*" },
    { name: "P_9A", title: l.t("invoice.rows.netUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_9B", title: l.t("invoice.rows.grossUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_8B", title: l.t("invoice.rows.quantity"), format: U.Number, width: "auto" },
    { name: "P_8A", title: l.t("invoice.rows.unit"), format: U.Default, width: "auto" },
    { name: "P_10", title: l.t("invoice.rows.discount"), format: U.Currency, width: "auto" },
    { name: "P_12", title: l.t("invoice.rows.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12_XII",
      title: l.t("invoice.rows.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    {
      name: "P_12_Zal_15",
      title: l.t("invoice.rows.productMarker"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_11", title: l.t("invoice.rows.netSalesValue"), format: U.Currency, width: "auto" },
    {
      name: "P_11A",
      title: l.t("invoice.rows.grossSalesValue"),
      format: U.Currency,
      width: "auto"
    },
    {
      name: "P_11Vat",
      title: l.t("invoice.rows.vatSalesValue"),
      format: U.Currency,
      width: "auto"
    }
  ];
  mn("KursWaluty", Y).length !== 1 && Q.push({
    name: "KursWaluty",
    title: l.t("invoice.rows.currencyRate"),
    format: U.Currency6,
    width: "auto"
  }), Q.push({
    name: "StanPrzed",
    title: l.t("invoice.rows.stateBefore"),
    format: U.Boolean,
    width: "auto"
  });
  const B = [
    { name: "GTIN", title: l.t("invoice.rows.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiU", title: l.t("invoice.rows.pkwiu"), format: U.Default, width: "auto" },
    { name: "CN", title: l.t("invoice.rows.cn"), format: U.Default, width: "auto" },
    { name: "PKOB", title: l.t("invoice.rows.pkob"), format: U.Default, width: "auto" },
    {
      name: "KwotaAkcyzy",
      title: l.t("invoice.rows.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTU", title: l.t("invoice.rows.gtu"), format: U.Default, width: "auto" },
    { name: "Procedura", title: l.t("invoice.rows.procedure"), format: U.Default, width: "*" },
    { name: "P_6A", title: l.t("invoice.rows.getOrMakeDate"), format: U.Date, width: "auto" },
    { name: "Indeks", title: l.t("invoice.rows.index"), format: U.Default, width: "auto" }
  ];
  let r = ft(
    [...X, ...Q, ...B],
    Y,
    "auto"
  );
  const A = re(l.t("invoice.rows.issuedInCurrency", { currency: e.KodWaluty?._text }), [
    U.Label,
    U.MarginBottom8
  ]), a = de(e.P_15);
  let D = "";
  return c == mt.ROZ ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.remainingAmount"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: U.CurrencyGreaterWithSeparator,
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : c == mt.KOR ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.totalAmountDueCorrection"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : c == mt.KOR_ROZ ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.remainingAmountCorrection"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : (c == mt.VAT || c == mt.UPR) && (D = {
    stack: Wt([
      { value: l.t("invoice.rows.totalAmountDue"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }), r.fieldsWithValue.length <= 8 && r.content ? n.push(r.content) : (r = ft([...X, ...Q], Y, "*"), r.content && n.push(r.content), r = ft([...X, ...B], Y, "*"), r.content && r.fieldsWithValue.length > 1 && (n.push(`
`), n.push(r.content))), n.length < 1 ? [] : Yt([...Ne(l.t("invoice.rows.header")), A, ...n, D], !0);
}
function KE(e, n, c, E, Y, X) {
  if (!e)
    return [];
  const Q = n === hn.BeforeCorrection ? U.CurrencyAbs : U.Currency, B = Te(e?.ZamowienieWiersz).map((d, J) => (d.NrWierszaZam._text || (d.NrWierszaZam._text = (J + 1).toString()), d.P_12Z = { _text: _n(de(d.P_12Z), 2, X) }, d)), r = [
    { name: "NrWierszaZam", title: l.t("invoice.order.lp"), format: U.Default, width: "auto" }
  ], A = [
    {
      name: "UU_ID",
      title: l.t("invoice.order.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7Z", title: l.t("invoice.order.productName"), format: U.Default, width: "*" },
    {
      name: "P_9AZ",
      title: l.t("invoice.order.netUnitPrice"),
      format: Q,
      width: "auto"
    },
    { name: "P_8BZ", title: l.t("invoice.order.quantity"), format: U.Right, width: "auto" },
    { name: "P_8AZ", title: l.t("invoice.order.unit"), format: U.Default, width: "auto" },
    { name: "P_12Z", title: l.t("invoice.order.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12Z_XII",
      title: l.t("invoice.order.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    {
      name: "P_12Z_Zal_15",
      title: l.t("invoice.order.productMarker"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_11NettoZ", title: l.t("invoice.order.netSalesValue"), format: Q, width: "auto" },
    { name: "P_11VatZ", title: l.t("invoice.order.taxAmount"), format: Q, width: "auto" }
  ], a = [
    { name: "UU_IDZ", title: l.t("invoice.order.orderNumber"), format: U.Default, width: "auto" },
    { name: "GTINZ", title: l.t("invoice.order.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiUZ", title: l.t("invoice.order.pkwiu"), format: U.Default, width: "auto" },
    { name: "CNZ", title: l.t("invoice.order.cn"), format: U.Default, width: "auto" },
    { name: "PKOBZ", title: l.t("invoice.order.pkob"), format: U.Default, width: "auto" },
    {
      name: "KwotaAkcyzyZ",
      title: l.t("invoice.order.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTUZ", title: l.t("invoice.order.gtu"), format: U.Default, width: "auto" },
    {
      name: "ProceduraZ",
      title: l.t("invoice.order.procedureMarkings"),
      format: U.Default,
      width: "*"
    },
    { name: "IndeksZ", title: l.t("invoice.order.index"), format: U.Default, width: "auto" },
    {
      name: "StanPrzedZ",
      title: l.t("invoice.order.stateBefore"),
      format: U.Boolean,
      width: "auto"
    }
  ];
  let D = ft(
    [...r, ...A, ...a],
    B,
    "*"
  );
  const x = [];
  D.fieldsWithValue.length <= 8 ? D.content && x.push(D.content) : (D = ft(
    [...r, ...A],
    B,
    "*"
  ), D.content && x.push(D.content), D = ft(
    [...r, ...a],
    B,
    "*"
  ), D.content && D.fieldsWithValue.length > 1 && x.push(D.content));
  const N = l.t("invoice.order.issuedInCurrency", { currency: Y });
  let P = "";
  return E == mt.ZAL ? P = {
    stack: Wt([
      { value: l.t("invoice.order.advancePaymentAmount"), formatTyp: U.LabelGreater },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : n !== hn.BeforeCorrection && E == mt.KOR_ZAL && (P = {
    stack: Wt([
      {
        value: l.t("invoice.order.advancePaymentAmountCorrection"),
        formatTyp: U.LabelGreater
      },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }), [
    {
      stack: [
        Ne(n),
        N,
        {
          text: [
            l.t("invoice.order.orderValueWithTax"),
            re(e.WartoscZamowienia?._text, U.Currency)
          ],
          marginBottom: 4
        },
        ...x,
        P
      ]
    }
  ];
}
Yn.addVirtualFileSystem(Xs);
function WE(e, n) {
  const E = e.Fa?.RodzajFaktury?._text == mt.KOR && WA(e.Fa?.OkresFaKorygowanej) ? RE(e.Fa) : JE(e.Fa), Y = {
    ...Vs(n?.watermark),
    content: [
      ...Ua(e.Fa, n),
      Js(e.Fa),
      ...zE(e),
      SE(e.Fa),
      E,
      KE(
        e.Fa?.Zamowienie,
        hn.Order,
        e.Fa?.P_15?._text ?? "",
        e.Fa?.RodzajFaktury?._text ?? "",
        e.Fa?.KodWaluty?._text ?? "",
        de(e.Fa?.Adnotacje?.PMarzy?.P_PMarzy)
      ),
      UE(e),
      dE(e.Fa?.Adnotacje),
      yE(e.Fa),
      Ks(e.Fa?.Rozliczenie, e.Fa?.KodWaluty?._text ?? ""),
      xE(e.Fa?.Platnosc),
      OE(e.Fa?.WarunkiTransakcji),
      ...Ws(n, e.Stopka, e.Naglowek, e.Fa?.WZ)
    ],
    footer: (X, Q) => ({
      text: `${X.toString()} ${l.t("invoice.footer.pagesTotal")} ${Q}`,
      alignment: xt.RIGHT,
      margin: [0, 0, 40, 0]
    }),
    ...rs()
  };
  return Yn.createPdf(Y);
}
function VE(e) {
  const n = [], c = [], E = [];
  if (e) {
    const Y = e.Zwolnienie;
    if (Y?.P_19?._text === "1" && (Wi(
      c,
      E,
      {
        text: l.t("invoice.annotations.noTaxDelivery")
      },
      !0
    ), Y.P_19A?._text && (Wi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument")
      ),
      !0
    ), Wi(
      c,
      E,
      qA(l.t("invoice.annotations.law"), Y.P_19A._text),
      !0
    )), Y.P_19B?._text && (Wi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument2")
      ),
      !0
    ), Wi(
      c,
      E,
      qA(l.t("invoice.annotations.directiveLaw"), Y.P_19B._text),
      !0
    )), Y.P_19C?._text && (Wi(
      c,
      E,
      qA(
        l.t("invoice.annotations.noTaxBase"),
        l.t("invoice.annotations.noTaxBaseDocument3")
      ),
      !0
    ), Wi(
      c,
      E,
      qA(l.t("invoice.annotations.otherLaw"), Y.P_19C._text),
      !0
    ))), e.NoweSrodkiTransportu?.P_42_5?._text === "1" || e.NoweSrodkiTransportu?.P_42_5?._text === "2") {
      let X = [], Q = " ";
      e.NoweSrodkiTransportu.P_42_5?._text === "1" ? Q = l.t("invoice.annotations.vat22DocumentRequired") : e.NoweSrodkiTransportu.P_42_5?._text === "2" && (Q = l.t("invoice.annotations.vat22DocumentNotRequired")), X = [
        ...qA(`${l.t("invoice.annotations.newTransportsDelivery")}: `, Q ?? "")
      ], X && Wi(c, E, X, !0);
    }
    if (e.P_18A?._text === "1" && Wi(c, E, { text: l.t("invoice.annotations.partialPayMechanism") }), e.P_16?._text === "1" && Wi(c, E, { text: l.t("invoice.annotations.cashMethod") }), e.P_18?._text === "1" && Wi(c, E, { text: l.t("invoice.annotations.reverseTax") }), e.P_23?._text === "1" && Wi(c, E, { text: l.t("invoice.annotations.threePartsSimplerMethod") }), e.PMarzy?.P_PMarzy?._text === "1") {
      let X = "";
      e.PMarzy.P_PMarzy_3_1?._text === "1" ? X = l.t("invoice.annotations.usedGoods") : e.PMarzy.P_PMarzy_3_2?._text === "1" ? X = l.t("invoice.annotations.artPieces") : e.PMarzy.P_PMarzy_2?._text === "1" ? X = l.t("invoice.annotations.travelAgencies") : e.PMarzy.P_PMarzy_3_3?._text === "1" && (X = l.t("invoice.annotations.antiques")), Wi(
        c,
        E,
        qA(l.t("invoice.annotations.marginProcedure"), X)
      );
    }
    e.P_17?._text === "1" && Wi(c, E, { text: l.t("invoice.annotations.selfInvoice") }), (c.length || E.length) && n.push(Gi([c, E])), n.length && (n.unshift(Ei(1)), n.unshift(Ne(l.t("invoice.annotations.header"))), n.unshift(Ei(1)), n.push(Ei(1))), (e.NoweSrodkiTransportu?.P_42_5?._text === "1" || e.NoweSrodkiTransportu?.P_42_5?._text === "2") && n.push(XE(e.NoweSrodkiTransportu));
  }
  return n;
}
function XE(e) {
  const n = Te(e.NowySrodekTransportu);
  let c = [];
  const E = {
    table: {
      headerRows: 1,
      widths: [100, "*"],
      body: []
    },
    layout: {
      hLineWidth: () => 1,
      hLineColor: () => "#BABABA",
      vLineWidth: () => 1,
      vLineColor: () => "#BABABA"
    },
    marginTop: 4
  };
  if (n?.length) {
    const Y = [
      { text: l.t("invoice.annotations.usePermissionDate"), style: U.GrayBoldTitle },
      { text: l.t("invoice.annotations.description"), style: U.GrayBoldTitle }
    ];
    c = n.map((X) => {
      const Q = [], B = WA(X.P_22B) || WA(X.P_22BT) || WA(X.P_22B1) || WA(X.P_22B2) || WA(X.P_22B3) || WA(X.P_22B4), r = WA(X.P_22C) || WA(X.P_22C1), A = WA(X.P_22D) || WA(X.P_22D1), a = WA(X.P_22B1) || WA(X.P_22B2) || WA(X.P_22B3) || WA(X.P_22B4);
      X.P_NrWierszaNST?._text && Q.push(X.P_NrWierszaNST._text), B ? Q.push(l.t("invoice.annotations.landDelivery")) : r ? Q.push(l.t("invoice.annotations.boatDelivery")) : A && Q.push(l.t("invoice.annotations.airDelivery"));
      const D = [
        de(X.P_22BMK),
        de(X.P_22BMD),
        de(X.P_22BK),
        de(X.P_22BNR),
        de(X.P_22BRP)
      ].filter((x) => !!x);
      return D.length && Q.push(D.join(", ")), X.DetailsString?._text && Q.push(X.DetailsString._text), (B || r || A) && Q.push(X.P_22B?._text ?? X.P_22C?._text ?? X.P_22D?._text ?? ""), X.P_22C1?._text && Q.push(`${l.t("invoice.annotations.hullNumber")}: ${X.P_22C1._text}`), X.P_22D1?._text && Q.push(`${l.t("invoice.annotations.factoryNumber")}: ${X.P_22D1._text}`), a && (X.P_22B1?._text && Q.push(`${l.t("invoice.annotations.vin")}: ${X.P_22B1._text}`), X.P_22B2?._text && Q.push(`${l.t("invoice.annotations.bodyNumber")}: ${X.P_22B2._text}`), X.P_22B3?._text && Q.push(`${l.t("invoice.annotations.chassisNumber")}: ${X.P_22B3._text}`), X.P_22B4?._text && Q.push(`${l.t("invoice.annotations.frameNumber")}: ${X.P_22B4._text}`)), X.P_22BT?._text && Q.push(X.P_22BT._text), [re(X.P_22A?._text), { text: Q.join(`
`) }];
    }), E.table.body = [[...Y], ...c];
  }
  return c.length ? [E, Ei(1)] : [];
}
function Wi(e, n, c, E) {
  if (e.length > n.length && E) {
    n.push(c);
    return;
  }
  e.push(c);
}
function ZE(e) {
  const n = [];
  de(e.TP) === "1" && n.push(re(l.t("invoice.additionalInformation.tpLabel")));
  const c = [];
  de(e.FP) === "1" && c.push(re(l.t("invoice.additionalInformation.fpLabel")));
  const E = [];
  de(e.ZwrotAkcyzy) === "1" && E.push(re(l.t("invoice.additionalInformation.exciseTaxRefund")));
  const Y = [n, c, E].filter((Q) => Q.length > 0), X = [
    ...Ne(l.t("invoice.additionalInformation.additionalInformationLabel")),
    ...Y,
    ...qE(e.DodatkowyOpis)
  ];
  return X.length > 1 ? Yt(X, !0) : [];
}
function qE(e) {
  if (!e)
    return [];
  const n = Te(e)?.map((X, Q) => ({
    ...X,
    lp: { _text: Q + 1 }
  })), c = kt(l.t("invoice.additionalInformation.additionalDescription")), E = [
    {
      name: "lp",
      title: l.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "NrWiersza",
      title: l.t("invoice.additionalInformation.rowNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Klucz",
      title: l.t("invoice.additionalInformation.infoType"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Wartosc",
      title: l.t("invoice.additionalInformation.infoContent"),
      format: U.Default,
      width: "*"
    }
  ], Y = ft(
    E,
    n,
    "*",
    [0, 0, 0, 0]
  );
  return Y.content && c.push(Y.content), c;
}
const aB = (e, n) => {
  const c = [];
  return e?.length ? (e.forEach((E, Y) => {
    const X = [], Q = Ne(
      n ? `${n} ${e?.length > 1 ? ++Y : ""}` : "",
      [0, 12, 0, 8]
    );
    X.push([
      re(l.t("invoice.registers.fullAccountNumber"), U.GrayBoldTitle),
      re(de(E.NrRB), U.AccountNumber)
    ]), X.push([
      re(l.t("invoice.registers.swiftCode"), U.GrayBoldTitle),
      re(de(E.SWIFT), U.Default)
    ]), X.push([
      re(l.t("invoice.registers.ownBankAccount"), U.GrayBoldTitle),
      re(
        bi(_t(E.RachunekWlasnyBanku, va), 20),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.bankName"), U.GrayBoldTitle),
      re(
        WA(E.NazwaBanku) ? bi(de(E.NazwaBanku), 20) : de(E.NazwaBanku),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.accountDescription"), U.GrayBoldTitle),
      re(
        WA(E.OpisRachunku) ? bi(de(E.OpisRachunku), 20) : de(E.OpisRachunku),
        U.Default
      )
    ]), c.push([
      ...Q,
      {
        unbreakable: !0,
        table: {
          body: X,
          widths: ["auto", "*"]
        },
        layout: {
          hLineWidth: () => 1,
          hLineColor: () => "#BABABA",
          vLineWidth: () => 1,
          vLineColor: () => "#BABABA"
        }
      }
    ]);
  }), Yt(c, !1)) : [];
};
function _E(e) {
  if (!e)
    return [];
  const n = Te(e.TerminPlatnosci), c = [
    {
      name: "Termin",
      title: l.t("invoice.payment.maturityDate"),
      format: U.Date
    }
  ];
  n.some((x) => x.TerminOpis) && c.push({
    name: "TerminOpis",
    title: l.t("invoice.payment.paymentDescription"),
    format: U.Date
  });
  const E = [zi(), ...Ne(l.t("invoice.payment.payment"))];
  de(e.Zaplacono) === "1" ? (E.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.paidStatus"))
  ), E.push(qA(l.t("invoice.payment.paymentDate"), e.DataZaplaty, U.Date))) : (de(e.ZnacznikZaplatyCzesciowej) === "1" || de(e.ZnacznikZaplatyCzesciowej) === "2") && (E.push(
    qA(l.t("invoice.payment.paymentInformation"), l.t("invoice.payment.partialPayment"))
  ), E.push(
    qA(
      l.t("invoice.payment.paymentInformationContinued"),
      de(e.ZnacznikZaplatyCzesciowej) === "1" ? l.t("invoice.payment.paidInPart") : l.t("invoice.payment.paidAllInParts")
    )
  )), WA(e.FormaPlatnosci) ? E.push(
    qA(
      l.t("invoice.payment.paymentMethod2"),
      _t(e.FormaPlatnosci, Os)
    )
  ) : e.OpisPlatnosci?._text && (E.push(
    qA(l.t("invoice.payment.paymentMethod2"), l.t("invoice.payment.paymentDifferent"))
  ), E.push(qA(l.t("invoice.payment.otherPaymentDescription"), e.OpisPlatnosci)));
  const Y = Te(e.ZaplataCzesciowa), X = Q();
  function Q() {
    const x = [
      re(bi(l.t("invoice.payment.partialPaymentDate"), 20), U.GrayBoldTitle),
      re(bi(l.t("invoice.payment.partialPaymentAmount"), 20), U.GrayBoldTitle),
      re(bi(l.t("invoice.payment.paymentMethod"), 20), U.GrayBoldTitle)
    ], N = Y.map((P) => {
      const d = [];
      return d.push(
        re(de(P.DataZaplatyCzesciowej), U.Date),
        re(de(P.KwotaZaplatyCzesciowej), U.Currency)
      ), P.PlatnoscInna ? d.push(re(bi(de(P.OpisPlatnosci) ?? "", 20), U.Default)) : d.push(re(de(P.FormaPlatnosci), U.FormOfPayment)), d;
    });
    return {
      content: {
        table: {
          headerRows: 1,
          keepWithHeaderRows: 1,
          widths: ["*", "*", "*"],
          body: [x, ...N]
        },
        margin: [0, 0, 0, 8],
        layout: Cn,
        alignment: xt.LEFT
      }
    };
  }
  const B = n.map((x) => n.some((N) => N.TerminOpis) ? {
    ...x,
    TerminOpis: {
      _text: `${x.TerminOpis?.Ilosc?._text ?? ""} ${x.TerminOpis?.Jednostka?._text ?? ""} ${x.TerminOpis?.ZdarzeniePoczatkowe?._text ?? ""}`
    }
  } : x), r = ft(
    c,
    B,
    "*",
    void 0,
    20
  );
  Y.length > 0 && n.length > 0 ? E.push(
    It(
      X.content ?? [],
      r.content ?? [],
      [0, 4, 0, 0],
      !1
    )
  ) : n.length > 0 ? r.content && E.push(It(r.content, [], void 0, !1)) : Y.length > 0 && X.content && E.push(X.content), e.LinkDoPlatnosci && (E.push(re(l.t("invoice.payment.moneylessLink"), U.Label)), E.push({
    text: re(e.LinkDoPlatnosci._text, U.Link),
    link: re(e.LinkDoPlatnosci._text, U.Link)
  })), e.IPKSeF?._text && E.push(qA(l.t("invoice.payment.ksefTransferId"), e.IPKSeF));
  const A = Te(e.RachunekBankowy).map(
    (x) => aB([x], l.t("invoice.payment.bankAccountNumber"))
  ), a = Te(e.RachunekBankowyFaktora).map(
    (x) => aB([x], l.t("invoice.payment.factorsBankAccountNumber"))
  ), D = [...A, ...a];
  return D.length > 0 && D.forEach((x, N) => {
    N % 2 === 0 && E.push(It(x, D[N + 1] ?? []));
  }), e.Skonto && (E.push(Ne(l.t("invoice.payment.conditionalDiscount"), [0, 0])), E.push(qA(l.t("invoice.payment.discountConditions"), e.Skonto.WarunkiSkonta)), E.push(qA(l.t("invoice.payment.discountAmount"), e.Skonto.WysokoscSkonta))), E;
}
function qn(e) {
  const n = [];
  return e?.AdresL1 && n.push(re(e.AdresL1._text, U.Value)), e?.AdresL2 && n.push(re(e.AdresL2._text, U.Value)), e?.KodKraju && n.push(re(l.t(za(e.KodKraju._text ?? "")), U.Value)), n.push(...qA(l.t("invoice.address.GLN"), e.GLN)), n;
}
function qs(e) {
  return [
    qA(l.t("invoice.subject1.nip"), e.NIP),
    qA(l.t("invoice.subject1.name"), e.Nazwa)
  ];
}
function Yr(e) {
  return Te(e)?.map((n) => n?.Email || n?.Telefon ? [
    qA(l.t("invoice.authorizedSubject.email"), n.Email),
    qA(l.t("invoice.authorizedSubject.phone"), n.Telefon)
  ] : "-");
}
function oB(e) {
  const n = Ne(l.t("invoice.subject1.seller"));
  if (n.push(
    qA(l.t("invoice.subject1.eoriNumber"), e.NrEORI),
    qA(l.t("invoice.subject1.vatPrefix"), e.PrefiksPodatnika)
  ), e.DaneIdentyfikacyjne && n.push(...qs(e.DaneIdentyfikacyjne)), e.Adres && n.push(
    re(l.t("invoice.subject1.address"), [U.Label, U.LabelMargin]),
    qn(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject1.mailingAddress"), [U.Label, U.LabelMargin]),
    ...qn(e.AdresKoresp)
  ), e.DaneKontaktowe && n.push(
    re(l.t("invoice.subject1.contactDetails"), [U.Label, U.LabelMargin]),
    ...Yr(e.DaneKontaktowe)
  ), WA(e.StatusInfoPodatnika)) {
    const c = _t(e.StatusInfoPodatnika, Ln);
    n.push(qA(l.t("invoice.subject1.taxpayerStatus"), c));
  }
  return n;
}
function $E(e, n) {
  const c = Ne(l.t("invoice.subject1K.seller"));
  let E = [], Y = [];
  if (E.push(
    Ne(l.t("invoice.subject1K.identificationData")),
    qA(l.t("invoice.subject1K.eoriNumber"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...qs(e.DaneIdentyfikacyjne)), e.DaneKontaktowe) {
    const X = Yr(Te(e.DaneKontaktowe));
    X.length && (E.push(Ne(l.t("invoice.subject1K.contactDetails"))), E.push(X));
  }
  if (e.StatusInfoPodatnika) {
    const X = _t(e.StatusInfoPodatnika, Ln);
    E.push(qA(l.t("invoice.subject1K.taxpayerStatus"), X));
  }
  return E.length && c.push(E), E = BB(n, l.t("invoice.subject1K.correctedContent")), Y = BB(e, l.t("invoice.subject1K.correctiveContent")), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject1K.mailingAddress"), [U.Label, U.LabelMargin]),
    qn(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function BB(e, n) {
  const c = [];
  return c.push(Ne(n)), e.PrefiksPodatnika?._text && c.push(qA(l.t("invoice.subject1K.vatPrefix"), e.PrefiksPodatnika)), e.DaneIdentyfikacyjne && c.push(...qs(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    re(l.t("invoice.subject1K.address"), [U.Label, U.LabelMargin]),
    qn(e.Adres)
  ), c;
}
function ks(e) {
  const n = [];
  return n.push(qA(l.t("invoice.subject2.nip"), e.NIP)), e.NrVatUE?._text && n.push(
    Wt([
      { value: l.t("invoice.subject2.vatUeNumber"), formatTyp: U.Label },
      { value: e.KodUE, formatTyp: U.Value },
      { value: " " },
      { value: e.NrVatUE, formatTyp: U.Value }
    ])
  ), e.NrID?._text && n.push(
    Wt([
      { value: l.t("invoice.subject2.taxIdOther"), formatTyp: U.Label },
      { value: e.KodKraju || "", formatTyp: U.Value },
      { value: " " },
      { value: e.NrID, formatTyp: U.Value }
    ])
  ), e.BrakID?._text === "1" && n.push(re(l.t("invoice.subject2.noTaxId"), U.Label)), n.push(qA(l.t("invoice.subject2.name"), e.Nazwa)), n;
}
function fa(e) {
  const n = Ne(l.t("invoice.subject2.buyer"));
  return n.push(
    qA(l.t("invoice.subject2.getterId"), e.IDNabywcy),
    qA(l.t("invoice.subject2.eoriNumber"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && n.push(
    ...ks(
      e.DaneIdentyfikacyjne
    )
  ), e.Adres && n.push(
    re(l.t("invoice.subject2.address"), [U.Label, U.LabelMargin]),
    qn(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject2.mailingAddress"), [U.Label, U.LabelMargin]),
    ...qn(e.AdresKoresp)
  ), (e.DaneKontaktowe || e.NrKlienta) && n.push(
    re(l.t("invoice.subject2.contactDetails"), [U.Label, U.LabelMargin]),
    ...Yr(e.DaneKontaktowe ?? []),
    qA(l.t("invoice.subject2.customerNumber"), e.NrKlienta)
  ), e?.JST && n.push(
    qA(
      l.t("invoice.subject2.jst"),
      l.t(
        de(e?.JST)?.toString().trim() === "1" ? "invoice.subject2.yes" : "invoice.subject2.no"
      ),
      U.Default,
      { marginTop: 8 }
    )
  ), e?.GV && n.push(
    qA(
      l.t("invoice.subject2.gv"),
      l.t(
        de(e?.GV)?.toString().trim() === "1" ? "invoice.subject2.yes" : "invoice.subject2.no"
      ),
      U.Default,
      e?.JST ? {} : { marginTop: 8 }
    )
  ), n;
}
function Aw(e) {
  if (!e)
    return [];
  const n = [];
  return WA(e.NIP) ? n.push(qA(l.t("invoice.subject3.nip"), e.NIP, U.Default)) : WA(e.IDWew) ? n.push(
    qA(l.t("invoice.subject3.internalId"), e.IDWew, U.Default)
  ) : WA(e.KodUE) ? n.push(
    Wt([
      { value: l.t("invoice.subject3.vatUeNumber"), formatTyp: U.Label },
      { value: e.KodUE, formatTyp: U.Default },
      { value: "" },
      { value: e.NrVatUE, formatTyp: U.Default }
    ])
  ) : WA(e.NrID) ? n.push(
    Wt([
      { value: l.t("invoice.subject3.otherId"), formatTyp: U.Label },
      { value: e.KodKraju, formatTyp: U.Default },
      { value: "" },
      { value: e.NrID, formatTyp: U.Default }
    ])
  ) : e.BrakID?._text === "1" && n.push(qA(l.t("invoice.subjectIdentificationData.noId"), " ", U.Default)), WA(e.Nazwa) && n.push(
    qA(l.t("invoice.subject3.name"), e.Nazwa, U.Default)
  ), n;
}
function gB(e, n) {
  const c = [];
  c.push(zi());
  const E = [
    ...Ne(l.t("invoice.subject3.otherEntity", { index: n + 1 })),
    qA(l.t("invoice.subject3.getterId"), e.IDNabywcy),
    qA(l.t("invoice.subject3.eori"), e.NrEORI),
    ...Aw(e.DaneIdentyfikacyjne),
    qA(l.t("invoice.subject3.role"), _t(e.Rola, PB)),
    qA(l.t("invoice.subject3.otherRole"), e.OpisRoli),
    qA(l.t("invoice.subject3.share"), e.Udzial, [U.Percentage])
  ], Y = [];
  return e.Adres && Y.push(
    re(l.t("invoice.subject3.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject3.correspondenceAddress"), [U.Label, U.LabelMargin]),
    ...Si(e.AdresKoresp)
  ), (e.DaneKontaktowe || e.NrKlienta) && (Y.push(
    re(l.t("invoice.subject3.contactData"), [U.Label, U.LabelMargin])
  ), e.DaneKontaktowe && Y.push(...Yr(e.DaneKontaktowe)), e.NrKlienta && Y.push(qA(l.t("invoice.subject3.clientNumber"), e.NrKlienta))), c.push(It(E, Y)), c;
}
function Fr(e, n = l.t("invoice.subject1.address"), c = !1, E) {
  return e ? [
    ...c ? kt(n, E) : Ne(n, E),
    ...qn(e)
  ] : [];
}
function ew(e, n) {
  if (!e)
    return [];
  const c = e.fakturaPodmiotNDto, E = Te(c.DaneKontaktowe), Y = e.podmiot2KDto, X = [];
  X.push(zi()), X.push(Ne(`${l.t("invoice.subject3k.otherEntity")} ${n + 1}`)), (WA(c.NrEORI) || WA(c.Rola) || WA(c.OpisRoli) || WA(c?.Udzial)) && X.push(
    ...Ne(l.t("invoice.subject3k.identificationData")),
    qA(l.t("invoice.subject3k.eori"), c.NrEORI),
    qA(l.t("invoice.subject3k.role"), _t(c.Rola, PB)),
    qA(l.t("invoice.subject3k.otherRole"), c.OpisRoli),
    qA(l.t("invoice.subject3k.share"), c.Udzial, U.Percentage)
  ), (E.length > 0 || WA(c.NrKlienta)) && (X.push(Yr(c.DaneKontaktowe ?? [])), X.push(qA(l.t("invoice.subject3k.clientNumber"), c.NrKlienta)));
  const Q = [
    ...Ne(l.t("invoice.subject3k.correctedContent")),
    qA(l.t("invoice.subject3k.getterId"), Y?.IDNabywcy)
  ];
  Y?.DaneIdentyfikacyjne && Q.push(ks(Y.DaneIdentyfikacyjne)), Y?.Adres && Q.push(Fr(Y.Adres));
  const B = [
    ...Ne(l.t("invoice.subject3k.correctiveContent")),
    qA(l.t("invoice.subject3k.getterId"), c?.IDNabywcy)
  ];
  return c?.DaneIdentyfikacyjne && B.push(ks(c.DaneIdentyfikacyjne)), c?.Adres && B.push(Fr(c.Adres)), c.AdresKoresp != null && B.push(
    Fr(c.AdresKoresp, l.t("invoice.subject3k.correspondenceAddress"))
  ), X.push(It(Q, B)), X;
}
function tw(e) {
  if (!e)
    return [];
  const n = [
    re(l.t("invoice.authorizedSubject.contactData"), U.Description)
  ], c = Te(e);
  return c.length === 0 ? [] : (c.forEach((E) => {
    WA(E.EmailPU) && n.push(qA(l.t("invoice.authorizedSubject.email"), E.EmailPU)), WA(E.TelefonPU) && n.push(qA(l.t("invoice.authorizedSubject.phone"), E.TelefonPU)), n.push(Ei(1));
  }), n);
}
function iw(e) {
  if (!e)
    return [];
  const n = Ne(l.t("invoice.authorizedSubject.authorizedSubject"));
  return WA(e.RolaPU) && n.push(
    qA(
      l.t("invoice.authorizedSubject.role"),
      _t(e.RolaPU, Fl)
    )
  ), WA(e.NrEORI) && n.push(qA(l.t("invoice.authorizedSubject.eori"), e.NrEORI)), e.DaneIdentyfikacyjne && n.push(qs(e.DaneIdentyfikacyjne)), n.push([
    ...Fr(e.Adres),
    ...Fr(
      e.AdresKoresp,
      l.t("invoice.authorizedSubject.correspondenceAddress2")
    ),
    ...tw(e.DaneKontaktowe)
  ]), n;
}
function nw(e, n) {
  const c = [];
  c.push(zi()), c.push(Ne(l.t("invoice.subject2k.buyer")));
  let E = [], Y = [];
  return E.push(
    Ne(l.t("invoice.subject2k.identificationData")),
    qA(l.t("invoice.subject2k.eori"), e.NrEORI)
  ), e.DaneIdentyfikacyjne && E.push(...Zn(e.DaneIdentyfikacyjne)), e.DaneKontaktowe && (E.push(
    re(l.t("invoice.subject2k.contactDetails"), [U.Label, U.LabelMargin])
  ), e.NrKlienta && E.push(qA(l.t("invoice.subject2k.clientNumber"), e.NrKlienta)), E.push(Yr(Te(e.DaneKontaktowe)))), E.length && c.push({
    columns: [E, []],
    columnGap: 20
  }), n.DaneIdentyfikacyjne && (E = Ls(n, l.t("invoice.subject2k.correctedContent")), Y = Ls(e, l.t("invoice.subject2k.correctiveContent"))), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject2k.mailingAddress"), [U.Label, U.LabelMargin]),
    Si(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function rw(e) {
  const n = [], c = Te(e.Fa?.Podmiot2K), E = Te(e.Podmiot3);
  if (e.Fa?.Podmiot1K || c.length > 0)
    if (e.Fa?.Podmiot1K ? n.push($E(e.Podmiot1 ?? {}, e.Fa?.Podmiot1K)) : e.Podmiot1 != null && n.push(oB(e.Podmiot1)), e.Fa?.Podmiot2K) {
      const Y = c.find(
        (X) => de(X.IDNabywcy) === de(e.Podmiot2?.IDNabywcy)
      );
      Y ? n.push(nw(e.Podmiot2 ?? {}, Y)) : n.push(Yt(fa(e.Podmiot2), !0));
    } else e.Podmiot2 && n.push(Yt(fa(e.Podmiot2), !0));
  else
    n.push([
      Gi([oB(e.Podmiot1), fa(e.Podmiot2)], {
        margin: [0, 0, 0, 8],
        columnGap: 20
      })
    ]);
  if (E.length > 0) {
    const Y = sw(c, E);
    Y.filter(
      (X) => X.fakturaPodmiotNDto.IDNabywcy === e.Podmiot2?.IDNabywcy
    ), Y.length > 0 ? Y.forEach((X, Q) => {
      X.podmiot2KDto ? n.push(ew(X, Q)) : n.push(gB(X.fakturaPodmiotNDto, Q)), Q < Y.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    }) : E.forEach((X, Q) => {
      n.push(gB(X, Q)), Q < E.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
    });
  }
  return n.push(iw(e.PodmiotUpowazniony)), Yt(n, !0, [0, 0, 0, 0]);
}
function sw(e, n) {
  const c = [];
  return n.filter((E) => de(E.Rola) === "4").length > 0 && n.forEach((E) => {
    de(E.Rola) === "4" ? c.push({
      fakturaPodmiotNDto: E,
      podmiot2KDto: e.find(
        (Y) => de(Y.IDNabywcy) === de(E.IDNabywcy)
      )
    }) : c.push({
      fakturaPodmiotNDto: E
    });
  }), c;
}
function aw(e) {
  const n = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) && !WA(e.Fa?.P_14_5, !1) || WA(e.Fa?.P_13_6_1, !1) || WA(e.Fa?.P_13_6_2, !1) || WA(e.Fa?.P_13_6_3, !1) || WA(e.Fa?.P_13_7, !1) || WA(e.Fa?.P_13_8, !1) || WA(e.Fa?.P_13_9, !1) || WA(e.Fa?.P_13_10, !1) || WA(e.Fa?.P_13_11, !1), c = WA(e.Fa?.P_13_1, !1) || WA(e.Fa?.P_13_2, !1) || WA(e.Fa?.P_13_3, !1) || WA(e.Fa?.P_13_4, !1) || WA(e.Fa?.P_13_5, !1) || WA(e.Fa?.P_13_6_1, !1) || WA(e.Fa?.P_13_6_2, !1) || WA(e.Fa?.P_13_6_3, !1) || WA(e.Fa?.P_13_7, !1) || WA(e.Fa?.P_13_8, !1) || WA(e.Fa?.P_13_9, !1) || WA(e.Fa?.P_13_10, !1) || WA(e.Fa?.P_13_11, !1), E = WA(e.Fa?.P_14_1W, !1) || WA(e.Fa?.P_14_2W, !1) || WA(e.Fa?.P_14_3W, !1) || WA(e.Fa?.P_14_4W, !1);
  let Y = [];
  const X = {
    table: {
      headerRows: 1,
      widths: [],
      body: []
    },
    layout: {
      hLineWidth: () => 1,
      hLineColor: () => "#BABABA",
      vLineWidth: () => 1,
      vLineColor: () => "#BABABA"
    }
  }, Q = [
    { text: l.t("invoice.summary.lp"), style: U.GrayBoldTitle },
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxRate"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.netAmount"), style: U.GrayBoldTitle }] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? [
      {
        text: l.t("invoice.summary.taxAmount"),
        style: U.GrayBoldTitle
      }
    ] : [],
    ...c ? [{ text: l.t("invoice.summary.grossAmount"), style: U.GrayBoldTitle }] : [],
    ...E ? [{ text: l.t("invoice.summary.taxAmountPLN"), style: U.GrayBoldTitle }] : []
  ], B = [
    "auto",
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...n || WA(e.Fa?.P_14_5, !1) ? ["*"] : [],
    ...c ? ["*"] : [],
    ...E ? ["*"] : []
  ];
  return e?.Fa && (Y = ow(e.Fa).map((A) => {
    const a = [];
    return a.push(A.no ?? ""), n ? A.taxRateString ? a.push(A.taxRateString) : de(e.Fa?.P_13_5) ? a.push(l.t("invoice.summary.oss")) : a.push("") : WA(e.Fa?.P_14_5, !1) && a.push(l.t("invoice.summary.oss")), c && a.push(re(A.net, U.Currency)), n ? a.push(re(A.tax, U.Currency)) : WA(e.Fa?.P_14_5, !1) && a.push(de(e.Fa?.P_14_5) ?? ""), c && a.push(re(A.gross, U.Currency)), E && a.push(re(A.taxPLN, U.Currency)), a;
  })), X.table.body = [[...Q], ...Y], X.table.widths = [...B], Y.length ? Yt([...Ne(l.t("invoice.summary.sectionHeader"), [0, 0, 0, 8]), X], !1) : [];
}
function ow(e) {
  const n = [], c = WA(e?.P_13_1, !1) || WA(e?.P_14_1, !1) || WA(e?.P_14_1W, !1), E = WA(e?.P_13_2, !1) || WA(e?.P_14_2, !1) || WA(e?.P_14_2W, !1), Y = WA(e?.P_13_3, !1) || WA(e?.P_14_3, !1) || WA(e?.P_14_3W, !1), X = WA(e?.P_13_4, !1) || WA(e?.P_14_4, !1) || WA(e?.P_14_4W, !1), Q = WA(e?.P_13_5, !1) || WA(e?.P_14_5, !1), B = WA(e?.P_13_6_1, !1), r = WA(e?.P_13_6_2, !1), A = WA(e?.P_13_6_3, !1), a = WA(e?.P_13_7, !1), D = WA(e?.P_13_8, !1), x = WA(e?.P_13_9, !1), N = WA(e?.P_13_10, !1), P = WA(e?.P_13_11, !1);
  let d = 1;
  return c && (n.push({
    no: d,
    net: Se(e.P_13_1).toFixed(2),
    gross: (Se(e.P_13_1) + Se(e.P_14_1)).toFixed(2),
    tax: Se(e.P_14_1).toFixed(2),
    taxPLN: Se(e.P_14_1W).toFixed(2),
    taxRateString: l.t("invoice.summary.23or22")
  }), d++), E && (n.push({
    no: d,
    net: Se(e.P_13_2).toFixed(2),
    gross: (Se(e.P_13_2) + Se(e.P_14_2)).toFixed(2),
    tax: Se(e.P_14_2).toFixed(2),
    taxPLN: Se(e.P_14_2W).toFixed(2),
    taxRateString: l.t("invoice.summary.8or7")
  }), d++), Y && (n.push({
    no: d,
    net: Se(e.P_13_3).toFixed(2),
    gross: (Se(e.P_13_3) + Se(e.P_14_3)).toFixed(2),
    tax: Se(e.P_14_3).toFixed(2),
    taxPLN: Se(e.P_14_3W).toFixed(2),
    taxRateString: l.t("invoice.summary.5")
  }), d++), X && (n.push({
    no: d,
    net: Se(e.P_13_4).toFixed(2),
    gross: (Se(e.P_13_4) + Se(e.P_14_4)).toFixed(2),
    tax: Se(e.P_14_4).toFixed(2),
    taxPLN: Se(e.P_14_4W).toFixed(2),
    taxRateString: l.t("invoice.summary.4or3")
  }), d++), Q && (n.push({
    no: d,
    net: Se(e.P_13_5).toFixed(2),
    gross: (Se(e.P_13_5) + Se(e.P_14_5)).toFixed(2),
    tax: Se(e.P_14_5).toFixed(2),
    taxPLN: "",
    taxRateString: de(e.P_14_5) != 0 ? l.t("invoice.summary.oss") : ""
  }), d++), B && (n.push({
    no: d,
    net: Se(e.P_13_6_1).toFixed(2),
    gross: Se(e.P_13_6_1).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0long")
  }), d++), r && (n.push({
    no: d,
    net: Se(e.P_13_6_2).toFixed(2),
    gross: Se(e.P_13_6_2).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0mid")
  }), d++), A && (n.push({
    no: d,
    net: Se(e.P_13_6_3).toFixed(2),
    gross: Se(e.P_13_6_3).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.0short")
  }), d++), a && (n.push({
    no: d,
    net: Se(e.P_13_7).toFixed(2),
    gross: Se(e.P_13_7).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.noTax")
  }), d++), D && (n.push({
    no: d,
    net: Se(e.P_13_8).toFixed(2),
    gross: Se(e.P_13_8).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.npExcludingArt100")
  }), d++), x && (n.push({
    no: d,
    net: Se(e.P_13_9).toFixed(2),
    gross: Se(e.P_13_9).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.npBasedArt100")
  }), d++), N && (n.push({
    no: d,
    net: Se(e.P_13_10).toFixed(2),
    gross: Se(e.P_13_10).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.reverseTax")
  }), d++), P && (n.push({
    no: d,
    net: Se(e.P_13_11).toFixed(2),
    gross: Se(e.P_13_11).toFixed(2),
    tax: "0.00",
    taxPLN: "",
    taxRateString: l.t("invoice.summary.margin")
  }), d++), n;
}
function Bw(e) {
  const n = Te(e.FaWiersz), c = [], E = [
    { name: "NrWierszaFa", title: l.t("invoice.discount.lp"), format: U.Default, width: "auto" },
    { name: "P_7", title: l.t("invoice.discount.productName"), format: U.Default },
    { name: "P_8B", title: l.t("invoice.discount.quantity"), format: U.Default },
    { name: "P_8A", title: l.t("invoice.discount.unit"), format: U.Default }
  ], Y = ft(E, n, "*"), X = Y.fieldsWithValue.includes("NrWierszaFa");
  return c.push(
    ...Ne(l.t("invoice.discount.header")),
    ...qA(l.t("invoice.discount.totalValue"), e.P_15, U.Currency, {
      alignment: xt.RIGHT
    }),
    It(
      re(
        l.t(X ? "invoice.discount.notAll" : "invoice.discount.all"),
        U.Default
      ),
      ""
    )
  ), Y.fieldsWithValue.length > 0 && Y.content && c.push(Y.content), Yt(c, !0);
}
function gw(e) {
  const n = Te(e.FaWiersz), c = Te(e.Zamowienie?.ZamowienieWiersz), E = [mt.ZAL, mt.KOR_ZAL].includes(
    de(e.RodzajFaktury)
  ) ? l.t("invoice.details.getMoneyDate") : l.t("invoice.details.deliveryOrServiceDate"), Y = cw(e.OkresFa?.P_6_Od, e.OkresFa?.P_6_Do), X = [], Q = [];
  WA(e.KodWaluty) && Q.push(qA(l.t("invoice.details.currencyCode"), e.KodWaluty));
  const B = [];
  (pr("P_12_XII", n) || pr("P_12_XII", c)) && B.push(qA(l.t("invoice.details.ossProcedure"), " "));
  const r = [], A = [];
  if (WA(e.KodWaluty) && de(e.KodWaluty) != "PLN")
    if (WA(e.KursWalutyZ))
      r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(l.t("invoice.details.currencyRate"), e.KursWalutyZ, U.Currency6)
      );
    else {
      const J = mn("KursWaluty", n);
      J.length === 1 && (r.push(qA(l.t("invoice.details.commonCurrencyRate"), " ")), A.push(
        qA(
          l.t("invoice.details.currencyRate"),
          J[0].value,
          U.Currency6
        )
      ));
    }
  const a = [], D = [], x = [
    qA(l.t("invoice.details.issueDate"), e.P_1, U.Date),
    qA(l.t("invoice.details.issuePlace"), e.P_1M),
    qA(l.t("invoice.details.discountPeriod"), e.OkresFaKorygowanej),
    qA(E, e.P_6, U.Date),
    Y,
    X,
    Q,
    B,
    r,
    A,
    a,
    D
  ].filter((J) => J.length > 0), N = [], P = [];
  x.forEach((J, q) => {
    q % 2 ? P.push(J) : N.push(J);
  });
  const d = [
    ...Ne(l.t("invoice.details.header")),
    It(N, P),
    ...lw(e.ZaliczkaCzesciowa),
    ...Ew(e.FakturaZaliczkowa)
  ];
  return Yt(d, !0);
}
function cw(e, n) {
  const c = [];
  return WA(e) && WA(n) ? c.push(
    Wt([
      {
        value: l.t("invoice.details.deliveryOrServiceDateFrom")
      },
      { value: $i(de(e)), formatTyp: U.Value },
      { value: l.t("invoice.details.to") },
      { value: $i(de(n)), formatTyp: U.Value }
    ])
  ) : WA(e) ? c.push(
    qA(
      l.t("invoice.details.deliveryOrServiceDateFrom"),
      $i(de(e))
    )
  ) : WA(n) && c.push(
    qA(
      l.t("invoice.details.deliveryOrServiceDateTo"),
      $i(de(n))
    )
  ), c;
}
function lw(e) {
  if (!e)
    return [];
  const n = Te(e), c = [], E = [
    { name: "P_6Z", title: l.t("invoice.details.getMoneyDate2"), format: U.Date },
    { name: "P_15Z", title: l.t("invoice.details.costAmount"), format: U.Default },
    { name: "KursWalutyZW", title: l.t("invoice.details.currencyRate2"), format: U.Currency6 }
  ], Y = ft(
    E,
    n,
    "auto"
  );
  return Y.content && c.push(Y.content), c;
}
function Ew(e) {
  if (!e)
    return [];
  const c = Te(e).map((Q) => "NrFaZaliczkowej" in Q && Q.NrFaZaliczkowej ? { ...Q, NrFaZaliczkowej: Q.NrFaZaliczkowej } : "NrKSeFFaZaliczkowej" in Q && Q.NrKSeFFaZaliczkowej ? { ...Q, NrFaZaliczkowej: Q.NrKSeFFaZaliczkowej } : { ...Q, NrFaZaliczkowej: { _text: "" } }), E = [], Y = [
    {
      name: "NrFaZaliczkowej",
      title: l.t("invoice.details.advanceInvoiceNumbers"),
      format: U.Default
    }
  ], X = ft(
    Y,
    c,
    "auto",
    [0, 4, 0, 0]
  );
  return X.content && E.push(X.content), E;
}
function ww(e) {
  return e ? [
    ...Ne(l.t("invoice.carrier.carrier")),
    [
      It(
        ks(
          e.DaneIdentyfikacyjne
        ),
        Fr(
          e.AdresPrzewoznika,
          l.t("invoice.carrier.carrierAddress"),
          !0,
          [0, 0, 0, 0]
        ),
        [0, 0, 0, 8]
      )
    ]
  ] : [];
}
function uw(e, n) {
  const c = [], E = {
    transport: [],
    dane: [],
    wysylkaZ: [],
    wysylkaDo: [],
    wysylkaPrzez: []
  }, Y = l.t("invoice.transport.header");
  return c.push(Ne(n ? `${Y} ${n}` : Y)), e.RodzajTransportu?._text ? E.transport.push(
    qA(
      l.t("invoice.transport.type"),
      _t(e.RodzajTransportu, Pa)
    )
  ) : e.TransportInny?._text == "1" && e.OpisInnegoTransportu?._text && (E.transport.push(
    qA(l.t("invoice.transport.type"), l.t("invoice.transport.otherType"))
  ), E.transport.push(
    qA(l.t("invoice.transport.otherTypeDescription"), e.OpisInnegoTransportu)
  )), E.dane.push(qA(l.t("invoice.transport.orderNumber"), e.NrZleceniaTransportu)), WA(e.OpisLadunku) && (E.dane.push(
    qA(
      l.t("invoice.transport.cargoDescription"),
      _t(e.OpisLadunku, ba)
    )
  ), e.LadunekInny?._text === "1" && e.OpisInnegoLadunku?._text && (E.dane.push(
    qA(l.t("invoice.transport.cargoDescription"), l.t("invoice.transport.otherCargo"))
  ), E.dane.push(
    qA(l.t("invoice.transport.otherCargoDescription"), e.OpisInnegoLadunku)
  ))), E.dane.push(qA(l.t("invoice.transport.packageUnit"), e.JednostkaOpakowania)), E.dane.push(
    qA(
      l.t("invoice.transport.startDateTime"),
      xr(e.DataGodzRozpTransportu)
    )
  ), E.dane.push(
    qA(
      l.t("invoice.transport.endDateTime"),
      xr(e.DataGodzZakTransportu)
    )
  ), E.dane.length > 0 && E.dane.unshift(kt(l.t("invoice.transport.dataHeader"), [0, 0, 0, 0])), c.push(It(E.transport, E.dane)), c.push(ww(e.Przewoznik)), e.WysylkaZ?.AdresL1 && (E.wysylkaZ.push(kt(l.t("invoice.transport.shipFrom"), [0, 0, 0, 0])), E.wysylkaZ.push(re(e.WysylkaZ?.AdresL1?._text, U.Default)), E.wysylkaZ.push(re(e.WysylkaZ?.AdresL2?._text, U.Default)), E.wysylkaZ.push(
    re(l.t(Gn[e.WysylkaZ?.KodKraju?._text ?? ""]), U.Default)
  ), E.wysylkaZ.push(qA(l.t("invoice.transport.gln"), e.WysylkaZ?.GLN?._text))), e.WysylkaDo?.AdresL1 && (E.wysylkaDo.push(kt(l.t("invoice.transport.shipTo"), [0, 0, 0, 0])), E.wysylkaDo.push(re(e.WysylkaDo?.AdresL1?._text, U.Default)), E.wysylkaDo.push(re(e.WysylkaDo?.AdresL2?._text, U.Default)), E.wysylkaDo.push(
    re(l.t(Gn[e.WysylkaDo?.KodKraju?._text ?? ""]), U.Default)
  ), E.wysylkaDo.push(qA(l.t("invoice.transport.gln"), e.WysylkaDo?.GLN?._text))), Te(e.WysylkaPrzez).forEach((Q, B) => {
    B && E.wysylkaPrzez.push(`
`), E.wysylkaPrzez.push(kt(l.t("invoice.transport.intermediateAddress"), [0, 4, 0, 0])), E.wysylkaPrzez.push(re(Q.AdresL1?._text, U.Default)), E.wysylkaPrzez.push(re(Q?.AdresL2?._text, U.Default)), E.wysylkaPrzez.push(re(l.t(Gn[Q?.KodKraju?._text ?? ""]), U.Default)), E.wysylkaPrzez.push(qA(l.t("invoice.transport.gln"), Q?.GLN?._text));
  }), (e.WysylkaZ?.AdresL1 || e.WysylkaDo?.AdresL1 || e.WysylkaPrzez?.length) && (c.push(Ne(l.t("invoice.transport.shipmentHeader"))), c.push(It(E.wysylkaZ, E.wysylkaDo)), c.push(It(E.wysylkaPrzez, []))), Yt(c, !0);
}
function fw(e) {
  if (!e)
    return [];
  const n = [], c = { umowy: [], zamowienia: [] }, E = Te(e?.Umowy), Y = Te(e?.Zamowienia), X = Te(e?.NrPartiiTowaru), Q = [
    { name: "DataUmowy", title: l.t("invoice.transaction.contractDate"), format: U.Date },
    { name: "NrUmowy", title: l.t("invoice.transaction.contractNumber"), format: U.Default }
  ], B = [
    { name: "DataZamowienia", title: l.t("invoice.transaction.orderDate"), format: U.Date },
    { name: "NrZamowienia", title: l.t("invoice.transaction.orderNumber"), format: U.Default }
  ], r = [
    { name: "", title: l.t("invoice.transaction.batchNumber"), format: U.Default }
  ];
  if (n.push(Ne(l.t("invoice.transaction.header"), [0, 8, 0, 4])), E.length > 0) {
    const A = ft(Q, E, "*", void 0, 20);
    A.content && (c.umowy = [kt(l.t("invoice.transaction.contract")), A.content]);
  }
  if (Y.length > 0) {
    const A = ft(
      B,
      Y,
      "*",
      void 0,
      20
    );
    A.content && A.fieldsWithValue.length > 0 && (c.zamowienia = [kt(l.t("invoice.transaction.order")), A.content]);
  }
  if ((c.zamowienia.length > 0 || c.umowy.length > 0) && n.push(It(c.umowy, c.zamowienia, 0, !1)), (e.WalutaUmowna?._text || e.KursUmowny?._text) && (n.push(Ne(l.t("invoice.transaction.currencyAndRate"), [0, 8, 0, 4])), n.push(qA(l.t("invoice.transaction.currency"), e.WalutaUmowna)), n.push(qA(l.t("invoice.transaction.rate"), e.KursUmowny))), X.length > 0) {
    const A = ft(
      r,
      X,
      "*",
      [0, 4]
    );
    A.content && n.push(It(A.content, "", 0, !1));
  }
  return n.push(
    qA(
      l.t("invoice.transaction.deliveryTerms"),
      e.WarunkiDostawy,
      U.MarginTop4
    )
  ), e.PodmiotPosredniczacy?._text === "1" && n.push(
    re(l.t("invoice.transaction.intermediaryDelivery"), [U.Label, U.MarginTop4])
  ), e.Transport && Te(e.Transport).forEach((A, a) => {
    n.push(
      uw(A, Te(e.Transport).length !== 0 ? a + 1 : null)
    );
  }), Yt(n, !0);
}
function Qw(e) {
  const n = [], c = de(e.RodzajFaktury), E = !!Number(de(e.Adnotacje?.PMarzy?.P_PMarzy)), Y = Te(e.FaWiersz).map(
    (x) => {
      const N = Ta(c, E, x);
      return de(x.P_12) && (x.P_12._text = _n(de(x.P_12), 3)), { ...x, ...N };
    }
  ), X = [
    { name: "NrWierszaFa", title: l.t("invoice.rows.lp"), format: U.Default, width: "auto" }
  ], Q = [
    {
      name: "UU_ID",
      title: l.t("invoice.rows.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7", title: l.t("invoice.rows.productName"), format: U.Default, width: "*" },
    { name: "P_9A", title: l.t("invoice.rows.netUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_9B", title: l.t("invoice.rows.grossUnitPrice"), format: U.Currency, width: "auto" },
    { name: "P_8B", title: l.t("invoice.rows.amount"), format: U.Number, width: "auto" },
    { name: "P_8A", title: l.t("invoice.rows.unit"), format: U.Default, width: "auto" },
    { name: "P_10", title: l.t("invoice.rows.discount"), format: U.Currency, width: "auto" },
    { name: "P_12", title: l.t("invoice.rows.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12_XII",
      title: l.t("invoice.rows.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    {
      name: "P_12_Zal_15",
      title: l.t("invoice.rows.productMarker"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_11", title: l.t("invoice.rows.netSalesValue"), format: U.Currency, width: "auto" },
    {
      name: "P_11A",
      title: l.t("invoice.rows.grossSalesValue"),
      format: U.Currency,
      width: "auto"
    },
    {
      name: "P_11Vat",
      title: l.t("invoice.rows.vatSalesValue"),
      format: U.Currency,
      width: "auto"
    }
  ];
  mn("KursWaluty", Y).length !== 1 && Q.push({
    name: "KursWaluty",
    title: l.t("invoice.rows.currencyRate"),
    format: U.Currency6,
    width: "auto"
  }), Q.push({
    name: "StanPrzed",
    title: l.t("invoice.rows.stateBefore"),
    format: U.Boolean,
    width: "auto"
  });
  const B = [
    { name: "GTIN", title: l.t("invoice.rows.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiU", title: l.t("invoice.rows.pkwiu"), format: U.Default, width: "auto" },
    { name: "CN", title: l.t("invoice.rows.cn"), format: U.Default, width: "auto" },
    { name: "PKOB", title: l.t("invoice.rows.pkob"), format: U.Default, width: "auto" },
    {
      name: "KwotaAkcyzy",
      title: l.t("invoice.rows.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTU", title: l.t("invoice.rows.gtu"), format: U.Default, width: "auto" },
    { name: "Procedura", title: l.t("invoice.rows.procedure"), format: U.Default, width: "*" },
    { name: "P_6A", title: l.t("invoice.rows.getOrMakeDate"), format: U.Date, width: "auto" },
    { name: "Indeks", title: l.t("invoice.rows.index"), format: U.Default, width: "auto" }
  ];
  let r = ft(
    [...X, ...Q, ...B],
    Y,
    "auto"
  );
  const A = re(l.t("invoice.rows.issuedInCurrency", { currency: e.KodWaluty?._text }), [
    U.Label,
    U.MarginBottom8
  ]), a = de(e.P_15);
  let D = "";
  return c == mt.ROZ ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.remainingAmount"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: U.CurrencyGreaterWithSeparator,
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : c == mt.KOR ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.totalAmountDueCorrection"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : c == mt.KOR_ROZ ? D = {
    stack: Wt([
      { value: l.t("invoice.rows.remainingAmountCorrection"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : (c == mt.VAT || c == mt.UPR) && (D = {
    stack: Wt([
      { value: l.t("invoice.rows.totalAmountDue"), formatTyp: U.LabelGreater },
      {
        value: a,
        formatTyp: [U.CurrencyGreaterWithSeparator, U.HeaderContent, U.Value],
        currency: de(e.KodWaluty)?.toString() ?? ""
      }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }), r.fieldsWithValue.length <= 8 && r.content ? n.push(r.content) : (r = ft([...X, ...Q], Y, "*"), r.content && n.push(r.content), r = ft([...X, ...B], Y, "*"), r.content && r.fieldsWithValue.length > 1 && (n.push(`
`), n.push(r.content))), n.length < 1 ? [] : Yt([...Ne(l.t("invoice.rows.header")), A, ...n, D], !0);
}
function hw(e, n, c, E, Y, X) {
  if (!e)
    return [];
  const Q = n === hn.BeforeCorrection ? U.CurrencyAbs : U.Currency, B = Te(e?.ZamowienieWiersz).map((d, J) => (d.NrWierszaZam._text || (d.NrWierszaZam._text = (J + 1).toString()), d.P_12Z = { _text: l.t(_n(de(d.P_12Z), 3, X)) }, d)), r = [
    { name: "NrWierszaZam", title: l.t("invoice.order.lp"), format: U.Default, width: "auto" }
  ], A = [
    {
      name: "UU_ID",
      title: l.t("invoice.order.uniqueRowNumber"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_7Z", title: l.t("invoice.order.productName"), format: U.Default, width: "*" },
    {
      name: "P_9AZ",
      title: l.t("invoice.order.netUnitPrice"),
      format: Q,
      width: "auto"
    },
    { name: "P_8BZ", title: l.t("invoice.order.quantity"), format: U.Right, width: "auto" },
    { name: "P_8AZ", title: l.t("invoice.order.unit"), format: U.Default, width: "auto" },
    { name: "P_12Z", title: l.t("invoice.order.taxRate"), format: U.Default, width: "auto" },
    {
      name: "P_12Z_XII",
      title: l.t("invoice.order.ossTaxRate"),
      format: U.Percentage,
      width: "auto"
    },
    {
      name: "P_12Z_Zal_15",
      title: l.t("invoice.order.productMarker"),
      format: U.Default,
      width: "auto"
    },
    { name: "P_11NettoZ", title: l.t("invoice.order.netSalesValue"), format: Q, width: "auto" },
    { name: "P_11VatZ", title: l.t("invoice.order.taxAmount"), format: Q, width: "auto" }
  ], a = [
    { name: "UU_IDZ", title: l.t("invoice.order.orderNumber"), format: U.Default, width: "auto" },
    { name: "GTINZ", title: l.t("invoice.order.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiUZ", title: l.t("invoice.order.pkwiu"), format: U.Default, width: "auto" },
    { name: "CNZ", title: l.t("invoice.order.cn"), format: U.Default, width: "auto" },
    { name: "PKOBZ", title: l.t("invoice.order.pkob"), format: U.Default, width: "auto" },
    {
      name: "KwotaAkcyzyZ",
      title: l.t("invoice.order.exciseTaxAmount"),
      format: U.Currency,
      width: "auto"
    },
    { name: "GTUZ", title: l.t("invoice.order.gtu"), format: U.Default, width: "auto" },
    {
      name: "ProceduraZ",
      title: l.t("invoice.order.procedureMarkings"),
      format: U.Default,
      width: "*"
    },
    { name: "IndeksZ", title: l.t("invoice.order.index"), format: U.Default, width: "auto" },
    {
      name: "StanPrzedZ",
      title: l.t("invoice.order.stateBefore"),
      format: U.Boolean,
      width: "auto"
    }
  ];
  let D = ft(
    [...r, ...A, ...a],
    B,
    "*"
  );
  const x = [];
  D.fieldsWithValue.length <= 8 ? D.content && x.push(D.content) : (D = ft(
    [...r, ...A],
    B,
    "*"
  ), D.content && x.push(D.content), D = ft(
    [...r, ...a],
    B,
    "*"
  ), D.content && D.fieldsWithValue.length > 1 && x.push(D.content));
  const N = l.t("invoice.order.issuedInCurrency", { currency: Y });
  let P = "";
  return E == mt.ZAL ? P = {
    stack: Wt([
      { value: l.t("invoice.order.advancePaymentAmount"), formatTyp: U.LabelGreater },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  } : n !== hn.BeforeCorrection && E == mt.KOR_ZAL && (P = {
    stack: Wt([
      { value: l.t("invoice.order.advancePaymentAmountCorrection"), formatTyp: U.LabelGreater },
      { value: c, formatTyp: U.CurrencyGreaterWithSeparator }
    ]),
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  }), [
    {
      stack: [
        Ne(n),
        N,
        {
          text: [
            l.t("invoice.order.orderValueWithTax"),
            re(e.WartoscZamowienia?._text, U.Currency)
          ],
          marginBottom: 4
        },
        ...x,
        P
      ]
    }
  ];
}
Yn.addVirtualFileSystem(Xs);
function Cw(e, n) {
  const E = e.Fa?.RodzajFaktury?._text == mt.KOR && WA(e.Fa?.OkresFaKorygowanej) ? Bw(e.Fa) : Qw(e.Fa), Y = {
    ...Vs(n?.watermark),
    content: [
      ...Ua(e.Fa, n, e.Zalacznik),
      Js(e.Fa),
      ...rw(e),
      gw(e.Fa),
      E,
      hw(
        e.Fa?.Zamowienie,
        hn.Order,
        e.Fa?.P_15?._text ?? "",
        e.Fa?.RodzajFaktury?._text ?? "",
        e.Fa?.KodWaluty?._text ?? "",
        de(e.Fa?.Adnotacje?.PMarzy?.P_PMarzy)
      ),
      aw(e),
      VE(e.Fa?.Adnotacje),
      ZE(e.Fa),
      Ks(e.Fa?.Rozliczenie, e.Fa?.KodWaluty?._text ?? ""),
      _E(e.Fa?.Platnosc),
      fw(e.Fa?.WarunkiTransakcji),
      ...Ws(n, e.Stopka, e.Naglowek, e.Fa?.WZ, e.Zalacznik)
    ],
    footer: (X, Q) => ({
      text: `${X.toString()} ${l.t("invoice.footer.pagesTotal")} ${Q}`,
      alignment: xt.RIGHT,
      margin: [0, 0, 40, 0]
    }),
    ...rs()
  };
  return Yn.createPdf(Y);
}
function Mw(e) {
  const n = [
    ...Ne(l.t("invoice.additionalInformation.additionalInformationLabel")),
    ...Dw(e.DokumentZaplaty),
    ...dw(e.DodatkowyOpis)
  ];
  return n.length > 1 ? Yt(n, !0) : [];
}
function Dw(e) {
  if (!e)
    return [];
  const n = Te(e)?.map((X, Q) => ({
    ...X,
    lp: { _text: Q + 1 }
  })), c = kt(
    l.t("invoice.additionalInformation.paymentDocuments"),
    [0, 0, 0, 4]
  ), E = [
    {
      name: "lp",
      title: l.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "NrDokumentu",
      title: l.t("invoice.additionalInformation.documentNumber"),
      format: U.Default,
      width: "*"
    },
    {
      name: "DataDokumentu",
      title: l.t("invoice.additionalInformation.documentDate"),
      format: U.Date,
      width: "auto"
    }
  ], Y = ft(
    E,
    n,
    "*",
    [0, 0, 0, 0]
  );
  return Y.content && c.push(Y.content), c;
}
function dw(e) {
  if (!e)
    return [];
  const n = Te(e)?.map((X, Q) => ({
    ...X,
    lp: { _text: Q + 1 }
  })), c = kt(l.t("invoice.additionalInformation.additionalDescription")), E = [
    {
      name: "lp",
      title: l.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "NrWiersza",
      title: l.t("invoice.additionalInformation.rowNumber"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Klucz",
      title: l.t("invoice.additionalInformation.infoType"),
      format: U.Default,
      width: "auto"
    },
    {
      name: "Wartosc",
      title: l.t("invoice.additionalInformation.infoContent"),
      format: U.Default,
      width: "*"
    }
  ], Y = ft(
    E,
    n,
    "*",
    [0, 0, 0, 0]
  );
  return Y.content && c.push(Y.content), c;
}
function Iw(e, n) {
  let c = "";
  switch (de(e?.RodzajFaktury)) {
    case mt.VAT_RR:
      c = l.t("invoice.header.primalInvoiceVatRr");
      break;
    case mt.KOR_VAT_RR:
      c = l.t("invoice.header.correctedInvoiceVatRr");
      break;
  }
  return [
    {
      text: [
        { text: l.t("invoice.header.ksefPart1"), fontSize: 18 },
        { text: l.t("invoice.header.ksefPart2"), color: "red", bold: !0, fontSize: 18 },
        { text: l.t("invoice.header.ksefPart3"), bold: !0, fontSize: 18 }
      ]
    },
    {
      ...re(l.t("invoice.header.invoiceNumberLabel"), U.ValueMedium),
      alignment: xt.RIGHT
    },
    {
      ...re(de(e?.P_4C), U.HeaderPosition),
      alignment: xt.RIGHT
    },
    {
      ...re(c, [U.ValueMedium, U.Default]),
      alignment: xt.RIGHT
    },
    ...n?.nrKSeF ? [
      {
        text: [
          re(l.t("invoice.header.ksefNumberLabel"), U.LabelMedium),
          re(n?.nrKSeF, U.ValueMedium)
        ],
        alignment: xt.RIGHT
      }
    ] : []
  ];
}
const cB = (e, n) => {
  const c = [];
  return e?.length ? (e.forEach((E, Y) => {
    const X = [], Q = Ne(
      n ? `${n} ${e?.length > 1 ? ++Y : ""}` : "",
      [0, 8, 0, 8]
    );
    X.push([
      re(l.t("invoice.registers.fullAccountNumber"), U.GrayBoldTitle),
      re(de(E.NrRB), U.AccountNumber)
    ]), X.push([
      re(l.t("invoice.registers.swiftCode"), U.GrayBoldTitle),
      re(de(E.SWIFT), U.Default)
    ]), X.push([
      re(l.t("invoice.registers.bankName"), U.GrayBoldTitle),
      re(
        WA(E.NazwaBanku) ? bi(de(E.NazwaBanku), 20) : de(E.NazwaBanku),
        U.Default
      )
    ]), X.push([
      re(l.t("invoice.registers.accountDescription"), U.GrayBoldTitle),
      re(
        WA(E.OpisRachunku) ? bi(de(E.OpisRachunku), 20) : de(E.OpisRachunku),
        U.Default
      )
    ]), c.push([
      ...Q,
      {
        unbreakable: !0,
        table: {
          body: X,
          widths: ["auto", "*"]
        },
        layout: {
          hLineWidth: () => 1,
          hLineColor: () => "#BABABA",
          vLineWidth: () => 1,
          vLineColor: () => "#BABABA"
        }
      }
    ]);
  }), Yt(c, !1, [0, 0, 0, 0])) : [];
};
function yw(e) {
  if (!e)
    return [];
  const n = [zi(), ...Ne(l.t("invoice.payment.payment"))];
  WA(e.FormaPlatnosci) ? n.push(qA(l.t("invoice.payment.paymentMethod3"), l.t("invoice.payment.transfer"))) : WA(e.OpisPlatnosci) && (n.push(qA(l.t("invoice.payment.paymentMethod3"), l.t("invoice.payment.other"))), n.push(qA(l.t("invoice.payment.description"), e.OpisPlatnosci))), WA(e.LinkDoPlatnosci) && (n.push(re(l.t("invoice.payment.moneylessLink"), U.Label)), n.push({
    text: re(de(e.LinkDoPlatnosci), U.Link),
    link: re(de(e.LinkDoPlatnosci), U.Link)
  })), WA(e.IPKSeF) && n.push(qA(l.t("invoice.payment.ksefTransferId"), e.IPKSeF));
  const c = Te(e.RachunekBankowy1).map(
    (X) => cB([X], l.t("invoice.payment.farmer"))
  ), E = Te(e.RachunekBankowy2).map(
    (X) => cB([X], l.t("invoice.payment.getter"))
  ), Y = [...c, ...E];
  return Y.length > 0 && Y.forEach((X, Q) => {
    Q % 2 === 0 && n.push(It(X, Y[Q + 1] ?? []));
  }), n.push({ margin: [0, 8, 0, 0], text: "" }), n;
}
function Hn(e) {
  const n = [];
  return e?.AdresL1 && n.push(re(de(e.AdresL1), U.Value)), e?.AdresL2 && n.push(re(de(e.AdresL2), U.Value)), e?.KodKraju && n.push(re(l.t(za(de(e.KodKraju) ?? "")), U.Value)), n.push(...qA(l.t("invoice.address.GLN"), e.GLN)), n;
}
function Na(e) {
  return [
    qA(l.t("invoice.subjectIdentificationData.nip"), e.NIP),
    qA(l.t("invoice.subjectIdentificationData.name"), e.Nazwa)
  ];
}
function ss(e) {
  return Te(e)?.map((n) => [
    qA(l.t("invoice.subjectContactData.e-mail"), n.Email),
    qA(l.t("invoice.subjectContactData.phone"), n.Telefon)
  ]);
}
function lB(e) {
  const n = Ne(l.t("invoice.subject1.seller"));
  return e.DaneIdentyfikacyjne && n.push(...Na(e.DaneIdentyfikacyjne)), e.Adres && n.push(
    re(l.t("invoice.subject1.address"), [U.Label, U.LabelMargin]),
    Hn(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject1.mailingAddress"), [U.Label, U.LabelMargin]),
    ...Hn(e.AdresKoresp)
  ), e.DaneKontaktowe && n.push(
    re(l.t("invoice.subject1.contactDetails"), [U.Label, U.LabelMargin]),
    ...ss(e.DaneKontaktowe)
  ), WA(e.NrKontrahenta) && n.push(
    qA(l.t("invoice.subject1.contractorNumber"), de(e.NrKontrahenta))
  ), n;
}
function Ra(e) {
  return [
    qA(l.t("invoice.subjectIdentificationData.nip"), e.NIP),
    qA(l.t("invoice.subjectIdentificationData.name"), e.Nazwa)
  ];
}
function EB(e) {
  const n = Ne(l.t("invoice.subject2.buyer"));
  if (e.DaneIdentyfikacyjne && n.push(...Ra(e.DaneIdentyfikacyjne)), e.Adres && n.push(
    re(l.t("invoice.subject2.address"), [U.Label, U.LabelMargin]),
    Hn(e.Adres)
  ), e.AdresKoresp && n.push(
    re(l.t("invoice.subject2.mailingAddress"), [U.Label, U.LabelMargin]),
    ...Hn(e.AdresKoresp)
  ), e.DaneKontaktowe && n.push(
    re(l.t("invoice.subject2.contactDetails"), [U.Label, U.LabelMargin]),
    ...ss(e.DaneKontaktowe)
  ), WA(e.StatusInfoPodatnika)) {
    const c = _t(e.StatusInfoPodatnika, Ln);
    n.push(qA(l.t("invoice.subject2.taxPayerStatus"), c));
  }
  return n;
}
function Fw(e) {
  if (!e)
    return [];
  const n = [];
  return WA(e.NIP) ? n.push(
    qA(
      l.t("invoice.subjectIdentificationData.nip"),
      e.NIP,
      U.Default
    )
  ) : WA(e.IDWew) ? n.push(
    qA(
      l.t("invoice.subjectIdentificationData.internalId"),
      e.IDWew,
      U.Default
    )
  ) : de(e.BrakID) === "1" && n.push(qA(l.t("invoice.subjectIdentificationData.noId"), " ", U.Default)), WA(e.Nazwa) && n.push(
    qA(
      l.t("invoice.subjectIdentificationData.name"),
      e.Nazwa,
      U.Default
    )
  ), n;
}
function xw(e, n) {
  const c = [];
  c.push(zi());
  const E = [
    ...Ne(l.t("invoice.subject3.otherEntity", { index: n + 1 })),
    ...Fw(e.DaneIdentyfikacyjne),
    qA(l.t("invoice.subject3.role"), _t(e.Rola, zl)),
    qA(l.t("invoice.subject3.roleDescription"), e.OpisRoli)
  ], Y = [];
  return e.Adres && Y.push(
    re(l.t("invoice.subject3.address"), [U.Label, U.LabelMargin]),
    Hn(e.Adres)
  ), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject3.correspondenceAddress"), [U.Label, U.LabelMargin]),
    ...Hn(e.AdresKoresp)
  ), e.DaneKontaktowe && Y.push(
    re(l.t("invoice.subject3.contactData"), [U.Label, U.LabelMargin]),
    ...ss(e.DaneKontaktowe)
  ), c.push(It(E, Y)), c;
}
function pw(e, n) {
  const c = Ne(l.t("invoice.subject1K.seller"));
  let E = [], Y = [];
  if (e.DaneIdentyfikacyjne && E.push(
    Ne(l.t("invoice.subject1K.identificationData")),
    ...Na(e.DaneIdentyfikacyjne)
  ), e.DaneKontaktowe) {
    const X = ss(Te(e.DaneKontaktowe));
    X.length && (E.push(Ne(l.t("invoice.subject1K.contactDetails"))), E.push(X));
  }
  return WA(e.NrKontrahenta) && E.push(
    qA(l.t("invoice.subject1K.contractorNumber"), de(e.NrKontrahenta))
  ), E.length && c.push({
    columns: [E, []],
    columnGap: 20
  }), E = wB(n, l.t("invoice.subject1K.correctedContent")), Y = wB(e, l.t("invoice.subject1K.correctiveContent")), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject1K.mailingAddress"), [U.Label, U.LabelMargin]),
    Hn(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function wB(e, n) {
  const c = [];
  return c.push(Ne(n)), e.DaneIdentyfikacyjne && c.push(...Na(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    re(l.t("invoice.subject1K.address"), [U.Label, U.LabelMargin]),
    Hn(e.Adres)
  ), c;
}
function mw(e, n) {
  const c = Ne(l.t("invoice.subject2k.buyer"));
  let E = [], Y = [];
  if (e.DaneIdentyfikacyjne && E.push(
    Ne(l.t("invoice.subject2k.identificationData")),
    ...Ra(e.DaneIdentyfikacyjne)
  ), e.DaneKontaktowe && (E.push(
    re(l.t("invoice.subject2k.contactDetails"), [U.Label, U.LabelMargin])
  ), E.push(ss(Te(e.DaneKontaktowe)))), WA(e.StatusInfoPodatnika)) {
    const X = _t(e.StatusInfoPodatnika, Ln);
    E.push(qA(l.t("invoice.subject2k.taxPayerStatus"), X));
  }
  return E.length && c.push({
    columns: [E, []],
    columnGap: 20
  }), E = uB(n, l.t("invoice.subject2k.correctedContent")), Y = uB(e, l.t("invoice.subject2k.correctiveContent")), e.AdresKoresp && Y.push(
    re(l.t("invoice.subject2k.mailingAddress"), [U.Label, U.LabelMargin]),
    Si(e.AdresKoresp)
  ), (E.length || Y.length) && c.push(Gi([E, Y])), c.length && c.push(Ei(1)), c;
}
function uB(e, n) {
  const c = [];
  return c.push(Ne(n)), e.DaneIdentyfikacyjne && c.push(...Ra(e.DaneIdentyfikacyjne)), e.Adres && c.push(
    re(l.t("invoice.subject2k.address"), [U.Label, U.LabelMargin]),
    Si(e.Adres)
  ), c;
}
function Yw(e) {
  const n = [], c = Te(e.Podmiot3);
  return e.FakturaRR?.Podmiot1K || e.FakturaRR?.Podmiot2K ? (e.FakturaRR?.Podmiot1K ? n.push(pw(e.Podmiot1 ?? {}, e.FakturaRR?.Podmiot1K)) : e.Podmiot1 != null && n.push(lB(e.Podmiot1)), e.FakturaRR?.Podmiot2K ? n.push(mw(e.Podmiot2 ?? {}, e.FakturaRR?.Podmiot2K)) : e.Podmiot2 && n.push(Yt(EB(e.Podmiot2), !0))) : n.push([
    Gi([lB(e.Podmiot1), EB(e.Podmiot2)], {
      margin: [0, 0, 0, 8],
      columnGap: 20
    })
  ]), c.length > 0 && c.forEach((E, Y) => {
    n.push(xw(E, Y)), Y < c.length - 1 && n.push({ margin: [0, 8, 0, 0], text: "" });
  }), Yt(n, !0, [0, 0, 0, 0]);
}
function Pw(e) {
  const n = Te(e.FakturaRRWiersz), c = [];
  if (WA(e.KodWaluty) && de(e.KodWaluty) != "PLN") {
    const Q = mn("KursWaluty", n);
    Q.length === 1 && c.push(
      qA(
        l.t("invoice.details.currencyRate"),
        Q[0].value,
        U.Currency6
      )
    );
  }
  const E = [
    qA(l.t("invoice.details.invoiceDateShort"), e.P_4B, U.Date),
    qA(l.t("invoice.details.getDate"), e.P_4A, U.Date),
    c
  ].filter((Q) => Q.length > 0), Y = [qA(l.t("invoice.details.place"), e.P_1M)].filter(
    (Q) => Q.length > 0
  ), X = [
    ...Ne(l.t("invoice.details.header")),
    It(E, Y)
  ];
  return Yt(X, !0);
}
function vw(e) {
  const n = [], c = Te(e.FakturaRRWiersz).map(
    (r) => (de(r.P_9) && (r.P_9._text = l.t(_n(de(r.P_9), "RR"))), { ...r })
  ), E = [
    {
      name: "NrWierszaFa",
      title: l.t("invoice.additionalInformation.ordinalNumber"),
      format: U.Default,
      width: "auto"
    }
  ], Y = [
    { name: "P_5", title: l.t("invoice.rows.name"), format: U.Default, width: "*" },
    { name: "P_6A", title: l.t("invoice.rows.unit"), format: U.Default, width: "auto" },
    { name: "P_6B", title: l.t("invoice.rows.amount"), format: U.Number, width: "auto" },
    { name: "P_6C", title: l.t("invoice.rows.qualityDesc"), format: U.Default, width: "auto" },
    { name: "P_7", title: l.t("invoice.rows.unitPrice"), format: U.Currency, width: "auto" },
    { name: "P_8", title: l.t("invoice.rows.priceNoZZP"), format: U.Currency, width: "auto" },
    { name: "P_9", title: l.t("invoice.rows.wageZZP"), format: U.Default, width: "auto" },
    { name: "P_10", title: l.t("invoice.rows.costZZP"), format: U.Currency, width: "auto" },
    { name: "P_11", title: l.t("invoice.rows.valueZZP"), format: U.Currency, width: "auto" }
  ];
  mn("KursWaluty", c).length !== 1 && Y.push({
    name: "KursWaluty",
    title: l.t("invoice.rows.currencyRate"),
    format: U.Currency6,
    width: "auto"
  }), Y.push({
    name: "StanPrzed",
    title: l.t("invoice.rows.stateBefore"),
    format: U.Boolean,
    width: "auto"
  });
  const X = [
    { name: "P_4AA", title: l.t("invoice.rows.getDate"), format: U.Date, width: "auto" },
    { name: "GTIN", title: l.t("invoice.rows.gtin"), format: U.Default, width: "auto" },
    { name: "PKWiU", title: l.t("invoice.rows.pkwiu"), format: U.Default, width: "auto" },
    { name: "CN", title: l.t("invoice.rows.cn"), format: U.Default, width: "auto" }
  ];
  let Q = ft(
    [...E, ...Y, ...X],
    c,
    "auto"
  );
  const B = {
    stack: [
      {
        stack: [
          Wt([
            {
              value: l.t("invoice.rows.farmProductCost")
            },
            {
              value: de(e.P_11_1),
              formatTyp: [U.Currency, U.Value],
              currency: de(e.KodWaluty)?.toString() ?? ""
            },
            de(e.KodWaluty)?.toString() === "PLN" ? { value: "" } : {
              value: ` (${ts(de(e.P_11_1W))} PLN)`,
              formatTyp: [U.Currency, U.Value, U.LabelMargin],
              currency: de(e.KodWaluty)?.toString() ?? ""
            }
          ])
        ],
        margin: [0, 0, 0, 8]
      },
      {
        stack: [
          Wt([
            {
              value: l.t("invoice.rows.lumpSumTaxRefund"),
              formatTyp: [U.LabelMargin, U.Label]
            },
            {
              value: de(e.P_11_2),
              formatTyp: [U.Currency, U.Value, U.LabelMargin],
              currency: de(e.KodWaluty)?.toString() ?? ""
            },
            de(e.KodWaluty)?.toString() === "PLN" ? { value: "" } : {
              value: ` (${ts(de(e.P_11_2W))} PLN)`,
              formatTyp: [U.Currency, U.Value, U.LabelMargin],
              currency: de(e.KodWaluty)?.toString() ?? ""
            }
          ])
        ],
        margin: [0, 0, 0, 8]
      },
      {
        stack: [
          Wt([
            {
              value: l.t("invoice.rows.overallCost"),
              formatTyp: [U.LabelGreater, U.LabelMargin]
            },
            {
              value: de(e.P_12_1),
              formatTyp: [U.Currency, U.ValueMedium, U.LabelMargin],
              currency: de(e.KodWaluty)?.toString() ?? ""
            },
            de(e.KodWaluty)?.toString() === "PLN" ? { value: "" } : {
              value: ` (${ts(de(e.P_12_1W))} PLN)`,
              formatTyp: [U.Currency, U.ValueMedium, U.LabelMargin]
            }
          ])
        ],
        margin: [0, 0, 0, 8]
      },
      Wt([
        { value: l.t("invoice.rows.inWords"), formatTyp: [U.LabelMargin, U.Label] },
        {
          value: de(e.P_12_2),
          formatTyp: [U.Value]
        }
      ])
    ],
    alignment: xt.RIGHT,
    margin: [0, 8, 0, 0]
  };
  return Q.fieldsWithValue.length <= 8 && Q.content ? n.push(Q.content) : (Q = ft([...E, ...Y], c, "*"), Q.content && n.push(Q.content), Q = ft([...E, ...X], c, "*"), Q.content && Q.fieldsWithValue.length > 1 && (n.push(`
`), n.push(Q.content))), n.length < 1 ? [] : Yt([...Ne(l.t("invoice.rows.header")), ...n, B], !0);
}
Yn.addVirtualFileSystem(Xs);
function bw(e, n) {
  const c = {
    ...Vs(n?.watermark),
    content: [
      ...Iw(e.FakturaRR, n),
      Js(e.FakturaRR),
      ...Yw(e),
      Pw(e.FakturaRR),
      vw(e.FakturaRR),
      Mw(e.FakturaRR),
      Ks(e.FakturaRR?.Rozliczenie, e.FakturaRR?.KodWaluty?._text ?? ""),
      yw(e.FakturaRR?.Platnosc),
      ...Ws(n, e.Stopka, e.Naglowek)
    ],
    footer: (E, Y) => ({
      text: `${E.toString()} ${l.t("invoice.footer.pagesTotal")} ${Y}`,
      alignment: xt.RIGHT,
      margin: [0, 0, 40, 0]
    }),
    ...rs()
  };
  return Yn.createPdf(c);
}
var Qa = {};
const zw = {}, Tw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: zw
}, Symbol.toStringTag, { value: "Module" })), Uw = /* @__PURE__ */ Ql(Tw);
var fB;
function Nw() {
  return fB || (fB = 1, (function(e) {
    (function(n) {
      n.parser = function(F, o) {
        return new E(F, o);
      }, n.SAXParser = E, n.SAXStream = D, n.createStream = A, n.MAX_BUFFER_LENGTH = 64 * 1024;
      var c = [
        "comment",
        "sgmlDecl",
        "textNode",
        "tagName",
        "doctype",
        "procInstName",
        "procInstBody",
        "entity",
        "attribName",
        "attribValue",
        "cdata",
        "script"
      ];
      n.EVENTS = [
        "text",
        "processinginstruction",
        "sgmldeclaration",
        "doctype",
        "comment",
        "opentagstart",
        "attribute",
        "opentag",
        "closetag",
        "opencdata",
        "cdata",
        "closecdata",
        "error",
        "end",
        "ready",
        "script",
        "opennamespace",
        "closenamespace"
      ];
      function E(F, o) {
        if (!(this instanceof E))
          return new E(F, o);
        var h = this;
        X(h), h.q = h.c = "", h.bufferCheckPosition = n.MAX_BUFFER_LENGTH, h.encoding = null, h.opt = o || {}, h.opt.lowercase = h.opt.lowercase || h.opt.lowercasetags, h.looseCase = h.opt.lowercase ? "toLowerCase" : "toUpperCase", h.opt.maxEntityCount = h.opt.maxEntityCount || 512, h.opt.maxEntityDepth = h.opt.maxEntityDepth || 4, h.entityCount = h.entityDepth = 0, h.tags = [], h.closed = h.closedRoot = h.sawRoot = !1, h.tag = h.error = null, h.strict = !!F, h.noscript = !!(F || h.opt.noscript), h.state = k.BEGIN, h.strictEntities = h.opt.strictEntities, h.ENTITIES = h.strictEntities ? Object.create(n.XML_ENTITIES) : Object.create(n.ENTITIES), h.attribList = [], h.opt.xmlns && (h.ns = Object.create(J)), h.opt.unquotedAttributeValues === void 0 && (h.opt.unquotedAttributeValues = !F), h.trackPosition = h.opt.position !== !1, h.trackPosition && (h.position = h.line = h.column = 0), lA(h, "onready");
      }
      Object.create || (Object.create = function(F) {
        function o() {
        }
        o.prototype = F;
        var h = new o();
        return h;
      }), Object.keys || (Object.keys = function(F) {
        var o = [];
        for (var h in F) F.hasOwnProperty(h) && o.push(h);
        return o;
      });
      function Y(F) {
        for (var o = Math.max(n.MAX_BUFFER_LENGTH, 10), h = 0, _ = 0, oA = c.length; _ < oA; _++) {
          var p = F[c[_]].length;
          if (p > o)
            switch (c[_]) {
              case "textNode":
                $(F);
                break;
              case "cdata":
                DA(F, "oncdata", F.cdata), F.cdata = "";
                break;
              case "script":
                DA(F, "onscript", F.script), F.script = "";
                break;
              default:
                Ae(F, "Max buffer length exceeded: " + c[_]);
            }
          h = Math.max(h, p);
        }
        var rA = n.MAX_BUFFER_LENGTH - h;
        F.bufferCheckPosition = rA + F.position;
      }
      function X(F) {
        for (var o = 0, h = c.length; o < h; o++)
          F[c[o]] = "";
      }
      function Q(F) {
        $(F), F.cdata !== "" && (DA(F, "oncdata", F.cdata), F.cdata = ""), F.script !== "" && (DA(F, "onscript", F.script), F.script = "");
      }
      E.prototype = {
        end: function() {
          kA(this);
        },
        write: sA,
        resume: function() {
          return this.error = null, this;
        },
        close: function() {
          return this.write(null);
        },
        flush: function() {
          Q(this);
        }
      };
      var B;
      try {
        B = Uw.Stream;
      } catch {
        B = function() {
        };
      }
      B || (B = function() {
      });
      var r = n.EVENTS.filter(function(F) {
        return F !== "error" && F !== "end";
      });
      function A(F, o) {
        return new D(F, o);
      }
      function a(F, o) {
        if (F.length >= 2) {
          if (F[0] === 255 && F[1] === 254)
            return "utf-16le";
          if (F[0] === 254 && F[1] === 255)
            return "utf-16be";
        }
        return F.length >= 3 && F[0] === 239 && F[1] === 187 && F[2] === 191 ? "utf8" : F.length >= 4 ? F[0] === 60 && F[1] === 0 && F[2] === 63 && F[3] === 0 ? "utf-16le" : F[0] === 0 && F[1] === 60 && F[2] === 0 && F[3] === 63 ? "utf-16be" : "utf8" : o ? "utf8" : null;
      }
      function D(F, o) {
        if (!(this instanceof D))
          return new D(F, o);
        B.apply(this), this._parser = new E(F, o), this.writable = !0, this.readable = !0;
        var h = this;
        this._parser.onend = function() {
          h.emit("end");
        }, this._parser.onerror = function(_) {
          h.emit("error", _), h._parser.error = null;
        }, this._decoder = null, this._decoderBuffer = null, r.forEach(function(_) {
          Object.defineProperty(h, "on" + _, {
            get: function() {
              return h._parser["on" + _];
            },
            set: function(oA) {
              if (!oA)
                return h.removeAllListeners(_), h._parser["on" + _] = oA, oA;
              h.on(_, oA);
            },
            enumerable: !0,
            configurable: !1
          });
        });
      }
      D.prototype = Object.create(B.prototype, {
        constructor: {
          value: D
        }
      }), D.prototype._decodeBuffer = function(F, o) {
        if (this._decoderBuffer && (F = Buffer.concat([this._decoderBuffer, F]), this._decoderBuffer = null), !this._decoder) {
          var h = a(F, o);
          if (!h)
            return this._decoderBuffer = F, "";
          this._parser.encoding = h, this._decoder = new TextDecoder(h);
        }
        return this._decoder.decode(F, { stream: !o });
      }, D.prototype.write = function(F) {
        if (typeof Buffer == "function" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(F))
          F = this._decodeBuffer(F, !1);
        else if (this._decoderBuffer) {
          var o = this._decodeBuffer(Buffer.alloc(0), !0);
          o && (this._parser.write(o), this.emit("data", o));
        }
        return this._parser.write(F.toString()), this.emit("data", F), !0;
      }, D.prototype.end = function(F) {
        if (F && F.length && this.write(F), this._decoderBuffer) {
          var o = this._decodeBuffer(Buffer.alloc(0), !0);
          o && (this._parser.write(o), this.emit("data", o));
        } else if (this._decoder) {
          var h = this._decoder.decode();
          h && (this._parser.write(h), this.emit("data", h));
        }
        return this._parser.end(), !0;
      }, D.prototype.on = function(F, o) {
        var h = this;
        return !h._parser["on" + F] && r.indexOf(F) !== -1 && (h._parser["on" + F] = function() {
          var _ = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
          _.splice(0, 0, F), h.emit.apply(h, _);
        }), B.prototype.on.call(h, F, o);
      };
      var x = "[CDATA[", N = "DOCTYPE", P = "http://www.w3.org/XML/1998/namespace", d = "http://www.w3.org/2000/xmlns/", J = { xml: P, xmlns: d }, q = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, AA = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, K = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, z = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
      function T(F) {
        return F === " " || F === `
` || F === "\r" || F === "	";
      }
      function H(F) {
        return F === '"' || F === "'";
      }
      function eA(F) {
        return F === ">" || T(F);
      }
      function CA(F, o) {
        return F.test(o);
      }
      function IA(F, o) {
        return !CA(F, o);
      }
      var k = 0;
      n.STATE = {
        BEGIN: k++,
        // leading byte order mark or whitespace
        BEGIN_WHITESPACE: k++,
        // leading whitespace
        TEXT: k++,
        // general stuff
        TEXT_ENTITY: k++,
        // &amp and such.
        OPEN_WAKA: k++,
        // <
        SGML_DECL: k++,
        // <!BLARG
        SGML_DECL_QUOTED: k++,
        // <!BLARG foo "bar
        DOCTYPE: k++,
        // <!DOCTYPE
        DOCTYPE_QUOTED: k++,
        // <!DOCTYPE "//blah
        DOCTYPE_DTD: k++,
        // <!DOCTYPE "//blah" [ ...
        DOCTYPE_DTD_QUOTED: k++,
        // <!DOCTYPE "//blah" [ "foo
        COMMENT_STARTING: k++,
        // <!-
        COMMENT: k++,
        // <!--
        COMMENT_ENDING: k++,
        // <!-- blah -
        COMMENT_ENDED: k++,
        // <!-- blah --
        CDATA: k++,
        // <![CDATA[ something
        CDATA_ENDING: k++,
        // ]
        CDATA_ENDING_2: k++,
        // ]]
        PROC_INST: k++,
        // <?hi
        PROC_INST_BODY: k++,
        // <?hi there
        PROC_INST_ENDING: k++,
        // <?hi "there" ?
        OPEN_TAG: k++,
        // <strong
        OPEN_TAG_SLASH: k++,
        // <strong /
        ATTRIB: k++,
        // <a
        ATTRIB_NAME: k++,
        // <a foo
        ATTRIB_NAME_SAW_WHITE: k++,
        // <a foo _
        ATTRIB_VALUE: k++,
        // <a foo=
        ATTRIB_VALUE_QUOTED: k++,
        // <a foo="bar
        ATTRIB_VALUE_CLOSED: k++,
        // <a foo="bar"
        ATTRIB_VALUE_UNQUOTED: k++,
        // <a foo=bar
        ATTRIB_VALUE_ENTITY_Q: k++,
        // <foo bar="&quot;"
        ATTRIB_VALUE_ENTITY_U: k++,
        // <foo bar=&quot
        CLOSE_TAG: k++,
        // </a
        CLOSE_TAG_SAW_WHITE: k++,
        // </a   >
        SCRIPT: k++,
        // <script> ...
        SCRIPT_ENDING: k++
        // <script> ... <
      }, n.XML_ENTITIES = {
        amp: "&",
        gt: ">",
        lt: "<",
        quot: '"',
        apos: "'"
      }, n.ENTITIES = {
        amp: "&",
        gt: ">",
        lt: "<",
        quot: '"',
        apos: "'",
        AElig: 198,
        Aacute: 193,
        Acirc: 194,
        Agrave: 192,
        Aring: 197,
        Atilde: 195,
        Auml: 196,
        Ccedil: 199,
        ETH: 208,
        Eacute: 201,
        Ecirc: 202,
        Egrave: 200,
        Euml: 203,
        Iacute: 205,
        Icirc: 206,
        Igrave: 204,
        Iuml: 207,
        Ntilde: 209,
        Oacute: 211,
        Ocirc: 212,
        Ograve: 210,
        Oslash: 216,
        Otilde: 213,
        Ouml: 214,
        THORN: 222,
        Uacute: 218,
        Ucirc: 219,
        Ugrave: 217,
        Uuml: 220,
        Yacute: 221,
        aacute: 225,
        acirc: 226,
        aelig: 230,
        agrave: 224,
        aring: 229,
        atilde: 227,
        auml: 228,
        ccedil: 231,
        eacute: 233,
        ecirc: 234,
        egrave: 232,
        eth: 240,
        euml: 235,
        iacute: 237,
        icirc: 238,
        igrave: 236,
        iuml: 239,
        ntilde: 241,
        oacute: 243,
        ocirc: 244,
        ograve: 242,
        oslash: 248,
        otilde: 245,
        ouml: 246,
        szlig: 223,
        thorn: 254,
        uacute: 250,
        ucirc: 251,
        ugrave: 249,
        uuml: 252,
        yacute: 253,
        yuml: 255,
        copy: 169,
        reg: 174,
        nbsp: 160,
        iexcl: 161,
        cent: 162,
        pound: 163,
        curren: 164,
        yen: 165,
        brvbar: 166,
        sect: 167,
        uml: 168,
        ordf: 170,
        laquo: 171,
        not: 172,
        shy: 173,
        macr: 175,
        deg: 176,
        plusmn: 177,
        sup1: 185,
        sup2: 178,
        sup3: 179,
        acute: 180,
        micro: 181,
        para: 182,
        middot: 183,
        cedil: 184,
        ordm: 186,
        raquo: 187,
        frac14: 188,
        frac12: 189,
        frac34: 190,
        iquest: 191,
        times: 215,
        divide: 247,
        OElig: 338,
        oelig: 339,
        Scaron: 352,
        scaron: 353,
        Yuml: 376,
        fnof: 402,
        circ: 710,
        tilde: 732,
        Alpha: 913,
        Beta: 914,
        Gamma: 915,
        Delta: 916,
        Epsilon: 917,
        Zeta: 918,
        Eta: 919,
        Theta: 920,
        Iota: 921,
        Kappa: 922,
        Lambda: 923,
        Mu: 924,
        Nu: 925,
        Xi: 926,
        Omicron: 927,
        Pi: 928,
        Rho: 929,
        Sigma: 931,
        Tau: 932,
        Upsilon: 933,
        Phi: 934,
        Chi: 935,
        Psi: 936,
        Omega: 937,
        alpha: 945,
        beta: 946,
        gamma: 947,
        delta: 948,
        epsilon: 949,
        zeta: 950,
        eta: 951,
        theta: 952,
        iota: 953,
        kappa: 954,
        lambda: 955,
        mu: 956,
        nu: 957,
        xi: 958,
        omicron: 959,
        pi: 960,
        rho: 961,
        sigmaf: 962,
        sigma: 963,
        tau: 964,
        upsilon: 965,
        phi: 966,
        chi: 967,
        psi: 968,
        omega: 969,
        thetasym: 977,
        upsih: 978,
        piv: 982,
        ensp: 8194,
        emsp: 8195,
        thinsp: 8201,
        zwnj: 8204,
        zwj: 8205,
        lrm: 8206,
        rlm: 8207,
        ndash: 8211,
        mdash: 8212,
        lsquo: 8216,
        rsquo: 8217,
        sbquo: 8218,
        ldquo: 8220,
        rdquo: 8221,
        bdquo: 8222,
        dagger: 8224,
        Dagger: 8225,
        bull: 8226,
        hellip: 8230,
        permil: 8240,
        prime: 8242,
        Prime: 8243,
        lsaquo: 8249,
        rsaquo: 8250,
        oline: 8254,
        frasl: 8260,
        euro: 8364,
        image: 8465,
        weierp: 8472,
        real: 8476,
        trade: 8482,
        alefsym: 8501,
        larr: 8592,
        uarr: 8593,
        rarr: 8594,
        darr: 8595,
        harr: 8596,
        crarr: 8629,
        lArr: 8656,
        uArr: 8657,
        rArr: 8658,
        dArr: 8659,
        hArr: 8660,
        forall: 8704,
        part: 8706,
        exist: 8707,
        empty: 8709,
        nabla: 8711,
        isin: 8712,
        notin: 8713,
        ni: 8715,
        prod: 8719,
        sum: 8721,
        minus: 8722,
        lowast: 8727,
        radic: 8730,
        prop: 8733,
        infin: 8734,
        ang: 8736,
        and: 8743,
        or: 8744,
        cap: 8745,
        cup: 8746,
        int: 8747,
        there4: 8756,
        sim: 8764,
        cong: 8773,
        asymp: 8776,
        ne: 8800,
        equiv: 8801,
        le: 8804,
        ge: 8805,
        sub: 8834,
        sup: 8835,
        nsub: 8836,
        sube: 8838,
        supe: 8839,
        oplus: 8853,
        otimes: 8855,
        perp: 8869,
        sdot: 8901,
        lceil: 8968,
        rceil: 8969,
        lfloor: 8970,
        rfloor: 8971,
        lang: 9001,
        rang: 9002,
        loz: 9674,
        spades: 9824,
        clubs: 9827,
        hearts: 9829,
        diams: 9830
      }, Object.keys(n.ENTITIES).forEach(function(F) {
        var o = n.ENTITIES[F], h = typeof o == "number" ? String.fromCharCode(o) : o;
        n.ENTITIES[F] = h;
      });
      for (var tA in n.STATE)
        n.STATE[n.STATE[tA]] = tA;
      k = n.STATE;
      function lA(F, o, h) {
        F[o] && F[o](h);
      }
      function uA(F) {
        var o = F && F.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
        return o ? o[2] : null;
      }
      function w(F) {
        return F ? F.toLowerCase().replace(/[^a-z0-9]/g, "") : null;
      }
      function v(F, o) {
        const h = w(F), _ = w(o);
        return !h || !_ ? !0 : _ === "utf16" ? h === "utf16le" || h === "utf16be" : h === _;
      }
      function RA(F, o) {
        if (!(!F.strict || !F.encoding || !o || o.name !== "xml")) {
          var h = uA(o.body);
          h && !v(F.encoding, h) && VA(
            F,
            "XML declaration encoding " + h + " does not match detected stream encoding " + F.encoding.toUpperCase()
          );
        }
      }
      function DA(F, o, h) {
        F.textNode && $(F), lA(F, o, h);
      }
      function $(F) {
        F.textNode = cA(F.opt, F.textNode), F.textNode && lA(F, "ontext", F.textNode), F.textNode = "";
      }
      function cA(F, o) {
        return F.trim && (o = o.trim()), F.normalize && (o = o.replace(/\s+/g, " ")), o;
      }
      function Ae(F, o) {
        return $(F), F.trackPosition && (o += `
Line: ` + F.line + `
Column: ` + F.column + `
Char: ` + F.c), o = new Error(o), F.error = o, lA(F, "onerror", o), F;
      }
      function kA(F) {
        return F.sawRoot && !F.closedRoot && VA(F, "Unclosed root tag"), F.state !== k.BEGIN && F.state !== k.BEGIN_WHITESPACE && F.state !== k.TEXT && Ae(F, "Unexpected end"), $(F), F.c = "", F.closed = !0, lA(F, "onend"), E.call(F, F.strict, F.opt), F;
      }
      function VA(F, o) {
        if (typeof F != "object" || !(F instanceof E))
          throw new Error("bad call to strictFail");
        F.strict && Ae(F, o);
      }
      function EA(F) {
        F.strict || (F.tagName = F.tagName[F.looseCase]());
        var o = F.tags[F.tags.length - 1] || F, h = F.tag = { name: F.tagName, attributes: {} };
        F.opt.xmlns && (h.ns = o.ns), F.attribList.length = 0, DA(F, "onopentagstart", h);
      }
      function zA(F, o) {
        var h = F.indexOf(":"), _ = h < 0 ? ["", F] : F.split(":"), oA = _[0], p = _[1];
        return o && F === "xmlns" && (oA = "xmlns", p = ""), { prefix: oA, local: p };
      }
      function OA(F) {
        if (F.strict || (F.attribName = F.attribName[F.looseCase]()), F.attribList.indexOf(F.attribName) !== -1 || F.tag.attributes.hasOwnProperty(F.attribName)) {
          F.attribName = F.attribValue = "";
          return;
        }
        if (F.opt.xmlns) {
          var o = zA(F.attribName, !0), h = o.prefix, _ = o.local;
          if (h === "xmlns")
            if (_ === "xml" && F.attribValue !== P)
              VA(
                F,
                "xml: prefix must be bound to " + P + `
Actual: ` + F.attribValue
              );
            else if (_ === "xmlns" && F.attribValue !== d)
              VA(
                F,
                "xmlns: prefix must be bound to " + d + `
Actual: ` + F.attribValue
              );
            else {
              var oA = F.tag, p = F.tags[F.tags.length - 1] || F;
              oA.ns === p.ns && (oA.ns = Object.create(p.ns)), oA.ns[_] = F.attribValue;
            }
          F.attribList.push([F.attribName, F.attribValue]);
        } else
          F.tag.attributes[F.attribName] = F.attribValue, DA(F, "onattribute", {
            name: F.attribName,
            value: F.attribValue
          });
        F.attribName = F.attribValue = "";
      }
      function xA(F, o) {
        if (F.opt.xmlns) {
          var h = F.tag, _ = zA(F.tagName);
          h.prefix = _.prefix, h.local = _.local, h.uri = h.ns[_.prefix] || "", h.prefix && !h.uri && (VA(
            F,
            "Unbound namespace prefix: " + JSON.stringify(F.tagName)
          ), h.uri = _.prefix);
          var oA = F.tags[F.tags.length - 1] || F;
          h.ns && oA.ns !== h.ns && Object.keys(h.ns).forEach(function(KA) {
            DA(F, "onopennamespace", {
              prefix: KA,
              uri: h.ns[KA]
            });
          });
          for (var p = 0, rA = F.attribList.length; p < rA; p++) {
            var QA = F.attribList[p], bA = QA[0], y = QA[1], M = zA(bA, !0), FA = M.prefix, dA = M.local, he = FA === "" ? "" : h.ns[FA] || "", ie = {
              name: bA,
              value: y,
              prefix: FA,
              local: dA,
              uri: he
            };
            FA && FA !== "xmlns" && !he && (VA(
              F,
              "Unbound namespace prefix: " + JSON.stringify(FA)
            ), ie.uri = FA), F.tag.attributes[bA] = ie, DA(F, "onattribute", ie);
          }
          F.attribList.length = 0;
        }
        F.tag.isSelfClosing = !!o, F.sawRoot = !0, F.tags.push(F.tag), DA(F, "onopentag", F.tag), o || (!F.noscript && F.tagName.toLowerCase() === "script" ? F.state = k.SCRIPT : F.state = k.TEXT, F.tag = null, F.tagName = ""), F.attribName = F.attribValue = "", F.attribList.length = 0;
      }
      function LA(F) {
        if (!F.tagName) {
          VA(F, "Weird empty close tag."), F.textNode += "</>", F.state = k.TEXT;
          return;
        }
        if (F.script) {
          if (F.tagName !== "script") {
            F.script += "</" + F.tagName + ">", F.tagName = "", F.state = k.SCRIPT;
            return;
          }
          DA(F, "onscript", F.script), F.script = "";
        }
        var o = F.tags.length, h = F.tagName;
        F.strict || (h = h[F.looseCase]());
        for (var _ = h; o--; ) {
          var oA = F.tags[o];
          if (oA.name !== _)
            VA(F, "Unexpected close tag");
          else
            break;
        }
        if (o < 0) {
          VA(F, "Unmatched closing tag: " + F.tagName), F.textNode += "</" + F.tagName + ">", F.state = k.TEXT;
          return;
        }
        F.tagName = h;
        for (var p = F.tags.length; p-- > o; ) {
          var rA = F.tag = F.tags.pop();
          F.tagName = F.tag.name, DA(F, "onclosetag", F.tagName);
          var QA = {};
          for (var bA in rA.ns)
            QA[bA] = rA.ns[bA];
          var y = F.tags[F.tags.length - 1] || F;
          F.opt.xmlns && rA.ns !== y.ns && Object.keys(rA.ns).forEach(function(M) {
            var FA = rA.ns[M];
            DA(F, "onclosenamespace", { prefix: M, uri: FA });
          });
        }
        o === 0 && (F.closedRoot = !0), F.tagName = F.attribValue = F.attribName = "", F.attribList.length = 0, F.state = k.TEXT;
      }
      function yA(F) {
        var o = F.entity, h = o.toLowerCase(), _, oA = "";
        return F.ENTITIES[o] ? F.ENTITIES[o] : F.ENTITIES[h] ? F.ENTITIES[h] : (o = h, o.charAt(0) === "#" && (o.charAt(1) === "x" ? (o = o.slice(2), _ = parseInt(o, 16), oA = _.toString(16)) : (o = o.slice(1), _ = parseInt(o, 10), oA = _.toString(10))), o = o.replace(/^0+/, ""), isNaN(_) || oA.toLowerCase() !== o || _ < 0 || _ > 1114111 ? (VA(F, "Invalid character entity"), "&" + F.entity + ";") : String.fromCodePoint(_));
      }
      function TA(F, o) {
        o === "<" ? (F.state = k.OPEN_WAKA, F.startTagPosition = F.position) : T(o) || (VA(F, "Non-whitespace before first tag."), F.textNode = o, F.state = k.TEXT);
      }
      function fA(F, o) {
        var h = "";
        return o < F.length && (h = F.charAt(o)), h;
      }
      function sA(F) {
        var o = this;
        if (this.error)
          throw this.error;
        if (o.closed)
          return Ae(
            o,
            "Cannot write after close. Assign an onready handler."
          );
        if (F === null)
          return kA(o);
        typeof F == "object" && (F = F.toString());
        for (var h = 0, _ = ""; _ = fA(F, h++), o.c = _, !!_; )
          switch (o.trackPosition && (o.position++, _ === `
` ? (o.line++, o.column = 0) : o.column++), o.state) {
            case k.BEGIN:
              if (o.state = k.BEGIN_WHITESPACE, _ === "\uFEFF")
                continue;
              TA(o, _);
              continue;
            case k.BEGIN_WHITESPACE:
              TA(o, _);
              continue;
            case k.TEXT:
              if (o.sawRoot && !o.closedRoot) {
                for (var p = h - 1; _ && _ !== "<" && _ !== "&"; )
                  _ = fA(F, h++), _ && o.trackPosition && (o.position++, _ === `
` ? (o.line++, o.column = 0) : o.column++);
                o.textNode += F.substring(p, h - 1);
              }
              _ === "<" && !(o.sawRoot && o.closedRoot && !o.strict) ? (o.state = k.OPEN_WAKA, o.startTagPosition = o.position) : (!T(_) && (!o.sawRoot || o.closedRoot) && VA(o, "Text data outside of root node."), _ === "&" ? o.state = k.TEXT_ENTITY : o.textNode += _);
              continue;
            case k.SCRIPT:
              _ === "<" ? o.state = k.SCRIPT_ENDING : o.script += _;
              continue;
            case k.SCRIPT_ENDING:
              _ === "/" ? o.state = k.CLOSE_TAG : (o.script += "<" + _, o.state = k.SCRIPT);
              continue;
            case k.OPEN_WAKA:
              if (_ === "!")
                o.state = k.SGML_DECL, o.sgmlDecl = "";
              else if (!T(_)) if (CA(q, _))
                o.state = k.OPEN_TAG, o.tagName = _;
              else if (_ === "/")
                o.state = k.CLOSE_TAG, o.tagName = "";
              else if (_ === "?")
                o.state = k.PROC_INST, o.procInstName = o.procInstBody = "";
              else {
                if (VA(o, "Unencoded <"), o.startTagPosition + 1 < o.position) {
                  var oA = o.position - o.startTagPosition;
                  _ = new Array(oA).join(" ") + _;
                }
                o.textNode += "<" + _, o.state = k.TEXT;
              }
              continue;
            case k.SGML_DECL:
              if (o.sgmlDecl + _ === "--") {
                o.state = k.COMMENT, o.comment = "", o.sgmlDecl = "";
                continue;
              }
              o.doctype && o.doctype !== !0 && o.sgmlDecl ? (o.state = k.DOCTYPE_DTD, o.doctype += "<!" + o.sgmlDecl + _, o.sgmlDecl = "") : (o.sgmlDecl + _).toUpperCase() === x ? (DA(o, "onopencdata"), o.state = k.CDATA, o.sgmlDecl = "", o.cdata = "") : (o.sgmlDecl + _).toUpperCase() === N ? (o.state = k.DOCTYPE, (o.doctype || o.sawRoot) && VA(
                o,
                "Inappropriately located doctype declaration"
              ), o.doctype = "", o.sgmlDecl = "") : _ === ">" ? (DA(o, "onsgmldeclaration", o.sgmlDecl), o.sgmlDecl = "", o.state = k.TEXT) : (H(_) && (o.state = k.SGML_DECL_QUOTED), o.sgmlDecl += _);
              continue;
            case k.SGML_DECL_QUOTED:
              _ === o.q && (o.state = k.SGML_DECL, o.q = ""), o.sgmlDecl += _;
              continue;
            case k.DOCTYPE:
              _ === ">" ? (o.state = k.TEXT, DA(o, "ondoctype", o.doctype), o.doctype = !0) : (o.doctype += _, _ === "[" ? o.state = k.DOCTYPE_DTD : H(_) && (o.state = k.DOCTYPE_QUOTED, o.q = _));
              continue;
            case k.DOCTYPE_QUOTED:
              o.doctype += _, _ === o.q && (o.q = "", o.state = k.DOCTYPE);
              continue;
            case k.DOCTYPE_DTD:
              _ === "]" ? (o.doctype += _, o.state = k.DOCTYPE) : _ === "<" ? (o.state = k.OPEN_WAKA, o.startTagPosition = o.position) : H(_) ? (o.doctype += _, o.state = k.DOCTYPE_DTD_QUOTED, o.q = _) : o.doctype += _;
              continue;
            case k.DOCTYPE_DTD_QUOTED:
              o.doctype += _, _ === o.q && (o.state = k.DOCTYPE_DTD, o.q = "");
              continue;
            case k.COMMENT:
              _ === "-" ? o.state = k.COMMENT_ENDING : o.comment += _;
              continue;
            case k.COMMENT_ENDING:
              _ === "-" ? (o.state = k.COMMENT_ENDED, o.comment = cA(o.opt, o.comment), o.comment && DA(o, "oncomment", o.comment), o.comment = "") : (o.comment += "-" + _, o.state = k.COMMENT);
              continue;
            case k.COMMENT_ENDED:
              _ !== ">" ? (VA(o, "Malformed comment"), o.comment += "--" + _, o.state = k.COMMENT) : o.doctype && o.doctype !== !0 ? o.state = k.DOCTYPE_DTD : o.state = k.TEXT;
              continue;
            case k.CDATA:
              for (var p = h - 1; _ && _ !== "]"; )
                _ = fA(F, h++), _ && o.trackPosition && (o.position++, _ === `
` ? (o.line++, o.column = 0) : o.column++);
              o.cdata += F.substring(p, h - 1), _ === "]" && (o.state = k.CDATA_ENDING);
              continue;
            case k.CDATA_ENDING:
              _ === "]" ? o.state = k.CDATA_ENDING_2 : (o.cdata += "]" + _, o.state = k.CDATA);
              continue;
            case k.CDATA_ENDING_2:
              _ === ">" ? (o.cdata && DA(o, "oncdata", o.cdata), DA(o, "onclosecdata"), o.cdata = "", o.state = k.TEXT) : _ === "]" ? o.cdata += "]" : (o.cdata += "]]" + _, o.state = k.CDATA);
              continue;
            case k.PROC_INST:
              _ === "?" ? o.state = k.PROC_INST_ENDING : T(_) ? o.state = k.PROC_INST_BODY : o.procInstName += _;
              continue;
            case k.PROC_INST_BODY:
              if (!o.procInstBody && T(_))
                continue;
              _ === "?" ? o.state = k.PROC_INST_ENDING : o.procInstBody += _;
              continue;
            case k.PROC_INST_ENDING:
              if (_ === ">") {
                const y = {
                  name: o.procInstName,
                  body: o.procInstBody
                };
                RA(o, y), DA(o, "onprocessinginstruction", y), o.procInstName = o.procInstBody = "", o.state = k.TEXT;
              } else
                o.procInstBody += "?" + _, o.state = k.PROC_INST_BODY;
              continue;
            case k.OPEN_TAG:
              CA(AA, _) ? o.tagName += _ : (EA(o), _ === ">" ? xA(o) : _ === "/" ? o.state = k.OPEN_TAG_SLASH : (T(_) || VA(o, "Invalid character in tag name"), o.state = k.ATTRIB));
              continue;
            case k.OPEN_TAG_SLASH:
              _ === ">" ? (xA(o, !0), LA(o)) : (VA(
                o,
                "Forward-slash in opening tag not followed by >"
              ), o.state = k.ATTRIB);
              continue;
            case k.ATTRIB:
              if (T(_))
                continue;
              _ === ">" ? xA(o) : _ === "/" ? o.state = k.OPEN_TAG_SLASH : CA(q, _) ? (o.attribName = _, o.attribValue = "", o.state = k.ATTRIB_NAME) : VA(o, "Invalid attribute name");
              continue;
            case k.ATTRIB_NAME:
              _ === "=" ? o.state = k.ATTRIB_VALUE : _ === ">" ? (VA(o, "Attribute without value"), o.attribValue = o.attribName, OA(o), xA(o)) : T(_) ? o.state = k.ATTRIB_NAME_SAW_WHITE : CA(AA, _) ? o.attribName += _ : VA(o, "Invalid attribute name");
              continue;
            case k.ATTRIB_NAME_SAW_WHITE:
              if (_ === "=")
                o.state = k.ATTRIB_VALUE;
              else {
                if (T(_))
                  continue;
                VA(o, "Attribute without value"), o.tag.attributes[o.attribName] = "", o.attribValue = "", DA(o, "onattribute", {
                  name: o.attribName,
                  value: ""
                }), o.attribName = "", _ === ">" ? xA(o) : CA(q, _) ? (o.attribName = _, o.state = k.ATTRIB_NAME) : (VA(o, "Invalid attribute name"), o.state = k.ATTRIB);
              }
              continue;
            case k.ATTRIB_VALUE:
              if (T(_))
                continue;
              H(_) ? (o.q = _, o.state = k.ATTRIB_VALUE_QUOTED) : (o.opt.unquotedAttributeValues || Ae(o, "Unquoted attribute value"), o.state = k.ATTRIB_VALUE_UNQUOTED, o.attribValue = _);
              continue;
            case k.ATTRIB_VALUE_QUOTED:
              if (_ !== o.q) {
                _ === "&" ? o.state = k.ATTRIB_VALUE_ENTITY_Q : o.attribValue += _;
                continue;
              }
              OA(o), o.q = "", o.state = k.ATTRIB_VALUE_CLOSED;
              continue;
            case k.ATTRIB_VALUE_CLOSED:
              T(_) ? o.state = k.ATTRIB : _ === ">" ? xA(o) : _ === "/" ? o.state = k.OPEN_TAG_SLASH : CA(q, _) ? (VA(o, "No whitespace between attributes"), o.attribName = _, o.attribValue = "", o.state = k.ATTRIB_NAME) : VA(o, "Invalid attribute name");
              continue;
            case k.ATTRIB_VALUE_UNQUOTED:
              if (!eA(_)) {
                _ === "&" ? o.state = k.ATTRIB_VALUE_ENTITY_U : o.attribValue += _;
                continue;
              }
              OA(o), _ === ">" ? xA(o) : o.state = k.ATTRIB;
              continue;
            case k.CLOSE_TAG:
              if (o.tagName)
                _ === ">" ? LA(o) : CA(AA, _) ? o.tagName += _ : o.script ? (o.script += "</" + o.tagName + _, o.tagName = "", o.state = k.SCRIPT) : (T(_) || VA(o, "Invalid tagname in closing tag"), o.state = k.CLOSE_TAG_SAW_WHITE);
              else {
                if (T(_))
                  continue;
                IA(q, _) ? o.script ? (o.script += "</" + _, o.state = k.SCRIPT) : VA(o, "Invalid tagname in closing tag.") : o.tagName = _;
              }
              continue;
            case k.CLOSE_TAG_SAW_WHITE:
              if (T(_))
                continue;
              _ === ">" ? LA(o) : VA(o, "Invalid characters in closing tag");
              continue;
            case k.TEXT_ENTITY:
            case k.ATTRIB_VALUE_ENTITY_Q:
            case k.ATTRIB_VALUE_ENTITY_U:
              var rA, QA;
              switch (o.state) {
                case k.TEXT_ENTITY:
                  rA = k.TEXT, QA = "textNode";
                  break;
                case k.ATTRIB_VALUE_ENTITY_Q:
                  rA = k.ATTRIB_VALUE_QUOTED, QA = "attribValue";
                  break;
                case k.ATTRIB_VALUE_ENTITY_U:
                  rA = k.ATTRIB_VALUE_UNQUOTED, QA = "attribValue";
                  break;
              }
              if (_ === ";") {
                var bA = yA(o);
                o.opt.unparsedEntities && !Object.values(n.XML_ENTITIES).includes(bA) ? ((o.entityCount += 1) > o.opt.maxEntityCount && Ae(
                  o,
                  "Parsed entity count exceeds max entity count"
                ), (o.entityDepth += 1) > o.opt.maxEntityDepth && Ae(
                  o,
                  "Parsed entity depth exceeds max entity depth"
                ), o.entity = "", o.state = rA, o.write(bA), o.entityDepth -= 1) : (o[QA] += bA, o.entity = "", o.state = rA);
              } else CA(o.entity.length ? z : K, _) ? o.entity += _ : (VA(o, "Invalid character in entity name"), o[QA] += "&" + o.entity + _, o.entity = "", o.state = rA);
              continue;
            default:
              throw new Error(o, "Unknown state: " + o.state);
          }
        return o.position >= o.bufferCheckPosition && Y(o), o;
      }
      /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
      String.fromCodePoint || (function() {
        var F = String.fromCharCode, o = Math.floor, h = function() {
          var _ = 16384, oA = [], p, rA, QA = -1, bA = arguments.length;
          if (!bA)
            return "";
          for (var y = ""; ++QA < bA; ) {
            var M = Number(arguments[QA]);
            if (!isFinite(M) || // `NaN`, `+Infinity`, or `-Infinity`
            M < 0 || // not a valid Unicode code point
            M > 1114111 || // not a valid Unicode code point
            o(M) !== M)
              throw RangeError("Invalid code point: " + M);
            M <= 65535 ? oA.push(M) : (M -= 65536, p = (M >> 10) + 55296, rA = M % 1024 + 56320, oA.push(p, rA)), (QA + 1 === bA || oA.length > _) && (y += F.apply(null, oA), oA.length = 0);
          }
          return y;
        };
        Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
          value: h,
          configurable: !0,
          writable: !0
        }) : String.fromCodePoint = h;
      })();
    })(e);
  })(Qa)), Qa;
}
var ha, QB;
function Sa() {
  return QB || (QB = 1, ha = {
    isArray: function(e) {
      return Array.isArray ? Array.isArray(e) : Object.prototype.toString.call(e) === "[object Array]";
    }
  }), ha;
}
var Ca, hB;
function Ga() {
  if (hB) return Ca;
  hB = 1;
  var e = Sa().isArray;
  return Ca = {
    copyOptions: function(n) {
      var c, E = {};
      for (c in n)
        n.hasOwnProperty(c) && (E[c] = n[c]);
      return E;
    },
    ensureFlagExists: function(n, c) {
      (!(n in c) || typeof c[n] != "boolean") && (c[n] = !1);
    },
    ensureSpacesExists: function(n) {
      (!("spaces" in n) || typeof n.spaces != "number" && typeof n.spaces != "string") && (n.spaces = 0);
    },
    ensureAlwaysArrayExists: function(n) {
      (!("alwaysArray" in n) || typeof n.alwaysArray != "boolean" && !e(n.alwaysArray)) && (n.alwaysArray = !1);
    },
    ensureKeyExists: function(n, c) {
      (!(n + "Key" in c) || typeof c[n + "Key"] != "string") && (c[n + "Key"] = c.compact ? "_" + n : n);
    },
    checkFnExists: function(n, c) {
      return n + "Fn" in c;
    }
  }, Ca;
}
var Ma, CB;
function NB() {
  if (CB) return Ma;
  CB = 1;
  var e = Nw(), n = Ga(), c = Sa().isArray, E, Y;
  function X(q) {
    return E = n.copyOptions(q), n.ensureFlagExists("ignoreDeclaration", E), n.ensureFlagExists("ignoreInstruction", E), n.ensureFlagExists("ignoreAttributes", E), n.ensureFlagExists("ignoreText", E), n.ensureFlagExists("ignoreComment", E), n.ensureFlagExists("ignoreCdata", E), n.ensureFlagExists("ignoreDoctype", E), n.ensureFlagExists("compact", E), n.ensureFlagExists("alwaysChildren", E), n.ensureFlagExists("addParent", E), n.ensureFlagExists("trim", E), n.ensureFlagExists("nativeType", E), n.ensureFlagExists("nativeTypeAttributes", E), n.ensureFlagExists("sanitize", E), n.ensureFlagExists("instructionHasAttributes", E), n.ensureFlagExists("captureSpacesBetweenElements", E), n.ensureAlwaysArrayExists(E), n.ensureKeyExists("declaration", E), n.ensureKeyExists("instruction", E), n.ensureKeyExists("attributes", E), n.ensureKeyExists("text", E), n.ensureKeyExists("comment", E), n.ensureKeyExists("cdata", E), n.ensureKeyExists("doctype", E), n.ensureKeyExists("type", E), n.ensureKeyExists("name", E), n.ensureKeyExists("elements", E), n.ensureKeyExists("parent", E), n.checkFnExists("doctype", E), n.checkFnExists("instruction", E), n.checkFnExists("cdata", E), n.checkFnExists("comment", E), n.checkFnExists("text", E), n.checkFnExists("instructionName", E), n.checkFnExists("elementName", E), n.checkFnExists("attributeName", E), n.checkFnExists("attributeValue", E), n.checkFnExists("attributes", E), E;
  }
  function Q(q) {
    var AA = Number(q);
    if (!isNaN(AA))
      return AA;
    var K = q.toLowerCase();
    return K === "true" ? !0 : K === "false" ? !1 : q;
  }
  function B(q, AA) {
    var K;
    if (E.compact) {
      if (!Y[E[q + "Key"]] && (c(E.alwaysArray) ? E.alwaysArray.indexOf(E[q + "Key"]) !== -1 : E.alwaysArray) && (Y[E[q + "Key"]] = []), Y[E[q + "Key"]] && !c(Y[E[q + "Key"]]) && (Y[E[q + "Key"]] = [Y[E[q + "Key"]]]), q + "Fn" in E && typeof AA == "string" && (AA = E[q + "Fn"](AA, Y)), q === "instruction" && ("instructionFn" in E || "instructionNameFn" in E)) {
        for (K in AA)
          if (AA.hasOwnProperty(K))
            if ("instructionFn" in E)
              AA[K] = E.instructionFn(AA[K], K, Y);
            else {
              var z = AA[K];
              delete AA[K], AA[E.instructionNameFn(K, z, Y)] = z;
            }
      }
      c(Y[E[q + "Key"]]) ? Y[E[q + "Key"]].push(AA) : Y[E[q + "Key"]] = AA;
    } else {
      Y[E.elementsKey] || (Y[E.elementsKey] = []);
      var T = {};
      if (T[E.typeKey] = q, q === "instruction") {
        for (K in AA)
          if (AA.hasOwnProperty(K))
            break;
        T[E.nameKey] = "instructionNameFn" in E ? E.instructionNameFn(K, AA, Y) : K, E.instructionHasAttributes ? (T[E.attributesKey] = AA[K][E.attributesKey], "instructionFn" in E && (T[E.attributesKey] = E.instructionFn(T[E.attributesKey], K, Y))) : ("instructionFn" in E && (AA[K] = E.instructionFn(AA[K], K, Y)), T[E.instructionKey] = AA[K]);
      } else
        q + "Fn" in E && (AA = E[q + "Fn"](AA, Y)), T[E[q + "Key"]] = AA;
      E.addParent && (T[E.parentKey] = Y), Y[E.elementsKey].push(T);
    }
  }
  function r(q) {
    if ("attributesFn" in E && q && (q = E.attributesFn(q, Y)), (E.trim || "attributeValueFn" in E || "attributeNameFn" in E || E.nativeTypeAttributes) && q) {
      var AA;
      for (AA in q)
        if (q.hasOwnProperty(AA) && (E.trim && (q[AA] = q[AA].trim()), E.nativeTypeAttributes && (q[AA] = Q(q[AA])), "attributeValueFn" in E && (q[AA] = E.attributeValueFn(q[AA], AA, Y)), "attributeNameFn" in E)) {
          var K = q[AA];
          delete q[AA], q[E.attributeNameFn(AA, q[AA], Y)] = K;
        }
    }
    return q;
  }
  function A(q) {
    var AA = {};
    if (q.body && (q.name.toLowerCase() === "xml" || E.instructionHasAttributes)) {
      for (var K = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g, z; (z = K.exec(q.body)) !== null; )
        AA[z[1]] = z[2] || z[3] || z[4];
      AA = r(AA);
    }
    if (q.name.toLowerCase() === "xml") {
      if (E.ignoreDeclaration)
        return;
      Y[E.declarationKey] = {}, Object.keys(AA).length && (Y[E.declarationKey][E.attributesKey] = AA), E.addParent && (Y[E.declarationKey][E.parentKey] = Y);
    } else {
      if (E.ignoreInstruction)
        return;
      E.trim && (q.body = q.body.trim());
      var T = {};
      E.instructionHasAttributes && Object.keys(AA).length ? (T[q.name] = {}, T[q.name][E.attributesKey] = AA) : T[q.name] = q.body, B("instruction", T);
    }
  }
  function a(q, AA) {
    var K;
    if (typeof q == "object" && (AA = q.attributes, q = q.name), AA = r(AA), "elementNameFn" in E && (q = E.elementNameFn(q, Y)), E.compact) {
      if (K = {}, !E.ignoreAttributes && AA && Object.keys(AA).length) {
        K[E.attributesKey] = {};
        var z;
        for (z in AA)
          AA.hasOwnProperty(z) && (K[E.attributesKey][z] = AA[z]);
      }
      !(q in Y) && (c(E.alwaysArray) ? E.alwaysArray.indexOf(q) !== -1 : E.alwaysArray) && (Y[q] = []), Y[q] && !c(Y[q]) && (Y[q] = [Y[q]]), c(Y[q]) ? Y[q].push(K) : Y[q] = K;
    } else
      Y[E.elementsKey] || (Y[E.elementsKey] = []), K = {}, K[E.typeKey] = "element", K[E.nameKey] = q, !E.ignoreAttributes && AA && Object.keys(AA).length && (K[E.attributesKey] = AA), E.alwaysChildren && (K[E.elementsKey] = []), Y[E.elementsKey].push(K);
    K[E.parentKey] = Y, Y = K;
  }
  function D(q) {
    E.ignoreText || !q.trim() && !E.captureSpacesBetweenElements || (E.trim && (q = q.trim()), E.nativeType && (q = Q(q)), E.sanitize && (q = q.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")), B("text", q));
  }
  function x(q) {
    E.ignoreComment || (E.trim && (q = q.trim()), B("comment", q));
  }
  function N(q) {
    var AA = Y[E.parentKey];
    E.addParent || delete Y[E.parentKey], Y = AA;
  }
  function P(q) {
    E.ignoreCdata || (E.trim && (q = q.trim()), B("cdata", q));
  }
  function d(q) {
    E.ignoreDoctype || (q = q.replace(/^ /, ""), E.trim && (q = q.trim()), B("doctype", q));
  }
  function J(q) {
    q.note = q;
  }
  return Ma = function(q, AA) {
    var K = e.parser(!0, {}), z = {};
    if (Y = z, E = X(AA), K.opt = { strictEntities: !0 }, K.onopentag = a, K.ontext = D, K.oncomment = x, K.onclosetag = N, K.onerror = J, K.oncdata = P, K.ondoctype = d, K.onprocessinginstruction = A, K.write(q).close(), z[E.elementsKey]) {
      var T = z[E.elementsKey];
      delete z[E.elementsKey], z[E.elementsKey] = T, delete z.text;
    }
    return z;
  }, Ma;
}
var Da, MB;
function Rw() {
  if (MB) return Da;
  MB = 1;
  var e = Ga(), n = NB();
  function c(E) {
    var Y = e.copyOptions(E);
    return e.ensureSpacesExists(Y), Y;
  }
  return Da = function(E, Y) {
    var X, Q, B, r;
    return X = c(Y), Q = n(E, X), r = "compact" in X && X.compact ? "_parent" : "parent", "addParent" in X && X.addParent ? B = JSON.stringify(Q, function(A, a) {
      return A === r ? "_" : a;
    }, X.spaces) : B = JSON.stringify(Q, null, X.spaces), B.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
  }, Da;
}
var da, DB;
function RB() {
  if (DB) return da;
  DB = 1;
  var e = Ga(), n = Sa().isArray, c, E;
  function Y(K) {
    var z = e.copyOptions(K);
    return e.ensureFlagExists("ignoreDeclaration", z), e.ensureFlagExists("ignoreInstruction", z), e.ensureFlagExists("ignoreAttributes", z), e.ensureFlagExists("ignoreText", z), e.ensureFlagExists("ignoreComment", z), e.ensureFlagExists("ignoreCdata", z), e.ensureFlagExists("ignoreDoctype", z), e.ensureFlagExists("compact", z), e.ensureFlagExists("indentText", z), e.ensureFlagExists("indentCdata", z), e.ensureFlagExists("indentAttributes", z), e.ensureFlagExists("indentInstruction", z), e.ensureFlagExists("fullTagEmptyElement", z), e.ensureFlagExists("noQuotesForNativeAttributes", z), e.ensureSpacesExists(z), typeof z.spaces == "number" && (z.spaces = Array(z.spaces + 1).join(" ")), e.ensureKeyExists("declaration", z), e.ensureKeyExists("instruction", z), e.ensureKeyExists("attributes", z), e.ensureKeyExists("text", z), e.ensureKeyExists("comment", z), e.ensureKeyExists("cdata", z), e.ensureKeyExists("doctype", z), e.ensureKeyExists("type", z), e.ensureKeyExists("name", z), e.ensureKeyExists("elements", z), e.checkFnExists("doctype", z), e.checkFnExists("instruction", z), e.checkFnExists("cdata", z), e.checkFnExists("comment", z), e.checkFnExists("text", z), e.checkFnExists("instructionName", z), e.checkFnExists("elementName", z), e.checkFnExists("attributeName", z), e.checkFnExists("attributeValue", z), e.checkFnExists("attributes", z), e.checkFnExists("fullTagEmptyElement", z), z;
  }
  function X(K, z, T) {
    return (!T && K.spaces ? `
` : "") + Array(z + 1).join(K.spaces);
  }
  function Q(K, z, T) {
    if (z.ignoreAttributes)
      return "";
    "attributesFn" in z && (K = z.attributesFn(K, E, c));
    var H, eA, CA, IA, k = [];
    for (H in K)
      K.hasOwnProperty(H) && K[H] !== null && K[H] !== void 0 && (IA = z.noQuotesForNativeAttributes && typeof K[H] != "string" ? "" : '"', eA = "" + K[H], eA = eA.replace(/"/g, "&quot;"), CA = "attributeNameFn" in z ? z.attributeNameFn(H, eA, E, c) : H, k.push(z.spaces && z.indentAttributes ? X(z, T + 1, !1) : " "), k.push(CA + "=" + IA + ("attributeValueFn" in z ? z.attributeValueFn(eA, H, E, c) : eA) + IA));
    return K && Object.keys(K).length && z.spaces && z.indentAttributes && k.push(X(z, T, !1)), k.join("");
  }
  function B(K, z, T) {
    return c = K, E = "xml", z.ignoreDeclaration ? "" : "<?xml" + Q(K[z.attributesKey], z, T) + "?>";
  }
  function r(K, z, T) {
    if (z.ignoreInstruction)
      return "";
    var H;
    for (H in K)
      if (K.hasOwnProperty(H))
        break;
    var eA = "instructionNameFn" in z ? z.instructionNameFn(H, K[H], E, c) : H;
    if (typeof K[H] == "object")
      return c = K, E = eA, "<?" + eA + Q(K[H][z.attributesKey], z, T) + "?>";
    var CA = K[H] ? K[H] : "";
    return "instructionFn" in z && (CA = z.instructionFn(CA, H, E, c)), "<?" + eA + (CA ? " " + CA : "") + "?>";
  }
  function A(K, z) {
    return z.ignoreComment ? "" : "<!--" + ("commentFn" in z ? z.commentFn(K, E, c) : K) + "-->";
  }
  function a(K, z) {
    return z.ignoreCdata ? "" : "<![CDATA[" + ("cdataFn" in z ? z.cdataFn(K, E, c) : K.replace("]]>", "]]]]><![CDATA[>")) + "]]>";
  }
  function D(K, z) {
    return z.ignoreDoctype ? "" : "<!DOCTYPE " + ("doctypeFn" in z ? z.doctypeFn(K, E, c) : K) + ">";
  }
  function x(K, z) {
    return z.ignoreText ? "" : (K = "" + K, K = K.replace(/&amp;/g, "&"), K = K.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), "textFn" in z ? z.textFn(K, E, c) : K);
  }
  function N(K, z) {
    var T;
    if (K.elements && K.elements.length)
      for (T = 0; T < K.elements.length; ++T)
        switch (K.elements[T][z.typeKey]) {
          case "text":
            if (z.indentText)
              return !0;
            break;
          // skip to next key
          case "cdata":
            if (z.indentCdata)
              return !0;
            break;
          // skip to next key
          case "instruction":
            if (z.indentInstruction)
              return !0;
            break;
          // skip to next key
          case "doctype":
          case "comment":
          case "element":
            return !0;
          default:
            return !0;
        }
    return !1;
  }
  function P(K, z, T) {
    c = K, E = K.name;
    var H = [], eA = "elementNameFn" in z ? z.elementNameFn(K.name, K) : K.name;
    H.push("<" + eA), K[z.attributesKey] && H.push(Q(K[z.attributesKey], z, T));
    var CA = K[z.elementsKey] && K[z.elementsKey].length || K[z.attributesKey] && K[z.attributesKey]["xml:space"] === "preserve";
    return CA || ("fullTagEmptyElementFn" in z ? CA = z.fullTagEmptyElementFn(K.name, K) : CA = z.fullTagEmptyElement), CA ? (H.push(">"), K[z.elementsKey] && K[z.elementsKey].length && (H.push(d(K[z.elementsKey], z, T + 1)), c = K, E = K.name), H.push(z.spaces && N(K, z) ? `
` + Array(T + 1).join(z.spaces) : ""), H.push("</" + eA + ">")) : H.push("/>"), H.join("");
  }
  function d(K, z, T, H) {
    return K.reduce(function(eA, CA) {
      var IA = X(z, T, H && !eA);
      switch (CA.type) {
        case "element":
          return eA + IA + P(CA, z, T);
        case "comment":
          return eA + IA + A(CA[z.commentKey], z);
        case "doctype":
          return eA + IA + D(CA[z.doctypeKey], z);
        case "cdata":
          return eA + (z.indentCdata ? IA : "") + a(CA[z.cdataKey], z);
        case "text":
          return eA + (z.indentText ? IA : "") + x(CA[z.textKey], z);
        case "instruction":
          var k = {};
          return k[CA[z.nameKey]] = CA[z.attributesKey] ? CA : CA[z.instructionKey], eA + (z.indentInstruction ? IA : "") + r(k, z, T);
      }
    }, "");
  }
  function J(K, z, T) {
    var H;
    for (H in K)
      if (K.hasOwnProperty(H))
        switch (H) {
          case z.parentKey:
          case z.attributesKey:
            break;
          // skip to next key
          case z.textKey:
            if (z.indentText || T)
              return !0;
            break;
          // skip to next key
          case z.cdataKey:
            if (z.indentCdata || T)
              return !0;
            break;
          // skip to next key
          case z.instructionKey:
            if (z.indentInstruction || T)
              return !0;
            break;
          // skip to next key
          case z.doctypeKey:
          case z.commentKey:
            return !0;
          default:
            return !0;
        }
    return !1;
  }
  function q(K, z, T, H, eA) {
    c = K, E = z;
    var CA = "elementNameFn" in T ? T.elementNameFn(z, K) : z;
    if (typeof K > "u" || K === null || K === "")
      return "fullTagEmptyElementFn" in T && T.fullTagEmptyElementFn(z, K) || T.fullTagEmptyElement ? "<" + CA + "></" + CA + ">" : "<" + CA + "/>";
    var IA = [];
    if (z) {
      if (IA.push("<" + CA), typeof K != "object")
        return IA.push(">" + x(K, T) + "</" + CA + ">"), IA.join("");
      K[T.attributesKey] && IA.push(Q(K[T.attributesKey], T, H));
      var k = J(K, T, !0) || K[T.attributesKey] && K[T.attributesKey]["xml:space"] === "preserve";
      if (k || ("fullTagEmptyElementFn" in T ? k = T.fullTagEmptyElementFn(z, K) : k = T.fullTagEmptyElement), k)
        IA.push(">");
      else
        return IA.push("/>"), IA.join("");
    }
    return IA.push(AA(K, T, H + 1, !1)), c = K, E = z, z && IA.push((eA ? X(T, H, !1) : "") + "</" + CA + ">"), IA.join("");
  }
  function AA(K, z, T, H) {
    var eA, CA, IA, k = [];
    for (CA in K)
      if (K.hasOwnProperty(CA))
        for (IA = n(K[CA]) ? K[CA] : [K[CA]], eA = 0; eA < IA.length; ++eA) {
          switch (CA) {
            case z.declarationKey:
              k.push(B(IA[eA], z, T));
              break;
            case z.instructionKey:
              k.push((z.indentInstruction ? X(z, T, H) : "") + r(IA[eA], z, T));
              break;
            case z.attributesKey:
            case z.parentKey:
              break;
            // skip
            case z.textKey:
              k.push((z.indentText ? X(z, T, H) : "") + x(IA[eA], z));
              break;
            case z.cdataKey:
              k.push((z.indentCdata ? X(z, T, H) : "") + a(IA[eA], z));
              break;
            case z.doctypeKey:
              k.push(X(z, T, H) + D(IA[eA], z));
              break;
            case z.commentKey:
              k.push(X(z, T, H) + A(IA[eA], z));
              break;
            default:
              k.push(X(z, T, H) + q(IA[eA], CA, z, T, J(IA[eA], z)));
          }
          H = H && !k.length;
        }
    return k.join("");
  }
  return da = function(K, z) {
    z = Y(z);
    var T = [];
    return c = K, E = "_root_", z.compact ? T.push(AA(K, z, 0, !0)) : (K[z.declarationKey] && T.push(B(K[z.declarationKey], z, 0)), K[z.elementsKey] && K[z.elementsKey].length && T.push(d(K[z.elementsKey], z, 0, !T.length))), T.join("");
  }, da;
}
var Ia, dB;
function Sw() {
  if (dB) return Ia;
  dB = 1;
  var e = RB();
  return Ia = function(n, c) {
    n instanceof Buffer && (n = n.toString());
    var E = null;
    if (typeof n == "string")
      try {
        E = JSON.parse(n);
      } catch {
        throw new Error("The JSON structure is invalid");
      }
    else
      E = n;
    return e(E, c);
  }, Ia;
}
var ya, IB;
function Gw() {
  if (IB) return ya;
  IB = 1;
  var e = NB(), n = Rw(), c = RB(), E = Sw();
  return ya = {
    xml2js: e,
    xml2json: n,
    js2xml: c,
    json2xml: E
  }, ya;
}
var Hw = Gw();
function yB(e) {
  return e.includes(":") ? e.split(":")[1] : e;
}
function SB(e) {
  return new Promise((n, c) => {
    const E = new FileReader();
    E.onload = function(Y) {
      try {
        const X = Y.target?.result, Q = Hw.xml2js(X, {
          compact: !0,
          cdataKey: "_text",
          trim: !0,
          elementNameFn: yB,
          attributeNameFn: yB
        });
        n(Q);
      } catch (X) {
        c(X);
      }
    }, E.readAsText(e);
  });
}
const Lw = /* @__PURE__ */ JSON.parse(`{"additionalInformation":{"additionalDescription":"Dodatkowy opis","additionalInformationLabel":"Dodatkowe informacje","documentDate":"Data dokumentu","documentNumber":"Numer dokumentu","exciseTaxRefund":"- Informacja dodatkowa związana ze zwrotem podatku akcyzowego zawartego w cenie oleju napędowego","fpLabel":"- Faktura, o której mowa w art. 109 ust. 3d ustawy","infoContent":"Treść informacji","informationContent":"Treść informacji","infoType":"Rodzaj informacji","ksefDocumentNumber":"Numer identyfikujący fakturę w KSeF","ordinalNumber":"Lp.","paymentDocuments":"Dokumenty Zapłaty","rowNumber":"Numer wiersza","tpLabel":"- Istniejące powiązania między nabywcą a dokonującym dostawy towarów lub usługodawcą","typeOfInformation":"Rodzaj informacji"},"address":{"apartmentNumber":"Numer lokalu: ","communeName":"Gmina: ","countryName":"Kraj: ","districtName":"Powiat: ","GLN":"GLN: ","houseNumber":"Numer domu: ","postName":"Poczta: ","streetName":"Ulica: ","townName":"Miejscowość: ","voivodeshipName":"Województwo: ","zipCode":"Kod pocztowy: "},"annotations":{"airDelivery":"Dostawa dotyczy statków powietrznych, o których mowa w art. 2 pkt 10 lit. c ustawy","antiques":"przedmioty kolekcjonerskie i antyki","artPieces":"dzieła sztuki","boatDelivery":"Dostawa dotyczy jednostek pływających, o których mowa w art. 2 pkt 10 lit. b ustawy","bodyNumber":"Numer nadwozia","cashMethod":"Metoda kasowa","chassisNumber":"Numer podwozia","description":"Opis","directiveLaw":"Przepis dyrektywy: ","factoryNumber":"Numer fabryczny nowego środka transportu","frameNumber":"Numer ramy","header":"Adnotacje","hullNumber":"Numer kadłuba nowego środka transportu","landDelivery":"Dostawa dotyczy pojazdów lądowych, o których mowa w art. 2 pkt 10 lit. a ustawy","law":"Przepis ustawy albo aktu wydanego na podstawie ustawy: ","marginProcedure":"Procedura marży: ","newTransportsDelivery":"Wewnątrzwspólnotowe dostawy nowych środków transportu","newTransportType":"Typ nowego środka transportu","noTaxBase":"Podstawa zwolnienia od podatku: ","noTaxBaseDocument":"Przepis ustawy albo aktu wydanego na podstawie ustawy, na podstawie którego podatnik stosuje zwolnienie od podatku","noTaxBaseDocument2":"Przepis dyrektywy 2006/112/WE, który zwalnia od podatku taką dostawę towarów lub takie świadczenie usług","noTaxBaseDocument3":"Inna podstawa prawna wskazującą na to, że dostawa towarów lub świadczenie usług korzysta ze zwolnienia","noTaxDelivery":"Dostawa towarów lub świadczenie usług zwolnionych od podatku na podstawie art. 43 ust. 1, art. 113 ust. 1 i 9 albo przepisów wydanych na podstawie art. 82 ust. 3 lub na podstawie innych przepisów","otherLaw":"Inna podstawa prawna: ","partialPayMechanism":"Mechanizm podzielonej płatności","reverseTax":"Odwrotne obciążenie","selfInvoice":"Samofakturowanie","threePartsSimplerMethod":"Procedura trójstronna uproszczona","transportApprovalDate":"Data dopuszczenia nowego środka transportu do użytku","transportBrand":"Marka nowego środka transportu","transportColor":"Kolor nowego środka transportu","transportMileage":"Przebieg pojazdu","transportModel":"Model nowego środka transportu","transportProductionYear":"Rok produkcji nowego środka transportu","transportRegistrationNumber":"Numer rejestracyjny nowego środka transportu","transportType":"Rodzaj pojazdu","travelAgencies":"biura podróży","usedGoods":"towary używane","usePermissionDate":"Data dopuszczenia do użytku","vat22DocumentNotRequired":"Nie istnieje obowiązek wystawienia dokumentu VAT-22","vat22DocumentRequired":"Istnieje obowiązek wystawienia dokumentu VAT-22","vin":"Numer VIN"},"attachment":{"blockHeader":"Nagłówek bloku danych: ","description":"Opis: ","details":"Szczegółowe dane załącznika ({{index}})","header":"Załącznik do Faktury VAT","key":"Klucz","tableLabel":"Tabela","tableSummary":"Podsumowanie tabeli","value":"Wartość"},"authorizedSubject":{"address":"Adres","authorizedSubject":"Podmiot upoważniony","contactData":"Dane kontaktowe","correspondenceAddress":"Adres do korespondencji","correspondenceAddress2":"Adres korespondencyjny","email":"E-mail: ","eori":"Numer EORI: ","noTaxId":"Brak identyfikatora ","otherTaxId":"Identyfikator podatkowy inny: ","phone":"Tel.: ","role":"Rola: "},"carrier":{"carrier":"Przewoźnik","carrierAddress":"Adres przewoźnika"},"correctedInvoice":{"correctInvoiceNumber":"Poprawny numer faktury korygowanej: ","correctionEffectType":"Typ skutku korekty: ","correctionReason":"Przyczyna korekty dla faktur korygujących: ","identificationHeader":"Dane identyfikacyjne faktury korygowanej","identificationHeaderIndexed":"Dane identyfikacyjne faktury korygowanej {{index}}","invoiceNumber":"Numer faktury korygowanej: ","issueDate":"Data wystawienia faktury, której dotyczy faktura korygująca: ","ksefNumber":"Numer KSeF faktury korygowanej: ","sectionHeader":"Dane faktury korygowanej"},"details":{"advanceInvoiceNumbers":"Numery wcześniejszych faktur zaliczkowych","assignKsefNumberDate":"Data nadania numeru KSeF","commonCurrencyRate":"Kurs waluty wspólny dla wszystkich wierszy faktury","costAmount":"Kwota płatności","currencyCode":"Kod waluty: ","currencyRate":"Kurs waluty: ","currencyRate2":"Kurs waluty","deliveryOrServiceDate":"Data dokonania lub zakończenia dostawy towarów lub wykonania usługi: ","deliveryOrServiceDateFrom":"Data dokonania lub zakończenia dostawy towarów lub wykonania usługi: od ","deliveryOrServiceDateTo":"Data dokonania lub zakończenia dostawy towarów lub wykonania usługi: do ","discountPeriod":"Okres, którego dotyczy rabat: ","getDate":"Data dokonania nabycia: ","getMoneyDate":"Data otrzymania zapłaty: ","getMoneyDate2":"Data otrzymania płatności","header":"Szczegóły","invoiceDate":"Data wystawienia faktury","invoiceDateSentToKsef":"Data przesłania do KSeF","invoiceDateShort":"Data wystawienia: ","invoiceNumber":"Numer faktury: ","issueDate":"Data wystawienia, z zastrzeżeniem art. 106na ust. 1 ustawy: ","issuePlace":"Miejsce wystawienia: ","ossProcedure":"Procedura One Stop Shop","paymentReceivedDate":"Data otrzymania zapłaty: ","place":"Miejsce wystawienia: ","to":" do "},"discount":{"all":"Rabat dotyczy wszystkich dostaw towarów i wykonanych usług na rzecz tego nabywcy w danym okresie.","header":"Rabat","lp":"Lp.","notAll":"Rabat nie dotyczy wszystkich dostaw towarów i wykonanych usług na rzecz tego nabywcy w danym okresie.","productName":"Nazwa towaru lub usługi","quantity":"Ilość","totalValue":"Wartość rabatu ogółem: ","unit":"Miara"},"footer":{"generatedIn":"Wytworzona w: ","margin":"marża","pagesTotal":"z","version":"wersja","appName":"Aplikacja Podatnika KSeF"},"header":{"advance":"Faktura zaliczkowa","attachmentWarning":"Uwaga, faktura zawiera załącznik, jednak ze względu na ograniczenia wizualizacji, nie został on uwzględniony w pliku PDF","correctedInvoiceVatRr":"Faktura korygująca VAT RR","correction":"Faktura korygująca","correctionAdvance":"Faktura korygująca zaliczkową","correctionCollective":"Faktura korygująca zbiorcza (rabat)","correctionSettlement":"Faktura korygująca rozliczeniową","invoiceNumberLabel":"Numer Faktury:","ksefNumberLabel":"Numer KSEF:","ksefPart1":"Krajowy System ","ksefPart2":"e","ksefPart3":"-Faktur","primalInvoiceVatRr":"Faktura pierwotna VAT RR","settlement":"Faktura rozliczeniowa","simplified":"Faktura uproszczona","vat":"Faktura podstawowa"},"information":{"header":"Pozostałe informacje","invoiceFooter":"Stopka faktury"},"order":{"additionalInfo":"Dodatkowe informacje","advancePaymentAmount":"Kwota zapłaty (zaliczki) dokumentowana fakturą: ","advancePaymentAmountCorrection":"Korekta kwoty zapłaty (zaliczki) dokumentowana fakturą: ","cn":"CN","currencyRate":"Kurs waluty","exciseTaxAmount":"Kwota podatku akcyzowego","gtin":"GTIN","gtu":"GTU","index":"Indeks","issuedInCurrency":"Faktura wystawiona w walucie {{currency}}","lp":"Lp.","netSalesValue":"Wartość sprzedaży netto","netUnitPrice":"Cena jedn. netto","orderNumber":"Numer umowy / Zamów.","orderValueWithTax":"Wartość zamówienia lub umowy z uwzględnieniem kwoty podatku: ","ossTaxRate":"Stawka podatku OSS","pkob":"PKOB","pkwiu":"PKWiU","procedure":"Procedura","procedureMarkings":"Oznaczenia dotyczące procedur","productMarker":"Znacznik dla towaru lub usługi z zał. nr 15 do ustawy","productName":"Nazwa towaru lub usługi","quantity":"Ilość","receivedAdvance":"Otrzymana kwota zapłaty (zaliczki): ","stateBefore":"Stan przed","taxAmount":"Kwota podatku","taxRate":"Stawka podatku","totalAmountDue":"Kwota należności ogółem: ","uniqueRowNumber":"Unikalny numer wiersza","unit":"Miara"},"payment":{"bankAccountNumber":"Numer rachunku bankowego","conditionalDiscount":"Skonto","description":"Opis: ","discountAmount":"Wysokość skonta: ","discountConditions":"Warunki skonta: ","factorsBankAccountNumber":"Numer rachunku bankowego faktora","farmer":"Rachunek bankowy rolnika","getter":"Rachunek bankowy nabywcy","ksefTransferId":"Identyfikator płatności Krajowego Systemu e-Faktur: ","maturityDate":"Termin płatności","moneylessLink":"Link do płatności bezgotówkowej: ","noPayment":"Brak zapłaty","other":"Inna","otherPaymentDescription":"Opis płatności innej: ","paidAllInParts":"Zapłacono całość w częściach","paidInPart":"Zapłacono w części","paidStatus":"Zapłacono","partialPayment":"Zapłata częściowa","partialPaymentAmount":"Kwota zapłaty częściowej","partialPaymentDate":"Data zapłaty częściowej","payment":"Płatność","paymentDate":"Data zapłaty: ","paymentDescription":"Opis płatności","paymentDifferent":"Płatność inna","paymentInformation":"Informacja o płatności: ","paymentInformationContinued":"Informacja o płatności (kontynuacja): ","paymentMethod":"Forma płatności","paymentMethod2":"Forma płatności: ","paymentMethod3":"Forma zapłaty: ","transfer":"Przelew"},"qr1":{"description":"Nie możesz zeskanować kodu z obrazka? Kliknij w link weryfikacyjny i przejdź do weryfikacji faktury!","header":"Sprawdź, czy Twoja faktura znajduje się w KSeF!","offline":"OFFLINE"},"qr2":{"certificate":"CERTYFIKAT","description":"Nie możesz zeskanować kodu z obrazka? Kliknij w link weryfikacyjny i przejdź do weryfikacji wystawcy faktury!","header":"Zweryfikuj dostawcę faktury"},"registers":{"accountDescription":"Opis rachunku","bankName":"Nazwa banku","bdo":"BDO","billFormat":"'Format rachunku","foreign":"Zagraniczny","fullAccountNumber":"Pełny numer rachunku","fullForeignAccountNumber":"Pełny numer rachunku zagranicznego","fullName":"Pełna nazwa","fullNrbAccountNumber":"Pełny numer rachunku w standardzie NRB","header":"Rejestry","krs":"KRS","ownBankAccount":"Rachunek własny banku","polish":"Polski","regon":"REGON","swiftCode":"Kod SWIFT"},"rows":{"additionalInfo":"Dodatkowe informacje","amount":"Ilość","cn":"CN","costZZP":"Kwota ZZP","currencyRate":"Kurs waluty","deliveryDate":"Data dostawy / wykonania","discount":"Rabat","exciseTaxAmount":"Kwota podatku akcyzowego","farmProductCost":"Wartość nabytych produktów rolnych lub wykonanych usług rolniczych: ","getDate":"Data dokonania nabycia","getOrMakeDate":"Data dostawy / wykonania","grossSalesValue":"Wartość sprzedaży brutto","grossUnitPrice":"Cena jedn. brutto","gtin":"GTIN","gtu":"GTU","header":"Pozycje","index":"Indeks","inWords":"Słownie: ","issuedInCurrency":"Faktura wystawiona w walucie {{currency}}","lp":"Lp.","lumpSumTaxRefund":"Kwota zryczałtowanego zwrotu podatku: ","name":"Nazwa","netSalesValue":"Wartość sprzedaży netto","netUnitPrice":"Cena jedn. netto","ossTaxRate":"Stawka podatku OSS","overallCost":"Kwota należności ogółem: ","pkob":"PKOB","pkwiu":"PKWiU","priceNoZZP":"Wartość bez ZZP","procedure":"Procedura","procedureMarkings":"Oznaczenia dotyczące procedur","productMarker":"Znacznik dla towaru lub usługi z zał. nr 15 do ustawy","productName":"Nazwa towaru lub usługi","qualityDesc":"Opis klasy lub jakości","quantity":"Ilość","remainingAmount":"Kwota pozostała do zapłaty: ","remainingAmountCorrection":"Korekta kwoty pozostałej do zapłaty: ","stateBefore":"Stan przed","taxRate":"Stawka podatku","totalAmountDue":"Kwota należności ogółem: ","totalAmountDueCorrection":"Korekta kwoty należności ogółem: ","uniqueRowNumber":"Unikalny numer wiersza","unit":"Miara","unitPrice":"Cena jedn.","valueZZP":"Wartość z ZZP","vatSalesValue":"Wartość sprzedaży vat","wageZZP":"Stawka ZZP"},"settlement":{"chargeReason":"Powód obciążenia","charges":"Obciążenia","deductionReason":"Powód odliczenia","deductions":"Odliczenia","header":"Rozliczenie","toPay":"Do zapłaty: ","toSettle":"Do rozliczenia: ","totalCharges":"Suma kwot obciążenia: ","totalDeductions":"Suma kwot odliczenia: ","amount":"Kwota"},"subject1":{"address":"Adres","contactDetails":"Dane kontaktowe","contractorNumber":"Numer kontrahenta: ","correspondenceAddress":"Adres do korespondencji","eoriNumber":"Numer EORI: ","mailingAddress":"Adres do korespondencji","name":"Nazwa: ","nip":"NIP: ","seller":"Sprzedawca","taxpayerStatus":"Status podatnika: ","vatPrefix":"Prefiks VAT: "},"subject1K":{"address":"Adres","contactDetails":"Dane kontaktowe","contractorNumber":"Numer kontrahenta: ","correctedContent":"Treść korygowana","correctiveContent":"Treść korygująca","correspondenceAddress":"Adres do korespondencji","eoriNumber":"Numer EORI: ","identificationData":"Dane identyfikacyjne","mailingAddress":"Adres do korespondencji","seller":"Sprzedawca","taxpayerStatus":"Status podatnika: ","vatPrefix":"Prefiks VAT: "},"subject2":{"address":"Adres","buyer":"Nabywca","contactDetails":"Dane kontaktowe","correspondenceAddress":"Adres do korespondencji","customerNumber":"Numer klienta: ","eoriNumber":"Numer EORI: ","getterId":"Identyfikator nabywcy: ","gv":"Faktura dotyczy członka grupy GV: ","internalId":"Identyfikator wewnętrzny: ","jst":"Faktura dotyczy jednostki podrzędnej JST: ","mailingAddress":"Adres do korespondencji","name":"Nazwa: ","nip":"NIP: ","no":"NIE","noId":"Brak identyfikatora ","noTaxId":"Brak identyfikatora","taxIdOther":"Identyfikator podatkowy inny: ","taxPayerStatus":"Status podatnika: ","vatPrefix":"Prefiks VAT: ","vatUeNumber":"Numer VAT-UE: ","yes":"TAK"},"subject2k":{"address":"Adres","buyer":"Nabywca","buyerId":"Identyfikator nabywcy: ","clientNumber":"Numer klienta: ","contactDetails":"Dane kontaktowe","correctedContent":"Treść korygowana","correctiveContent":"Treść korygująca","correspondenceAddress":"Adres do korespondencji","eori":"Numer EORI: ","identificationData":"Dane identyfikacyjne","mailingAddress":"Adres do korespondencji","taxPayerStatus":"Status podatnika: "},"subject3":{"address":"Adres","clientNumber":"Numer klienta: ","contactData":"Dane kontaktowe","correspondenceAddress":"Adres do korespondencji","eori":"Numer EORI: ","getterId":"Identyfikator nabywcy: ","internalId":"Identyfikator wewnętrzny: ","name":"Nazwa: ","nip":"NIP: ","noTaxId":"Brak identyfikatora ","otherEntity":"Podmiot inny {{index}}","otherId":"Identyfikator podatkowy inny: ","otherRole":"Rola inna: ","otherTaxId":"Identyfikator podatkowy inny: ","role":"Rola: ","roleDescription":"Opis roli: ","share":"Udział: ","vatUeNumber":"Numer VAT-UE: "},"subject3k":{"address":"Adres","clientNumber":"Numer klienta: ","correctedContent":"Treść korygowana","correctiveContent":"Treść korygująca","correspondenceAddress":"Adres korespondencyjny","eori":"Numer EORI: ","getterId":"Identyfikator nabywcy: ","identificationData":"Dane identyfikacyjne","noTaxId":"Brak identyfikatora ","otherEntity":"Podmiot inny","otherRole":"Rola inna: ","otherTaxId":"Identyfikator podatkowy inny: ","role":"Rola: ","share":"Udział: "},"subjectContactData":{"e-mail":"E-mail: ","email":"Email: ","phone":"Tel.: "},"subjectIdentificationData":{"fullName":"Pełna nazwa: ","internalId":"Identyfikator wewnętrzny: ","name":"Nazwa: ","nameSurname":"Imię i nazwisko: ","nip":"NIP: ","noId":"Brak identyfikatora","tradeName":"Nazwa handlowa: "},"summary":{"5":"5%","0domestic":"0% - krajowe","0export":"0% - eksport","0long":"0% w przypadku sprzedaży towarów i świadczenia usług na terytorium kraju (z wyłączeniem WDT i eksportu)","0mid":"0% w przypadku wewnątrzwspólnotowej dostawy towarów (WDT)","0short":"0% w przypadku eksportu towarów","0wdt":"0% - wdt","23or22":"23% lub 22%","4or3":"4% lub 3%","8or7":"8% lub 7%","grossAmount":"Kwota brutto","lp":"Lp.","margin":"marża","netAmount":"Kwota netto","noTax":"zwolnione od podatku","npBasedArt100":"np na podstawie art. 100 ust. 1 pkt 4 ustawy","npExcludingArt100":"np z wyłączeniem art. 100 ust 1 pkt 4 ustawy","oss":"OSS","reverseTax":"odwrotne obciążenie","sectionHeader":"Podsumowanie stawek podatku","taxAmount":"Kwota podatku","taxAmountPLN":"Kwota podatku PLN","taxFree":"zwolnione z opodatkowania","taxRate":"Stawka podatku"},"transaction":{"batchNumber":"Numer partii towaru","contract":"Umowa","contractDate":"Data umowy","contractNumber":"Numer umowy","currency":"Waluta umowna: ","currencyAndRate":"Waluta umowna i kurs umowny","deliveryTerms":"Warunki dostawy towarów: ","header":"Warunki transakcji","intermediaryDelivery":"Dostawa dokonana przez podmiot, o którym mowa w art. 22 ust. 2d ustawy. Pole dotyczy sytuacji, w której podmiot uczestniczy w transakcji łańcuchowej innej niż procedura trójstronna uproszczona, o której mowa w art. 135 ust. 1 pkt 4 ustawy","order":"Zamówienie","orderDate":"Data zamówienia","orderNumber":"Numer zamówienia","rate":"Kurs umowny: "},"transport":{"cargoDescription":"Opis ładunku: ","dataHeader":"Dane transportu","endDateTime":"Data i godzina zakończenia transportu: ","gln":"GLN: ","header":"Transport","intermediateAddress":"Adres pośredni wysyłki","orderNumber":"Numer zlecenia transportu: ","otherCargo":"Ładunek inny","otherCargoDescription":"Opis innego ładunku: ","otherType":"Transport inny","otherTypeDescription":"Opis innego rodzaju transportu: ","packageUnit":"Jednostka opakowania: ","shipFrom":"Adres miejsca wysyłki","shipmentHeader":"Wysyłka","shipTo":"Adres miejsca docelowego, do którego został zlecony transport","startDateTime":"Data i godzina rozpoczęcia transportu: ","type":"Rodzaj transportu: "},"upo":{"authorizationDocumentShortcut":"Skrót dokumentu uwierzytelniającego: ","complexId":"Identyfikator złożony","contextAuthorizationId":"Identyfikator kontekstu uwierzytelnienia: ","contextType":"Typ kontekstu: ","documentInfo":"Informacja o dokumencie: ","documentRangeFrom":"Zakres dokumentów od: ","documentRangeTo":"Zakres dokumentów do: ","documentsTotal":"Całkowita liczba dokumentów: ","eDocumentFormCode":"Kod formularza przedłożonego dokumentu elektronicznego:","entityFullName":"Nazwa pełna podmiotu, któremu doręczono dokument elektroniczny: ","functionValueShortcut":"Wartość funkcji skrótu złożonego dokumentu","internalId":"Identyfikator wewnętrzny","peppolId":"Identyfikator Peppol","registeredInMF":"Dokument został zarejestrowany w systemie teleinformatycznym Ministerstwa Finansów","sendMethod":"Tryb wysyłki","sessionReferenceNumber":"Numer referencyjny sesji: ","upoKsef":"Urzędowe poświadczenie odbioru dokumentu elektronicznego KSeF","upoPage":"Strona dokumentu UPO: ","upoPageTotal":"Całkowita liczba stron dokumentu UPO: ","vendorNIP":"NIP sprzedawcy","xsdFileLogicName":"Nazwa pliku XSD struktury logicznej dotycząca przesłanego dokumentu:","nip":"NIP"},"wz":{"documentsHeader":"Numery dokumentów magazynowych WZ","number":"Numer WZ"}}`), kw = {
  const: /* @__PURE__ */ JSON.parse('{"countries":{"AD":"Andora","AE":"Zjednoczone Emiraty Arabskie","AF":"Afganistan","AG":"Antigua i Barbuda","AI":"Anguilla","AL":"Albania","AM":"Armenia","AN":"Antyle Holenderskie","AO":"Angola","AQ":"Antarktyda","AR":"Argentyna","AS":"Samoa Amerykańskie","AT":"Austria","AU":"Australia","AW":"Aruba","AX":"Aland Islands","AZ":"Azerbejdżan","BA":"Bośnia i Hercegowina","BB":"Barbados","BD":"Bangladesz","BE":"Belgia","BF":"Burkina Faso","BG":"Bułgaria","BH":"Bahrajn","BI":"Burundi","BJ":"Benin","BL":"Saint Barthelemy","BM":"Bermudy","BN":"Brunei Darussalam","BO":"Boliwia","BQ":"Bonaire, Sint Eustatius i Saba","BR":"Brazylia","BS":"Bahamy","BT":"Bhutan","BV":"Wyspa Bouveta","BW":"Botswana","BY":"Białoruś","BZ":"Belize","CA":"Kanada","CC":"Wyspy Kokosowe (Keelinga)","CD":"Kongo, Republika Demokratyczna","CF":"Rep.środkowoafrykańska","CG":"Kongo","CH":"Szwajcaria","CI":"Wybrzeże Kości Słoniowej","CK":"Wyspy Cooka","CL":"Chile","CM":"Kamerun","CN":"Chiny","CO":"Kolumbia","CR":"Kostaryka","CU":"Kuba","CV":"Zielony Przylądek","CW":"Curaçao","CX":"Wyspa Bożego Narodzenia","CY":"Cypr","CZ":"Republika Czeska","DE":"Niemcy","DJ":"Dżibuti","DK":"Dania","DM":"Dominika","DO":"Dominikana","DZ":"Algieria","EC":"Ekwador","EE":"Estonia","EG":"Egipt","EH":"Sahara Zachodnia","ER":"Erytrea","ES":"Hiszpania","ET":"Etiopia","FI":"Finlandia","FJ":"Fidżi Republika","FK":"Falklandy","FM":"Mikronezja","FO":"Wyspy Owcze","FR":"Francja","GA":"Gabon","GB":"Wielka Brytania","GD":"Grenada","GE":"Gruzja","GF":"Gujana Francuska","GG":"Guernsey","GH":"Ghana","GI":"Gibraltar","GL":"Grenlandia","GM":"Gambia","GN":"Gwinea","GP":"Gwadelupa","GQ":"Gwinea Równikowa","GR":"Grecja","GS":"Południowa Georgia i Połud.Wyspy Sandwich","GT":"Gwatemala","GU":"Guam","GW":"Gwinea Bissau","GY":"Gujana","HK":"Hongkong","HM":"Wyspy Heard i Mcdonald","HN":"Honduras","HR":"Chorwacja","HT":"Haiti","HU":"Węgry","ID":"Indonezja","IE":"Irlandia","IL":"Izrael","IM":"Wyspa Man","IN":"Indie","IO":"Brytyjskie Terytorium Oceanu Indyjskiego","IQ":"Irak","IR":"Iran","IS":"Islandia","IT":"Włochy","JE":"Jersey","JM":"Jamajka","JO":"Jordania","JP":"Japonia","KE":"Kenia","KG":"Kirgistan","KH":"Kambodża","KI":"Kiribati","KM":"Komory","KN":"Saint Kitts i Nevis","KP":"Koreańska Republika Ludowo-Demokratyczna","KR":"Republika Korei","KW":"Kuwejt","KY":"Kajmany","KZ":"Kazachstan","LA":"Laos","LB":"Liban","LC":"Saint Lucia","LI":"Liechtenstein","LK":"Sri Lanka","LR":"Liberia","LS":"Lesotho","LT":"Litwa","LU":"Luksemburg","LV":"Łotwa","LY":"Libia","MA":"Maroko","MC":"Monako","MD":"Mołdowa","ME":"Czarnogóra","MF":"Saint Martin","MG":"Madagaskar","MH":"Wyspy Marshalla","MK":"Macedonia","ML":"Mali","MM":"Myanmar (Burma)","MN":"Mongolia","MO":"Makau","MP":"Mariany Północne","MQ":"Martynika","MR":"Mauretania","MS":"Montserrat","MT":"Malta","MU":"Mauritius","MV":"Malediwy","MW":"Malawi","MX":"Meksyk","MY":"Malezja","MZ":"Mozambik","NA":"Namibia","NC":"Nowa Kaledonia","NE":"Niger","NF":"Norfolk","NG":"Nigeria","NI":"Nikaragua","NL":"Niderlandy (Holandia)","NO":"Norwegia","NP":"Nepal","NR":"Nauru","NU":"Niue","NZ":"Nowa Zelandia","OM":"Oman","PA":"Panama","PE":"Peru","PF":"Polinezja Francuska","PG":"Papua Nowa Gwinea","PH":"Filipiny","PK":"Pakistan","PL":"Polska","PM":"Saint Pierre i Miquelon","PN":"Pitcairn","PR":"Portoryko","PS":"Okupowane Terytorium Palestyny","PT":"Portugalia","PW":"Palau","PY":"Paragwaj","QA":"Katar","RE":"Reunion","RO":"Rumunia","RS":"Serbia","RU":"Rosja","RW":"Rwanda","SA":"Arabia Saudyjska","SB":"Wyspy Salomona","SC":"Seszele","SD":"Sudan","SE":"Szwecja","SG":"Singapur","SH":"Święta Helena","SI":"Słowenia","SJ":"Svalbard i Jan Mayen","SK":"Słowacja","SL":"Sierra Leone","SM":"San Marino","SN":"Senegal","SO":"Somalia","SR":"Surinam","SS":"Sudan Południowy","ST":"Wyspy Świętego Tomasza i Książęca","SV":"Salwador","SX":"Wyspa Sint Maarten (część holenderska wyspy)","SY":"Syria","SZ":"Suazi","TC":"Wyspy Turks i Caicos","TD":"Czad","TF":"Francuskie Terytorium Południowe","TG":"Togo","TH":"Tajlandia","TJ":"Tadżykistan","TK":"Tokelau","TL":"Wschodni Timor","TM":"Turkmenistan","TN":"Tunezja","TO":"Tonga","TR":"Turcja","TT":"Trynidad i Tobago","TV":"Tuvalu","TW":"Tajwan","TZ":"Tanzania","UA":"Ukraina","UG":"Uganda","UM":"Minor","US":"Stany Zjednoczone Ameryki","UY":"Urugwaj","UZ":"Uzbekistan","VA":"Watykan","VC":"Saint Vincent i Grenadyny","VE":"Wenezuela","VG":"Wyspy Dziewicze-W.B.","VI":"Wyspy Dziewicze-USA","VN":"Wietnam","VU":"Vanuatu","WF":"Wallis i Futuna","WS":"Samoa","XC":"Ceuta","XI":"Zjednoczone Królestwo (Irlandia Północna)","XK":"Kosowo","XL":"Melilla","YE":"Jemen","YT":"Majotta","ZA":"Republika Południowej Afryki","ZM":"Zambia","ZW":"Zimbabwe"},"fa":{"additionalBuyer":"Dodatkowy nabywca - w przypadku, gdy na fakturze występują dane kolejnych (innych niż wymieniony w części Podmiot2) nabywców","airTransport":"Transport lotniczy","bag":"Worek","bankruptcy":"Stan upadłości","barrel":"Beczka","basket":"Kosz/koszyk","bin":"Pojemnik","box":"Pudełko","bubble":"Bańka","bulkLiquidContainer":"Pojemnik do ładunków masowych w postaci płynnej","bulkPackage":"Opakowanie zbiorcze","bulkSolidContainer":"Pojemnik do ładunków masowych stałych","cage":"Klatka","canister":"Kanister","card":"Karta","carton":"Karton","cash":"Gotówka","check":"Czek","container":"Kontener","correctionOtherDate":"Korekta skutkująca w dacie innej, w tym gdy dla różnych pozycji faktury korygującej daty te są różne","courtBailiff":"Komornik sądowy","courtBailiffArt106c2":"Komornik sądowy - w przypadku, o którym mowa w art. 106c pkt 2 ustawy","crate":"Skrzynia","credit":"Kredyt","cylinder":"Butla","domesticZeroRate":"Stawka 0% stosowana w ramach sprzedaży krajowej","employee":"Pracownik","enforcementAuthority":"Organ egzekucyjny","enforcementAuthorityArt106c1":"Organ egzekucyjny - w przypadku, o którym mowa w art. 106c pkt 1 ustawy","exportZeroRate":"Stawka 0% - eksport towarów","factor":"Faktor - w przypadku, gdy na fakturze występują dane faktora","fixedPipeline":"Stałe instalacje przesyłowe","goodsServicesAttachment15":"Towar/usługa wymienione w załączniku 15","inheritedBusiness":"Przedsiębiorstwo w spadku","inlandNavigation":"Żegluga śródlądowa","intraCommunitySupply":"Stawka 0% - wewnątrzwspólnotowa dostawa towarów","invoiceIssuer":"Wystawca faktury - w przypadku, gdy na fakturze występują dane podmiotu wystawiającego fakturę w imieniu podatnika. Nie dotyczy przypadku, gdy wystawcą faktury jest nabywca","liquidation":"Stan likwidacji","localGovernmentIssuer":"Jednostka samorządu terytorialnego - wystawca","localGovernmentRecipient":"Jednostka samorządu terytorialnego - odbiorca","mobile":"Mobilna","oo":"oo","otherDomesticSales":"Pozostała sprzedaż krajowa","ownAccountCollection":"Rachunek banku lub rachunek spółdzielczej kasy oszczędnościowo-kredytowej wykorzystywany przez ten bank lub tę kasę do pobrania należności od nabywcy towarów lub usług za dostawę towarów lub świadczenie usług, potwierdzone fakturą, i przekazania jej w całości albo części dostawcy towarów lub usługodawcy","ownAccountInternal":"Rachunek banku lub rachunek spółdzielczej kasy oszczędnościowo-kredytowej prowadzony przez ten bank lub tę kasę w ramach gospodarki własnej, niebędący rachunkiem rozliczeniowym","ownAccountSettlement":"Rachunek banku lub rachunek spółdzielczej kasy oszczędnościowo-kredytowej służący do dokonywania rozliczeń z tytułu nabywanych przez ten bank lub tę kasę wierzytelności pieniężnych","package":"Paczka","packet":"Pakiet","pallet":"Paleta","payer":"Dokonujący płatności - w przypadku, gdy na fakturze występują dane podmiotu regulującego zobowiązanie w miejsce nabywcy","postalShipment":"Przesyłka pocztowa","primaryEntity":"Podmiot pierwotny - w przypadku, gdy na fakturze występują dane podmiotu będącego w stosunku do podatnika podmiotem przejętym lub przekształconym, który dokonywał dostawy lub świadczył usługę. Z wyłączeniem przypadków, o których mowa w art. 106j ust.2 pkt 3 ustawy, gdy dane te wykazywane są w części Podmiot1K","punnet":"Łubianka","railTransport":"Transport kolejowy","recipient":"Odbiorca - w przypadku, gdy na fakturze występują dane jednostek wewnętrznych, oddziałów, wyodrębnionych w ramach nabywcy, które same nie stanowią nabywcy w rozumieniu ustawy","restructuring":"Postępowanie restrukturyzacyjne","roadTransport":"Transport drogowy","seaTransport":"Transport morski","servicesArt100":"Świadczenie usług z art. 100 ust. 1 pkt 4 ustawy","supplyOutsideCountry":"Dostawa towarów oraz świadczenie usług opodatkowane poza terytorium kraju","taxRate0":"0%","taxRate0EX":"0% - EX","taxRate0KR":"0% - KR","taxRate0WDT":"0% - WDT","taxRate22":"22%","taxRate23":"23%","taxRate3":"3%","taxRate4":"4%","taxRate4oo":"4% lub 3% lub oo","taxRate5":"5%","taxRate7":"7%","taxRate8":"8%","taxRateNp":"niepodlegające opodatkowaniu-transakcje dostawy towarów oraz świadczenia usług poza terytorium kraju","taxRateNpI":"np I","taxRateNpII":"np II","taxRateOo":"4% lub 3% lub oo\\nUWAGA: oo jest wykazywane łącznie z 4% lub 3%","taxRateRevOo":"odwrotne obciążenie","taxRateZw":"zwolnione z opodatkowania","taxRateZw2":"zwolnione od podatku","taxRepresentative":"Przedstawiciel podatkowy","taxRepresentativeArt18":"Przedstawiciel podatkowy - w przypadku, gdy na fakturze występują dane przedstawiciela podatkowego, o którym mowa w przepisach art. 18a - 18d ustawy","tin":"Puszka","transfer":"Przelew","vatGroupIssuer":"Członek grupy VAT - wystawca","vatGroupRecipient":"Członek grupy VAT - odbiorca","voucher":"Bon","zw":"zw"},"farr":{"correctionInvoiceDate":"Korekta skutkująca w dacie wystawienia faktury korygującej","correctionOriginalDate":"Korekta skutkująca w dacie ujęcia faktury pierwotnej","correctionOtherDate":"Korekta skutkująca w dacie innej","correctionRefundDate":"Korekta skutkująca w dacie dokonania zwrotu całości lub części należności","employee":"Pracownik","factor":"Faktor - w przypadku gdy na fakturze występują dane faktora","invoiceIssuer":"Wystawca faktury - w przypadku gdy na fakturze występują dane podmiotu wystawiającego fakturę w imieniu podatnika. Nie dotyczy przypadku, gdy wystawcą faktury jest nabywca","localGovIssuer":"Jednostka samorządu terytorialnego - wystawca","localGovRecipient":"Jednostka samorządu terytorialnego - odbiorca","originalEntity":"Podmiot pierwotny - w przypadku gdy na fakturze występują dane podmiotu będącego w stosunku do podatnika podmiotem przejętym lub przekształconym, który dokonywał dostawy lub świadczył usługę. Z wyłączeniem przypadków, o których mowa w art. 106j ust.2 pkt 3 ustawy, gdy dane te wykazywane są w części Podmiot1K","paymentEntity":"Dokonujący płatności - w przypadku gdy na fakturze występują dane podmiotu regulującego zobowiązanie w miejsce nabywcy","recipientInternalUnit":"Odbiorca - w przypadku gdy na fakturze występują dane jednostek wewnętrznych, oddziałów, wyodrębnionych w ramach nabywcy, które same nie stanowią nabywcy w rozumieniu ustawy","taxRate65":"6.5%","taxRate7":"7%","vatGroupMemberIssuer":"Członek grupy VAT - wystawca","vatGroupMemberRecipient":"Członek grupy VAT - odbiorca"}}'),
  invoice: Lw
}, jw = /* @__PURE__ */ JSON.parse('{"additionalInformation":{"additionalDescription":"ExampleText","additionalInformationLabel":"ExampleText","documentDate":"ExampleText","documentNumber":"ExampleText","exciseTaxRefund":"ExampleText","fpLabel":"ExampleText","infoContent":"ExampleText","informationContent":"ExampleText","infoType":"ExampleText","ksefDocumentNumber":"ExampleText","ordinalNumber":"ExampleText","paymentDocuments":"ExampleText","rowNumber":"ExampleText","tpLabel":"ExampleText","typeOfInformation":"ExampleText"},"address":{"apartmentNumber":"ExampleText","communeName":"ExampleText","countryName":"ExampleText","districtName":"ExampleText","GLN":"ExampleText","houseNumber":"ExampleText","postName":"ExampleText","streetName":"ExampleText","townName":"ExampleText","voivodeshipName":"ExampleText","zipCode":"ExampleText"},"annotations":{"airDelivery":"ExampleText","antiques":"ExampleText","artPieces":"ExampleText","boatDelivery":"ExampleText","bodyNumber":"ExampleText","cashMethod":"ExampleText","chassisNumber":"ExampleText","description":"ExampleText","directiveLaw":"ExampleText","factoryNumber":"ExampleText","frameNumber":"ExampleText","header":"ExampleText","hullNumber":"ExampleText","landDelivery":"ExampleText","law":"ExampleText","marginProcedure":"ExampleText","newTransportsDelivery":"ExampleText","newTransportType":"ExampleText","noTaxBase":"ExampleText","noTaxBaseDocument":"ExampleText","noTaxBaseDocument2":"ExampleText","noTaxBaseDocument3":"ExampleText","noTaxDelivery":"ExampleText","otherLaw":"ExampleText","partialPayMechanism":"ExampleText","reverseTax":"ExampleText","selfInvoice":"ExampleText","threePartsSimplerMethod":"ExampleText","transportApprovalDate":"ExampleText","transportBrand":"ExampleText","transportColor":"ExampleText","transportMileage":"ExampleText","transportModel":"ExampleText","transportProductionYear":"ExampleText","transportRegistrationNumber":"ExampleText","transportType":"ExampleText","travelAgencies":"ExampleText","usedGoods":"ExampleText","usePermissionDate":"ExampleText","vat22DocumentNotRequired":"ExampleText","vat22DocumentRequired":"ExampleText","vin":"ExampleText"},"attachment":{"blockHeader":"ExampleText","description":"ExampleText","details":"ExampleText","header":"ExampleText","key":"ExampleText","tableLabel":"ExampleText","tableSummary":"ExampleText","value":"ExampleText"},"authorizedSubject":{"address":"ExampleText","authorizedSubject":"ExampleText","contactData":"ExampleText","correspondenceAddress":"ExampleText","correspondenceAddress2":"ExampleText","email":"ExampleText","eori":"ExampleText","noTaxId":"ExampleText","otherTaxId":"ExampleText","phone":"ExampleText","role":"ExampleText"},"carrier":{"carrier":"ExampleText","carrierAddress":"ExampleText"},"correctedInvoice":{"correctInvoiceNumber":"ExampleText","correctionEffectType":"ExampleText","correctionReason":"ExampleText","identificationHeader":"ExampleText","identificationHeaderIndexed":"ExampleText","invoiceNumber":"ExampleText","issueDate":"ExampleText","ksefNumber":"ExampleText","sectionHeader":"ExampleText"},"details":{"advanceInvoiceNumbers":"ExampleText","assignKsefNumberDate":"ExampleText","commonCurrencyRate":"ExampleText","costAmount":"ExampleText","currencyCode":"ExampleText","currencyRate":"ExampleText","currencyRate2":"ExampleText","deliveryOrServiceDate":"ExampleText","deliveryOrServiceDateFrom":"ExampleText","deliveryOrServiceDateTo":"ExampleText","discountPeriod":"ExampleText","getDate":"ExampleText","getMoneyDate":"ExampleText","getMoneyDate2":"ExampleText","header":"ExampleText","invoiceDate":"ExampleText","invoiceDateSentToKsef":"ExampleText","invoiceDateShort":"ExampleText","invoiceNumber":"ExampleText","issueDate":"ExampleText","issuePlace":"ExampleText","ossProcedure":"ExampleText","paymentReceivedDate":"ExampleText","place":"ExampleText","to":"ExampleText"},"discount":{"all":"ExampleText","header":"ExampleText","lp":"ExampleText","notAll":"ExampleText","productName":"ExampleText","quantity":"ExampleText","totalValue":"ExampleText","unit":"ExampleText"},"footer":{"generatedIn":"ExampleText","margin":"ExampleText","pagesTotal":"ExampleText","version":"ExampleText","appName":"ExampleText"},"header":{"advance":"ExampleText","attachmentWarning":"ExampleText","correctedInvoiceVatRr":"ExampleText","correction":"ExampleText","correctionAdvance":"ExampleText","correctionCollective":"ExampleText","correctionSettlement":"ExampleText","invoiceNumberLabel":"ExampleText","ksefNumberLabel":"ExampleText","ksefPart1":"ExampleText","ksefPart2":"ExampleText","ksefPart3":"ExampleText","primalInvoiceVatRr":"ExampleText","settlement":"ExampleText","simplified":"ExampleText","vat":"ExampleText"},"information":{"header":"ExampleText","invoiceFooter":"ExampleText"},"order":{"additionalInfo":"ExampleText","advancePaymentAmount":"ExampleText","advancePaymentAmountCorrection":"ExampleText","cn":"ExampleText","currencyRate":"ExampleText","exciseTaxAmount":"ExampleText","gtin":"ExampleText","gtu":"ExampleText","index":"ExampleText","issuedInCurrency":"ExampleText","lp":"ExampleText","netSalesValue":"ExampleText","netUnitPrice":"ExampleText","orderNumber":"ExampleText","orderValueWithTax":"ExampleText","ossTaxRate":"ExampleText","pkob":"ExampleText","pkwiu":"ExampleText","procedure":"ExampleText","procedureMarkings":"ExampleText","productMarker":"ExampleText","productName":"ExampleText","quantity":"ExampleText","receivedAdvance":"ExampleText","stateBefore":"ExampleText","taxAmount":"ExampleText","taxRate":"ExampleText","totalAmountDue":"ExampleText","uniqueRowNumber":"ExampleText","unit":"ExampleText"},"payment":{"bankAccountNumber":"ExampleText","conditionalDiscount":"ExampleText","description":"ExampleText","discountAmount":"ExampleText","discountConditions":"ExampleText","factorsBankAccountNumber":"ExampleText","farmer":"ExampleText","getter":"ExampleText","ksefTransferId":"ExampleText","maturityDate":"ExampleText","moneylessLink":"ExampleText","noPayment":"ExampleText","other":"ExampleText","otherPaymentDescription":"ExampleText","paidAllInParts":"ExampleText","paidInPart":"ExampleText","paidStatus":"ExampleText","partialPayment":"ExampleText","partialPaymentAmount":"ExampleText","partialPaymentDate":"ExampleText","payment":"ExampleText","paymentDate":"ExampleText","paymentDescription":"ExampleText","paymentDifferent":"ExampleText","paymentInformation":"ExampleText","paymentInformationContinued":"ExampleText","paymentMethod":"ExampleText","paymentMethod2":"ExampleText","paymentMethod3":"ExampleText","transfer":"ExampleText"},"qr1":{"description":"ExampleText","header":"ExampleText","offline":"ExampleText"},"qr2":{"certificate":"ExampleText","description":"ExampleText","header":"ExampleText"},"registers":{"accountDescription":"ExampleText","bankName":"ExampleText","bdo":"ExampleText","billFormat":"ExampleText","foreign":"ExampleText","fullAccountNumber":"ExampleText","fullForeignAccountNumber":"ExampleText","fullName":"ExampleText","fullNrbAccountNumber":"ExampleText","header":"ExampleText","krs":"ExampleText","ownBankAccount":"ExampleText","polish":"ExampleText","regon":"ExampleText","swiftCode":"ExampleText"},"rows":{"additionalInfo":"ExampleText","amount":"ExampleText","cn":"ExampleText","costZZP":"ExampleText","currencyRate":"ExampleText","deliveryDate":"ExampleText","discount":"ExampleText","exciseTaxAmount":"ExampleText","farmProductCost":"ExampleText","getDate":"ExampleText","getOrMakeDate":"ExampleText","grossSalesValue":"ExampleText","grossUnitPrice":"ExampleText","gtin":"ExampleText","gtu":"ExampleText","header":"ExampleText","index":"ExampleText","inWords":"ExampleText","issuedInCurrency":"ExampleText","lp":"ExampleText","lumpSumTaxRefund":"ExampleText","name":"ExampleText","netSalesValue":"ExampleText","netUnitPrice":"ExampleText","ossTaxRate":"ExampleText","overallCost":"ExampleText","pkob":"ExampleText","pkwiu":"ExampleText","priceNoZZP":"ExampleText","procedure":"ExampleText","procedureMarkings":"ExampleText","productMarker":"ExampleText","productName":"ExampleText","qualityDesc":"ExampleText","quantity":"ExampleText","remainingAmount":"ExampleText","remainingAmountCorrection":"ExampleText","stateBefore":"ExampleText","taxRate":"ExampleText","totalAmountDue":"ExampleText","totalAmountDueCorrection":"ExampleText","uniqueRowNumber":"ExampleText","unit":"ExampleText","unitPrice":"ExampleText","valueZZP":"ExampleText","vatSalesValue":"ExampleText","wageZZP":"ExampleText"},"settlement":{"chargeReason":"ExampleText","charges":"ExampleText","deductionReason":"ExampleText","deductions":"ExampleText","header":"ExampleText","toPay":"ExampleText","toSettle":"ExampleText","totalCharges":"ExampleText","totalDeductions":"ExampleText","amount":"ExampleText"},"subject1":{"address":"ExampleText","contactDetails":"ExampleText","contractorNumber":"ExampleText","correspondenceAddress":"ExampleText","eoriNumber":"ExampleText","mailingAddress":"ExampleText","name":"ExampleText","nip":"ExampleText","seller":"ExampleText","taxpayerStatus":"ExampleText","vatPrefix":"ExampleText"},"subject1K":{"address":"ExampleText","contactDetails":"ExampleText","contractorNumber":"ExampleText","correctedContent":"ExampleText","correctiveContent":"ExampleText","correspondenceAddress":"ExampleText","eoriNumber":"ExampleText","identificationData":"ExampleText","mailingAddress":"ExampleText","seller":"ExampleText","taxpayerStatus":"ExampleText","vatPrefix":"ExampleText"},"subject2":{"address":"ExampleText","buyer":"ExampleText","contactDetails":"ExampleText","correspondenceAddress":"ExampleText","customerNumber":"ExampleText","eoriNumber":"ExampleText","getterId":"ExampleText","gv":"ExampleText","internalId":"ExampleText","jst":"ExampleText","mailingAddress":"ExampleText","name":"ExampleText","nip":"ExampleText","no":"ExampleText","noId":"ExampleText","noTaxId":"ExampleText","taxIdOther":"ExampleText","taxPayerStatus":"ExampleText","vatPrefix":"ExampleText","vatUeNumber":"ExampleText","yes":"ExampleText"},"subject2k":{"address":"ExampleText","buyer":"ExampleText","buyerId":"ExampleText","clientNumber":"ExampleText","contactDetails":"ExampleText","correctedContent":"ExampleText","correctiveContent":"ExampleText","correspondenceAddress":"ExampleText","eori":"ExampleText","identificationData":"ExampleText","mailingAddress":"ExampleText","taxPayerStatus":"ExampleText"},"subject3":{"address":"ExampleText","clientNumber":"ExampleText","contactData":"ExampleText","correspondenceAddress":"ExampleText","eori":"ExampleText","getterId":"ExampleText","internalId":"ExampleText","name":"ExampleText","nip":"ExampleText","noTaxId":"ExampleText","otherEntity":"ExampleText","otherId":"ExampleText","otherRole":"ExampleText","otherTaxId":"ExampleText","role":"ExampleText","roleDescription":"ExampleText","share":"ExampleText","vatUeNumber":"ExampleText"},"subject3k":{"address":"ExampleText","clientNumber":"ExampleText","correctedContent":"ExampleText","correctiveContent":"ExampleText","correspondenceAddress":"ExampleText","eori":"ExampleText","getterId":"ExampleText","identificationData":"ExampleText","noTaxId":"ExampleText","otherEntity":"ExampleText","otherRole":"ExampleText","otherTaxId":"ExampleText","role":"ExampleText","share":"ExampleText"},"subjectContactData":{"e-mail":"ExampleText","email":"ExampleText","phone":"ExampleText"},"subjectIdentificationData":{"fullName":"ExampleText","internalId":"ExampleText","name":"ExampleText","nameSurname":"ExampleText","nip":"ExampleText","noId":"ExampleText","tradeName":"ExampleText"},"summary":{"5":"ExampleText","0domestic":"ExampleText","0export":"ExampleText","0long":"ExampleText","0mid":"ExampleText","0short":"ExampleText","0wdt":"ExampleText","23or22":"ExampleText","4or3":"ExampleText","8or7":"ExampleText","grossAmount":"ExampleText","lp":"ExampleText","margin":"ExampleText","netAmount":"ExampleText","noTax":"ExampleText","npBasedArt100":"ExampleText","npExcludingArt100":"ExampleText","oss":"ExampleText","reverseTax":"ExampleText","sectionHeader":"ExampleText","taxAmount":"ExampleText","taxAmountPLN":"ExampleText","taxFree":"ExampleText","taxRate":"ExampleText"},"transaction":{"batchNumber":"ExampleText","contract":"ExampleText","contractDate":"ExampleText","contractNumber":"ExampleText","currency":"ExampleText","currencyAndRate":"ExampleText","deliveryTerms":"ExampleText","header":"ExampleText","intermediaryDelivery":"ExampleText","order":"ExampleText","orderDate":"ExampleText","orderNumber":"ExampleText","rate":"ExampleText"},"transport":{"cargoDescription":"ExampleText","dataHeader":"ExampleText","endDateTime":"ExampleText","gln":"ExampleText","header":"ExampleText","intermediateAddress":"ExampleText","orderNumber":"ExampleText","otherCargo":"ExampleText","otherCargoDescription":"ExampleText","otherType":"ExampleText","otherTypeDescription":"ExampleText","packageUnit":"ExampleText","shipFrom":"ExampleText","shipmentHeader":"ExampleText","shipTo":"ExampleText","startDateTime":"ExampleText","type":"ExampleText"},"upo":{"authorizationDocumentShortcut":"ExampleText","complexId":"ExampleText","contextAuthorizationId":"ExampleText","contextType":"ExampleText","documentInfo":"ExampleText","documentRangeFrom":"ExampleText","documentRangeTo":"ExampleText","documentsTotal":"ExampleText","eDocumentFormCode":"ExampleText","entityFullName":"ExampleText","functionValueShortcut":"ExampleText","internalId":"ExampleText","peppolId":"ExampleText","registeredInMF":"ExampleText","sendMethod":"ExampleText","sessionReferenceNumber":"ExampleText","upoKsef":"ExampleText","upoPage":"ExampleText","upoPageTotal":"ExampleText","vendorNIP":"ExampleText","xsdFileLogicName":"ExampleText","nip":"ExampleText"},"wz":{"documentsHeader":"ExampleText","number":"ExampleText"}}'), Ow = {
  const: { countries: { AD: "ExampleText", AE: "ExampleText", AF: "ExampleText", AG: "ExampleText", AI: "ExampleText", AL: "ExampleText", AM: "ExampleText", AN: "ExampleText", AO: "ExampleText", AQ: "ExampleText", AR: "ExampleText", AS: "ExampleText", AT: "ExampleText", AU: "ExampleText", AW: "ExampleText", AX: "ExampleText", AZ: "ExampleText", BA: "ExampleText", BB: "ExampleText", BD: "ExampleText", BE: "ExampleText", BF: "ExampleText", BG: "ExampleText", BH: "ExampleText", BI: "ExampleText", BJ: "ExampleText", BL: "ExampleText", BM: "ExampleText", BN: "ExampleText", BO: "ExampleText", BQ: "ExampleText", BR: "ExampleText", BS: "ExampleText", BT: "ExampleText", BV: "ExampleText", BW: "ExampleText", BY: "ExampleText", BZ: "ExampleText", CA: "ExampleText", CC: "ExampleText", CD: "ExampleText", CF: "ExampleText", CG: "ExampleText", CH: "ExampleText", CI: "ExampleText", CK: "ExampleText", CL: "ExampleText", CM: "ExampleText", CN: "ExampleText", CO: "ExampleText", CR: "ExampleText", CU: "ExampleText", CV: "ExampleText", CW: "ExampleText", CX: "ExampleText", CY: "ExampleText", CZ: "ExampleText", DE: "ExampleText", DJ: "ExampleText", DK: "ExampleText", DM: "ExampleText", DO: "ExampleText", DZ: "ExampleText", EC: "ExampleText", EE: "ExampleText", EG: "ExampleText", EH: "ExampleText", ER: "ExampleText", ES: "ExampleText", ET: "ExampleText", FI: "ExampleText", FJ: "ExampleText", FK: "ExampleText", FM: "ExampleText", FO: "ExampleText", FR: "ExampleText", GA: "ExampleText", GB: "ExampleText", GD: "ExampleText", GE: "ExampleText", GF: "ExampleText", GG: "ExampleText", GH: "ExampleText", GI: "ExampleText", GL: "ExampleText", GM: "ExampleText", GN: "ExampleText", GP: "ExampleText", GQ: "ExampleText", GR: "ExampleText", GS: "ExampleText", GT: "ExampleText", GU: "ExampleText", GW: "ExampleText", GY: "ExampleText", HK: "ExampleText", HM: "ExampleText", HN: "ExampleText", HR: "ExampleText", HT: "ExampleText", HU: "ExampleText", ID: "ExampleText", IE: "ExampleText", IL: "ExampleText", IM: "ExampleText", IN: "ExampleText", IO: "ExampleText", IQ: "ExampleText", IR: "ExampleText", IS: "ExampleText", IT: "ExampleText", JE: "ExampleText", JM: "ExampleText", JO: "ExampleText", JP: "ExampleText", KE: "ExampleText", KG: "ExampleText", KH: "ExampleText", KI: "ExampleText", KM: "ExampleText", KN: "ExampleText", KP: "ExampleText", KR: "ExampleText", KW: "ExampleText", KY: "ExampleText", KZ: "ExampleText", LA: "ExampleText", LB: "ExampleText", LC: "ExampleText", LI: "ExampleText", LK: "ExampleText", LR: "ExampleText", LS: "ExampleText", LT: "ExampleText", LU: "ExampleText", LV: "ExampleText", LY: "ExampleText", MA: "ExampleText", MC: "ExampleText", MD: "ExampleText", ME: "ExampleText", MF: "ExampleText", MG: "ExampleText", MH: "ExampleText", MK: "ExampleText", ML: "ExampleText", MM: "ExampleText", MN: "ExampleText", MO: "ExampleText", MP: "ExampleText", MQ: "ExampleText", MR: "ExampleText", MS: "ExampleText", MT: "ExampleText", MU: "ExampleText", MV: "ExampleText", MW: "ExampleText", MX: "ExampleText", MY: "ExampleText", MZ: "ExampleText", NA: "ExampleText", NC: "ExampleText", NE: "ExampleText", NF: "ExampleText", NG: "ExampleText", NI: "ExampleText", NL: "ExampleText", NO: "ExampleText", NP: "ExampleText", NR: "ExampleText", NU: "ExampleText", NZ: "ExampleText", OM: "ExampleText", PA: "ExampleText", PE: "ExampleText", PF: "ExampleText", PG: "ExampleText", PH: "ExampleText", PK: "ExampleText", PL: "ExampleText", PM: "ExampleText", PN: "ExampleText", PR: "ExampleText", PS: "ExampleText", PT: "ExampleText", PW: "ExampleText", PY: "ExampleText", QA: "ExampleText", RE: "ExampleText", RO: "ExampleText", RS: "ExampleText", RU: "ExampleText", RW: "ExampleText", SA: "ExampleText", SB: "ExampleText", SC: "ExampleText", SD: "ExampleText", SE: "ExampleText", SG: "ExampleText", SH: "ExampleText", SI: "ExampleText", SJ: "ExampleText", SK: "ExampleText", SL: "ExampleText", SM: "ExampleText", SN: "ExampleText", SO: "ExampleText", SR: "ExampleText", SS: "ExampleText", ST: "ExampleText", SV: "ExampleText", SX: "ExampleText", SY: "ExampleText", SZ: "ExampleText", TC: "ExampleText", TD: "ExampleText", TF: "ExampleText", TG: "ExampleText", TH: "ExampleText", TJ: "ExampleText", TK: "ExampleText", TL: "ExampleText", TM: "ExampleText", TN: "ExampleText", TO: "ExampleText", TR: "ExampleText", TT: "ExampleText", TV: "ExampleText", TW: "ExampleText", TZ: "ExampleText", UA: "ExampleText", UG: "ExampleText", UM: "ExampleText", US: "ExampleText", UY: "ExampleText", UZ: "ExampleText", VA: "ExampleText", VC: "ExampleText", VE: "ExampleText", VG: "ExampleText", VI: "ExampleText", VN: "ExampleText", VU: "ExampleText", WF: "ExampleText", WS: "ExampleText", XC: "ExampleText", XI: "ExampleText", XK: "ExampleText", XL: "ExampleText", YE: "ExampleText", YT: "ExampleText", ZA: "ExampleText", ZM: "ExampleText", ZW: "ExampleText" }, fa: { additionalBuyer: "ExampleText", airTransport: "ExampleText", bag: "ExampleText", bankruptcy: "ExampleText", barrel: "ExampleText", basket: "ExampleText", bin: "ExampleText", box: "ExampleText", bubble: "ExampleText", bulkLiquidContainer: "ExampleText", bulkPackage: "ExampleText", bulkSolidContainer: "ExampleText", cage: "ExampleText", canister: "ExampleText", card: "ExampleText", carton: "ExampleText", cash: "ExampleText", check: "ExampleText", container: "ExampleText", correctionOtherDate: "ExampleText", courtBailiff: "ExampleText", courtBailiffArt106c2: "ExampleText", crate: "ExampleText", credit: "ExampleText", cylinder: "ExampleText", domesticZeroRate: "ExampleText", employee: "ExampleText", enforcementAuthority: "ExampleText", enforcementAuthorityArt106c1: "ExampleText", exportZeroRate: "ExampleText", factor: "ExampleText", fixedPipeline: "ExampleText", goodsServicesAttachment15: "ExampleText", inheritedBusiness: "ExampleText", inlandNavigation: "ExampleText", intraCommunitySupply: "ExampleText", invoiceIssuer: "ExampleText", liquidation: "ExampleText", localGovernmentIssuer: "ExampleText", localGovernmentRecipient: "ExampleText", mobile: "ExampleText", oo: "ExampleText", otherDomesticSales: "ExampleText", ownAccountCollection: "ExampleText", ownAccountInternal: "ExampleText", ownAccountSettlement: "ExampleText", package: "ExampleText", packet: "ExampleText", pallet: "ExampleText", payer: "ExampleText", postalShipment: "ExampleText", primaryEntity: "ExampleText", punnet: "ExampleText", railTransport: "ExampleText", recipient: "ExampleText", restructuring: "ExampleText", roadTransport: "ExampleText", seaTransport: "ExampleText", servicesArt100: "ExampleText", supplyOutsideCountry: "ExampleText", taxRate0: "ExampleText", taxRate0EX: "ExampleText", taxRate0KR: "ExampleText", taxRate0WDT: "ExampleText", taxRate22: "ExampleText", taxRate23: "ExampleText", taxRate3: "ExampleText", taxRate4: "ExampleText", taxRate4oo: "ExampleText", taxRate5: "ExampleText", taxRate7: "ExampleText", taxRate8: "ExampleText", taxRateNp: "ExampleText", taxRateNpI: "ExampleText", taxRateNpII: "ExampleText", taxRateOo: "ExampleText", taxRateRevOo: "ExampleText", taxRateZw: "ExampleText", taxRateZw2: "ExampleText", taxRepresentative: "ExampleText", taxRepresentativeArt18: "ExampleText", tin: "ExampleText", transfer: "ExampleText", vatGroupIssuer: "ExampleText", vatGroupRecipient: "ExampleText", voucher: "ExampleText", zw: "ExampleText" }, farr: { correctionInvoiceDate: "ExampleText", correctionOriginalDate: "ExampleText", correctionOtherDate: "ExampleText", correctionRefundDate: "ExampleText", employee: "ExampleText", factor: "ExampleText", invoiceIssuer: "ExampleText", localGovIssuer: "ExampleText", localGovRecipient: "ExampleText", originalEntity: "ExampleText", paymentEntity: "ExampleText", recipientInternalUnit: "ExampleText", taxRate65: "ExampleText", taxRate7: "ExampleText", vatGroupMemberIssuer: "ExampleText", vatGroupMemberRecipient: "ExampleText" } },
  invoice: jw
}, GB = l.init({
  lng: "pl",
  debug: !0,
  resources: {
    en: { translation: Ow },
    pl: { translation: kw }
  }
}).then(() => {
});
async function Xw(e, n, c = "blob") {
  const E = await SB(e), Y = E?.Faktura?.Naglowek?.KodFormularza?._attributes?.kodSystemowy;
  let X;
  switch (await GB, Y) {
    case "FA (1)":
      X = DE(E.Faktura, n);
      break;
    case "FA (2)":
      X = WE(E.Faktura, n);
      break;
    case "FA (3)":
      X = Cw(E.Faktura, n);
      break;
    case "FA_RR (1)":
    case "FA_RR(1)":
      X = bw(E.Faktura, n);
      break;
    default:
      throw new Error(`Unknown XML Version: ${Y}`);
  }
  switch (c) {
    case "blob":
      return X.getBlob();
    case "base64":
    default:
      return X.getBase64();
  }
}
function Jw(e) {
  const n = Te(e.Dokument), c = [], E = [];
  c.push(Ei(4)), c.push(zi()), c.push(Ei(8)), c.push(re(l.t("invoice.upo.upoKsef"), U.HeaderPosition)), c.push(Ei(8)), WA(e.NumerReferencyjnySesji) && E.push([
    re(l.t("invoice.upo.sessionReferenceNumber"), U.GrayBoldTitle),
    re(e.NumerReferencyjnySesji?._text, U.Default)
  ]), WA(e.OpisPotwierdzenia?.Strona) && E.push([
    re(l.t("invoice.upo.upoPage"), U.GrayBoldTitle),
    re(e.OpisPotwierdzenia?.Strona?._text, U.Default)
  ]), WA(e.OpisPotwierdzenia?.LiczbaStron) && E.push([
    re(l.t("invoice.upo.upoPageTotal"), U.GrayBoldTitle),
    re(e.OpisPotwierdzenia?.LiczbaStron?._text, U.Default)
  ]), WA(e.OpisPotwierdzenia?.ZakresDokumentowOd) && E.push([
    re(l.t("invoice.upo.documentRangeFrom"), U.GrayBoldTitle),
    re(e.OpisPotwierdzenia?.ZakresDokumentowOd?._text, U.Default)
  ]), WA(e.OpisPotwierdzenia?.ZakresDokumentowDo) && E.push([
    re(l.t("invoice.upo.documentRangeTo"), U.GrayBoldTitle),
    re(e.OpisPotwierdzenia?.ZakresDokumentowDo?._text, U.Default)
  ]), WA(e.OpisPotwierdzenia?.CalkowitaLiczbaDokumentow) && E.push([
    re(l.t("invoice.upo.documentsTotal"), U.GrayBoldTitle),
    re(e.OpisPotwierdzenia?.CalkowitaLiczbaDokumentow?._text, U.Default)
  ]);
  const Y = e?.Uwierzytelnienie?.IdKontekstu;
  if (Y) {
    let r = "", A;
    WA(Y.IdDostawcyUslugPeppol) && (r = l.t("invoice.upo.peppolId"), A = de(Y.IdDostawcyUslugPeppol)), WA(Y.Nip) && (r = l.t("invoice.upo.nip"), A = de(Y.Nip)), WA(Y.IdWewnetrzny) && (r = l.t("invoice.upo.internalId"), A = de(Y.IdWewnetrzny)), WA(Y.IdZlozonyVatUE) && (r = l.t("invoice.upo.complexId"), A = de(Y.IdZlozonyVatUE)), E.push([
      re(l.t("invoice.upo.contextType"), U.GrayBoldTitle),
      re(r, U.Default)
    ]), E.push([
      re(l.t("invoice.upo.contextAuthorizationId"), U.GrayBoldTitle),
      re(A, U.Default)
    ]);
  }
  WA(e.Uwierzytelnienie?.SkrotDokumentuUwierzytelniajacego) && E.push([
    re(l.t("invoice.upo.authorizationDocumentShortcut"), U.GrayBoldTitle),
    re(e.Uwierzytelnienie?.SkrotDokumentuUwierzytelniajacego?._text, U.Default)
  ]), WA(e.NazwaStrukturyLogicznej) && E.push([
    re(l.t("invoice.upo.xsdFileLogicName"), U.GrayBoldTitle),
    re(e.NazwaStrukturyLogicznej?._text, U.Default)
  ]), WA(e.KodFormularza) && E.push([
    re(l.t("invoice.upo.eDocumentFormCode"), U.GrayBoldTitle),
    re(e.KodFormularza?._text, U.Default)
  ]), c.push([
    {
      unbreakable: !0,
      table: {
        body: E,
        widths: ["auto", "*"]
      },
      layout: Cn
    }
  ]), c.push(Ei(8));
  const X = [
    { name: "lp", title: l.t("invoice.additionalInformation.ordinalNumber"), format: U.Default },
    {
      name: "NumerKSeFDokumentu",
      title: l.t("invoice.additionalInformation.ksefDocumentNumber"),
      format: U.Default
    },
    { name: "NumerFaktury", title: l.t("invoice.details.invoiceNumber"), format: U.Default },
    { name: "NipSprzedawcy", title: l.t("invoice.upo.vendorNIP"), format: U.Default },
    {
      name: "DataWystawieniaFaktury",
      title: l.t("invoice.details.invoiceDate"),
      format: U.Date
    },
    {
      name: "DataPrzeslaniaDokumentu",
      title: l.t("invoice.details.invoiceDateSentToKsef"),
      format: U.DateTime
    },
    {
      name: "DataNadaniaNumeruKSeF",
      title: l.t("invoice.details.assignKsefNumberDate"),
      format: U.DateTime
    },
    {
      name: "SkrotDokumentu",
      title: l.t("invoice.upo.functionValueShortcut"),
      format: U.Default
    },
    {
      name: "TrybWysylki",
      title: l.t("invoice.upo.sendMethod"),
      format: U.Default,
      width: "*"
    }
  ], Q = n.map((r, A) => ({ ...r, lp: A + 1 })) ?? [], B = ft(
    X,
    Q,
    "auto"
  );
  return B.content && c.push(B.content), c;
}
function Kw(e) {
  return [
    It(
      {
        text: [
          { text: l.t("invoice.header.ksefPart1"), fontSize: 18 },
          { text: l.t("invoice.header.ksefPart2"), color: "red", bold: !0, fontSize: 18 },
          { text: l.t("invoice.header.ksefPart3"), bold: !0, fontSize: 18 }
        ]
      },
      [
        {
          text: qA(
            l.t("invoice.upo.entityFullName"),
            e.NazwaPodmiotuPrzyjmujacego
          ),
          alignment: xt.RIGHT
        },
        {
          text: qA(l.t("invoice.upo.documentInfo"), l.t("invoice.upo.registeredInMF")),
          alignment: xt.RIGHT
        }
      ]
    )
  ];
}
async function Zw(e) {
  const n = await SB(e);
  await GB;
  const c = {
    content: [Kw(n.Potwierdzenie), Jw(n.Potwierdzenie)],
    ...rs(),
    pageSize: "A4",
    pageOrientation: "landscape",
    footer: function(E, Y) {
      return {
        text: `${E.toString()} ${l.t("invoice.footer.pagesTotal")} ${Y}`,
        alignment: xt.RIGHT,
        margin: [0, 0, 20, 0]
      };
    }
  };
  return Yn.createPdf(c).getBlob();
}
//export {
//  ma as Answer,
//  U as FormatTyp,
//  xt as Position,
//  Jw as generateDokumentUPO,
//  DE as generateFA1,
//  WE as generateFA2,
//  Cw as generateFA3,
//  bw as generateFARR,
//  Xw as generateInvoice,
//  Kw as generateNaglowekUPO,
//  Zw as generatePDFUPO,
//  rs as generateStyle,
//  GB as i18nReady,
//  l as i18next
//};

var generateInvoice = Xw;
var generatePDFUPO = Zw;