import { map as f } from "./accelbyte-widgets722.mjs";
import { nullTag as u } from "./accelbyte-widgets742.mjs";
import { seq as s } from "./accelbyte-widgets723.mjs";
import { string as b } from "./accelbyte-widgets724.mjs";
import { boolTag as k } from "./accelbyte-widgets743.mjs";
import { float as $, floatExp as j, floatNaN as A } from "./accelbyte-widgets744.mjs";
import { int as O, intHex as N, intOct as x } from "./accelbyte-widgets745.mjs";
import { schema as E } from "./accelbyte-widgets746.mjs";
import { schema as T } from "./accelbyte-widgets747.mjs";
import { binary as p } from "./accelbyte-widgets748.mjs";
import { omap as y } from "./accelbyte-widgets653.mjs";
import { pairs as l } from "./accelbyte-widgets749.mjs";
import { schema as i } from "./accelbyte-widgets750.mjs";
import { set as c } from "./accelbyte-widgets654.mjs";
import { timestamp as g, floatTime as J, intTime as S } from "./accelbyte-widgets751.mjs";
const e = /* @__PURE__ */ new Map([
  ["core", E],
  ["failsafe", [f, s, b]],
  ["json", T],
  ["yaml11", i],
  ["yaml-1.1", i]
]), n = {
  binary: p,
  bool: k,
  float: $,
  floatExp: j,
  floatNaN: A,
  floatTime: J,
  int: O,
  intHex: N,
  intOct: x,
  intTime: S,
  map: f,
  null: u,
  omap: y,
  pairs: l,
  seq: s,
  set: c,
  timestamp: g
}, P = {
  "tag:yaml.org,2002:binary": p,
  "tag:yaml.org,2002:omap": y,
  "tag:yaml.org,2002:pairs": l,
  "tag:yaml.org,2002:set": c,
  "tag:yaml.org,2002:timestamp": g
};
function Q(m, a) {
  let r = e.get(a);
  if (!r)
    if (Array.isArray(m))
      r = [];
    else {
      const o = Array.from(e.keys()).filter((t) => t !== "yaml11").map((t) => JSON.stringify(t)).join(", ");
      throw new Error(`Unknown schema "${a}"; use one of ${o} or define customTags array`);
    }
  if (Array.isArray(m))
    for (const o of m)
      r = r.concat(o);
  else
    typeof m == "function" && (r = m(r.slice()));
  return r.map((o) => {
    if (typeof o != "string")
      return o;
    const t = n[o];
    if (t)
      return t;
    const h = Object.keys(n).map((w) => JSON.stringify(w)).join(", ");
    throw new Error(`Unknown custom tag "${o}"; use one of ${h}`);
  });
}
export {
  P as coreKnownTags,
  Q as getTags
};
