UNPKG

gvf3n4ygn-test

Version:
4,407 lines 249 kB
import "./chunk-PZ5AY32C.js";

// ../../node_modules/.pnpm/prettier@3.5.0/node_modules/prettier/plugins/estree.mjs
var Xa = Object.defineProperty;
var Ws = (e) => {
  throw TypeError(e);
};
var Tr = (e, t) => {
  for (var r in t) Xa(e, r, { get: t[r], enumerable: true });
};
var Gs = (e, t, r) => t.has(e) || Ws("Cannot " + r);
var pt = (e, t, r) => (Gs(e, t, "read from private field"), r ? r.call(e) : t.get(e));
var Us = (e, t, r) => t.has(e) ? Ws("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
var Ys = (e, t, r, n) => (Gs(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
var js = {};
Tr(js, { languages: () => cm, options: () => Wa, printers: () => pm });
var Ns = [{ linguistLanguageId: 183, name: "JavaScript", type: "programming", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: ["js", "node"], extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".wxs"], filenames: ["Jakefile"], interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell", "zx"], parsers: ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], vscodeLanguageIds: ["javascript", "mongo"] }, { linguistLanguageId: 183, name: "Flow", type: "programming", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: [], extensions: [".js.flow"], filenames: [], interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"] }, { linguistLanguageId: 183, name: "JSX", type: "programming", tmScope: "source.js.jsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", color: void 0, aliases: void 0, extensions: [".jsx"], filenames: void 0, interpreters: void 0, parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], group: "JavaScript" }, { linguistLanguageId: 378, name: "TypeScript", type: "programming", color: "#3178c6", aliases: ["ts"], interpreters: ["deno", "ts-node"], extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aceMode: "typescript", codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"] }, { linguistLanguageId: 94901924, name: "TSX", type: "programming", color: "#3178c6", group: "TypeScript", extensions: [".tsx"], tmScope: "source.tsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"] }];
var _s = {};
Tr(_s, { canAttachComment: () => dp, embed: () => ti, experimentalFeatures: () => nm, getCommentChildNodes: () => xp, getVisitorKeys: () => Sr, handleComments: () => Qn, insertPragma: () => mi, isBlockComment: () => ee, isGap: () => hp, massageAstNode: () => du, print: () => va, printComment: () => wu, willPrintOwnComments: () => zn });
var Ha = (e, t, r, n) => {
  if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
};
var N = Ha;
var Va = (e, t, r) => {
  if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
};
var M = Va;
function $a(e) {
  return e !== null && typeof e == "object";
}
var Xs = $a;
function* Ka(e, t) {
  let { getVisitorKeys: r, filter: n = () => true } = t, s = (u) => Xs(u) && n(u);
  for (let u of r(e)) {
    let i = e[u];
    if (Array.isArray(i)) for (let a of i) s(a) && (yield a);
    else s(i) && (yield i);
  }
}
function* Qa(e, t) {
  let r = [e];
  for (let n = 0; n < r.length; n++) {
    let s = r[n];
    for (let u of Ka(s, t)) yield u, r.push(u);
  }
}
function Hs(e, { getVisitorKeys: t, predicate: r }) {
  for (let n of Qa(e, { getVisitorKeys: t })) if (r(n)) return true;
  return false;
}
var Vs = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
function $s(e) {
  return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
}
function Ks(e) {
  return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101631 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129673 || e >= 129679 && e <= 129734 || e >= 129742 && e <= 129756 || e >= 129759 && e <= 129769 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
}
var Qs = (e) => !($s(e) || Ks(e));
var za = /[^\x20-\x7F]/u;
function Za(e) {
  if (!e) return 0;
  if (!za.test(e)) return e.length;
  e = e.replace(Vs(), "  ");
  let t = 0;
  for (let r of e) {
    let n = r.codePointAt(0);
    n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || (t += Qs(n) ? 1 : 2);
  }
  return t;
}
var tt = Za;
function dr(e) {
  return (t, r, n) => {
    let s = !!(n != null && n.backwards);
    if (r === false) return false;
    let { length: u } = t, i = r;
    for (; i >= 0 && i < u; ) {
      let a = t.charAt(i);
      if (e instanceof RegExp) {
        if (!e.test(a)) return i;
      } else if (!e.includes(a)) return i;
      s ? i-- : i++;
    }
    return i === -1 || i === u ? i : false;
  };
}
var Pm = dr(/\s/u);
var Ye = dr(" 	");
var zs = dr(",; 	");
var Zs = dr(/[^\n\r]/u);
function eo(e, t, r) {
  let n = !!(r != null && r.backwards);
  if (t === false) return false;
  let s = e.charAt(t);
  if (n) {
    if (e.charAt(t - 1) === "\r" && s === `
`) return t - 2;
    if (s === `
` || s === "\r" || s === "\u2028" || s === "\u2029") return t - 1;
  } else {
    if (s === "\r" && e.charAt(t + 1) === `
`) return t + 2;
    if (s === `
` || s === "\r" || s === "\u2028" || s === "\u2029") return t + 1;
  }
  return t;
}
var Ne = eo;
function to(e, t, r = {}) {
  let n = Ye(e, r.backwards ? t - 1 : t, r), s = Ne(e, n, r);
  return n !== s;
}
var Z = to;
function ro(e, t) {
  if (t === false) return false;
  if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
    for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
  }
  return t;
}
var Ot = ro;
function no(e, t) {
  return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Zs(e, t) : t;
}
var _t = no;
function so(e, t) {
  let r = null, n = t;
  for (; n !== r; ) r = n, n = zs(e, n), n = Ot(e, n), n = Ye(e, n);
  return n = _t(e, n), n = Ne(e, n), n !== false && Z(e, n);
}
var vt = so;
function uo(e) {
  return Array.isArray(e) && e.length > 0;
}
var O = uo;
var eu = new Proxy(() => {
}, { get: () => eu });
var jt = eu;
var xr = "'";
var tu = '"';
function io(e, t) {
  let r = t === true || t === xr ? xr : tu, n = r === xr ? tu : xr, s = 0, u = 0;
  for (let i of e) i === r ? s++ : i === n && u++;
  return s > u ? n : r;
}
var hr = io;
function ao(e, t, r) {
  let n = t === '"' ? "'" : '"', u = N(false, e, /\\(.)|(["'])/gsu, (i, a, o) => a === n ? a : o === t ? "\\" + o : o || (r && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a) ? a : "\\" + a));
  return t + u + t;
}
var ru = ao;
function oo(e, t) {
  jt(/^(?<quote>["']).*\k<quote>$/su.test(e));
  let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? '"' : t.__isInHtmlAttribute ? "'" : hr(r, t.singleQuote);
  return e.charAt(0) === n ? e : ru(r, n, false);
}
var rt = oo;
function q(e) {
  var n, s, u;
  let t = ((n = e.range) == null ? void 0 : n[0]) ?? e.start, r = (u = ((s = e.declaration) == null ? void 0 : s.decorators) ?? e.decorators) == null ? void 0 : u[0];
  return r ? Math.min(q(r), t) : t;
}
function k(e) {
  var t;
  return ((t = e.range) == null ? void 0 : t[1]) ?? e.end;
}
function bt(e, t) {
  let r = q(e);
  return Number.isInteger(r) && r === q(t);
}
function po(e, t) {
  let r = k(e);
  return Number.isInteger(r) && r === k(t);
}
function nu(e, t) {
  return bt(e, t) && po(e, t);
}
var er = null;
function tr(e) {
  if (er !== null && typeof er.property) {
    let t = er;
    return er = tr.prototype = null, t;
  }
  return er = tr.prototype = e ?? /* @__PURE__ */ Object.create(null), new tr();
}
var co = 10;
for (let e = 0; e <= co; e++) tr();
function Ln(e) {
  return tr(e);
}
function lo(e, t = "type") {
  Ln(e);
  function r(n) {
    let s = n[t], u = e[s];
    if (!Array.isArray(u)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: n });
    return u;
  }
  return r;
}
var gr = lo;
var su = { ArrayExpression: ["elements"], AssignmentExpression: ["left", "right"], BinaryExpression: ["left", "right"], InterpreterDirective: [], Directive: ["value"], DirectiveLiteral: [], BlockStatement: ["directives", "body"], BreakStatement: ["label"], CallExpression: ["callee", "arguments", "typeParameters", "typeArguments"], CatchClause: ["param", "body"], ConditionalExpression: ["test", "consequent", "alternate"], ContinueStatement: ["label"], DebuggerStatement: [], DoWhileStatement: ["body", "test"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "typeParameters", "params", "predicate", "returnType", "body"], FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"], Identifier: ["typeAnnotation", "decorators"], IfStatement: ["test", "consequent", "alternate"], LabeledStatement: ["label", "body"], StringLiteral: [], NumericLiteral: [], NullLiteral: [], BooleanLiteral: [], RegExpLiteral: [], LogicalExpression: ["left", "right"], MemberExpression: ["object", "property"], NewExpression: ["callee", "arguments", "typeParameters", "typeArguments"], Program: ["directives", "body"], ObjectExpression: ["properties"], ObjectMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectProperty: ["key", "value", "decorators"], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: ["argument"], SequenceExpression: ["expressions"], ParenthesizedExpression: ["expression"], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], ThisExpression: [], ThrowStatement: ["argument"], TryStatement: ["block", "handler", "finalizer"], UnaryExpression: ["argument"], UpdateExpression: ["argument"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id", "init"], WhileStatement: ["test", "body"], WithStatement: ["object", "body"], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], ClassBody: ["body"], ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportNamedDeclaration: ["declaration", "specifiers", "source", "attributes"], ExportSpecifier: ["local", "exported"], ForOfStatement: ["left", "right", "body"], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportSpecifier: ["imported", "local"], ImportExpression: ["source", "options"], MetaProperty: ["meta", "property"], ClassMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectPattern: ["properties", "typeAnnotation", "decorators"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "typeParameters", "quasi", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "arguments", "typeParameters", "typeArguments"], ClassProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassAccessorProperty: ["decorators", "key", "typeAnnotation", "value"], ClassPrivateProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassPrivateMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], PrivateName: ["id"], StaticBlock: ["body"], AnyTypeAnnotation: [], ArrayTypeAnnotation: ["elementType"], BooleanTypeAnnotation: [], BooleanLiteralTypeAnnotation: [], NullLiteralTypeAnnotation: [], ClassImplements: ["id", "typeParameters"], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareFunction: ["id", "predicate"], DeclareInterface: ["id", "typeParameters", "extends", "body"], DeclareModule: ["id", "body"], DeclareModuleExports: ["typeAnnotation"], DeclareTypeAlias: ["id", "typeParameters", "right"], DeclareOpaqueType: ["id", "typeParameters", "supertype"], DeclareVariable: ["id"], DeclareExportDeclaration: ["declaration", "specifiers", "source", "attributes"], DeclareExportAllDeclaration: ["source", "attributes"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: ["name", "typeAnnotation"], GenericTypeAnnotation: ["id", "typeParameters"], InferredPredicate: [], InterfaceExtends: ["id", "typeParameters"], InterfaceDeclaration: ["id", "typeParameters", "extends", "body"], InterfaceTypeAnnotation: ["extends", "body"], IntersectionTypeAnnotation: ["types"], MixedTypeAnnotation: [], EmptyTypeAnnotation: [], NullableTypeAnnotation: ["typeAnnotation"], NumberLiteralTypeAnnotation: [], NumberTypeAnnotation: [], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeCallProperty: ["value"], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["qualification", "id"], StringLiteralTypeAnnotation: [], StringTypeAnnotation: [], SymbolTypeAnnotation: [], ThisTypeAnnotation: [], TupleTypeAnnotation: ["types", "elementTypes"], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeAlias: ["id", "typeParameters", "right"], TypeAnnotation: ["typeAnnotation"], TypeCastExpression: ["expression", "typeAnnotation"], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: ["params"], TypeParameterInstantiation: ["params"], UnionTypeAnnotation: ["types"], Variance: [], VoidTypeAnnotation: [], EnumDeclaration: ["id", "body"], EnumBooleanBody: ["members"], EnumNumberBody: ["members"], EnumStringBody: ["members"], EnumSymbolBody: ["members"], EnumBooleanMember: ["id", "init"], EnumNumberMember: ["id", "init"], EnumStringMember: ["id", "init"], EnumDefaultedMember: ["id"], IndexedAccessType: ["objectType", "indexType"], OptionalIndexedAccessType: ["objectType", "indexType"], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: [], JSXExpressionContainer: ["expression"], JSXSpreadChild: ["expression"], JSXIdentifier: [], JSXMemberExpression: ["object", "property"], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeParameters", "typeArguments", "attributes"], JSXSpreadAttribute: ["argument"], JSXText: [], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXOpeningFragment: [], JSXClosingFragment: [], Noop: [], Placeholder: [], V8IntrinsicIdentifier: [], ArgumentPlaceholder: [], BindExpression: ["object", "callee"], ImportAttribute: ["key", "value"], Decorator: ["expression"], DoExpression: ["body"], ExportDefaultSpecifier: ["exported"], RecordExpression: ["properties"], TupleExpression: ["elements"], ModuleExpression: ["body"], TopicReference: [], PipelineTopicExpression: ["expression"], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: [], TSParameterProperty: ["parameter", "decorators"], TSDeclareFunction: ["id", "typeParameters", "params", "returnType", "body"], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSQualifiedName: ["left", "right"], TSCallSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSPropertySignature: ["key", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSIndexSignature: ["parameters", "typeAnnotation"], TSAnyKeyword: [], TSBooleanKeyword: [], TSBigIntKeyword: [], TSIntrinsicKeyword: [], TSNeverKeyword: [], TSNullKeyword: [], TSNumberKeyword: [], TSObjectKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], TSUndefinedKeyword: [], TSUnknownKeyword: [], TSVoidKeyword: [], TSThisType: [], TSFunctionType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructorType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSTypeReference: ["typeName", "typeParameters", "typeArguments"], TSTypePredicate: ["parameterName", "typeAnnotation"], TSTypeQuery: ["exprName", "typeParameters", "typeArguments"], TSTypeLiteral: ["members"], TSArrayType: ["elementType"], TSTupleType: ["elementTypes"], TSOptionalType: ["typeAnnotation"], TSRestType: ["typeAnnotation"], TSNamedTupleMember: ["label", "elementType"], TSUnionType: ["types"], TSIntersectionType: ["types"], TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"], TSInferType: ["typeParameter"], TSParenthesizedType: ["typeAnnotation"], TSTypeOperator: ["typeAnnotation"], TSIndexedAccessType: ["objectType", "indexType"], TSMappedType: ["typeParameter", "nameType", "typeAnnotation"], TSTemplateLiteralType: ["quasis", "types"], TSLiteralType: ["literal"], TSExpressionWithTypeArguments: ["expression", "typeParameters"], TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"], TSInterfaceBody: ["body"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSInstantiationExpression: ["expression", "typeParameters", "typeArguments"], TSAsExpression: ["expression", "typeAnnotation"], TSSatisfiesExpression: ["expression", "typeAnnotation"], TSTypeAssertion: ["typeAnnotation", "expression"], TSEnumBody: ["members"], TSEnumDeclaration: ["id", "members"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "options", "qualifier", "typeParameters", "typeArguments"], TSImportEqualsDeclaration: ["id", "moduleReference"], TSExternalModuleReference: ["expression"], TSNonNullExpression: ["expression"], TSExportAssignment: ["expression"], TSNamespaceExportDeclaration: ["id"], TSTypeAnnotation: ["typeAnnotation"], TSTypeParameterInstantiation: ["params"], TSTypeParameterDeclaration: ["params"], TSTypeParameter: ["constraint", "default", "name"], ChainExpression: ["expression"], ExperimentalRestProperty: ["argument"], ExperimentalSpreadProperty: ["argument"], Literal: [], MethodDefinition: ["decorators", "key", "value"], PrivateIdentifier: [], Property: ["key", "value"], PropertyDefinition: ["decorators", "key", "typeAnnotation", "value", "variance"], AccessorProperty: ["decorators", "key", "typeAnnotation", "value"], TSAbstractAccessorProperty: ["decorators", "key", "typeAnnotation"], TSAbstractKeyword: [], TSAbstractMethodDefinition: ["key", "value"], TSAbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"], TSAsyncKeyword: [], TSClassImplements: ["expression", "typeArguments", "typeParameters"], TSDeclareKeyword: [], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], AsConstExpression: ["expression"], AsExpression: ["expression", "typeAnnotation"], BigIntLiteralTypeAnnotation: [], BigIntTypeAnnotation: [], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: ["name", "typeAnnotation"], ConditionalTypeAnnotation: ["checkType", "extendsType", "trueType", "falseType"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclareEnum: ["id", "body"], DeclareHook: ["id"], DeclareNamespace: ["id", "body"], EnumBigIntBody: ["members"], EnumBigIntMember: ["id", "init"], HookDeclaration: ["id", "params", "body", "typeParameters", "returnType"], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], InferTypeAnnotation: ["typeParameter"], KeyofTypeAnnotation: ["argument"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], QualifiedTypeofIdentifier: ["qualification", "id"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeOperator: ["typeAnnotation"], TypePredicate: ["parameterName", "typeAnnotation", "asserts"], NGRoot: ["node"], NGPipeExpression: ["left", "right", "arguments"], NGChainedExpression: ["expressions"], NGEmptyExpression: [], NGMicrosyntax: ["body"], NGMicrosyntaxKey: [], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: ["key", "value"], NGMicrosyntaxAs: ["key", "alias"], JsExpressionRoot: ["node"], JsonRoot: ["node"], TSJSDocAllType: [], TSJSDocUnknownType: [], TSJSDocNullableType: ["typeAnnotation"], TSJSDocNonNullableType: ["typeAnnotation"], NeverTypeAnnotation: [], UndefinedTypeAnnotation: [], UnknownTypeAnnotation: [], SatisfiesExpression: ["expression", "typeAnnotation"] };
var mo = gr(su);
var Sr = mo;
function yo(e) {
  let t = new Set(e);
  return (r) => t.has(r == null ? void 0 : r.type);
}
var R = yo;
var Do = R(["Block", "CommentBlock", "MultiLine"]);
var ee = Do;
var fo = R(["AnyTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "BooleanTypeAnnotation", "BigIntTypeAnnotation", "SymbolTypeAnnotation", "StringTypeAnnotation", "NeverTypeAnnotation", "UndefinedTypeAnnotation", "UnknownTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation"]);
var Br = fo;
function Eo(e, t) {
  let r = t.split(".");
  for (let n = r.length - 1; n >= 0; n--) {
    let s = r[n];
    if (n === 0) return e.type === "Identifier" && e.name === s;
    if (e.type !== "MemberExpression" || e.optional || e.computed || e.property.type !== "Identifier" || e.property.name !== s) return false;
    e = e.object;
  }
}
function Fo(e, t) {
  return t.some((r) => Eo(e, r));
}
var uu = Fo;
function Co({ type: e }) {
  return e.startsWith("TS") && e.endsWith("Keyword");
}
var br = Co;
function nr(e, t) {
  return t(e) || Hs(e, { getVisitorKeys: Sr, predicate: t });
}
function Rt(e) {
  return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || L(e) || W(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || Ae(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression";
}
function ou(e) {
  return e.expressions ? e.expressions[0] : e.left ?? e.test ?? e.callee ?? e.object ?? e.tag ?? e.argument ?? e.expression;
}
function kr(e) {
  if (e.expressions) return ["expressions", 0];
  if (e.left) return ["left"];
  if (e.test) return ["test"];
  if (e.object) return ["object"];
  if (e.callee) return ["callee"];
  if (e.tag) return ["tag"];
  if (e.argument) return ["argument"];
  if (e.expression) return ["expression"];
  throw new Error("Unexpected node has no left side.");
}
var Ct = R(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
var pu = R(["ExportDefaultDeclaration", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportAllDeclaration"]);
var Y = R(["ArrayExpression", "TupleExpression"]);
var se = R(["ObjectExpression", "RecordExpression"]);
function cu(e) {
  return e.type === "LogicalExpression" && e.operator === "??";
}
function Fe(e) {
  return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number";
}
function jn(e) {
  return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && Fe(e.argument);
}
function te(e) {
  return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string"));
}
function Mn(e) {
  return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex;
}
var Ir = R(["Literal", "BooleanLiteral", "BigIntLiteral", "DirectiveLiteral", "NullLiteral", "NumericLiteral", "RegExpLiteral", "StringLiteral"]);
var Ao = R(["Identifier", "ThisExpression", "Super", "PrivateName", "PrivateIdentifier"]);
var Me = R(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]);
var Mt = R(["FunctionExpression", "ArrowFunctionExpression"]);
function To(e) {
  return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement";
}
function wn(e) {
  return L(e) && e.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(e.callee.name);
}
var X = R(["JSXElement", "JSXFragment"]);
function Pt(e) {
  return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set";
}
function Lr(e) {
  return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation";
}
function lu(e) {
  return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !bt(e, e.typeAnnotation);
}
var De = R(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
function At(e) {
  return W(e) || e.type === "BindExpression" && !!e.object;
}
var xo = R(["TSThisType", "NullLiteralTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType"]);
function Jt(e) {
  return br(e) || Br(e) || xo(e) || (e.type === "GenericTypeAnnotation" || e.type === "TSTypeReference") && !e.typeParameters && !e.typeArguments;
}
function ho(e) {
  return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll");
}
var go = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.step", "test.describe", "test.describe.only", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"];
function So(e) {
  return uu(e, go);
}
function kt(e, t) {
  if ((e == null ? void 0 : e.type) !== "CallExpression" || e.optional) return false;
  let r = pe(e);
  if (r.length === 1) {
    if (wn(e) && kt(t)) return Mt(r[0]);
    if (ho(e.callee)) return wn(r[0]);
  } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || te(r[0])) && So(e.callee)) return r[2] && !Fe(r[2]) ? false : (r.length === 2 ? Mt(r[1]) : To(r[1]) && z(r[1]).length <= 1) || wn(r[1]);
  return false;
}
var mu = (e) => (t) => ((t == null ? void 0 : t.type) === "ChainExpression" && (t = t.expression), e(t));
var L = mu(R(["CallExpression", "OptionalCallExpression"]));
var W = mu(R(["MemberExpression", "OptionalMemberExpression"]));
function Rn(e, t = 5) {
  return yu(e, t) <= t;
}
function yu(e, t) {
  let r = 0;
  for (let n in e) {
    let s = e[n];
    if (s && typeof s == "object" && typeof s.type == "string" && (r++, r += yu(s, t - r)), r > t) return r;
  }
  return r;
}
var Bo = 0.25;
function sr(e, t) {
  let { printWidth: r } = t;
  if (T(e)) return false;
  let n = r * Bo;
  if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || jn(e) && !T(e.argument)) return true;
  let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern;
  return s ? s.length <= n : te(e) ? rt(fe(e), t).length <= n : e.type === "TemplateLiteral" ? e.expressions.length === 0 && e.quasis[0].value.raw.length <= n && !e.quasis[0].value.raw.includes(`
`) : e.type === "UnaryExpression" ? sr(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : Ir(e);
}
function Le(e, t) {
  return X(t) ? It(t) : T(t, h.Leading, (r) => Z(e, k(r)));
}
function iu(e) {
  return e.quasis.some((t) => t.value.raw.includes(`
`));
}
function wr(e, t) {
  return (e.type === "TemplateLiteral" && iu(e) || e.type === "TaggedTemplateExpression" && iu(e.quasi)) && !Z(t, q(e), { backwards: true });
}
function Or(e) {
  if (!T(e)) return false;
  let t = M(false, ct(e, h.Dangling), -1);
  return t && !ee(t);
}
function Du(e) {
  if (e.length <= 1) return false;
  let t = 0;
  for (let r of e) if (Mt(r)) {
    if (t += 1, t > 1) return true;
  } else if (L(r)) {
    for (let n of pe(r)) if (Mt(n)) return true;
  }
  return false;
}
function _r(e) {
  let { node: t, parent: r, key: n } = e;
  return n === "callee" && L(t) && L(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length;
}
var bo = /* @__PURE__ */ new Set(["!", "-", "+", "~"]);
function Ie(e, t = 2) {
  if (t <= 0) return false;
  if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return Ie(e.expression, t);
  let r = (n) => Ie(n, t - 1);
  if (Mn(e)) return tt(e.pattern ?? e.regex.pattern) <= 5;
  if (Ir(e) || Ao(e) || e.type === "ArgumentPlaceholder") return true;
  if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(`
`)) && e.expressions.every(r);
  if (se(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value)));
  if (Y(e)) return e.elements.every((n) => n === null || r(n));
  if (lt(e)) {
    if (e.type === "ImportExpression" || Ie(e.callee, t)) {
      let n = pe(e);
      return n.length <= t && n.every(r);
    }
    return false;
  }
  return W(e) ? Ie(e.object, t) && Ie(e.property, t) : e.type === "UnaryExpression" && bo.has(e.operator) || e.type === "UpdateExpression" ? Ie(e.argument, t) : false;
}
function fe(e) {
  var t;
  return ((t = e.extra) == null ? void 0 : t.raw) ?? e.raw;
}
function fu(e) {
  return e;
}
function oe(e, t = "es5") {
  return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5");
}
function ae(e, t) {
  switch (e.type) {
    case "BinaryExpression":
    case "LogicalExpression":
    case "AssignmentExpression":
    case "NGPipeExpression":
      return ae(e.left, t);
    case "MemberExpression":
    case "OptionalMemberExpression":
      return ae(e.object, t);
    case "TaggedTemplateExpression":
      return e.tag.type === "FunctionExpression" ? false : ae(e.tag, t);
    case "CallExpression":
    case "OptionalCallExpression":
      return e.callee.type === "FunctionExpression" ? false : ae(e.callee, t);
    case "ConditionalExpression":
      return ae(e.test, t);
    case "UpdateExpression":
      return !e.prefix && ae(e.argument, t);
    case "BindExpression":
      return e.object && ae(e.object, t);
    case "SequenceExpression":
      return ae(e.expressions[0], t);
    case "ChainExpression":
    case "TSSatisfiesExpression":
    case "TSAsExpression":
    case "TSNonNullExpression":
    case "AsExpression":
    case "AsConstExpression":
    case "SatisfiesExpression":
      return ae(e.expression, t);
    default:
      return t(e);
  }
}
var au = { "==": true, "!=": true, "===": true, "!==": true };
var Pr = { "*": true, "/": true, "%": true };
var vn = { ">>": true, ">>>": true, "<<": true };
function ur(e, t) {
  return !(rr(t) !== rr(e) || e === "**" || au[e] && au[t] || t === "%" && Pr[e] || e === "%" && Pr[t] || t !== e && Pr[t] && Pr[e] || vn[e] && vn[t]);
}
var Po = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((e, t) => e.map((r) => [r, t])));
function rr(e) {
  return Po.get(e);
}
function Eu(e) {
  return !!vn[e] || e === "|" || e === "^" || e === "&";
}
function Fu(e) {
  var r;
  if (e.rest) return true;
  let t = z(e);
  return ((r = M(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
}
var On = /* @__PURE__ */ new WeakMap();
function z(e) {
  if (On.has(e)) return On.get(e);
  let t = [];
  return e.this && t.push(e.this), Array.isArray(e.parameters) ? t.push(...e.parameters) : Array.isArray(e.params) && t.push(...e.params), e.rest && t.push(e.rest), On.set(e, t), t;
}
function Cu(e, t) {
  let { node: r } = e, n = 0, s = (u) => t(u, n++);
  r.this && e.call(s, "this"), Array.isArray(r.parameters) ? e.each(s, "parameters") : Array.isArray(r.params) && e.each(s, "params"), r.rest && e.call(s, "rest");
}
var _n = /* @__PURE__ */ new WeakMap();
function pe(e) {
  if (_n.has(e)) return _n.get(e);
  if (e.type === "ChainExpression") return pe(e.expression);
  let t = e.arguments;
  return e.type === "ImportExpression" && (t = [e.source], e.options && t.push(e.options)), _n.set(e, t), t;
}
function qt(e, t) {
  let { node: r } = e;
  if (r.type === "ChainExpression") return e.call(() => qt(e, t), "expression");
  r.type === "ImportExpression" ? (e.call((n) => t(n, 0), "source"), r.options && e.call((n) => t(n, 1), "options")) : e.each(t, "arguments");
}
function Jn(e, t) {
  let r = [];
  if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression") {
    if (t === 0 || t === (e.options ? -2 : -1)) return [...r, "source"];
    if (e.options && (t === 1 || t === -1)) return [...r, "options"];
    throw new RangeError("Invalid argument index");
  }
  if (t < 0 && (t = e.arguments.length + t), t < 0 || t >= e.arguments.length) throw new RangeError("Invalid argument index");
  return [...r, "arguments", t];
}
function ir(e) {
  return e.value.trim() === "prettier-ignore" && !e.unignore;
}
function It(e) {
  return (e == null ? void 0 : e.prettierIgnore) || T(e, h.PrettierIgnore);
}
var h = { Leading: 2, Trailing: 4, Dangling: 8, Block: 16, Line: 32, PrettierIgnore: 64, First: 128, Last: 256 };
var Au = (e, t) => {
  if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & h.Leading && !r.leading || e & h.Trailing && !r.trailing || e & h.Dangling && (r.leading || r.trailing) || e & h.Block && !ee(r) || e & h.Line && !Ct(r) || e & h.First && n !== 0 || e & h.Last && n !== s.length - 1 || e & h.PrettierIgnore && !ir(r) || t && !t(r));
};
function T(e, t, r) {
  if (!O(e == null ? void 0 : e.comments)) return false;
  let n = Au(t, r);
  return n ? e.comments.some(n) : true;
}
function ct(e, t, r) {
  if (!Array.isArray(e == null ? void 0 : e.comments)) return [];
  let n = Au(t, r);
  return n ? e.comments.filter(n) : e.comments;
}
var ce = (e, { originalText: t }) => vt(t, k(e));
function lt(e) {
  return L(e) || e.type === "NewExpression" || e.type === "ImportExpression";
}
function Ce(e) {
  return e && (e.type === "ObjectProperty" || e.type === "Property" && !Pt(e));
}
var Ae = R(["TSAsExpression", "TSSatisfiesExpression", "AsExpression", "AsConstExpression", "SatisfiesExpression"]);
var Xe = R(["UnionTypeAnnotation", "TSUnionType"]);
var vr = R(["IntersectionTypeAnnotation", "TSIntersectionType"]);
var ko = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]);
var Wt = (e) => {
  for (let t of e.quasis) delete t.value;
};
function Tu(e, t, r) {
  var s, u;
  if (e.type === "Program" && delete t.sourceType, (e.type === "BigIntLiteral" || e.type === "BigIntLiteralTypeAnnotation") && e.value && (t.value = e.value.toLowerCase()), (e.type === "BigIntLiteral" || e.type === "Literal") && e.bigint && (t.bigint = e.bigint.toLowerCase()), e.type === "EmptyStatement" || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null;
  if ((e.type === "Property" || e.type === "ObjectProperty" || e.type === "MethodDefinition" || e.type === "ClassProperty" || e.type === "ClassMethod" || e.type === "PropertyDefinition" || e.type === "TSDeclareMethod" || e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty" || e.type === "ImportAttribute") && e.key && !e.computed) {
    let { key: i } = e;
    te(i) || Fe(i) ? t.key = String(i.value) : i.type === "Identifier" && (t.key = i.name);
  }
  if (e.type === "JSXElement" && e.openingElement.name.name === "style" && e.openingElement.attributes.some((i) => i.type === "JSXAttribute" && i.name.name === "jsx")) for (let { type: i, expression: a } of t.children) i === "JSXExpressionContainer" && a.type === "TemplateLiteral" && Wt(a);
  e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Wt(t.value.expression), e.type === "JSXAttribute" && ((s = e.value) == null ? void 0 : s.type) === "Literal" && /["']|&quot;|&apos;/u.test(e.value.value) && (t.value.value = N(false, e.value.value, /["']|&quot;|&apos;/gu, '"'));
  let n = e.expression || e.callee;
  if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) {
    let i = e.expression.arguments[0].properties;
    for (let [a, o] of t.expression.arguments[0].properties.entries()) switch (i[a].key.name) {
      case "styles":
        Y(o.value) && Wt(o.value.elements[0]);
        break;
      case "template":
        o.value.type === "TemplateLiteral" && Wt(o.value);
        break;
    }
  }
  e.type === "TaggedTemplateExpression" && (e.tag.type === "MemberExpression" || e.tag.type === "Identifier" && (e.tag.name === "gql" || e.tag.name === "graphql" || e.tag.name === "css" || e.tag.name === "md" || e.tag.name === "markdown" || e.tag.name === "html") || e.tag.type === "CallExpression") && Wt(t.quasi), e.type === "TemplateLiteral" && ((u = e.leadingComments) != null && u.some((a) => ee(a) && ["GraphQL", "HTML"].some((o) => a.value === ` ${o} `)) || r.type === "CallExpression" && r.callee.name === "graphql" || !e.leadingComments) && Wt(t), e.type === "ChainExpression" && e.expression.type === "TSNonNullExpression" && (t.type = "TSNonNullExpression", t.expression.type = "ChainExpression"), e.type === "TSMappedType" && (delete t.key, delete t.constraint), e.type === "TSEnumDeclaration" && delete t.body;
}
Tu.ignoredProperties = ko;
var du = Tu;
var Re = "string";
var he = "array";
var nt = "cursor";
var He = "indent";
var Ve = "align";
var $e = "trim";
var me = "group";
var we = "fill";
var Te = "if-break";
var Ke = "indent-if-break";
var Qe = "line-suffix";
var Je = "line-suffix-boundary";
var ie = "line";
var ge = "label";
var Oe = "break-parent";
var jr = /* @__PURE__ */ new Set([nt, He, Ve, $e, me, we, Te, Ke, Qe, Je, ie, ge, Oe]);
function Io(e) {
  if (typeof e == "string") return Re;
  if (Array.isArray(e)) return he;
  if (!e) return;
  let { type: t } = e;
  if (jr.has(t)) return t;
}
var Se = Io;
var Lo = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
function wo(e) {
  let t = e === null ? "null" : typeof e;
  if (t !== "string" && t !== "object") return `Unexpected doc '${t}', 
Expected it to be 'string' or 'object'.`;
  if (Se(e)) throw new Error("doc is valid.");
  let r = Object.prototype.toString.call(e);
  if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
  let n = Lo([...jr].map((s) => `'${s}'`));
  return `Unexpected doc.type '${e.type}'.
Expected it to be ${n}.`;
}
var qn = class extends Error {
  name = "InvalidDocError";
  constructor(t) {
    super(wo(t)), this.doc = t;
  }
};
var Tt = qn;
var xu = {};
function Oo(e, t, r, n) {
  let s = [e];
  for (; s.length > 0; ) {
    let u = s.pop();
    if (u === xu) {
      r(s.pop());
      continue;
    }
    r && s.push(u, xu);
    let i = Se(u);
    if (!i) throw new Tt(u);
    if ((t == null ? void 0 : t(u)) !== false) switch (i) {
      case he:
      case we: {
        let a = i === he ? u : u.parts;
        for (let o = a.length, p = o - 1; p >= 0; --p) s.push(a[p]);
        break;
      }
      case Te:
        s.push(u.flatContents, u.breakContents);
        break;
      case me:
        if (n && u.expandedStates) for (let a = u.expandedStates.length, o = a - 1; o >= 0; --o) s.push(u.expandedStates[o]);
        else s.push(u.contents);
        break;
      case Ve:
      case He:
      case Ke:
      case ge:
      case Qe:
        s.push(u.contents);
        break;
      case Re:
      case nt:
      case $e:
      case Je:
      case ie:
      case Oe:
        break;
      default:
        throw new Tt(u);
    }
  }
}
var ar = Oo;
function mt(e, t) {
  if (typeof e == "string") return t(e);
  let r = /* @__PURE__ */ new Map();
  return n(e);
  function n(u) {
    if (r.has(u)) return r.get(u);
    let i = s(u);
    return r.set(u, i), i;
  }
  function s(u) {
    switch (Se(u)) {
      case he:
        return t(u.map(n));
      case we:
        return t({ ...u, parts: u.parts.map(n) });
      case Te:
        return t({ ...u, breakContents: n(u.breakContents), flatContents: n(u.flatContents) });
      case me: {
        let { expandedStates: i, contents: a } = u;
        return i ? (i = i.map(n), a = i[0]) : a = n(a), t({ ...u, contents: a, expandedStates: i });
      }
      case Ve:
      case He:
      case Ke:
      case ge:
      case Qe:
        return t({ ...u, contents: n(u.contents) });
      case Re:
      case nt:
      case $e:
      case Je:
      case ie:
      case Oe:
        return t(u);
      default:
        throw new Tt(u);
    }
  }
}
function gu(e, t, r) {
  let n = r, s = false;
  function u(i) {
    if (s) return false;
    let a = t(i);
    a !== void 0 && (s = true, n = a);
  }
  return ar(e, u), n;
}
function _o(e) {
  if (e.type === me && e.break || e.type === ie && e.hard || e.type === Oe) return true;
}
function re(e) {
  return gu(e, _o, false);
}
function hu(e) {
  if (e.length > 0) {
    let t = M(false, e, -1);
    !t.expandedStates && !t.break && (t.break = "propagated");
  }
  return null;
}
function Su(e) {
  let t = /* @__PURE__ */ new Set(), r = [];
  function n(u) {
    if (u.type === Oe && hu(r), u.type === me) {
      if (r.push(u), t.has(u)) return false;
      t.add(u);
    }
  }
  function s(u) {
    u.type === me && r.pop().break && hu(r);
  }
  ar(e, n, s, true);
}
function vo(e) {
  return e.type === ie && !e.hard ? e.soft ? "" : " " : e.type === Te ? e.flatContents : e;
}
function or(e) {
  return mt(e, vo);
}
function jo(e) {
  switch (Se(e)) {
    case we:
      if (e.parts.every((t) => t === "")) return "";
      break;
    case me:
      if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
      if (e.contents.type === me && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
      break;
    case Ve:
    case He:
    case Ke:
    case Qe:
      if (!e.contents) return "";
      break;
    case Te:
      if (!e.flatContents && !e.breakContents) return "";
      break;
    case he: {
      let t = [];
      for (let r of e) {
        if (!r) continue;
        let [n, ...s] = Array.isArray(r) ? r : [r];
        typeof n == "string" && typeof M(false, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s);
      }
      return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
    }
    case Re:
    case nt:
    case $e:
    case Je:
    case ie:
    case ge:
    case Oe:
      break;
    default:
      throw new Tt(e);
  }
  return e;
}
function Gt(e) {
  return mt(e, (t) => jo(t));
}
function _e(e, t = Mr) {
  return mt(e, (r) => typeof r == "string" ? b(t, r.split(`
`)) : r);
}
function Mo(e) {
  if (e.type === ie) return true;
}
function Bu(e) {
  return gu(e, Mo, false);
}
function pr(e, t) {
  return e.type === ge ? { ...e, contents: t(e.contents) } : t(e);
}
function bu(e) {
  let t = true;
  return ar(e, (r) => {
    switch (Se(r)) {
      case Re:
        if (r === "") break;
      case $e:
      case Je:
      case ie:
      case Oe:
        return t = false, false;
    }
  }), t;
}
var Wn = () => {
};
var ze = Wn;
var Gn = Wn;
var Pu = Wn;
function f(e) {
  return ze(e), { type: He, contents: e };
}
function Be(e, t) {
  return ze(t), { type: Ve, contents: t, n: e };
}
function l(e, t = {}) {
  return ze(e), Gn(t.expandedStates, true), { type: me, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
}
function ku(e) {
  return Be(Number.NEGATIVE_INFINITY, e);
}
function Rr(e) {
  return Be(-1, e);
}
function Ze(e, t) {
  return l(e[0], { ...t, expandedStates: e });
}
function Jr(e) {
  return Pu(e), { type: we, parts: e };
}
function B(e, t = "", r = {}) {
  return ze(e), t !== "" && ze(t), { type: Te, breakContents: e, flatContents: t, groupId: r.groupId };
}
function dt(e, t) {
  return ze(e), { type: Ke, contents: e, groupId: t.groupId, negate: t.negate };
}
function Un(e) {
  return ze(e), { type: Qe, contents: e };
}
var ve = { type: Je };
var Ee = { type: Oe };
var Yn = { type: ie, hard: true };
var Ro = { type: ie, hard: true, literal: true };
var x = { type: ie };
var E = { type: ie, soft: true };
var F = [Yn, Ee];
var Mr = [Ro, Ee];
var cr = { type: nt };
function b(e, t) {
  ze(e), Gn(t);
  let r = [];
  for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
  return r;
}
function Iu(e, t, r) {
  ze(e);
  let n = e;
  if (t > 0) {
    for (let s = 0; s < Math.floor(t / r); ++s) n = f(n);
    n = Be(t % r, n), n = Be(Number.NEGATIVE_INFINITY, n);
  }
  return n;
}
function st(e, t) {
  return ze(t), e ? { type: ge, label: e, contents: t } : t;
}
function Jo(e) {
  let t = `*${e.value}*`.split(`
`);
  return t.length > 1 && t.every((r) => r.trimStart()[0] === "*");
}
var Lu = Jo;
function wu(e, t) {
  let r = e.node;
  if (Ct(r)) return t.originalText.slice(q(r), k(r)).trimEnd();
  if (ee(r)) return Lu(r) ? qo(r) : ["/*", _e(r.value), "*/"];
  throw new Error("Not a comment: " + JSON.stringify(r));
}
function qo(e) {
  let t = e.value.split(`
`);
  return ["/*", b(F, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), "*/"];
}
var Qn = {};
Tr(Qn, { endOfLine: () => Ho, ownLine: () => Xo, remaining: () => Vo });
function Wo(e) {
  let t = e.type || e.kind || "(unknown type)", r = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
  return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
}
function Nn(e, t) {
  (e.comments ?? (e.comments = [])).push(t), t.printed = false, t.nodeDescription = Wo(e);
}
function le(e, t) {
  t.leading = true, t.trailing = false, Nn(e, t);
}
function je(e, t, r) {
  t.leading = false, t.trailing = false, r && (t.marker = r), Nn(e, t);
}
function V(e, t) {
  t.leading = false, t.trailing = true, Nn(e, t);
}
function Go(e, t) {
  let r = null, n = t;
  for (; n !== r; ) r = n, n = Ye(e, n), n = Ot(e, n), n = _t(e, n), n = Ne(e, n);
  return n;
}
var ut = Go;
function Uo(e, t) {
  let r = ut(e, t);
  return r === false ? "" : e.charAt(r);
}
var be = Uo;
function Yo(e, t, r) {
  for (let n = t; n < r; ++n) if (e.charAt(n) === `
`) return true;
  return false;
}
var de = Yo;
function No(e) {
  return ee(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value);
}
var qr = No;
function Xo(e) {
  return [qu, _u, Mu, up, Ko, Hn, Vn, Ou, vu, pp, ap, Kn, Ju, cp, ju, Ru, $n, Qo, Cp].some((t) => t(e));
}
function Ho(e) {
  return [$o, Mu, _u, Ju, Hn, Vn, Ou, vu, Ru, ip, op, Kn, yp, $n, Ep, Fp, Ap].some((t) => t(e));
}
function Vo(e) {
  return [qu, Hn, Vn, zo, sp, ju, Kn, np, rp, fp, $n, Dp].some((t) => t(e));
}
function Lt(e, t) {
  let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement");
  r ? le(r, t) : je(e, t);
}
function Xn(e, t) {
  e.type === "BlockStatement" ? Lt(e, t) : le(e, t);
}
function $o({ comment: e, followingNode: t }) {
  return t && qr(e) ? (le(t, e), true) : false;
}
function Hn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
  if ((r == null ? void 0 : r.type) !== "IfStatement" || !n) return false;
  if (be(s, k(e)) === ")") return V(t, e), true;
  if (t === r.consequent && n === r.alternate) {
    let i = ut(s, k(r.consequent));
    if (q(e) < i || r.alternate.type === "BlockStatement") {
      if (t.type === "BlockStatement") V(t, e);
      else {
        let a = Ct(e) || e.loc.start.line === e.loc.end.line, o = e.loc.start.line === t.loc.start.line;
        a && o ? V(t, e) : je(r, e);
      }
      return true;
    }
  }
  return n.type === "BlockStatement" ? (Lt(n, e), true) : n.type === "IfStatement" ? (Xn(n.consequent, e), true) : r.consequent === n ? (le(n, e), true) : false;
}
function Vn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
  return (r == null ? void 0 : r.type) !== "WhileStatement" || !n ? false : be(s, k(e)) === ")" ? (V(t, e), true) : n.type === "BlockStatement" ? (Lt(n, e), true) : r.body === n ? (le(n, e), true) : false;
}
function Ou({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  return (r == null ? void 0 : r.type) !== "TryStatement" && (r == null ? void 0 : r.type) !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? (V(t, e), true) : n.type === "BlockStatement" ? (Lt(n, e), true) : n.type === "TryStatement" ? (Xn(n.finalizer, e), true) : n.type === "CatchClause" ? (Xn(n.body, e), true) : false;
}
function Ko({ comment: e, enclosingNode: t, followingNode: r }) {
  return W(t) && (r == null ? void 0 : r.type) === "Identifier" ? (le(t, e), true) : false;
}
function Qo({ comment: e, enclosingNode: t, followingNode: r, options: n }) {
  return !n.experimentalTernaries || !((t == null ? void 0 : t.type) === "ConditionalExpression" || (t == null ? void 0 : t.type) === "ConditionalTypeAnnotation" || (t == null ? void 0 : t.type) === "TSConditionalType") ? false : (r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType" ? (je(t, e), true) : false;
}
function _u({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: u }) {
  let i = t && !de(s, k(t), q(e));
  return (!t || !i) && ((r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType") && n ? u.experimentalTernaries && r.alternate === n && !(ee(e) && !de(u.originalText, q(e), k(e))) ? (je(r, e), true) : (le(n, e), true) : false;
}
function zo({ comment: e, precedingNode: t, enclosingNode: r }) {
  return Ce(r) && r.shorthand && r.key === t && r.value.type === "AssignmentPattern" ? (V(r.value.left, e), true) : false;
}
var Zo = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
function vu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  if (Zo.has(r == null ? void 0 : r.type)) {
    if (O(r.decorators) && (n == null ? void 0 : n.type) !== "Decorator") return V(M(false, r.decorators, -1), e), true;
    if (r.body && n === r.body) return Lt(r.body, e), true;
    if (n) {
      if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return V(t, e), true;
      for (let s of ["implements", "extends", "mixins"]) if (r[s] && n === r[s][0]) return t && (t === r.id || t === r.typeParameters || t === r.superClass) ? V(t, e) : je(r, e, s), true;
    }
  }
  return false;
}
var ep = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "TSParameterProperty"]);
function ju({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
  return r && t && be(n, k(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && be(n, k(t)) !== ":" ? (V(t, e), true) : (t == null ? void 0 : t.type) === "Decorator" && ep.has(r == null ? void 0 : r.type) && (Ct(e) || e.placement === "ownLine") ? (V(t, e), true) : false;
}
var tp = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
function rp({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
  return be(n, k(e)) !== "(" ? false : t && tp.has(r == null ? void 0 : r.type) ? (V(t, e), true) : false;
}
function np({ comment: e, enclosingNode: t, text: r }) {
  if ((t == null ? void 0 : t.type) !== "ArrowFunctionExpression") return false;
  let n = ut(r, k(e));
  return n !== false && r.slice(n, n + 2) === "=>" ? (je(t, e), true) : false;
}
function sp({ comment: e, enclosingNode: t, text: r }) {
  return be(r, k(e)) !== ")" ? false : t && (Wu(t) && z(t).length === 0 || lt(t) && pe(t).length === 0) ? (je(t, e), true) : ((t == null ? void 0 : t.type) === "MethodDefinition" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && z(t.value).length === 0 ? (je(t.value, e), true) : false;
}
function up({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
  return (t == null ? void 0 : t.type) === "ComponentTypeParameter" && ((r == null ? void 0 : r.type) === "DeclareComponent" || (r == null ? void 0 : r.type) === "ComponentTypeAnnotation") && (n == null ? void 0 : n.type) !== "ComponentTypeParameter" ? (V(t, e), true) : ((t == null ? void 0 : t.type) === "ComponentParameter" || (t == null ? void 0 : t.type) === "RestElement") && (r == null ? void 0 : r.type) === "ComponentDeclaration" && be(s, k(e)) === ")" ? (V(t, e), true) : false;
}
function Mu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
  return (t == null ? void 0 : t.type) === "FunctionTypeParam" && (r == null ? void 0 : r.type) === "FunctionTypeAnnotation" && (n == null ? void 0 : n.type) !== "FunctionTypeParam" ? (V(t, e), true) : ((t == null ? void 0 : t.type) === "Identifier" || (t == null ? void 0 : t.type) === "AssignmentPattern" || (t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern" || (t == null ? void 0 : t.type) === "RestElement" || (t == null ? void 0 : t.type) === "TSParameterProperty") && Wu(r) && be(s, k(e)) === ")" ? (V(t, e), true) : !ee(e) && ((r == null ? void 0 : r.type) === "FunctionDeclaration" || (r == null ? void 0 : r.type) === "FunctionExpression" || (r == null ? void 0 : r.type) === "ObjectMethod") && (n == null ? void 0 : n.type) === "BlockStatement" && r.body === n && ut(s, k(e)) === q(n) ? (Lt(n, e), true) : false;
}
function Ru({ comment: e, enclosingNode: t }) {
  return (t == null ? void 0 : t.type) === "LabeledStatement" ? (le(t, e), true) : false;
}
function $n({ comment: e, enclosingNode: t }) {
  return ((t == null ? void 0 : t.type) === "ContinueStatement" || (t == null ? void 0 : t.type) === "BreakStatement") && !t.label ? (V(t, e), true) : false;
}
function ip({ comment: e, precedingNode: t, enclosingNode: r }) {
  return L(r) && t && r.callee === t && r.arguments.length > 0 ? (le(r.arguments[0], e), true) : false;
}
function ap({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  return Xe(r) ? (ir(e) && (n.prettierIgnore = true, e.unignore = true), t ? (V(t, e), true) : false) : (Xe(n) && ir(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
}
function op({ comment: e, enclosingNode: t }) {
  return Ce(t) ? (le(t, e), true) : false;
}
function Kn({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) {
  var s;
  return ((s = r == null ? void 0 : r.body) == null ? void 0 : s.length) === 0 ? (n ? je(r, e) : le(r, e), true) : (t == null ? void 0 : t.type) === "Program" && t.body.length === 0 && !O(t.directives) ? (n ? je(t, e) : le(t, e), true) : false;
}
function pp({ comment: e, enclosingNode: t }) {
  return (t == null ? void 0 : t.type) === "ForInStatement" || (t == null ? void 0 : t.type) === "ForOfStatement" ? (le(t, e), true) : false;
}
function Ju({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
  if ((r == null ? void 0 : r.type) === "ImportSpecifier" || (r == null ? void 0 : r.type) === "ExportSpecifier") return le(r, e), true;
  let s = (t == null ? void 0 : t.type) === "ImportSpecifier" && (r == null ? void 0 : r.type) === "ImportDeclaration", u = (t == null ? void 0 : t.type) === "ExportSpecifier" && (r == null ? void 0 : r.type) === "ExportNamedDeclaration";
  return (s || u) && Z(n, k(e)) ? (V(t, e), true) : false;
}
function cp({ comment: e, enclosingNode: t }) {
  return (t == null ? void 0 : t.type) === "AssignmentPattern" ? (le(t, e), true) : false;
}
var lp = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
var mp = /* @__PURE__ */ new Set(["ObjectExpression", "RecordExpression", "ArrayExpression", "TupleExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
function yp({ comment: e, enclosingNode: t, followingNode: r }) {
  return lp.has(t == null ? void 0 : t.type) && r && (mp.has(r.type) || ee(e)) ? (le(r, e), true) : false;
}
function Dp({ comment: e, enclosingNode: t, followingNode: r, text: n }) {
  return !r && ((t == null ? void 0 : t.type) === "TSMethodSignature" || (t == null ? void 0 : t.type) === "TSDeclareFunction" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && be(n, k(e)) === ";" ? (V(t, e), true) : false;
}
function qu({ comment: e, enclosingNode: t, followingNode: r }) {
  if (ir(e) && (t == null ? void 0 : t.type) === "TSMappedType" && (r == null ? void 0 : r.type) === "TSTypeParameter" && r.constraint) return t.prettierIgnore = true, e.unignore = true, true;
}
function fp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  return (r == null ? void 0 : r.type) !== "TSMappedType" ? false : (n == null ? void 0 : n.type) === "TSTypeParameter" && n.name ? (le(n.name, e), true) : (t == null ? void 0 : t.type) === "TSTypeParameter" && t.constraint ? (V(t.constraint, e), true) : false;
}
function Ep({ comment: e, enclosingNode: t, followingNode: r }) {
  return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? false : (r.type === "BlockStatement" && Ct(e) ? Lt(r, e) : je(t, e), true);
}
function Fp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  return Xe(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || vr(r)) ? (V(M(false, t.types, -1), e), true) : false;
}
function Cp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) {
  if (((t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern") && (n == null ? void 0 : n.type) === "TSTypeAnnotation") return r ? V(r, e) : je(t, e), true;
}
function Ap({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
  var s;
  if (!n && (r == null ? void 0 : r.type) === "UnaryExpression" && ((t == null ? void 0 : t.type) === "LogicalExpression" || (t == null ? void 0 : t.type) === "BinaryExpression")) {
    let u = ((s = r.argument.loc) == null ? void 0 : s.start.line) !== t.right.loc.start.line, i = Ct(e) || e.loc.start.line === e.loc.end.line, a = e.loc.start.line === t.right.loc.start.line;
    if (u && i && a) return V(t.right, e), true;
  }
  return false;
}
var Wu = R(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
var Tp = /* @__PURE__ */ new Set(["EmptyStatement", "TemplateElement", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
function dp(e) {
  return !Tp.has(e.type);
}
function xp(e, t) {
  var r;
  if ((t.parser === "typescript" || t.parser === "flow" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree") && e.type === "MethodDefinition" && ((r = e.value) == null ? void 0 : r.type) === "FunctionExpression" && z(e.value).length === 0 && !e.value.returnType && !O(e.value.typeParameters) && e.value.body) return [...e.decorators || [], e.key, e.value.body];
}
function zn(e) {
  let { node: t, parent: r } = e;
  return (X(t) || r && (r.type === "JSXSpreadAttribute" || r.type === "JSXSpreadChild" || Xe(r) || (r.type === "ClassDeclaration" || r.type === "ClassExpression") && r.superClass === t)) && (!It(t) || Xe(r));
}
function hp(e, { parser: t }) {
  if (t === "flow" || t === "babel-flow") return e = N(false, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::";
}
function Gu(e) {
  switch (e) {
    case "cr":
      return "\r";
    case "crlf":
      return `\r
`;
    default:
      return `
`;
  }
}
var Pe = Symbol("MODE_BREAK");
var it = Symbol("MODE_FLAT");
var Ut = Symbol("cursor");
var Zn = Symbol("DOC_FILL_PRINTED_LENGTH");
function Uu() {
  return { value: "", length: 0, queue: [] };
}
function gp(e, t) {
  return es(e, { type: "indent" }, t);
}
function Sp(e, t, r) {
  return t === Number.NEGATIVE_INFINITY ? e.root || Uu() : t < 0 ? es(e, { type: "dedent" }, r) : t ? t.type === "root" ? { ...e, root: e } : es(e, { type: typeof t == "string" ? "stringAlign" : "numberAlign", n: t }, r) : e;
}
function es(e, t, r) {
  let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t], s = "", u = 0, i = 0, a = 0;
  for (let c of n) switch (c.type) {
    case "indent":
      y(), r.useTabs ? o(1) : p(r.tabWidth);
      break;
    case "stringAlign":
      y(), s += c.n, u += c.n.length;
      break;
    case "numberAlign":
      i += 1, a += c.n;
      break;
    default:
      throw new Error(`Unexpected type '${c.type}'`);
  }
  return m(), { ...e, value: s, length: u, queue: n };
  function o(c) {
    s += "	".repeat(c), u += r.tabWidth * c;
  }
  function p(c) {
    s += " ".repeat(c), u += c;
  }
  function y() {
    r.useTabs ? D() : m();
  }
  function D() {
    i > 0 && o(i), C();
  }
  function m() {
    a > 0 && p(a), C();
  }
  function C() {
    i = 0, a = 0;
  }
}
function ts(e) {
  let t = 0, r = 0, n = e.length;
  e: for (; n--; ) {
    let s = e[n];
    if (s === Ut) {
      r++;
      continue;
    }
    for (let u = s.length - 1; u >= 0; u--) {
      let i = s[u];
      if (i === " " || i === "	") t++;
      else {
        e[n] = s.slice(0, u + 1);
        break e;
      }
    }
  }
  if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(Ut);
  return t;
}
function Wr(e, t, r, n, s, u) {
  if (r === Number.POSITIVE_INFINITY) return true;
  let i = t.length, a = [e], o = [];
  for (; r >= 0; ) {
    if (a.length === 0) {
      if (i === 0) return true;
      a.push(t[--i]);
      continue;
    }
    let { mode: p, doc: y } = a.pop(), D = Se(y);
    switch (D) {
      case Re:
        o.push(y), r -= tt(y);
        break;
      case he:
      case we: {
        let m = D === he ? y : y.parts, C = y[Zn] ?? 0;
        for (let c = m.length - 1; c >= C; c--) a.push({ mode: p, doc: m[c] });
        break;
      }
      case He:
      case Ve:
      case Ke:
      case ge:
        a.push({ mode: p, doc: y.contents });
        break;
      case $e:
        r += ts(o);
        break;
      case me: {
        if (u && y.break) return false;
        let m = y.break ? Pe : p, C = y.expandedStates && m === Pe ? M(false, y.expandedStates, -1) : y.contents;
        a.push({ mode: m, doc: C });
        break;
      }
      case Te: {
        let C = (y.groupId ? s[y.groupId] || it : p) === Pe ? y.breakContents : y.flatContents;
        C && a.push({ mode: p, doc: C });
        break;
      }
      case ie:
        if (p === Pe || y.hard) return true;
        y.soft || (o.push(" "), r--);
        break;
      case Qe:
        n = true;
        break;
      case Je:
        if (n) return false;
        break;
    }
  }
  return false;
}
function rs(e, t) {
  let r = {}, n = t.printWidth, s = Gu(t.endOfLine), u = 0, i = [{ ind: Uu(), mode: Pe, doc: e }], a = [], o = false, p = [], y = 0;
  for (Su(e); i.length > 0; ) {
    let { ind: m, mode: C, doc: c } = i.pop();
    switch (Se(c)) {
      case Re: {
        let A = s !== `
` ? N(false, c, `
`, s) : c;
        a.push(A), i.length > 0 && (u += tt(A));
        break;
      }
      case he:
        for (let A = c.length - 1; A >= 0; A--) i.push({ ind: m, mode: C, doc: c[A] });
        break;
      case nt:
        if (y >= 2) throw new Error("There are too many 'cursor' in doc.");
        a.push(Ut), y++;
        break;
      case He:
        i.push({ ind: gp(m, t), mode: C, doc: c.contents });
        break;
      case Ve:
        i.push({ ind: Sp(m, c.n, t), mode: C, doc: c.contents });
        break;
      case $e:
        u -= ts(a);
        break;
      case me:
        switch (C) {
          case it:
            if (!o) {
              i.push({ ind: m, mode: c.break ? Pe : it, doc: c.contents });
              break;
            }
          case Pe: {
            o = false;
            let A = { ind: m, mode: it, doc: c.contents }, d = n - u, S = p.length > 0;
            if (!c.break && Wr(A, i, d, S, r)) i.push(A);
            else if (c.expandedStates) {
              let g = M(false, c.expandedStates, -1);
              if (c.break) {
                i.push({ ind: m, mode: Pe, doc: g });
                break;
              } else for (let _ = 1; _ < c.expandedStates.length + 1; _++) if (_ >= c.expandedStates.length) {
                i.push({ ind: m, mode: Pe, doc: g });
                break;
              } else {
                let v = c.expandedStates[_], j = { ind: m, mode: it, doc: v };
                if (Wr(j, i, d, S, r)) {
                  i.push(j);
                  break;
                }
              }
            } else i.push({ ind: m, mode: Pe, doc: c.contents });
            break;
          }
        }
        c.id && (r[c.id] = M(false, i, -1).mode);
        break;
      case we: {
        let A = n - u, d = c[Zn] ?? 0, { parts: S } = c, g = S.length - d;
        if (g === 0) break;
        let _ = S[d + 0], v = S[d + 1], j = { ind: m, mode: it, doc: _ }, I = { ind: m, mode: Pe, doc: _ }, U = Wr(j, [], A, p.length > 0, r, true);
        if (g === 1) {
          U ? i.push(j) : i.push(I);
          break;
        }
        let P = { ind: m, mode: it, doc: v }, G = { ind: m, mode: Pe, doc: v };
        if (g === 2) {
          U ? i.push(P, j) : i.push(G, I);
          break;
        }
        let ue = S[d + 2], Q = { ind: m, mode: C, doc: { ...c, [Zn]: d + 2 } };
        Wr({ ind: m, mode: it, doc: [_, v, ue] }, [], A, p.length > 0, r, true) ? i.push(Q, P, j) : U ? i.push(Q, G, j) : i.push(Q, G, I);
        break;
      }
      case Te:
      case Ke: {
        let A = c.groupId ? r[c.groupId] : C;
        if (A === Pe) {
          let d = c.type === Te ? c.breakContents : c.negate ? c.contents : f(c.contents);
          d && i.push({ ind: m, mode: C, doc: d });
        }
        if (A === it) {
          let d = c.type === Te ? c.flatContents : c.negate ? f(c.contents) : c.contents;
          d && i.push({ ind: m, mode: C, doc: d });
        }
        break;
      }
      case Qe:
        p.push({ ind: m, mode: C, doc: c.contents });
        break;
      case Je:
        p.length > 0 && i.push({ ind: m, mode: C, doc: Yn });
        break;
      case ie:
        switch (C) {
          case it:
            if (c.hard) o = true;
            else {
              c.soft || (a.push(" "), u += 1);
              break;
            }
          case Pe:
            if (p.length > 0) {
              i.push({ ind: m, mode: C, doc: c }, ...p.reverse()), p.length = 0;
              break;
            }
            c.literal ? m.root ? (a.push(s, m.root.value), u = m.root.length) : (a.push(s), u = 0) : (u -= ts(a), a.push(s + m.value), u = m.length);
            break;
        }
        break;
      case ge:
        i.push({ ind: m, mode: C, doc: c.contents });
        break;
      case Oe:
        break;
      default:
        throw new Tt(c);
    }
    i.length === 0 && p.length > 0 && (i.push(...p.reverse()), p.length = 0);
  }
  let D = a.indexOf(Ut);
  if (D !== -1) {
    let m = a.indexOf(Ut, D + 1);
    if (m === -1) return { formatted: a.filter((d) => d !== Ut).join("") };
    let C = a.slice(0, D).join(""), c = a.slice(D + 1, m).join(""), A = a.slice(m + 1).join("");
    return { formatted: C + c + A, cursorNodeStart: C.length, cursorNodeText: c };
  }
  return { formatted: a.join("") };
}
function Bp(e, t, r = 0) {
  let n = 0;
  for (let s = r; s < e.length; ++s) e[s] === "	" ? n = n + t - n % t : n++;
  return n;
}
var Yu = Bp;
function bp(e, t) {
  let r = e.lastIndexOf(`
`);
  return r === -1 ? 0 : Yu(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
}
var Nu = bp;
function Gr(e, t, r) {
  let { node: n } = e;
  if (n.type === "TemplateLiteral" && Ip(e)) {
    let p = Pp(e, r, t);
    if (p) return p;
  }
  let u = "expressions";
  n.type === "TSTemplateLiteralType" && (u = "types");
  let i = [], a = e.map(t, u);
  i.push(ve, "`");
  let o = 0;
  return e.each(({ index: p, node: y }) => {
    if (i.push(t()), y.tail) return;
    let { tabWidth: D } = r, m = y.value.raw, C = m.includes(`
`) ? Nu(m, D) : o;
    o = C;
    let c = a[p], A = n[u][p], d = de(r.originalText, k(y), q(n.quasis[p + 1]));
    if (!d) {
      let g = rs(c, { ...r, printWidth: Number.POSITIVE_INFINITY }).formatted;
      g.includes(`
`) ? d = true : c = g;
    }
    d && (T(A) || A.type === "Identifier" || W(A) || A.type === "ConditionalExpression" || A.type === "SequenceExpression" || Ae(A) || De(A)) && (c = [f([E, c]), E]);
    let S = C === 0 && m.endsWith(`
`) ? Be(Number.NEGATIVE_INFINITY, c) : Iu(c, C, D);
    i.push(l(["${", S, ve, "}"]));
  }, "quasis"), i.push("`"), i;
}
function Xu(e, t) {
  let r = t("quasi");
  return st(r.label && { tagged: true, ...r.label }, [t("tag"), t(e.node.typeArguments ? "typeArguments" : "typeParameters"), ve, r]);
}
function Pp(e, t, r) {
  let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);
  if (s.length > 1 || s.some((u) => u.length > 0)) {
    t.__inJestEach = true;
    let u = e.map(r, "expressions");
    t.__inJestEach = false;
    let i = [], a = u.map((m) => "${" + rs(m, { ...t, printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" }).formatted + "}"), o = [{ hasLineBreak: false, cells: [] }];
    for (let m = 1; m < n.quasis.length; m++) {
      let C = M(false, o, -1), c = a[m - 1];
      C.cells.push(c), c.includes(`
`) && (C.hasLineBreak = true), n.quasis[m].value.raw.includes(`
`) && o.push({ hasLineBreak: false, cells: [] });
    }
    let p = Math.max(s.length, ...o.map((m) => m.cells.length)), y = Array.from({ length: p }).fill(0), D = [{ cells: s }, ...o.filter((m) => m.cells.length > 0)];
    for (let { cells: m } of D.filter((C) => !C.hasLineBreak)) for (let [C, c] of m.entries()) y[C] = Math.max(y[C], tt(c));
    return i.push(ve, "`", f([F, b(F, D.map((m) => b(" | ", m.cells.map((C, c) => m.hasLineBreak ? C : C + " ".repeat(y[c] - tt(C))))))]), F, "`"), i;
  }
}
function kp(e, t) {
  let { node: r } = e, n = t();
  return T(r) && (n = l([f([E, n]), E])), ["${", n, ve, "}"];
}
function Yt(e, t) {
  return e.map((r) => kp(r, t), "expressions");
}
function Ur(e, t) {
  return mt(e, (r) => typeof r == "string" ? t ? N(false, r, /(\\*)`/gu, "$1$1\\`") : ns(r) : r);
}
function ns(e) {
  return N(false, e, /([\\`]|\$\{)/gu, String.raw`\$1`);
}
function Ip({ node: e, parent: t }) {
  let r = /^[fx]?(?:describe|it|test)$/u;
  return t.type === "TaggedTemplateExpression" && t.quasi === e && t.tag.type === "MemberExpression" && t.tag.property.type === "Identifier" && t.tag.property.name === "each" && (t.tag.object.type === "Identifier" && r.test(t.tag.object.name) || t.tag.object.type === "MemberExpression" && t.tag.object.property.type === "Identifier" && (t.tag.object.property.name === "only" || t.tag.object.property.name === "skip") && t.tag.object.object.type === "Identifier" && r.test(t.tag.object.object.name));
}
var us = [(e, t) => e.type === "ObjectExpression" && t === "properties", (e, t) => e.type === "CallExpression" && e.callee.type === "Identifier" && e.callee.name === "Component" && t === "arguments", (e, t) => e.type === "Decorator" && t === "expression"];
function Hu(e) {
  let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Ce(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value";
  return e.match(t, (n, s) => Y(n) && s === "elements", r, ...us) || e.match(t, r, ...us);
}
function Vu(e) {
  return e.match((t) => t.type === "TemplateLiteral", (t, r) => Ce(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...us);
}
function ss(e, t) {
  return T(e, h.Block | h.Leading, ({ value: r }) => r === ` ${t} `);
}
function Yr({ node: e, parent: t }, r) {
  return ss(e, r) || Lp(t) && ss(t, r) || t.type === "ExpressionStatement" && ss(t, r);
}
function Lp(e) {
  return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
}
async function wp(e, t, r) {
  let { node: n } = r, s = n.quasis.map((y) => y.value.raw), u = 0, i = s.reduce((y, D, m) => m === 0 ? D : y + "@prettier-placeholder-" + u++ + "-id" + D, ""), a = await e(i, { parser: "scss" }), o = Yt(r, t), p = Op(a, o);
  if (!p) throw new Error("Couldn't insert all the expressions");
  return ["`", f([F, p]), E, "`"];
}
function Op(e, t) {
  if (!O(t)) return e;
  let r = 0, n = mt(Gt(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((u, i) => i % 2 === 0 ? _e(u) : (r++, t[u])));
  return t.length === r ? n : null;
}
function _p({ node: e, parent: t, grandparent: r }) {
  return r && e.quasis && t.type === "JSXExpressionContainer" && r.type === "JSXElement" && r.openingElement.name.name === "style" && r.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.name === "jsx") || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "css" || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "MemberExpression" && t.tag.object.name === "css" && (t.tag.property.name === "global" || t.tag.property.name === "resolve");
}
function Nr(e) {
  return e.type === "Identifier" && e.name === "styled";
}
function $u(e) {
  return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend";
}
function vp({ parent: e }) {
  if (!e || e.type !== "TaggedTemplateExpression") return false;
  let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag;
  switch (t.type) {
    case "MemberExpression":
      return Nr(t.object) || $u(t);
    case "CallExpression":
      return Nr(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (Nr(t.callee.object.object) || $u(t.callee.object)) || t.callee.object.type === "CallExpression" && Nr(t.callee.object.callee));
    case "Identifier":
      return t.name === "css";
    default:
      return false;
  }
}
function jp({ parent: e, grandparent: t }) {
  return (t == null ? void 0 : t.type) === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
}
function Mp(e) {
  if (_p(e) || vp(e) || jp(e) || Hu(e)) return wp;
}
var Ku = Mp;
async function Rp(e, t, r) {
  let { node: n } = r, s = n.quasis.length, u = Yt(r, t), i = [];
  for (let a = 0; a < s; a++) {
    let o = n.quasis[a], p = a === 0, y = a === s - 1, D = o.value.cooked, m = D.split(`
`), C = m.length, c = u[a], A = C > 2 && m[0].trim() === "" && m[1].trim() === "", d = C > 2 && m[C - 1].trim() === "" && m[C - 2].trim() === "", S = m.every((_) => /^\s*(?:#[^\n\r]*)?$/u.test(_));
    if (!y && /#[^\n\r]*$/u.test(m[C - 1])) return null;
    let g = null;
    S ? g = Jp(m) : g = await e(D, { parser: "graphql" }), g ? (g = Ur(g, false), !p && A && i.push(""), i.push(g), !y && d && i.push("")) : !p && !y && A && i.push(""), c && i.push(c);
  }
  return ["`", f([F, b(F, i)]), F, "`"];
}
function Jp(e) {
  let t = [], r = false, n = e.map((s) => s.trim());
  for (let [s, u] of n.entries()) u !== "" && (n[s - 1] === "" && r ? t.push([F, u]) : t.push(u), r = true);
  return t.length === 0 ? null : b(F, t);
}
function qp({ node: e, parent: t }) {
  return Yr({ node: e, parent: t }, "GraphQL") || t && (t.type === "TaggedTemplateExpression" && (t.tag.type === "MemberExpression" && t.tag.object.name === "graphql" && t.tag.property.name === "experimental" || t.tag.type === "Identifier" && (t.tag.name === "gql" || t.tag.name === "graphql")) || t.type === "CallExpression" && t.callee.type === "Identifier" && t.callee.name === "graphql");
}
function Wp(e) {
  if (qp(e)) return Rp;
}
var Qu = Wp;
var is = 0;
async function zu(e, t, r, n, s) {
  let { node: u } = n, i = is;
  is = is + 1 >>> 0;
  let a = (S) => `PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`, o = u.quasis.map((S, g, _) => g === _.length - 1 ? S.value.cooked : S.value.cooked + a(g)).join(""), p = Yt(n, r), y = new RegExp(a(String.raw`(\d+)`), "gu"), D = 0, m = await t(o, { parser: e, __onHtmlRoot(S) {
    D = S.children.length;
  } }), C = mt(m, (S) => {
    if (typeof S != "string") return S;
    let g = [], _ = S.split(y);
    for (let v = 0; v < _.length; v++) {
      let j = _[v];
      if (v % 2 === 0) {
        j && (j = ns(j), s.__embeddedInHtml && (j = N(false, j, /<\/(?=script\b)/giu, String.raw`<\/`)), g.push(j));
        continue;
      }
      let I = Number(j);
      g.push(p[I]);
    }
    return g;
  }), c = /^\s/u.test(o) ? " " : "", A = /\s$/u.test(o) ? " " : "", d = s.htmlWhitespaceSensitivity === "ignore" ? F : c && A ? x : null;
  return d ? l(["`", f([d, l(C)]), d, "`"]) : st({ hug: false }, l(["`", c, D > 1 ? f(l(C)) : l(C), A, "`"]));
}
function Gp(e) {
  return Yr(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
}
var Up = zu.bind(void 0, "html");
var Yp = zu.bind(void 0, "angular");
function Np(e) {
  if (Gp(e)) return Up;
  if (Vu(e)) return Yp;
}
var Zu = Np;
async function Xp(e, t, r) {
  let { node: n } = r, s = N(false, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (o, p) => "\\".repeat(p.length / 2) + "`"), u = Hp(s), i = u !== "";
  i && (s = N(false, s, new RegExp(`^${u}`, "gmu"), ""));
  let a = Ur(await e(s, { parser: "markdown", __inJsTemplate: true }), true);
  return ["`", i ? f([E, a]) : [Mr, ku(a)], E, "`"];
}
function Hp(e) {
  let t = e.match(/^([^\S\n]*)\S/mu);
  return t === null ? "" : t[1];
}
function Vp(e) {
  if ($p(e)) return Xp;
}
function $p({ node: e, parent: t }) {
  return (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
}
var ei = Vp;
function Kp(e) {
  let { node: t } = e;
  if (t.type !== "TemplateLiteral" || Qp(t)) return;
  let r;
  for (let n of [Ku, Qu, Zu, ei]) if (r = n(e), !!r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : async (...s) => {
    let u = await r(...s);
    return u && st({ embed: true, ...u.label }, u);
  };
}
function Qp({ quasis: e }) {
  return e.some(({ value: { cooked: t } }) => t === null);
}
var ti = Kp;
var zp = /\*\/$/;
var Zp = /^\/\*\*?/;
var ui = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
var ec = /(^|\s+)\/\/([^\n\r]*)/g;
var ri = /^(\r?\n)+/;
var tc = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
var ni = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
var rc = /(\r?\n|^) *\* ?/g;
var ii = [];
function ai(e) {
  let t = e.match(ui);
  return t ? t[0].trimStart() : "";
}
function oi(e) {
  let t = e.match(ui), r = t == null ? void 0 : t[0];
  return r == null ? e : e.slice(r.length);
}
function pi(e) {
  let t = `
`;
  e = N(false, e.replace(Zp, "").replace(zp, ""), rc, "$1");
  let r = "";
  for (; r !== e; ) r = e, e = N(false, e, tc, `${t}$1 $2${t}`);
  e = e.replace(ri, "").trimEnd();
  let n = /* @__PURE__ */ Object.create(null), s = N(false, e, ni, "").replace(ri, "").trimEnd(), u;
  for (; u = ni.exec(e); ) {
    let i = N(false, u[2], ec, "");
    if (typeof n[u[1]] == "string" || Array.isArray(n[u[1]])) {
      let a = n[u[1]];
      n[u[1]] = [...ii, ...Array.isArray(a) ? a : [a], i];
    } else n[u[1]] = i;
  }
  return { comments: s, pragmas: n };
}
function ci({ comments: e = "", pragmas: t = {} }) {
  let r = `
`, n = "/**", s = " *", u = " */", i = Object.keys(t), a = i.flatMap((p) => si(p, t[p])).map((p) => `${s} ${p}${r}`).join("");
  if (!e) {
    if (i.length === 0) return "";
    if (i.length === 1 && !Array.isArray(t[i[0]])) {
      let p = t[i[0]];
      return `${n} ${si(i[0], p)[0]}${u}`;
    }
  }
  let o = e.split(r).map((p) => `${s} ${p}`).join(r) + r;
  return n + r + (e ? o : "") + (e && i.length > 0 ? s + r : "") + a + u;
}
function si(e, t) {
  return [...ii, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim());
}
function nc(e) {
  if (!e.startsWith("#!")) return "";
  let t = e.indexOf(`
`);
  return t === -1 ? e : e.slice(0, t);
}
var li = nc;
function sc(e) {
  let t = li(e);
  t && (e = e.slice(t.length + 1));
  let r = ai(e), { pragmas: n, comments: s } = pi(r);
  return { shebang: t, text: e, pragmas: n, comments: s };
}
function mi(e) {
  let { shebang: t, text: r, pragmas: n, comments: s } = sc(e), u = oi(r), i = ci({ pragmas: { format: "", ...n }, comments: s.trimStart() });
  return (t ? `${t}
` : "") + i + (u.startsWith(`
`) ? `
` : `

`) + u;
}
function uc(e, t) {
  let { originalText: r, [Symbol.for("comments")]: n, locStart: s, locEnd: u, [Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
  for (let y of n) s(y) >= o && u(y) <= p && i.add(y);
  return r.slice(o, p);
}
var yi = uc;
function as(e, t) {
  var u, i, a, o, p, y, D, m, C;
  if (e.isRoot) return false;
  let { node: r, key: n, parent: s } = e;
  if (t.__isInHtmlInterpolation && !t.bracketSpacing && pc(r) && lr(e)) return true;
  if (ic(r)) return false;
  if (r.type === "Identifier") {
    if ((u = r.extra) != null && u.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name) || n === "left" && (r.name === "async" && !s.await || r.name === "let") && s.type === "ForOfStatement") return true;
    if (r.name === "let") {
      let c = (i = e.findAncestor((A) => A.type === "ForOfStatement")) == null ? void 0 : i.left;
      if (c && ae(c, (A) => A === r)) return true;
    }
    if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
      let c = e.findAncestor((d) => d.type === "ExpressionStatement" || d.type === "ForStatement" || d.type === "ForInStatement"), A = c ? c.type === "ExpressionStatement" ? c.expression : c.type === "ForStatement" ? c.init : c.left : void 0;
      if (A && ae(A, (d) => d === r)) return true;
    }
    if (n === "expression") switch (r.name) {
      case "await":
      case "interface":
      case "module":
      case "using":
      case "yield":
      case "let":
      case "component":
      case "hook":
      case "type": {
        let c = e.findAncestor((A) => !Ae(A));
        if (c !== s && c.type === "ExpressionStatement") return true;
      }
    }
    return false;
  }
  if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
    let c = (a = e.findAncestor((A) => A.type === "ExpressionStatement")) == null ? void 0 : a.expression;
    if (c && ae(c, (A) => A === r)) return true;
  }
  if (r.type === "ObjectExpression") {
    let c = (o = e.findAncestor((A) => A.type === "ArrowFunctionExpression")) == null ? void 0 : o.body;
    if (c && c.type !== "SequenceExpression" && c.type !== "AssignmentExpression" && ae(c, (A) => A === r)) return true;
  }
  switch (s.type) {
    case "ParenthesizedExpression":
      return false;
    case "ClassDeclaration":
    case "ClassExpression":
      if (n === "superClass" && (r.type === "ArrowFunctionExpression" || r.type === "AssignmentExpression" || r.type === "AwaitExpression" || r.type === "BinaryExpression" || r.type === "ConditionalExpression" || r.type === "LogicalExpression" || r.type === "NewExpression" || r.type === "ObjectExpression" || r.type === "SequenceExpression" || r.type === "TaggedTemplateExpression" || r.type === "UnaryExpression" || r.type === "UpdateExpression" || r.type === "YieldExpression" || r.type === "TSNonNullExpression" || r.type === "ClassExpression" && O(r.decorators))) return true;
      break;
    case "ExportDefaultDeclaration":
      return Di(e, t) || r.type === "SequenceExpression";
    case "Decorator":
      if (n === "expression" && !lc(r)) return true;
      break;
    case "TypeAnnotation":
      if (e.match(void 0, void 0, (c, A) => A === "returnType" && c.type === "ArrowFunctionExpression") && oc(r)) return true;
      break;
    case "BinaryExpression":
      if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
      break;
    case "VariableDeclarator":
      if (n === "init" && e.match(void 0, void 0, (c, A) => A === "declarations" && c.type === "VariableDeclaration", (c, A) => A === "left" && c.type === "ForInStatement")) return true;
      break;
  }
  switch (r.type) {
    case "UpdateExpression":
      if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-");
    case "UnaryExpression":
      switch (s.type) {
        case "UnaryExpression":
          return r.operator === s.operator && (r.operator === "+" || r.operator === "-");
        case "BindExpression":
          return true;
        case "MemberExpression":
        case "OptionalMemberExpression":
          return n === "object";
        case "TaggedTemplateExpression":
          return true;
        case "NewExpression":
        case "CallExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "BinaryExpression":
          return n === "left" && s.operator === "**";
        case "TSNonNullExpression":
          return true;
        default:
          return false;
      }
    case "BinaryExpression":
      if (s.type === "UpdateExpression" || r.operator === "in" && ac(e)) return true;
      if (r.operator === "|>" && ((p = r.extra) != null && p.parenthesized)) {
        let c = e.grandparent;
        if (c.type === "BinaryExpression" && c.operator === "|>") return true;
      }
    case "TSTypeAssertion":
    case "TSAsExpression":
    case "TSSatisfiesExpression":
    case "AsExpression":
    case "AsConstExpression":
    case "SatisfiesExpression":
    case "LogicalExpression":
      switch (s.type) {
        case "TSAsExpression":
        case "TSSatisfiesExpression":
        case "AsExpression":
        case "AsConstExpression":
        case "SatisfiesExpression":
          return !Ae(r);
        case "ConditionalExpression":
          return Ae(r) || cu(r);
        case "CallExpression":
        case "NewExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "ClassExpression":
        case "ClassDeclaration":
          return n === "superClass";
        case "TSTypeAssertion":
        case "TaggedTemplateExpression":
        case "UnaryExpression":
        case "JSXSpreadAttribute":
        case "SpreadElement":
        case "BindExpression":
        case "AwaitExpression":
        case "TSNonNullExpression":
        case "UpdateExpression":
          return true;
        case "MemberExpression":
        case "OptionalMemberExpression":
          return n === "object";
        case "AssignmentExpression":
        case "AssignmentPattern":
          return n === "left" && (r.type === "TSTypeAssertion" || Ae(r));
        case "LogicalExpression":
          if (r.type === "LogicalExpression") return s.operator !== r.operator;
        case "BinaryExpression": {
          let { operator: c, type: A } = r;
          if (!c && A !== "TSTypeAssertion") return true;
          let d = rr(c), S = s.operator, g = rr(S);
          return g > d || n === "right" && g === d || g === d && !ur(S, c) ? true : g < d && c === "%" ? S === "+" || S === "-" : !!Eu(S);
        }
        default:
          return false;
      }
    case "SequenceExpression":
      switch (s.type) {
        case "ReturnStatement":
          return false;
        case "ForStatement":
          return false;
        case "ExpressionStatement":
          return n !== "expression";
        case "ArrowFunctionExpression":
          return n !== "body";
        default:
          return true;
      }
    case "YieldExpression":
      if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return true;
    case "AwaitExpression":
      switch (s.type) {
        case "TaggedTemplateExpression":
        case "UnaryExpression":
        case "LogicalExpression":
        case "SpreadElement":
        case "TSAsExpression":
        case "TSSatisfiesExpression":
        case "TSNonNullExpression":
        case "AsExpression":
        case "AsConstExpression":
        case "SatisfiesExpression":
        case "BindExpression":
          return true;
        case "MemberExpression":
        case "OptionalMemberExpression":
          return n === "object";
        case "NewExpression":
        case "CallExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "ConditionalExpression":
          return n === "test";
        case "BinaryExpression":
          return !(!r.argument && s.operator === "|>");
        default:
          return false;
      }
    case "TSFunctionType":
      if (e.match((c) => c.type === "TSFunctionType", (c, A) => A === "typeAnnotation" && c.type === "TSTypeAnnotation", (c, A) => A === "returnType" && c.type === "ArrowFunctionExpression")) return true;
    case "TSConditionalType":
    case "TSConstructorType":
      if (n === "extendsType" && s.type === "TSConditionalType") {
        if (r.type === "TSConditionalType") return true;
        let { typeAnnotation: c } = r.returnType || r.typeAnnotation;
        if (c.type === "TSTypePredicate" && c.typeAnnotation && (c = c.typeAnnotation.typeAnnotation), c.type === "TSInferType" && c.typeParameter.constraint) return true;
      }
      if (n === "checkType" && s.type === "TSConditionalType") return true;
    case "TSUnionType":
    case "TSIntersectionType":
      if ((s.type === "TSUnionType" || s.type === "TSIntersectionType") && s.types.length > 1 && (!r.types || r.types.length > 1)) return true;
    case "TSInferType":
      if (r.type === "TSInferType") {
        if (s.type === "TSRestType") return false;
        if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return true;
      }
    case "TSTypeOperator":
      return s.type === "TSArrayType" || s.type === "TSOptionalType" || s.type === "TSRestType" || n === "objectType" && s.type === "TSIndexedAccessType" || s.type === "TSTypeOperator" || s.type === "TSTypeAnnotation" && e.grandparent.type.startsWith("TSJSDoc");
    case "TSTypeQuery":
      return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType";
    case "TypeOperator":
      return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator";
    case "TypeofTypeAnnotation":
      return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation";
    case "ArrayTypeAnnotation":
      return s.type === "NullableTypeAnnotation";
    case "IntersectionTypeAnnotation":
    case "UnionTypeAnnotation":
      return s.type === "TypeOperator" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
    case "InferTypeAnnotation":
    case "NullableTypeAnnotation":
      return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
    case "ComponentTypeAnnotation":
    case "FunctionTypeAnnotation": {
      if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return false;
      if (e.match(void 0, (A, d) => d === "typeAnnotation" && A.type === "TypeAnnotation", (A, d) => d === "returnType" && A.type === "ArrowFunctionExpression") || e.match(void 0, (A, d) => d === "typeAnnotation" && A.type === "TypePredicate", (A, d) => d === "typeAnnotation" && A.type === "TypeAnnotation", (A, d) => d === "returnType" && A.type === "ArrowFunctionExpression")) return true;
      let c = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
      return c.type === "UnionTypeAnnotation" || c.type === "IntersectionTypeAnnotation" || c.type === "ArrayTypeAnnotation" || n === "objectType" && (c.type === "IndexedAccessType" || c.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && ((y = r.returnType) == null ? void 0 : y.type) === "InferTypeAnnotation" && ((D = r.returnType) == null ? void 0 : D.typeParameter.bound) || c.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && z(r).some((A) => {
        var d;
        return ((d = A.typeAnnotation) == null ? void 0 : d.type) === "NullableTypeAnnotation";
      });
    }
    case "ConditionalTypeAnnotation":
      if (n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.type === "ConditionalTypeAnnotation" || n === "checkType" && s.type === "ConditionalTypeAnnotation") return true;
    case "OptionalIndexedAccessType":
      return n === "objectType" && s.type === "IndexedAccessType";
    case "StringLiteral":
    case "NumericLiteral":
    case "Literal":
      if (typeof r.value == "string" && s.type === "ExpressionStatement" && !s.directive) {
        let c = e.grandparent;
        return c.type === "Program" || c.type === "BlockStatement";
      }
      return n === "object" && s.type === "MemberExpression" && typeof r.value == "number";
    case "AssignmentExpression": {
      let c = e.grandparent;
      return n === "body" && s.type === "ArrowFunctionExpression" ? true : n === "key" && (s.type === "ClassProperty" || s.type === "PropertyDefinition") && s.computed || (n === "init" || n === "update") && s.type === "ForStatement" ? false : s.type === "ExpressionStatement" ? r.left.type === "ObjectPattern" : !(n === "key" && s.type === "TSPropertySignature" || s.type === "AssignmentExpression" || s.type === "SequenceExpression" && c.type === "ForStatement" && (c.init === s || c.update === s) || n === "value" && s.type === "Property" && c.type === "ObjectPattern" && c.properties.includes(s) || s.type === "NGChainedExpression" || n === "node" && s.type === "JsExpressionRoot");
    }
    case "ConditionalExpression":
      switch (s.type) {
        case "TaggedTemplateExpression":
        case "UnaryExpression":
        case "SpreadElement":
        case "BinaryExpression":
        case "LogicalExpression":
        case "NGPipeExpression":
        case "ExportDefaultDeclaration":
        case "AwaitExpression":
        case "JSXSpreadAttribute":
        case "TSTypeAssertion":
        case "TypeCastExpression":
        case "TSAsExpression":
        case "TSSatisfiesExpression":
        case "AsExpression":
        case "AsConstExpression":
        case "SatisfiesExpression":
        case "TSNonNullExpression":
          return true;
        case "NewExpression":
        case "CallExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "ConditionalExpression":
          return t.experimentalTernaries ? false : n === "test";
        case "MemberExpression":
        case "OptionalMemberExpression":
          return n === "object";
        default:
          return false;
      }
    case "FunctionExpression":
      switch (s.type) {
        case "NewExpression":
        case "CallExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "TaggedTemplateExpression":
          return true;
        default:
          return false;
      }
    case "ArrowFunctionExpression":
      switch (s.type) {
        case "BinaryExpression":
          return s.operator !== "|>" || ((m = r.extra) == null ? void 0 : m.parenthesized);
        case "NewExpression":
        case "CallExpression":
        case "OptionalCallExpression":
          return n === "callee";
        case "MemberExpression":
        case "OptionalMemberExpression":
          return n === "object";
        case "TSAsExpression":
        case "TSSatisfiesExpression":
        case "AsExpression":
        case "AsConstExpression":
        case "SatisfiesExpression":
        case "TSNonNullExpression":
        case "BindExpression":
        case "TaggedTemplateExpression":
        case "UnaryExpression":
        case "LogicalExpression":
        case "AwaitExpression":
        case "TSTypeAssertion":
          return true;
        case "ConditionalExpression":
          return n === "test";
        default:
          return false;
      }
    case "ClassExpression":
      switch (s.type) {
        case "NewExpression":
          return n === "callee";
        default:
          return false;
      }
    case "OptionalMemberExpression":
    case "OptionalCallExpression":
    case "CallExpression":
    case "MemberExpression":
      if (cc(e)) return true;
    case "TaggedTemplateExpression":
    case "TSNonNullExpression":
      if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) {
        let c = r;
        for (; c; ) switch (c.type) {
          case "CallExpression":
          case "OptionalCallExpression":
            return true;
          case "MemberExpression":
          case "OptionalMemberExpression":
          case "BindExpression":
            c = c.object;
            break;
          case "TaggedTemplateExpression":
            c = c.tag;
            break;
          case "TSNonNullExpression":
            c = c.expression;
            break;
          default:
            return false;
        }
      }
      return false;
    case "BindExpression":
      return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && W(s);
    case "NGPipeExpression":
      return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !((C = r.extra) != null && C.parenthesized) || Y(s) || n === "arguments" && L(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression");
    case "JSXFragment":
    case "JSXElement":
      return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !Y(s) && s.type !== "ArrowFunctionExpression" && s.type !== "AssignmentExpression" && s.type !== "AssignmentPattern" && s.type !== "BinaryExpression" && s.type !== "NewExpression" && s.type !== "ConditionalExpression" && s.type !== "ExpressionStatement" && s.type !== "JsExpressionRoot" && s.type !== "JSXAttribute" && s.type !== "JSXElement" && s.type !== "JSXExpressionContainer" && s.type !== "JSXFragment" && s.type !== "LogicalExpression" && !L(s) && !Ce(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression";
    case "TSInstantiationExpression":
      return n === "object" && W(s);
  }
  return false;
}
var ic = R(["BlockStatement", "BreakStatement", "ComponentDeclaration", "ClassBody", "ClassDeclaration", "ClassMethod", "ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ContinueStatement", "DebuggerStatement", "DeclareComponent", "DeclareClass", "DeclareExportAllDeclaration", "DeclareExportDeclaration", "DeclareFunction", "DeclareHook", "DeclareInterface", "DeclareModule", "DeclareModuleExports", "DeclareNamespace", "DeclareVariable", "DeclareEnum", "DoWhileStatement", "EnumDeclaration", "ExportAllDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ExpressionStatement", "ForInStatement", "ForOfStatement", "ForStatement", "FunctionDeclaration", "HookDeclaration", "IfStatement", "ImportDeclaration", "InterfaceDeclaration", "LabeledStatement", "MethodDefinition", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "TSDeclareFunction", "TSEnumDeclaration", "TSImportEqualsDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSNamespaceExportDeclaration", "TypeAlias", "VariableDeclaration", "WhileStatement", "WithStatement"]);
function ac(e) {
  let t = 0, { node: r } = e;
  for (; r; ) {
    let n = e.getParentNode(t++);
    if ((n == null ? void 0 : n.type) === "ForStatement" && n.init === r) return true;
    r = n;
  }
  return false;
}
function oc(e) {
  return nr(e, (t) => t.type === "ObjectTypeAnnotation" && nr(t, (r) => r.type === "FunctionTypeAnnotation"));
}
function pc(e) {
  return se(e);
}
function lr(e) {
  let { parent: t, key: r } = e;
  switch (t.type) {
    case "NGPipeExpression":
      if (r === "arguments" && e.isLast) return e.callParent(lr);
      break;
    case "ObjectProperty":
      if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast);
      break;
    case "BinaryExpression":
    case "LogicalExpression":
      if (r === "right") return e.callParent(lr);
      break;
    case "ConditionalExpression":
      if (r === "alternate") return e.callParent(lr);
      break;
    case "UnaryExpression":
      if (t.prefix) return e.callParent(lr);
      break;
  }
  return false;
}
function Di(e, t) {
  let { node: r, parent: n } = e;
  return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !as(e, t) : !Rt(r) || n.type !== "ExportDefaultDeclaration" && as(e, t) ? false : e.call(() => Di(e, t), ...kr(r));
}
function cc(e) {
  return !!(e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && (t.type === "CallExpression" || t.type === "NewExpression")) || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression") || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "ChainExpression") && (e.match(void 0, void 0, (t, r) => r === "callee" && (t.type === "CallExpression" && !t.optional || t.type === "NewExpression") || r === "object" && t.type === "MemberExpression" && !t.optional) || e.match(void 0, void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression")) || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression"));
}
function os(e) {
  return e.type === "Identifier" ? true : W(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && os(e.object) : false;
}
function lc(e) {
  return e.type === "ChainExpression" && (e = e.expression), os(e) || L(e) && !e.optional && os(e.callee);
}
var ke = as;
function mc(e, t) {
  let r = t - 1;
  r = Ye(e, r, { backwards: true }), r = Ne(e, r, { backwards: true }), r = Ye(e, r, { backwards: true });
  let n = Ne(e, r, { backwards: true });
  return r !== n;
}
var fi = mc;
var yc = () => true;
function ps(e, t) {
  let r = e.node;
  return r.printed = true, t.printer.printComment(e, t);
}
function Dc(e, t) {
  var y;
  let r = e.node, n = [ps(e, t)], { printer: s, originalText: u, locStart: i, locEnd: a } = t;
  if ((y = s.isBlockComment) == null ? void 0 : y.call(s, r)) {
    let D = Z(u, a(r)) ? Z(u, i(r), { backwards: true }) ? F : x : " ";
    n.push(D);
  } else n.push(F);
  let p = Ne(u, Ye(u, a(r)));
  return p !== false && Z(u, p) && n.push(F), n;
}
function fc(e, t, r) {
  var p;
  let n = e.node, s = ps(e, t), { printer: u, originalText: i, locStart: a } = t, o = (p = u.isBlockComment) == null ? void 0 : p.call(u, n);
  if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || Z(i, a(n), { backwards: true })) {
    let y = fi(i, a(n));
    return { doc: Un([F, y ? F : "", s]), isBlock: o, hasLineSuffix: true };
  }
  return !o || r != null && r.hasLineSuffix ? { doc: [Un([" ", s]), Ee], isBlock: o, hasLineSuffix: true } : { doc: [" ", s], isBlock: o, hasLineSuffix: false };
}
function J(e, t, r = {}) {
  let { node: n } = e;
  if (!O(n == null ? void 0 : n.comments)) return "";
  let { indent: s = false, marker: u, filter: i = yc } = r, a = [];
  if (e.each(({ node: p }) => {
    p.leading || p.trailing || p.marker !== u || !i(p) || a.push(ps(e, t));
  }, "comments"), a.length === 0) return "";
  let o = b(F, a);
  return s ? f([F, o]) : o;
}
function cs(e, t) {
  let r = e.node;
  if (!r) return {};
  let n = t[Symbol.for("printedComments")];
  if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
  let u = [], i = [], a;
  return e.each(() => {
    let o = e.node;
    if (n != null && n.has(o)) return;
    let { leading: p, trailing: y } = o;
    p ? u.push(Dc(e, t)) : y && (a = fc(e, t, a), i.push(a.doc));
  }, "comments"), { leading: u, trailing: i };
}
function ye(e, t, r) {
  let { leading: n, trailing: s } = cs(e, r);
  return !n && !s ? t : pr(t, (u) => [n, u, s]);
}
var ls = class extends Error {
  name = "UnexpectedNodeError";
  constructor(t, r, n = "type") {
    super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t;
  }
};
var qe = ls;
function ms(e) {
  if (typeof e != "string") throw new TypeError("Expected a string");
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
var We;
var ys = class {
  constructor(t) {
    Us(this, We);
    Ys(this, We, new Set(t));
  }
  getLeadingWhitespaceCount(t) {
    let r = pt(this, We), n = 0;
    for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++;
    return n;
  }
  getTrailingWhitespaceCount(t) {
    let r = pt(this, We), n = 0;
    for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++;
    return n;
  }
  getLeadingWhitespace(t) {
    let r = this.getLeadingWhitespaceCount(t);
    return t.slice(0, r);
  }
  getTrailingWhitespace(t) {
    let r = this.getTrailingWhitespaceCount(t);
    return t.slice(t.length - r);
  }
  hasLeadingWhitespace(t) {
    return pt(this, We).has(t.charAt(0));
  }
  hasTrailingWhitespace(t) {
    return pt(this, We).has(M(false, t, -1));
  }
  trimStart(t) {
    let r = this.getLeadingWhitespaceCount(t);
    return t.slice(r);
  }
  trimEnd(t) {
    let r = this.getTrailingWhitespaceCount(t);
    return t.slice(0, t.length - r);
  }
  trim(t) {
    return this.trimEnd(this.trimStart(t));
  }
  split(t, r = false) {
    let n = `[${ms([...pt(this, We)].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u");
    return t.split(s);
  }
  hasWhitespaceCharacter(t) {
    let r = pt(this, We);
    return Array.prototype.some.call(t, (n) => r.has(n));
  }
  hasNonWhitespaceCharacter(t) {
    let r = pt(this, We);
    return Array.prototype.some.call(t, (n) => !r.has(n));
  }
  isWhitespaceOnly(t) {
    let r = pt(this, We);
    return Array.prototype.every.call(t, (n) => r.has(n));
  }
};
We = /* @__PURE__ */ new WeakMap();
var Ei = ys;
var Xr = new Ei(` 
\r	`);
var Ds = (e) => e === "" || e === x || e === F || e === E;
function Ec(e, t, r) {
  var _, v, j, I, U;
  let { node: n } = e;
  if (n.type === "JSXElement" && Ic(n)) return [r("openingElement"), r("closingElement")];
  let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), u = n.type === "JSXElement" ? r("closingElement") : r("closingFragment");
  if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) return [s, ...e.map(r, "children"), u];
  n.children = n.children.map((P) => Lc(P) ? { type: "JSXText", value: " ", raw: " " } : P);
  let i = n.children.some(X), a = n.children.filter((P) => P.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, p = re(s) || i || o || a, y = e.parent.rootMarker === "mdx", D = t.singleQuote ? "{' '}" : '{" "}', m = y ? x : B([D, E], " "), C = ((v = (_ = n.openingElement) == null ? void 0 : _.name) == null ? void 0 : v.name) === "fbt", c = Fc(e, t, r, m, C), A = n.children.some((P) => mr(P));
  for (let P = c.length - 2; P >= 0; P--) {
    let G = c[P] === "" && c[P + 1] === "", ue = c[P] === F && c[P + 1] === "" && c[P + 2] === F, Q = (c[P] === E || c[P] === F) && c[P + 1] === "" && c[P + 2] === m, St = c[P] === m && c[P + 1] === "" && (c[P + 2] === E || c[P + 2] === F), Ft = c[P] === m && c[P + 1] === "" && c[P + 2] === m, w = c[P] === E && c[P + 1] === "" && c[P + 2] === F || c[P] === F && c[P + 1] === "" && c[P + 2] === E;
    ue && A || G || Q || Ft || w ? c.splice(P, 2) : St && c.splice(P + 1, 2);
  }
  for (; c.length > 0 && Ds(M(false, c, -1)); ) c.pop();
  for (; c.length > 1 && Ds(c[0]) && Ds(c[1]); ) c.shift(), c.shift();
  let d = [""];
  for (let [P, G] of c.entries()) {
    if (G === m) {
      if (P === 1 && bu(c[P - 1])) {
        if (c.length === 2) {
          d.push([d.pop(), D]);
          continue;
        }
        d.push([D, F], "");
        continue;
      } else if (P === c.length - 1) {
        d.push([d.pop(), D]);
        continue;
      } else if (c[P - 1] === "" && c[P - 2] === F) {
        d.push([d.pop(), D]);
        continue;
      }
    }
    P % 2 === 0 ? d.push([d.pop(), G]) : d.push(G, ""), re(G) && (p = true);
  }
  let S = A ? Jr(d) : l(d, { shouldBreak: true });
  if (((j = t.cursorNode) == null ? void 0 : j.type) === "JSXText" && n.children.includes(t.cursorNode) ? S = [cr, S, cr] : ((I = t.nodeBeforeCursor) == null ? void 0 : I.type) === "JSXText" && n.children.includes(t.nodeBeforeCursor) ? S = [cr, S] : ((U = t.nodeAfterCursor) == null ? void 0 : U.type) === "JSXText" && n.children.includes(t.nodeAfterCursor) && (S = [S, cr]), y) return S;
  let g = l([s, f([F, S]), F, u]);
  return p ? g : Ze([l([s, ...c, u]), g]);
}
function Fc(e, t, r, n, s) {
  let u = "", i = [u];
  function a(p) {
    u = p, i.push([i.pop(), p]);
  }
  function o(p) {
    p !== "" && (u = p, i.push(p, ""));
  }
  return e.each(({ node: p, next: y }) => {
    if (p.type === "JSXText") {
      let D = fe(p);
      if (mr(p)) {
        let m = Xr.split(D, true);
        m[0] === "" && (m.shift(), /\n/u.test(m[0]) ? o(Ci(s, m[1], p, y)) : o(n), m.shift());
        let C;
        if (M(false, m, -1) === "" && (m.pop(), C = m.pop()), m.length === 0) return;
        for (let [c, A] of m.entries()) c % 2 === 1 ? o(x) : a(A);
        C !== void 0 ? /\n/u.test(C) ? o(Ci(s, u, p, y)) : o(n) : o(Fi(s, u, p, y));
      } else /\n/u.test(D) ? D.match(/\n/gu).length > 1 && o(F) : o(n);
    } else {
      let D = r();
      if (a(D), y && mr(y)) {
        let C = Xr.trim(fe(y)), [c] = Xr.split(C);
        o(Fi(s, c, p, y));
      } else o(F);
    }
  }, "children"), i;
}
function Fi(e, t, r, n) {
  return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? t.length === 1 ? E : F : E;
}
function Ci(e, t, r, n) {
  return e ? F : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? F : E : F;
}
var Cc = /* @__PURE__ */ new Set(["ArrayExpression", "TupleExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot"]);
function Ac(e, t, r) {
  let { parent: n } = e;
  if (Cc.has(n.type)) return t;
  let s = e.match(void 0, (i) => i.type === "ArrowFunctionExpression", L, (i) => i.type === "JSXExpressionContainer"), u = ke(e, r);
  return l([u ? "" : B("("), f([E, t]), E, u ? "" : B(")")], { shouldBreak: s });
}
function Tc(e, t, r) {
  let { node: n } = e, s = [];
  if (s.push(r("name")), n.value) {
    let u;
    if (te(n.value)) {
      let i = fe(n.value), a = N(false, N(false, i.slice(1, -1), "&apos;", "'"), "&quot;", '"'), o = hr(a, t.jsxSingleQuote);
      a = o === '"' ? N(false, a, '"', "&quot;") : N(false, a, "'", "&apos;"), u = e.call(() => ye(e, _e(o + a + o), t), "value");
    } else u = r("value");
    s.push("=", u);
  }
  return s;
}
function dc(e, t, r) {
  let { node: n } = e, s = (u, i) => u.type === "JSXEmptyExpression" || !T(u) && (Y(u) || se(u) || u.type === "ArrowFunctionExpression" || u.type === "AwaitExpression" && (s(u.argument, u) || u.argument.type === "JSXElement") || L(u) || u.type === "ChainExpression" && L(u.expression) || u.type === "FunctionExpression" || u.type === "TemplateLiteral" || u.type === "TaggedTemplateExpression" || u.type === "DoExpression" || X(i) && (u.type === "ConditionalExpression" || De(u)));
  return s(n.expression, e.parent) ? l(["{", r("expression"), ve, "}"]) : l(["{", f([E, r("expression")]), E, ve, "}"]);
}
function xc(e, t, r) {
  var a, o;
  let { node: n } = e, s = T(n.name) || T(n.typeParameters) || T(n.typeArguments);
  if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " />"];
  if (((a = n.attributes) == null ? void 0 : a.length) === 1 && te(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
`) && !s && !T(n.attributes[0])) return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
  let u = (o = n.attributes) == null ? void 0 : o.some((p) => te(p.value) && p.value.value.includes(`
`)), i = t.singleAttributePerLine && n.attributes.length > 1 ? F : x;
  return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), f(e.map(() => [i, r()], "attributes")), ...hc(n, t, s)], { shouldBreak: u });
}
function hc(e, t, r) {
  return e.selfClosing ? [x, "/>"] : gc(e, t, r) ? [">"] : [E, ">"];
}
function gc(e, t, r) {
  let n = e.attributes.length > 0 && T(M(false, e.attributes, -1), h.Trailing);
  return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n;
}
function Sc(e, t, r) {
  let { node: n } = e, s = [];
  s.push("</");
  let u = r("name");
  return T(n.name, h.Leading | h.Line) ? s.push(f([F, u]), F) : T(n.name, h.Leading | h.Block) ? s.push(" ", u) : s.push(u), s.push(">"), s;
}
function Bc(e, t) {
  let { node: r } = e, n = T(r), s = T(r, h.Line), u = r.type === "JSXOpeningFragment";
  return [u ? "<" : "</", f([s ? F : n && !u ? " " : "", J(e, t)]), s ? F : "", ">"];
}
function bc(e, t, r) {
  let n = ye(e, Ec(e, t, r), t);
  return Ac(e, n, t);
}
function Pc(e, t) {
  let { node: r } = e, n = T(r, h.Line);
  return [J(e, t, { indent: n }), n ? F : ""];
}
function kc(e, t, r) {
  let { node: n } = e;
  return ["{", e.call(({ node: s }) => {
    let u = ["...", r()];
    return !T(s) || !zn(e) ? u : [f([E, ye(e, u, t)]), E];
  }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"];
}
function Ai(e, t, r) {
  let { node: n } = e;
  if (n.type.startsWith("JSX")) switch (n.type) {
    case "JSXAttribute":
      return Tc(e, t, r);
    case "JSXIdentifier":
      return n.name;
    case "JSXNamespacedName":
      return b(":", [r("namespace"), r("name")]);
    case "JSXMemberExpression":
      return b(".", [r("object"), r("property")]);
    case "JSXSpreadAttribute":
    case "JSXSpreadChild":
      return kc(e, t, r);
    case "JSXExpressionContainer":
      return dc(e, t, r);
    case "JSXFragment":
    case "JSXElement":
      return bc(e, t, r);
    case "JSXOpeningElement":
      return xc(e, t, r);
    case "JSXClosingElement":
      return Sc(e, t, r);
    case "JSXOpeningFragment":
    case "JSXClosingFragment":
      return Bc(e, t);
    case "JSXEmptyExpression":
      return Pc(e, t);
    case "JSXText":
      throw new Error("JSXText should be handled by JSXElement");
    default:
      throw new qe(n, "JSX");
  }
}
function Ic(e) {
  if (e.children.length === 0) return true;
  if (e.children.length > 1) return false;
  let t = e.children[0];
  return t.type === "JSXText" && !mr(t);
}
function mr(e) {
  return e.type === "JSXText" && (Xr.hasNonWhitespaceCharacter(fe(e)) || !/\n/u.test(fe(e)));
}
function Lc(e) {
  return e.type === "JSXExpressionContainer" && te(e.expression) && e.expression.value === " " && !T(e.expression);
}
function Ti(e) {
  let { node: t, parent: r } = e;
  if (!X(t) || !X(r)) return false;
  let { index: n, siblings: s } = e, u;
  for (let i = n; i > 0; i--) {
    let a = s[i - 1];
    if (!(a.type === "JSXText" && !mr(a))) {
      u = a;
      break;
    }
  }
  return (u == null ? void 0 : u.type) === "JSXExpressionContainer" && u.expression.type === "JSXEmptyExpression" && It(u.expression);
}
function wc(e) {
  return It(e.node) || Ti(e);
}
var Hr = wc;
var Oc = 0;
function Vr(e, t, r) {
  var v;
  let { node: n, parent: s, grandparent: u, key: i } = e, a = i !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), o = n.operator === "|>" && ((v = e.root.extra) == null ? void 0 : v.__isUsingHackPipeline), p = fs(e, r, t, false, a);
  if (a) return p;
  if (o) return l(p);
  if (L(s) && s.callee === n || s.type === "UnaryExpression" || W(s) && !s.computed) return l([f([E, ...p]), E]);
  let y = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !L(u) || s.type === "TemplateLiteral", D = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Ce(s), m = De(n.left) && ur(n.operator, n.left.operator);
  if (y || Nt(n) && !m || !Nt(n) && D) return l(p);
  if (p.length === 0) return "";
  let C = X(n.right), c = p.findIndex((j) => typeof j != "string" && !Array.isArray(j) && j.type === me), A = p.slice(0, c === -1 ? 1 : c + 1), d = p.slice(A.length, C ? -1 : void 0), S = Symbol("logicalChain-" + ++Oc), g = l([...A, f(d)], { id: S });
  if (!C) return g;
  let _ = M(false, p, -1);
  return l([g, dt(_, { groupId: S })]);
}
function fs(e, t, r, n, s) {
  var S;
  let { node: u } = e;
  if (!De(u)) return [l(t())];
  let i = [];
  ur(u.operator, u.left.operator) ? i = e.call((g) => fs(g, t, r, true, s), "left") : i.push(l(t("left")));
  let a = Nt(u), o = (u.operator === "|>" || u.type === "NGPipeExpression" || _c(e, r)) && !Le(r.originalText, u.right), y = !T(u.right, h.Leading, qr) && Le(r.originalText, u.right), D = u.type === "NGPipeExpression" ? "|" : u.operator, m = u.type === "NGPipeExpression" && u.arguments.length > 0 ? l(f([E, ": ", b([x, ": "], e.map(() => Be(2, l(t())), "arguments"))])) : "", C;
  if (a) C = [D, " ", t("right"), m];
  else {
    let _ = D === "|>" && ((S = e.root.extra) == null ? void 0 : S.__isUsingHackPipeline) ? e.call((v) => fs(v, t, r, true, s), "right") : t("right");
    if (r.experimentalOperatorPosition === "start") {
      let v = "";
      if (y) switch (Se(_)) {
        case he:
          v = _.splice(0, 1)[0];
          break;
        case ge:
          v = _.contents.splice(0, 1)[0];
          break;
      }
      C = [x, v, D, " ", _, m];
    } else C = [o ? x : "", D, o ? " " : x, _, m];
  }
  let { parent: c } = e, A = T(u.left, h.Trailing | h.Line);
  if ((A || !(s && u.type === "LogicalExpression") && c.type !== u.type && u.left.type !== u.type && u.right.type !== u.type) && (C = l(C, { shouldBreak: A })), r.experimentalOperatorPosition === "start" ? i.push(a || y ? " " : "", C) : i.push(o ? "" : " ", C), n && T(u)) {
    let g = Gt(ye(e, i, r));
    return g.type === we ? g.parts : Array.isArray(g) ? g : [g];
  }
  return i;
}
function Nt(e) {
  return e.type !== "LogicalExpression" ? false : !!(se(e.right) && e.right.properties.length > 0 || Y(e.right) && e.right.elements.length > 0 || X(e.right));
}
var di = (e) => e.type === "BinaryExpression" && e.operator === "|";
function _c(e, t) {
  return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && di(e.node) && !e.hasAncestor((r) => !di(r) && r.type !== "JsExpressionRoot");
}
function hi(e, t, r) {
  let { node: n } = e;
  if (n.type.startsWith("NG")) switch (n.type) {
    case "NGRoot":
      return [r("node"), T(n.node) ? " //" + ct(n.node)[0].value.trimEnd() : ""];
    case "NGPipeExpression":
      return Vr(e, t, r);
    case "NGChainedExpression":
      return l(b([";", x], e.map(() => jc(e) ? r() : ["(", r(), ")"], "expressions")));
    case "NGEmptyExpression":
      return "";
    case "NGMicrosyntax":
      return e.map(() => [e.isFirst ? "" : xi(e) ? " " : [";", x], r()], "body");
    case "NGMicrosyntaxKey":
      return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name);
    case "NGMicrosyntaxExpression":
      return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]];
    case "NGMicrosyntaxKeyedExpression": {
      let { index: s, parent: u } = e, i = xi(e) || (s === 1 && (n.key.name === "then" || n.key.name === "else" || n.key.name === "as") || (s === 2 || s === 3) && (n.key.name === "else" && u.body[s - 1].type === "NGMicrosyntaxKeyedExpression" && u.body[s - 1].key.name === "then" || n.key.name === "track")) && u.body[0].type === "NGMicrosyntaxExpression";
      return [r("key"), i ? " " : ": ", r("expression")];
    }
    case "NGMicrosyntaxLet":
      return ["let ", r("key"), n.value === null ? "" : [" = ", r("value")]];
    case "NGMicrosyntaxAs":
      return [r("key"), " as ", r("alias")];
    default:
      throw new qe(n, "Angular");
  }
}
function xi({ node: e, index: t }) {
  return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1;
}
var vc = R(["CallExpression", "OptionalCallExpression", "AssignmentExpression"]);
function jc({ node: e }) {
  return nr(e, vc);
}
function Es(e, t, r) {
  let { node: n } = e;
  return l([b(x, e.map(r, "decorators")), Bi(n, t) ? F : x]);
}
function gi(e, t, r) {
  return bi(e.node) ? [b(F, e.map(r, "declaration", "decorators")), F] : "";
}
function Si(e, t, r) {
  let { node: n, parent: s } = e, { decorators: u } = n;
  if (!O(u) || bi(s) || Hr(e)) return "";
  let i = n.type === "ClassExpression" || n.type === "ClassDeclaration" || Bi(n, t);
  return [e.key === "declaration" && pu(s) ? F : i ? Ee : "", b(x, e.map(r, "decorators")), x];
}
function Bi(e, t) {
  return e.decorators.some((r) => Z(t.originalText, k(r)));
}
function bi(e) {
  var r;
  if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
  let t = (r = e.declaration) == null ? void 0 : r.decorators;
  return O(t) && bt(e, t[0]);
}
var yt = class extends Error {
  name = "ArgExpansionBailout";
};
function Mc(e, t, r) {
  let { node: n } = e, s = pe(n);
  if (s.length === 0) return ["(", J(e, t), ")"];
  let u = s.length - 1;
  if (qc(s)) {
    let D = ["("];
    return qt(e, (m, C) => {
      D.push(r()), C !== u && D.push(", ");
    }), D.push(")"), D;
  }
  let i = false, a = [];
  qt(e, ({ node: D }, m) => {
    let C = r();
    m === u || (ce(D, t) ? (i = true, C = [C, ",", F, F]) : C = [C, ",", x]), a.push(C);
  });
  let o = !t.parser.startsWith("__ng_") && n.type !== "ImportExpression" && oe(t, "all") ? "," : "";
  function p() {
    return l(["(", f([x, ...a]), o, x, ")"], { shouldBreak: true });
  }
  if (i || e.parent.type !== "Decorator" && Du(s)) return p();
  if (Jc(s)) {
    let D = a.slice(1);
    if (D.some(re)) return p();
    let m;
    try {
      m = r(Jn(n, 0), { expandFirstArg: true });
    } catch (C) {
      if (C instanceof yt) return p();
      throw C;
    }
    return re(m) ? [Ee, Ze([["(", l(m, { shouldBreak: true }), ", ", ...D, ")"], p()])] : Ze([["(", m, ", ", ...D, ")"], ["(", l(m, { shouldBreak: true }), ", ", ...D, ")"], p()]);
  }
  if (Rc(s, a, t)) {
    let D = a.slice(0, -1);
    if (D.some(re)) return p();
    let m;
    try {
      m = r(Jn(n, -1), { expandLastArg: true });
    } catch (C) {
      if (C instanceof yt) return p();
      throw C;
    }
    return re(m) ? [Ee, Ze([["(", ...D, l(m, { shouldBreak: true }), ")"], p()])] : Ze([["(", ...D, m, ")"], ["(", ...D, l(m, { shouldBreak: true }), ")"], p()]);
  }
  let y = ["(", f([E, ...a]), B(o), E, ")"];
  return _r(e) ? y : l(y, { shouldBreak: a.some(re) || i });
}
function yr(e, t = false) {
  return se(e) && (e.properties.length > 0 || T(e)) || Y(e) && (e.elements.length > 0 || T(e)) || e.type === "TSTypeAssertion" && yr(e.expression) || Ae(e) && yr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || Wc(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && yr(e.body, true) || se(e.body) || Y(e.body) || !t && (L(e.body) || e.body.type === "ConditionalExpression") || X(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression";
}
function Rc(e, t, r) {
  var u, i;
  let n = M(false, e, -1);
  if (e.length === 1) {
    let a = M(false, t, -1);
    if ((u = a.label) != null && u.embed && ((i = a.label) == null ? void 0 : i.hug) !== false) return true;
  }
  let s = M(false, e, -2);
  return !T(n, h.Leading) && !T(n, h.Trailing) && yr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !Y(n)) && !(e.length > 1 && Fs(n, r));
}
function Jc(e) {
  if (e.length !== 2) return false;
  let [t, r] = e;
  return t.type === "ModuleExpression" && Gc(r) ? true : !T(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && ki(r) && !yr(r);
}
function ki(e) {
  if (e.type === "ParenthesizedExpression") return ki(e.expression);
  if (Ae(e) || e.type === "TypeCastExpression") {
    let { typeAnnotation: t } = e;
    if (t.type === "TypeAnnotation" && (t = t.typeAnnotation), t.type === "TSArrayType" && (t = t.elementType, t.type === "TSArrayType" && (t = t.elementType)), t.type === "GenericTypeAnnotation" || t.type === "TSTypeReference") {
      let r = t.typeArguments ?? t.typeParameters;
      (r == null ? void 0 : r.params.length) === 1 && (t = r.params[0]);
    }
    return Jt(t) && Ie(e.expression, 1);
  }
  return lt(e) && pe(e).length > 1 ? false : De(e) ? Ie(e.left, 1) && Ie(e.right, 1) : Mn(e) || Ie(e);
}
function qc(e) {
  return e.length === 2 ? Pi(e, 0) : e.length === 3 ? e[0].type === "Identifier" && Pi(e, 1) : false;
}
function Pi(e, t) {
  let r = e[t], n = e[t + 1];
  return r.type === "ArrowFunctionExpression" && z(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => T(s));
}
function Wc(e) {
  return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || T(e, h.Dangling));
}
function Gc(e) {
  return e.type === "ObjectExpression" && e.properties.length === 1 && Ce(e.properties[0]) && e.properties[0].key.type === "Identifier" && e.properties[0].key.name === "type" && te(e.properties[0].value) && e.properties[0].value.value === "module";
}
var Dr = Mc;
var Uc = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), L(e) && pe(e).length > 0);
function Ii(e, t, r) {
  var p;
  let n = r("object"), s = Cs(e, t, r), { node: u } = e, i = e.findAncestor((y) => !(W(y) || y.type === "TSNonNullExpression")), a = e.findAncestor((y) => !(y.type === "ChainExpression" || y.type === "TSNonNullExpression")), o = i && (i.type === "NewExpression" || i.type === "BindExpression" || i.type === "AssignmentExpression" && i.left.type !== "Identifier") || u.computed || u.object.type === "Identifier" && u.property.type === "Identifier" && !W(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Uc(u.object) || ((p = n.label) == null ? void 0 : p.memberChain));
  return st(n.label, [n, o ? s : l(f([E, s]))]);
}
function Cs(e, t, r) {
  let n = r("property"), { node: s } = e, u = $(e);
  return s.computed ? !s.property || Fe(s.property) ? [u, "[", n, "]"] : l([u, "[", f([E, n]), E, "]"]) : [u, ".", n];
}
function Li(e, t, r) {
  if (e.node.type === "ChainExpression") return e.call(() => Li(e, t, r), "expression");
  let { parent: n } = e, s = !n || n.type === "ExpressionStatement", u = [];
  function i(w) {
    let { originalText: ne } = t, xe = ut(ne, k(w));
    return ne.charAt(xe) === ")" ? xe !== false && vt(ne, xe + 1) : ce(w, t);
  }
  function a() {
    let { node: w } = e;
    if (w.type === "ChainExpression") return e.call(a, "expression");
    if (L(w) && (At(w.callee) || L(w.callee))) {
      let ne = i(w);
      u.unshift({ node: w, hasTrailingEmptyLine: ne, printed: [ye(e, [$(e), et(e, t, r), Dr(e, t, r)], t), ne ? F : ""] }), e.call(a, "callee");
    } else At(w) ? (u.unshift({ node: w, needsParens: ke(e, t), printed: ye(e, W(w) ? Cs(e, t, r) : $r(e, t, r), t) }), e.call(a, "object")) : w.type === "TSNonNullExpression" ? (u.unshift({ node: w, printed: ye(e, "!", t) }), e.call(a, "expression")) : u.unshift({ node: w, printed: r() });
  }
  let { node: o } = e;
  u.unshift({ node: o, printed: [$(e), et(e, t, r), Dr(e, t, r)] }), o.callee && e.call(a, "callee");
  let p = [], y = [u[0]], D = 1;
  for (; D < u.length && (u[D].node.type === "TSNonNullExpression" || L(u[D].node) || W(u[D].node) && u[D].node.computed && Fe(u[D].node.property)); ++D) y.push(u[D]);
  if (!L(u[0].node)) for (; D + 1 < u.length && (At(u[D].node) && At(u[D + 1].node)); ++D) y.push(u[D]);
  p.push(y), y = [];
  let m = false;
  for (; D < u.length; ++D) {
    if (m && At(u[D].node)) {
      if (u[D].node.computed && Fe(u[D].node.property)) {
        y.push(u[D]);
        continue;
      }
      p.push(y), y = [], m = false;
    }
    (L(u[D].node) || u[D].node.type === "ImportExpression") && (m = true), y.push(u[D]), T(u[D].node, h.Trailing) && (p.push(y), y = [], m = false);
  }
  y.length > 0 && p.push(y);
  function C(w) {
    return /^[A-Z]|^[$_]+$/u.test(w);
  }
  function c(w) {
    return w.length <= t.tabWidth;
  }
  function A(w) {
    var ot;
    let ne = (ot = w[1][0]) == null ? void 0 : ot.node.computed;
    if (w[0].length === 1) {
      let Bt = w[0][0].node;
      return Bt.type === "ThisExpression" || Bt.type === "Identifier" && (C(Bt.name) || s && c(Bt.name) || ne);
    }
    let xe = M(false, w[0], -1).node;
    return W(xe) && xe.property.type === "Identifier" && (C(xe.property.name) || ne);
  }
  let d = p.length >= 2 && !T(p[1][0].node) && A(p);
  function S(w) {
    let ne = w.map((xe) => xe.printed);
    return w.length > 0 && M(false, w, -1).needsParens ? ["(", ...ne, ")"] : ne;
  }
  function g(w) {
    return w.length === 0 ? "" : f([F, b(F, w.map(S))]);
  }
  let _ = p.map(S), v = _, j = d ? 3 : 2, I = p.flat(), U = I.slice(1, -1).some((w) => T(w.node, h.Leading)) || I.slice(0, -1).some((w) => T(w.node, h.Trailing)) || p[j] && T(p[j][0].node, h.Leading);
  if (p.length <= j && !U && !p.some((w) => M(false, w, -1).hasTrailingEmptyLine)) return _r(e) ? v : l(v);
  let P = M(false, p[d ? 1 : 0], -1).node, G = !L(P) && i(P), ue = [S(p[0]), d ? p.slice(1, 2).map(S) : "", G ? F : "", g(p.slice(d ? 2 : 1))], Q = u.map(({ node: w }) => w).filter(L);
  function St() {
    let w = M(false, M(false, p, -1), -1).node, ne = M(false, _, -1);
    return L(w) && re(ne) && Q.slice(0, -1).some((xe) => xe.arguments.some(Mt));
  }
  let Ft;
  return U || Q.length > 2 && Q.some((w) => !w.arguments.every((ne) => Ie(ne))) || _.slice(0, -1).some(re) || St() ? Ft = l(ue) : Ft = [re(v) || G ? Ee : "", Ze([v, ue])], st({ memberChain: true }, Ft);
}
var wi = Li;
function Kr(e, t, r) {
  var y;
  let { node: n } = e, s = n.type === "NewExpression", u = n.type === "ImportExpression", i = $(e), a = pe(n), o = a.length === 1 && wr(a[0], t.originalText);
  if (o || Yc(e) || kt(n, e.parent)) {
    let D = [];
    if (qt(e, () => {
      D.push(r());
    }), !(o && ((y = D[0].label) != null && y.embed))) return [s ? "new " : "", Oi(e, r), i, et(e, t, r), "(", b(", ", D), ")"];
  }
  if (!u && !s && At(n.callee) && !e.call((D) => ke(D, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return wi(e, t, r);
  let p = [s ? "new " : "", Oi(e, r), i, et(e, t, r), Dr(e, t, r)];
  return u || L(n.callee) ? l(p) : p;
}
function Oi(e, t) {
  let { node: r } = e;
  return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : t("callee");
}
function Yc(e) {
  let { node: t } = e;
  if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return false;
  let r = pe(t);
  return t.callee.name === "require" ? r.length === 1 && te(r[0]) || r.length > 1 : t.callee.name === "define" && e.parent.type === "ExpressionStatement" ? r.length === 1 || r.length === 2 && r[0].type === "ArrayExpression" || r.length === 3 && te(r[0]) && r[1].type === "ArrayExpression" : false;
}
function xt(e, t, r, n, s, u) {
  let i = Nc(e, t, r, n, u), a = u ? r(u, { assignmentLayout: i }) : "";
  switch (i) {
    case "break-after-operator":
      return l([l(n), s, l(f([x, a]))]);
    case "never-break-after-operator":
      return l([l(n), s, " ", a]);
    case "fluid": {
      let o = Symbol("assignment");
      return l([l(n), s, l(f(x), { id: o }), ve, dt(a, { groupId: o })]);
    }
    case "break-lhs":
      return l([n, s, " ", l(a)]);
    case "chain":
      return [l(n), s, x, a];
    case "chain-tail":
      return [l(n), s, f([x, a])];
    case "chain-tail-arrow-chain":
      return [l(n), s, a];
    case "only-left":
      return n;
  }
}
function vi(e, t, r) {
  let { node: n } = e;
  return xt(e, t, r, r("left"), [" ", n.operator], "right");
}
function ji(e, t, r) {
  return xt(e, t, r, r("id"), " =", "init");
}
function Nc(e, t, r, n, s) {
  let { node: u } = e, i = u[s];
  if (!i) return "only-left";
  let a = !Qr(i);
  if (e.match(Qr, Mi, (m) => !a || m.type !== "ExpressionStatement" && m.type !== "VariableDeclaration")) return a ? i.type === "ArrowFunctionExpression" && i.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain";
  if (!a && Qr(i.right) || Le(t.originalText, i)) return "break-after-operator";
  if (u.type === "ImportAttribute" || i.type === "CallExpression" && i.callee.name === "require" || t.parser === "json5" || t.parser === "jsonc" || t.parser === "json") return "never-break-after-operator";
  let y = Bu(n);
  if (Hc(u) || Qc(u) || As(u) && y) return "break-lhs";
  let D = Zc(u, n, t);
  return e.call(() => Xc(e, t, r, D), s) ? "break-after-operator" : Vc(u) ? "break-lhs" : !y && (D || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || i.type === "BooleanLiteral" || Fe(i) || i.type === "ClassExpression") ? "never-break-after-operator" : "fluid";
}
function Xc(e, t, r, n) {
  let s = e.node;
  if (De(s) && !Nt(s)) return true;
  switch (s.type) {
    case "StringLiteralTypeAnnotation":
    case "SequenceExpression":
      return true;
    case "TSConditionalType":
    case "ConditionalTypeAnnotation":
      if (!t.experimentalTernaries && !rl(s)) break;
      return true;
    case "ConditionalExpression": {
      if (!t.experimentalTernaries) {
        let { test: p } = s;
        return De(p) && !Nt(p);
      }
      let { consequent: a, alternate: o } = s;
      return a.type === "ConditionalExpression" || o.type === "ConditionalExpression";
    }
    case "ClassExpression":
      return O(s.decorators);
  }
  if (n) return false;
  let u = s, i = [];
  for (; ; ) if (u.type === "UnaryExpression" || u.type === "AwaitExpression" || u.type === "YieldExpression" && u.argument !== null) u = u.argument, i.push("argument");
  else if (u.type === "TSNonNullExpression") u = u.expression, i.push("expression");
  else break;
  return !!(te(u) || e.call(() => Ri(e, t, r), ...i));
}
function Hc(e) {
  if (Mi(e)) {
    let t = e.left || e.id;
    return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => {
      var n;
      return Ce(r) && (!r.shorthand || ((n = r.value) == null ? void 0 : n.type) === "AssignmentPattern");
    });
  }
  return false;
}
function Qr(e) {
  return e.type === "AssignmentExpression";
}
function Mi(e) {
  return Qr(e) || e.type === "VariableDeclarator";
}
function Vc(e) {
  let t = Kc(e);
  if (O(t)) {
    let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound";
    if (t.length > 1 && t.some((n) => n[r] || n.default)) return true;
  }
  return false;
}
var $c = R(["TSTypeAliasDeclaration", "TypeAlias"]);
function Kc(e) {
  var t;
  if ($c(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
}
function Qc(e) {
  if (e.type !== "VariableDeclarator") return false;
  let { typeAnnotation: t } = e.id;
  if (!t || !t.typeAnnotation) return false;
  let r = _i(t.typeAnnotation);
  return O(r) && r.length > 1 && r.some((n) => O(_i(n)) || n.type === "TSConditionalType");
}
function As(e) {
  var t;
  return e.type === "VariableDeclarator" && ((t = e.init) == null ? void 0 : t.type) === "ArrowFunctionExpression";
}
var zc = R(["TSTypeReference", "GenericTypeAnnotation"]);
function _i(e) {
  var t;
  if (zc(e)) return (t = e.typeArguments ?? e.typeParameters) == null ? void 0 : t.params;
}
function Ri(e, t, r, n = false) {
  var i;
  let { node: s } = e, u = () => Ri(e, t, r, true);
  if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(u, "expression");
  if (L(s)) {
    if ((i = Kr(e, t, r).label) != null && i.memberChain) return false;
    let o = pe(s);
    return !(o.length === 0 || o.length === 1 && sr(o[0], t)) || el(s, r) ? false : e.call(u, "callee");
  }
  return W(s) ? e.call(u, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression");
}
function Zc(e, t, r) {
  return Ce(e) ? (t = Gt(t), typeof t == "string" && tt(t) < r.tabWidth + 3) : false;
}
function el(e, t) {
  let r = tl(e);
  if (O(r)) {
    if (r.length > 1) return true;
    if (r.length === 1) {
      let s = r[0];
      if (Xe(s) || vr(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return true;
    }
    let n = e.typeParameters ? "typeParameters" : "typeArguments";
    if (re(t(n))) return true;
  }
  return false;
}
function tl(e) {
  var t;
  return (t = e.typeParameters ?? e.typeArguments) == null ? void 0 : t.params;
}
function rl(e) {
  function t(r) {
    switch (r.type) {
      case "FunctionTypeAnnotation":
      case "GenericTypeAnnotation":
      case "TSFunctionType":
        return !!r.typeParameters;
      case "TSTypeReference":
        return !!(r.typeArguments ?? r.typeParameters);
      default:
        return false;
    }
  }
  return t(e.checkType) || t(e.extendsType);
}
function Ge(e, t, r, n, s) {
  let u = e.node, i = z(u), a = s ? et(e, r, t) : "";
  if (i.length === 0) return [a, "(", J(e, r, { filter: (c) => be(r.originalText, k(c)) === ")" }), ")"];
  let { parent: o } = e, p = kt(o), y = Ts(u), D = [];
  if (Cu(e, (c, A) => {
    let d = A === i.length - 1;
    d && u.rest && D.push("..."), D.push(t()), !d && (D.push(","), p || y ? D.push(" ") : ce(i[A], r) ? D.push(F, F) : D.push(x));
  }), n && !sl(e)) {
    if (re(a) || re(D)) throw new yt();
    return l([or(a), "(", or(D), ")"]);
  }
  let m = i.every((c) => !O(c.decorators));
  return y && m ? [a, "(", ...D, ")"] : p ? [a, "(", ...D, ")"] : (Lr(o) || lu(o) || o.type === "TypeAlias" || o.type === "UnionTypeAnnotation" || o.type === "IntersectionTypeAnnotation" || o.type === "FunctionTypeAnnotation" && o.returnType === u) && i.length === 1 && i[0].name === null && u.this !== i[0] && i[0].typeAnnotation && u.typeParameters === null && Jt(i[0].typeAnnotation) && !u.rest ? r.arrowParens === "always" || u.type === "HookTypeAnnotation" ? ["(", ...D, ")"] : D : [a, "(", f([E, ...D]), B(!Fu(u) && oe(r, "all") ? "," : ""), E, ")"];
}
function Ts(e) {
  if (!e) return false;
  let t = z(e);
  if (t.length !== 1) return false;
  let [r] = t;
  return !T(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && Me(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && Me(r.typeAnnotation) && r !== e.rest || r.type === "AssignmentPattern" && (r.left.type === "ObjectPattern" || r.left.type === "ArrayPattern") && (r.right.type === "Identifier" || se(r.right) && r.right.properties.length === 0 || Y(r.right) && r.right.elements.length === 0));
}
function nl(e) {
  let t;
  return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t;
}
function at(e, t) {
  var s;
  let r = nl(e);
  if (!r) return false;
  let n = (s = e.typeParameters) == null ? void 0 : s.params;
  if (n) {
    if (n.length > 1) return false;
    if (n.length === 1) {
      let u = n[0];
      if (u.constraint || u.default) return false;
    }
  }
  return z(e).length === 1 && (Me(r) || re(t));
}
function sl(e) {
  return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => {
    if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") {
      let n = t.callee.callee;
      return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier";
    }
    return false;
  }, (t, r) => t.type === "VariableDeclarator" && r === "init" || t.type === "ExportDefaultDeclaration" && r === "declaration" || t.type === "TSExportAssignment" && r === "expression" || t.type === "AssignmentExpression" && r === "right" && t.left.type === "MemberExpression" && t.left.object.type === "Identifier" && t.left.object.name === "module" && t.left.property.type === "Identifier" && t.left.property.name === "exports", (t) => t.type !== "VariableDeclaration" || t.kind === "const" && t.declarations.length === 1);
}
function Ji(e) {
  let t = z(e);
  return t.length > 1 && t.some((r) => r.type === "TSParameterProperty");
}
var ul = R(["VoidTypeAnnotation", "TSVoidKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword"]);
var il = R(["ObjectTypeAnnotation", "TSTypeLiteral", "GenericTypeAnnotation", "TSTypeReference"]);
function al(e) {
  let { types: t } = e;
  if (t.some((n) => T(n))) return false;
  let r = t.find((n) => il(n));
  return r ? t.every((n) => n === r || ul(n)) : false;
}
function ds(e) {
  return Jt(e) || Me(e) ? true : Xe(e) ? al(e) : false;
}
function qi(e, t, r) {
  let n = t.semi ? ";" : "", { node: s } = e, u = [K(e), "opaque type ", r("id"), r("typeParameters")];
  return s.supertype && u.push(": ", r("supertype")), s.impltype && u.push(" = ", r("impltype")), u.push(n), u;
}
function zr(e, t, r) {
  let n = t.semi ? ";" : "", { node: s } = e, u = [K(e)];
  u.push("type ", r("id"), r("typeParameters"));
  let i = s.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right";
  return [xt(e, t, r, u, " =", i), n];
}
function Zr(e, t, r) {
  let n = false;
  return l(e.map(({ isFirst: s, previous: u, node: i, index: a }) => {
    let o = r();
    if (s) return o;
    let p = Me(i), y = Me(u);
    return y && p ? [" & ", n ? f(o) : o] : !y && !p ? t.experimentalOperatorPosition === "start" ? f([x, "& ", o]) : f([" &", x, o]) : (a > 1 && (n = true), [" & ", a > 1 ? f(o) : o]);
  }, "types"));
}
function en(e, t, r) {
  let { node: n } = e, { parent: s } = e, u = s.type !== "TypeParameterInstantiation" && (s.type !== "TSConditionalType" || !t.experimentalTernaries) && (s.type !== "ConditionalTypeAnnotation" || !t.experimentalTernaries) && s.type !== "TSTypeParameterInstantiation" && s.type !== "GenericTypeAnnotation" && s.type !== "TSTypeReference" && s.type !== "TSTypeAssertion" && s.type !== "TupleTypeAnnotation" && s.type !== "TSTupleType" && !(s.type === "FunctionTypeParam" && !s.name && e.grandparent.this !== s) && !((s.type === "TypeAlias" || s.type === "VariableDeclarator" || s.type === "TSTypeAliasDeclaration") && Le(t.originalText, n)), i = ds(n), a = e.map((y) => {
    let D = r();
    return i || (D = Be(2, D)), ye(y, D, t);
  }, "types");
  if (i) return b(" | ", a);
  let o = u && !Le(t.originalText, n), p = [B([o ? x : "", "| "]), b([x, "| "], a)];
  return ke(e, t) ? l([f(p), E]) : (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? l([f([B(["(", E]), p]), E, B(")")]) : l(u ? f(p) : p);
}
function ol(e) {
  var n;
  let { node: t, parent: r } = e;
  return t.type === "FunctionTypeAnnotation" && (Lr(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && bt(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ? void 0 : n.type) === "DeclareFunction"));
}
function tn(e, t, r) {
  let { node: n } = e, s = [Xt(e)];
  (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new ");
  let u = Ge(e, r, t, false, true), i = [];
  return n.type === "FunctionTypeAnnotation" ? i.push(ol(e) ? " => " : ": ", r("returnType")) : i.push(H(e, r, n.returnType ? "returnType" : "typeAnnotation")), at(n, i) && (u = l(u)), s.push(u, i), l(s);
}
function rn(e, t, r) {
  return [r("objectType"), $(e), "[", r("indexType"), "]"];
}
function nn(e, t, r) {
  return ["infer ", r("typeParameter")];
}
function xs(e, t, r) {
  let { node: n } = e;
  return [n.postfix ? "" : r, H(e, t), n.postfix ? r : ""];
}
function sn(e, t, r) {
  let { node: n } = e;
  return ["...", ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], r("typeAnnotation")];
}
function un(e, t, r) {
  let { node: n } = e;
  return [n.variance ? r("variance") : "", r("label"), n.optional ? "?" : "", ": ", r("elementType")];
}
var pl = /* @__PURE__ */ new WeakSet();
function H(e, t, r = "typeAnnotation") {
  let { node: { [r]: n } } = e;
  if (!n) return "";
  let s = false;
  if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") {
    let u = e.call(Wi, r);
    (u === "=>" || u === ":" && T(n, h.Leading)) && (s = true), pl.add(n);
  }
  return s ? [" ", t(r)] : t(r);
}
var Wi = (e) => e.match((t) => t.type === "TSTypeAnnotation", (t, r) => (r === "returnType" || r === "typeAnnotation") && (t.type === "TSFunctionType" || t.type === "TSConstructorType")) ? "=>" : e.match((t) => t.type === "TSTypeAnnotation", (t, r) => r === "typeAnnotation" && (t.type === "TSJSDocNullableType" || t.type === "TSJSDocNonNullableType" || t.type === "TSTypePredicate")) || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareFunction") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareHook") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "bound" && t.type === "TypeParameter" && t.usesExtendsBound) ? "" : ":";
function an(e, t, r) {
  let n = Wi(e);
  return n ? [n, " ", r("typeAnnotation")] : r("typeAnnotation");
}
function on(e) {
  return [e("elementType"), "[]"];
}
function pn({ node: e }, t) {
  let r = e.type === "TSTypeQuery" ? "exprName" : "argument", n = e.type === "TypeofTypeAnnotation" || e.typeArguments ? "typeArguments" : "typeParameters";
  return ["typeof ", t(r), t(n)];
}
function cn(e, t) {
  let { node: r } = e;
  return [r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", t("parameterName"), r.typeAnnotation ? [" is ", H(e, t)] : ""];
}
function $(e) {
  let { node: t } = e;
  return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : L(t) || W(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
}
function ln(e) {
  return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
}
var cl = /* @__PURE__ */ new Set(["DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
function K(e) {
  let { node: t } = e;
  return t.declare || cl.has(t.type) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : "";
}
var ll = /* @__PURE__ */ new Set(["TSAbstractMethodDefinition", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
function Xt({ node: e }) {
  return e.abstract || ll.has(e.type) ? "abstract " : "";
}
function et(e, t, r) {
  let n = e.node;
  return n.typeArguments ? r("typeArguments") : n.typeParameters ? r("typeParameters") : "";
}
function $r(e, t, r) {
  return ["::", r("callee")];
}
function Dt(e, t, r) {
  return e.type === "EmptyStatement" ? ";" : e.type === "BlockStatement" || r ? [" ", t] : f([x, t]);
}
function mn(e, t) {
  return ["...", t("argument"), H(e, t)];
}
function Ht(e) {
  return e.accessibility ? e.accessibility + " " : "";
}
function ml(e, t, r, n) {
  let { node: s } = e, u = s.inexact ? "..." : "";
  return T(s, h.Dangling) ? l([r, u, J(e, t, { indent: true }), E, n]) : [r, u, n];
}
function Vt(e, t, r) {
  let { node: n } = e, s = [], u = n.type === "TupleExpression" ? "#[" : "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
  if (o.length === 0) s.push(ml(e, t, u, i));
  else {
    let p = M(false, o, -1), y = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, D = p === null, m = Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((d, S, g) => {
      let _ = d == null ? void 0 : d.type;
      if (!Y(d) && !se(d)) return false;
      let v = g[S + 1];
      if (v && _ !== v.type) return false;
      let j = Y(d) ? "elements" : "properties";
      return d[j] && d[j].length > 1;
    }), c = Fs(n, t), A = y ? D ? "," : oe(t) ? c ? B(",", "", { groupId: m }) : B(",") : "" : "";
    s.push(l([u, f([E, c ? Dl(e, t, r, A) : [yl(e, t, a, n.inexact, r), A], J(e, t)]), E, i], { shouldBreak: C, id: m }));
  }
  return s.push($(e), H(e, r)), s;
}
function Fs(e, t) {
  return Y(e) && e.elements.length > 1 && e.elements.every((r) => r && (Fe(r) || jn(r) && !T(r.argument)) && !T(r, h.Trailing | h.Line, (n) => !Z(t.originalText, q(n), { backwards: true })));
}
function Gi({ node: e }, { originalText: t }) {
  let r = (s) => Ot(t, _t(t, s)), n = (s) => t[s] === "," ? s : n(r(s + 1));
  return vt(t, n(k(e)));
}
function yl(e, t, r, n, s) {
  let u = [];
  return e.each(({ node: i, isLast: a }) => {
    u.push(i ? l(s()) : ""), (!a || n) && u.push([",", x, i && Gi(e, t) ? E : ""]);
  }, r), n && u.push("..."), u;
}
function Dl(e, t, r, n) {
  let s = [];
  return e.each(({ isLast: u, next: i }) => {
    s.push([r(), u ? n : ","]), u || s.push(Gi(e, t) ? [F, F] : T(i, h.Leading | h.Line) ? F : x);
  }, "elements"), Jr(s);
}
var fl = /^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/;
var El = (e) => fl.test(e);
var Ui = El;
function Fl(e) {
  return e.length === 1 ? e : e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, "");
}
var ft = Fl;
var yn = /* @__PURE__ */ new WeakMap();
function Ni(e) {
  return /^(?:\d+|\d+\.\d+)$/u.test(e);
}
function Yi(e, t) {
  return t.parser === "json" || t.parser === "jsonc" || !te(e.key) || rt(fe(e.key), t).slice(1, -1) !== e.key.value ? false : !!(Ui(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || t.parser === "typescript" && e.type === "PropertyDefinition") || Ni(e.key.value) && String(Number(e.key.value)) === e.key.value && e.type !== "ImportAttribute" && (t.parser === "babel" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree"));
}
function Cl(e, t) {
  let { key: r } = e.node;
  return (r.type === "Identifier" || Fe(r) && Ni(ft(fe(r))) && String(r.value) === ft(fe(r)) && !(t.parser === "typescript" || t.parser === "babel-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && yn.get(e.parent));
}
function Et(e, t, r) {
  let { node: n } = e;
  if (n.computed) return ["[", r("key"), "]"];
  let { parent: s } = e, { key: u } = n;
  if (t.quoteProps === "consistent" && !yn.has(s)) {
    let i = e.siblings.some((a) => !a.computed && te(a.key) && !Yi(a, t));
    yn.set(s, i);
  }
  if (Cl(e, t)) {
    let i = rt(JSON.stringify(u.type === "Identifier" ? u.name : u.value.toString()), t);
    return e.call((a) => ye(a, i, t), "key");
  }
  return Yi(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !yn.get(s)) ? e.call((i) => ye(i, /^\d/u.test(u.value) ? ft(u.value) : u.value, t), "key") : r("key");
}
function Dn(e, t, r) {
  let { node: n } = e;
  return n.shorthand ? r("value") : xt(e, t, r, Et(e, t, r), ":", "value");
}
var Al = ({ node: e, key: t, parent: r }) => t === "value" && e.type === "FunctionExpression" && (r.type === "ObjectMethod" || r.type === "ClassMethod" || r.type === "ClassPrivateMethod" || r.type === "MethodDefinition" || r.type === "TSAbstractMethodDefinition" || r.type === "TSDeclareMethod" || r.type === "Property" && Pt(r));
function fn(e, t, r, n) {
  if (Al(e)) return En(e, r, t);
  let { node: s } = e, u = false;
  if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && (n != null && n.expandLastArg)) {
    let { parent: y } = e;
    L(y) && (pe(y).length > 1 || z(s).every((D) => D.type === "Identifier" && !D.typeAnnotation)) && (u = true);
  }
  let i = [K(e), s.async ? "async " : "", `function${s.generator ? "*" : ""} `, s.id ? t("id") : ""], a = Ge(e, t, r, u), o = $t(e, t), p = at(s, o);
  return i.push(et(e, r, t), l([p ? l(a) : a, o]), s.body ? " " : "", t("body")), r.semi && (s.declare || !s.body) && i.push(";"), i;
}
function fr(e, t, r) {
  let { node: n } = e, { kind: s } = n, u = n.value || n, i = [];
  return !s || s === "init" || s === "method" || s === "constructor" ? u.async && i.push("async ") : (jt.ok(s === "get" || s === "set"), i.push(s, " ")), u.generator && i.push("*"), i.push(Et(e, t, r), n.optional || n.key.optional ? "?" : "", n === u ? En(e, t, r) : r("value")), i;
}
function En(e, t, r) {
  let { node: n } = e, s = Ge(e, r, t), u = $t(e, r), i = Ji(n), a = at(n, u), o = [et(e, t, r), l([i ? l(s, { shouldBreak: true }) : a ? l(s) : s, u])];
  return n.body ? o.push(" ", r("body")) : o.push(t.semi ? ";" : ""), o;
}
function Tl(e) {
  let t = z(e);
  return t.length === 1 && !e.typeParameters && !T(e, h.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !T(t[0]) && !t[0].optional && !e.predicate && !e.returnType;
}
function Fn(e, t) {
  if (t.arrowParens === "always") return false;
  if (t.arrowParens === "avoid") {
    let { node: r } = e;
    return Tl(r);
  }
  return false;
}
function $t(e, t) {
  let { node: r } = e, s = [H(e, t, "returnType")];
  return r.predicate && s.push(t("predicate")), s;
}
function Xi(e, t, r) {
  let { node: n } = e, s = t.semi ? ";" : "", u = [];
  if (n.argument) {
    let o = r("argument");
    dl(t, n.argument) ? o = ["(", f([F, o]), F, ")"] : (De(n.argument) || n.argument.type === "SequenceExpression" || t.experimentalTernaries && n.argument.type === "ConditionalExpression" && (n.argument.consequent.type === "ConditionalExpression" || n.argument.alternate.type === "ConditionalExpression")) && (o = l([B("("), f([E, o]), E, B(")")])), u.push(" ", o);
  }
  let i = T(n, h.Dangling), a = s && i && T(n, h.Last | h.Line);
  return a && u.push(s), i && u.push(" ", J(e, t)), a || u.push(s), u;
}
function Hi(e, t, r) {
  return ["return", Xi(e, t, r)];
}
function Vi(e, t, r) {
  return ["throw", Xi(e, t, r)];
}
function dl(e, t) {
  if (Le(e.originalText, t) || T(t, h.Leading, (r) => de(e.originalText, q(r), k(r))) && !X(t)) return true;
  if (Rt(t)) {
    let r = t, n;
    for (; n = ou(r); ) if (r = n, Le(e.originalText, r)) return true;
  }
  return false;
}
var hs = /* @__PURE__ */ new WeakMap();
function $i(e) {
  return hs.has(e) || hs.set(e, e.type === "ConditionalExpression" && !ae(e, (t) => t.type === "ObjectExpression")), hs.get(e);
}
var Ki = (e) => e.type === "SequenceExpression";
function Qi(e, t, r, n = {}) {
  let s = [], u, i = [], a = false, o = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", p;
  (function S() {
    let { node: g } = e, _ = xl(e, t, r, n);
    if (s.length === 0) s.push(_);
    else {
      let { leading: v, trailing: j } = cs(e, t);
      s.push([v, _]), i.unshift(j);
    }
    o && (a || (a = g.returnType && z(g).length > 0 || g.typeParameters || z(g).some((v) => v.type !== "Identifier"))), !o || g.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), p = g.body) : e.call(S, "body");
  })();
  let y = !Le(t.originalText, p) && (Ki(p) || hl(p, u, t) || !a && $i(p)), D = e.key === "callee" && lt(e.parent), m = Symbol("arrow-chain"), C = gl(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, d = false;
  return o && (D || n.assignmentLayout) && (A = true, d = !T(e.node, h.Leading & h.Line), c = n.assignmentLayout === "chain-tail-arrow-chain" || D && !y), u = Sl(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: p, shouldPutBodyOnSameLine: y }), l([l(A ? f([d ? E : "", C]) : C, { shouldBreak: c, id: m }), " =>", o ? dt(u, { groupId: m }) : l(u), o && D ? B(E, "", { groupId: m }) : ""]);
}
function xl(e, t, r, n) {
  let { node: s } = e, u = [];
  if (s.async && u.push("async "), Fn(e, t)) u.push(r(["params", 0]));
  else {
    let a = n.expandLastArg || n.expandFirstArg, o = $t(e, r);
    if (a) {
      if (re(o)) throw new yt();
      o = l(or(o));
    }
    u.push(l([Ge(e, r, t, a, true), o]));
  }
  let i = J(e, t, { filter(a) {
    let o = ut(t.originalText, k(a));
    return o !== false && t.originalText.slice(o, o + 2) === "=>";
  } });
  return i && u.push(" ", i), u;
}
function hl(e, t, r) {
  var n, s;
  return Y(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || X(e) || ((n = t.label) == null ? void 0 : n.hug) !== false && (((s = t.label) == null ? void 0 : s.embed) || wr(e, r.originalText));
}
function gl(e, t, { signatureDocs: r, shouldBreak: n }) {
  if (r.length === 1) return r[0];
  let { parent: s, key: u } = e;
  return u !== "callee" && lt(s) || De(s) ? l([r[0], " =>", f([x, b([" =>", x], r.slice(1))])], { shouldBreak: n }) : u === "callee" && lt(s) || t.assignmentLayout ? l(b([" =>", x], r), { shouldBreak: n }) : l(f(b([" =>", x], r)), { shouldBreak: n });
}
function Sl(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: u, shouldPutBodyOnSameLine: i }) {
  let { node: a, parent: o } = e, p = r.expandLastArg && oe(t, "all") ? B(",") : "", y = (r.expandLastArg || o.type === "JSXExpressionContainer") && !T(a) ? E : "";
  return i && $i(u) ? [" ", l([B("", "("), f([E, n]), B("", ")"), p, y]), s] : (Ki(u) && (n = l(["(", f([E, n]), E, ")"])), i ? [" ", n, s] : [f([x, n, s]), p, y]);
}
var Bl = (e, t, r) => {
  if (!(e && t == null)) {
    if (t.findLast) return t.findLast(r);
    for (let n = t.length - 1; n >= 0; n--) {
      let s = t[n];
      if (r(s, n, t)) return s;
    }
  }
};
var zi = Bl;
function Er(e, t, r, n) {
  let { node: s } = e, u = [], i = zi(false, s[n], (a) => a.type !== "EmptyStatement");
  return e.each(({ node: a }) => {
    a.type !== "EmptyStatement" && (u.push(r()), a !== i && (u.push(F), ce(a, t) && u.push(F)));
  }, n), u;
}
function Cn(e, t, r) {
  let n = bl(e, t, r), { node: s, parent: u } = e;
  if (s.type === "Program" && (u == null ? void 0 : u.type) !== "ModuleExpression") return n ? [n, F] : "";
  let i = [];
  if (s.type === "StaticBlock" && i.push("static "), i.push("{"), n) i.push(f([F, n]), F);
  else {
    let a = e.grandparent;
    u.type === "ArrowFunctionExpression" || u.type === "FunctionExpression" || u.type === "FunctionDeclaration" || u.type === "ComponentDeclaration" || u.type === "HookDeclaration" || u.type === "ObjectMethod" || u.type === "ClassMethod" || u.type === "ClassPrivateMethod" || u.type === "ForStatement" || u.type === "WhileStatement" || u.type === "DoWhileStatement" || u.type === "DoExpression" || u.type === "ModuleExpression" || u.type === "CatchClause" && !a.finalizer || u.type === "TSModuleDeclaration" || s.type === "StaticBlock" || i.push(F);
  }
  return i.push("}"), i;
}
function bl(e, t, r) {
  let { node: n } = e, s = O(n.directives), u = n.body.some((o) => o.type !== "EmptyStatement"), i = T(n, h.Dangling);
  if (!s && !u && !i) return "";
  let a = [];
  return s && (a.push(Er(e, t, r, "directives")), (u || i) && (a.push(F), ce(M(false, n.directives, -1), t) && a.push(F))), u && a.push(Er(e, t, r, "body")), i && a.push(J(e, t)), a;
}
function Pl(e) {
  let t = /* @__PURE__ */ new WeakMap();
  return function(r) {
    return t.has(r) || t.set(r, Symbol(e)), t.get(r);
  };
}
var An = Pl;
function kl(e) {
  switch (e) {
    case null:
      return "";
    case "PlusOptional":
      return "+?";
    case "MinusOptional":
      return "-?";
    case "Optional":
      return "?";
  }
}
function Zi(e, t, r) {
  let { node: n } = e;
  return l([n.variance ? r("variance") : "", "[", f([r("keyTparam"), " in ", r("sourceType")]), "]", kl(n.optional), ": ", r("propType")]);
}
function gs(e, t) {
  return e === "+" || e === "-" ? e + t : t;
}
function ea(e, t, r) {
  let { node: n } = e, s = t.objectWrap === "preserve" && de(t.originalText, q(n), q(n.typeParameter));
  return l(["{", f([t.bracketSpacing ? x : E, l([r("typeParameter"), n.optional ? gs(n.optional, "?") : "", n.typeAnnotation ? ": " : "", r("typeAnnotation")]), t.semi ? B(";") : ""]), J(e, t), t.bracketSpacing ? x : E, "}"], { shouldBreak: s });
}
var Fr = An("typeParameters");
function Il(e, t, r) {
  let { node: n } = e;
  return z(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath));
}
function wt(e, t, r, n) {
  let { node: s } = e;
  if (!s[n]) return "";
  if (!Array.isArray(s[n])) return r(n);
  let u = kt(e.grandparent), i = e.match((p) => !(p[n].length === 1 && Me(p[n][0])), void 0, (p, y) => y === "typeAnnotation", (p) => p.type === "Identifier", As);
  if (s[n].length === 0 || !i && (u || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || ds(s[n][0])))) return ["<", b(", ", e.map(r, n)), Ll(e, t), ">"];
  let o = s.type === "TSTypeParameterInstantiation" ? "" : Il(e, t, n) ? "," : oe(t) ? B(",") : "";
  return l(["<", f([E, b([",", x], e.map(r, n))]), o, E, ">"], { id: Fr(s) });
}
function Ll(e, t) {
  let { node: r } = e;
  if (!T(r, h.Dangling)) return "";
  let n = !T(r, h.Line), s = J(e, t, { indent: !n });
  return n ? s : [s, F];
}
function Tn(e, t, r) {
  let { node: n, parent: s } = e, u = [n.const ? "const " : ""], i = n.type === "TSTypeParameter" ? r("name") : n.name;
  if (s.type === "TSMappedType") return s.readonly && u.push(gs(s.readonly, "readonly"), " "), u.push("[", i), n.constraint && u.push(" in ", r("constraint")), s.nameType && u.push(" as ", e.callParent(() => r("nameType"))), u.push("]"), u;
  if (n.variance && u.push(r("variance")), n.in && u.push("in "), n.out && u.push("out "), u.push(i), n.bound && (n.usesExtendsBound && u.push(" extends "), u.push(H(e, r, "bound"))), n.constraint) {
    let a = Symbol("constraint");
    u.push(" extends", l(f(x), { id: a }), ve, dt(r("constraint"), { groupId: a }));
  }
  return n.default && u.push(" = ", r("default")), l(u);
}
var ta = R(["ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
function dn(e, t, r) {
  let { node: n } = e, s = [K(e), Xt(e), "class"], u = T(n.id, h.Trailing) || T(n.typeParameters, h.Trailing) || T(n.superClass) || O(n.extends) || O(n.mixins) || O(n.implements), i = [], a = [];
  if (n.id && i.push(" ", r("id")), i.push(r("typeParameters")), n.superClass) {
    let y = [Ol(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], D = e.call((m) => ["extends ", ye(m, y, t)], "superClass");
    u ? a.push(x, l(D)) : a.push(" ", D);
  } else a.push(Ss(e, t, r, "extends"));
  a.push(Ss(e, t, r, "mixins"), Ss(e, t, r, "implements"));
  let o;
  if (u) {
    let y;
    sa(n) ? y = [...i, f(a)] : y = f([...i, a]), o = ra(n), s.push(l(y, { id: o }));
  } else s.push(...i, ...a);
  let p = n.body;
  return u && O(p.body) ? s.push(B(F, " ", { groupId: o })) : s.push(" "), s.push(r("body")), s;
}
var ra = An("heritageGroup");
function na(e) {
  return B(F, "", { groupId: ra(e) });
}
function wl(e) {
  return ["extends", "mixins", "implements"].reduce((t, r) => t + (Array.isArray(e[r]) ? e[r].length : 0), e.superClass ? 1 : 0) > 1;
}
function sa(e) {
  return e.typeParameters && !T(e.typeParameters, h.Trailing | h.Line) && !wl(e);
}
function Ss(e, t, r, n) {
  let { node: s } = e;
  if (!O(s[n])) return "";
  let u = J(e, t, { marker: n });
  return [sa(s) ? B(" ", x, { groupId: Fr(s.typeParameters) }) : x, u, u && F, n, l(f([x, b([",", x], e.map(r, n))]))];
}
function Ol(e, t, r) {
  let n = r("superClass"), { parent: s } = e;
  return s.type === "AssignmentExpression" ? l(B(["(", f([E, n]), E, ")"], n)) : n;
}
function xn(e, t, r) {
  let { node: n } = e, s = [];
  return O(n.decorators) && s.push(Es(e, t, r)), s.push(Ht(n)), n.static && s.push("static "), s.push(Xt(e)), n.override && s.push("override "), s.push(fr(e, t, r)), s;
}
function hn(e, t, r) {
  let { node: n } = e, s = [], u = t.semi ? ";" : "";
  O(n.decorators) && s.push(Es(e, t, r)), s.push(K(e), Ht(n)), n.static && s.push("static "), s.push(Xt(e)), n.override && s.push("override "), n.readonly && s.push("readonly "), n.variance && s.push(r("variance")), (n.type === "ClassAccessorProperty" || n.type === "AccessorProperty" || n.type === "TSAbstractAccessorProperty") && s.push("accessor "), s.push(Et(e, t, r), $(e), ln(e), H(e, r));
  let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
  return [xt(e, t, r, s, " =", i ? void 0 : "value"), u];
}
function ua(e, t, r) {
  let { node: n } = e, s = [];
  return e.each(({ node: u, next: i, isLast: a }) => {
    s.push(r()), !t.semi && ta(u) && _l(u, i) && s.push(";"), a || (s.push(F), ce(u, t) && s.push(F));
  }, "body"), T(n, h.Dangling) && s.push(J(e, t)), ["{", s.length > 0 ? [f([F, s]), F] : "", "}"];
}
function _l(e, t) {
  var s;
  let { type: r, name: n } = e.key;
  if (!e.computed && r === "Identifier" && (n === "static" || n === "get" || n === "set") && !e.value && !e.typeAnnotation) return true;
  if (!t || t.static || t.accessibility || t.readonly) return false;
  if (!t.computed) {
    let u = (s = t.key) == null ? void 0 : s.name;
    if (u === "in" || u === "instanceof") return true;
  }
  if (ta(t) && t.variance && !t.static && !t.declare) return true;
  switch (t.type) {
    case "ClassProperty":
    case "PropertyDefinition":
    case "TSAbstractPropertyDefinition":
      return t.computed;
    case "MethodDefinition":
    case "TSAbstractMethodDefinition":
    case "ClassMethod":
    case "ClassPrivateMethod": {
      if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return false;
      let i = t.value ? t.value.generator : t.generator;
      return !!(t.computed || i);
    }
    case "TSIndexSignature":
      return true;
  }
  return false;
}
var vl = R(["TSAsExpression", "TSTypeAssertion", "TSNonNullExpression", "TSInstantiationExpression", "TSSatisfiesExpression"]);
function Bs(e) {
  return vl(e) ? Bs(e.expression) : e;
}
var ia = R(["FunctionExpression", "ArrowFunctionExpression"]);
function aa(e) {
  return e.type === "MemberExpression" || e.type === "OptionalMemberExpression" || e.type === "Identifier" && e.name !== "undefined";
}
function oa(e, t) {
  if (t.semi || bs(e, t) || Ps(e, t)) return false;
  let { node: r, key: n, parent: s } = e;
  return !!(r.type === "ExpressionStatement" && (n === "body" && (s.type === "Program" || s.type === "BlockStatement" || s.type === "StaticBlock" || s.type === "TSModuleBlock") || n === "consequent" && s.type === "SwitchCase") && e.call(() => pa(e, t), "expression"));
}
function pa(e, t) {
  let { node: r } = e;
  switch (r.type) {
    case "ParenthesizedExpression":
    case "TypeCastExpression":
    case "ArrayExpression":
    case "ArrayPattern":
    case "TemplateLiteral":
    case "TemplateElement":
    case "RegExpLiteral":
      return true;
    case "ArrowFunctionExpression":
      if (!Fn(e, t)) return true;
      break;
    case "UnaryExpression": {
      let { prefix: n, operator: s } = r;
      if (n && (s === "+" || s === "-")) return true;
      break;
    }
    case "BindExpression":
      if (!r.object) return true;
      break;
    case "Literal":
      if (r.regex) return true;
      break;
    default:
      if (X(r)) return true;
  }
  return ke(e, t) ? true : Rt(r) ? e.call(() => pa(e, t), ...kr(r)) : false;
}
function bs({ node: e, parent: t }, r) {
  return (r.parentParser === "markdown" || r.parentParser === "mdx") && e.type === "ExpressionStatement" && X(e.expression) && t.type === "Program" && t.body.length === 1;
}
function Ps({ node: e, parent: t }, r) {
  return (r.parser === "__vue_event_binding" || r.parser === "__vue_ts_event_binding") && e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1;
}
function ca(e, t, r) {
  let n = [r("expression")];
  if (Ps(e, t)) {
    let s = Bs(e.node.expression);
    (ia(s) || aa(s)) && n.push(";");
  } else bs(e, t) || t.semi && n.push(";");
  return n;
}
function la(e, t, r) {
  if (t.__isVueBindings || t.__isVueForBindingLeft) {
    let n = e.map(r, "program", "body", 0, "params");
    if (n.length === 1) return n[0];
    let s = b([",", x], n);
    return t.__isVueForBindingLeft ? ["(", f([E, l(s)]), E, ")"] : s;
  }
  if (t.__isEmbeddedTypescriptGenericParameters) {
    let n = e.map(r, "program", "body", 0, "typeParameters", "params");
    return b([",", x], n);
  }
}
function Da(e, t) {
  let { node: r } = e;
  switch (r.type) {
    case "RegExpLiteral":
      return ma(r);
    case "BigIntLiteral":
      return gn(r.extra.raw);
    case "NumericLiteral":
      return ft(r.extra.raw);
    case "StringLiteral":
      return _e(rt(r.extra.raw, t));
    case "NullLiteral":
      return "null";
    case "BooleanLiteral":
      return String(r.value);
    case "DirectiveLiteral":
      return ya(r.extra.raw, t);
    case "Literal": {
      if (r.regex) return ma(r.regex);
      if (r.bigint) return gn(r.raw);
      let { value: n } = r;
      return typeof n == "number" ? ft(r.raw) : typeof n == "string" ? jl(e) ? ya(r.raw, t) : _e(rt(r.raw, t)) : String(n);
    }
  }
}
function jl(e) {
  if (e.key !== "expression") return;
  let { parent: t } = e;
  return t.type === "ExpressionStatement" && t.directive;
}
function gn(e) {
  return e.toLowerCase();
}
function ma({ pattern: e, flags: t }) {
  return t = [...t].sort().join(""), `/${e}/${t}`;
}
function ya(e, t) {
  let r = e.slice(1, -1);
  if (r.includes('"') || r.includes("'")) return e;
  let n = t.singleQuote ? "'" : '"';
  return n + r + n;
}
function Ml(e, t, r) {
  let n = e.originalText.slice(t, r);
  for (let s of e[Symbol.for("comments")]) {
    let u = q(s);
    if (u > r) break;
    let i = k(s);
    if (i < t) continue;
    let a = i - u;
    n = n.slice(0, u - t) + " ".repeat(a) + n.slice(i - t);
  }
  return n;
}
var ks = Ml;
function fa(e, t, r) {
  let { node: n } = e;
  return ["import", n.phase ? ` ${n.phase}` : "", Ls(n), Ca(e, t, r), Fa(e, t, r), Ta(e, t, r), t.semi ? ";" : ""];
}
var Ea = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default;
function Sn(e, t, r) {
  let { node: n } = e, s = [gi(e, t, r), K(e), "export", Ea(n) ? " default" : ""], { declaration: u, exported: i } = n;
  return T(n, h.Dangling) && (s.push(" ", J(e, t)), Or(n) && s.push(F)), u ? s.push(" ", r("declaration")) : (s.push(ql(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), i && s.push(" as ", r("exported"))) : s.push(Ca(e, t, r)), s.push(Fa(e, t, r), Ta(e, t, r))), s.push(Jl(n, t)), s;
}
var Rl = R(["ClassDeclaration", "ComponentDeclaration", "FunctionDeclaration", "TSInterfaceDeclaration", "DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "HookDeclaration", "TSDeclareFunction", "EnumDeclaration"]);
function Jl(e, t) {
  return t.semi && (!e.declaration || Ea(e) && !Rl(e.declaration)) ? ";" : "";
}
function Is(e, t = true) {
  return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : "";
}
function Ls(e, t) {
  return Is(e.importKind, t);
}
function ql(e) {
  return Is(e.exportKind);
}
function Fa(e, t, r) {
  let { node: n } = e;
  if (!n.source) return "";
  let s = [];
  return Aa(n, t) && s.push(" from"), s.push(" ", r("source")), s;
}
function Ca(e, t, r) {
  let { node: n } = e;
  if (!Aa(n, t)) return "";
  let s = [" "];
  if (O(n.specifiers)) {
    let u = [], i = [];
    e.each(() => {
      let a = e.node.type;
      if (a === "ExportNamespaceSpecifier" || a === "ExportDefaultSpecifier" || a === "ImportNamespaceSpecifier" || a === "ImportDefaultSpecifier") u.push(r());
      else if (a === "ExportSpecifier" || a === "ImportSpecifier") i.push(r());
      else throw new qe(n, "specifier");
    }, "specifiers"), s.push(b(", ", u)), i.length > 0 && (u.length > 0 && s.push(", "), i.length > 1 || u.length > 0 || n.specifiers.some((o) => T(o)) ? s.push(l(["{", f([t.bracketSpacing ? x : E, b([",", x], i)]), B(oe(t) ? "," : ""), t.bracketSpacing ? x : E, "}"])) : s.push(["{", t.bracketSpacing ? " " : "", ...i, t.bracketSpacing ? " " : "", "}"]));
  } else s.push("{}");
  return s;
}
function Aa(e, t) {
  return e.type !== "ImportDeclaration" || O(e.specifiers) || e.importKind === "type" ? true : ks(t, q(e), q(e.source)).trimEnd().endsWith("from");
}
function Wl(e, t) {
  var n, s;
  if ((n = e.extra) != null && n.deprecatedAssertSyntax) return "assert";
  let r = ks(t, k(e.source), (s = e.attributes) != null && s[0] ? q(e.attributes[0]) : k(e)).trimStart();
  return r.startsWith("assert") ? "assert" : r.startsWith("with") || O(e.attributes) ? "with" : void 0;
}
function Ta(e, t, r) {
  let { node: n } = e;
  if (!n.source) return "";
  let s = Wl(n, t);
  if (!s) return "";
  let u = [` ${s} {`];
  return O(n.attributes) && (t.bracketSpacing && u.push(" "), u.push(b(", ", e.map(r, "attributes"))), t.bracketSpacing && u.push(" ")), u.push("}"), u;
}
function da(e, t, r) {
  let { node: n } = e, { type: s } = n, u = s.startsWith("Import"), i = u ? "imported" : "local", a = u ? "local" : "exported", o = n[i], p = n[a], y = "", D = "";
  return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? y = "*" : o && (y = r(i)), p && !Gl(n) && (D = r(a)), [Is(s === "ImportSpecifier" ? n.importKind : n.exportKind, false), y, y && D ? " as " : "", D];
}
function Gl(e) {
  if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return false;
  let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e;
  if (t.type !== r.type || !nu(t, r)) return false;
  if (te(t)) return t.value === r.value && fe(t) === fe(r);
  switch (t.type) {
    case "Identifier":
      return t.name === r.name;
    default:
      return false;
  }
}
function ht(e, t, r) {
  var j;
  let n = t.semi ? ";" : "", { node: s } = e, u = s.type === "ObjectTypeAnnotation", i = s.type === "TSEnumDeclaration" || s.type === "EnumBooleanBody" || s.type === "EnumNumberBody" || s.type === "EnumBigIntBody" || s.type === "EnumStringBody" || s.type === "EnumSymbolBody", a = [s.type === "TSTypeLiteral" || i ? "members" : s.type === "TSInterfaceBody" ? "body" : "properties"];
  u && a.push("indexers", "callProperties", "internalSlots");
  let o = a.flatMap((I) => e.map(({ node: U }) => ({ node: U, printed: r(), loc: q(U) }), I));
  a.length > 1 && o.sort((I, U) => I.loc - U.loc);
  let { parent: p, key: y } = e, D = u && y === "body" && (p.type === "InterfaceDeclaration" || p.type === "DeclareInterface" || p.type === "DeclareClass"), m = s.type === "TSInterfaceBody" || i || D || s.type === "ObjectPattern" && p.type !== "FunctionDeclaration" && p.type !== "FunctionExpression" && p.type !== "ArrowFunctionExpression" && p.type !== "ObjectMethod" && p.type !== "ClassMethod" && p.type !== "ClassPrivateMethod" && p.type !== "AssignmentPattern" && p.type !== "CatchClause" && s.properties.some((I) => I.value && (I.value.type === "ObjectPattern" || I.value.type === "ArrayPattern")) || s.type !== "ObjectPattern" && t.objectWrap === "preserve" && o.length > 0 && de(t.originalText, q(s), o[0].loc), C = D ? ";" : s.type === "TSInterfaceBody" || s.type === "TSTypeLiteral" ? B(n, ";") : ",", c = s.type === "RecordExpression" ? "#{" : s.exact ? "{|" : "{", A = s.exact ? "|}" : "}", d = [], S = o.map((I) => {
    let U = [...d, l(I.printed)];
    return d = [C, x], (I.node.type === "TSPropertySignature" || I.node.type === "TSMethodSignature" || I.node.type === "TSConstructSignatureDeclaration" || I.node.type === "TSCallSignatureDeclaration") && T(I.node, h.PrettierIgnore) && d.shift(), ce(I.node, t) && d.push(F), U;
  });
  if (s.inexact || s.hasUnknownMembers) {
    let I;
    if (T(s, h.Dangling)) {
      let U = T(s, h.Line);
      I = [J(e, t), U || Z(t.originalText, k(M(false, ct(s), -1))) ? F : x, "..."];
    } else I = ["..."];
    S.push([...d, ...I]);
  }
  let g = (j = M(false, o, -1)) == null ? void 0 : j.node, _ = !(s.inexact || s.hasUnknownMembers || g && (g.type === "RestElement" || (g.type === "TSPropertySignature" || g.type === "TSCallSignatureDeclaration" || g.type === "TSMethodSignature" || g.type === "TSConstructSignatureDeclaration") && T(g, h.PrettierIgnore))), v;
  if (S.length === 0) {
    if (!T(s, h.Dangling)) return [c, A, H(e, r)];
    v = l([c, J(e, t, { indent: true }), E, A, $(e), H(e, r)]);
  } else v = [D && O(s.properties) ? na(p) : "", c, f([t.bracketSpacing ? x : E, ...S]), B(_ && (C !== "," || oe(t)) ? C : ""), t.bracketSpacing ? x : E, A, $(e), H(e, r)];
  return e.match((I) => I.type === "ObjectPattern" && !O(I.decorators), ws) || Me(s) && (e.match(void 0, (I, U) => U === "typeAnnotation", (I, U) => U === "typeAnnotation", ws) || e.match(void 0, (I, U) => I.type === "FunctionTypeParam" && U === "typeAnnotation", ws)) || !m && e.match((I) => I.type === "ObjectPattern", (I) => I.type === "AssignmentExpression" || I.type === "VariableDeclarator") ? v : l(v, { shouldBreak: m });
}
function ws(e, t) {
  return (t === "params" || t === "parameters" || t === "this" || t === "rest") && Ts(e);
}
function Ul(e) {
  let t = [e];
  for (let r = 0; r < t.length; r++) {
    let n = t[r];
    for (let s of ["test", "consequent", "alternate"]) {
      let u = n[s];
      if (X(u)) return true;
      u.type === "ConditionalExpression" && t.push(u);
    }
  }
  return false;
}
function Yl(e, t, r) {
  let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "alternate" : "falseType", { parent: i } = e, a = s ? r("test") : [r("checkType"), " ", "extends", " ", r("extendsType")];
  return i.type === n.type && i[u] === n ? Be(2, a) : a;
}
var Nl = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
function Xl(e) {
  let { node: t } = e;
  if (t.type !== "ConditionalExpression") return false;
  let r, n = t;
  for (let s = 0; !r; s++) {
    let u = e.getParentNode(s);
    if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || W(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
      n = u;
      continue;
    }
    u.type === "NewExpression" && u.callee === n || Ae(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
  }
  return n === t ? false : r[Nl.get(r.type)] === n;
}
function xa(e, t, r) {
  let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "consequent" : "trueType", i = s ? "alternate" : "falseType", a = s ? ["test"] : ["checkType", "extendsType"], o = n[u], p = n[i], y = [], D = false, { parent: m } = e, C = m.type === n.type && a.some((G) => m[G] === n), c = m.type === n.type && !C, A, d, S = 0;
  do
    d = A || n, A = e.getParentNode(S), S++;
  while (A && A.type === n.type && a.every((G) => A[G] !== d));
  let g = A || m, _ = d;
  if (s && (X(n[a[0]]) || X(o) || X(p) || Ul(_))) {
    D = true, c = true;
    let G = (Q) => [B("("), f([E, Q]), E, B(")")], ue = (Q) => Q.type === "NullLiteral" || Q.type === "Literal" && Q.value === null || Q.type === "Identifier" && Q.name === "undefined";
    y.push(" ? ", ue(o) ? r(u) : G(r(u)), " : ", p.type === n.type || ue(p) ? r(i) : G(r(i)));
  } else {
    let G = (Q) => t.useTabs ? f(r(Q)) : Be(2, r(Q)), ue = [x, "? ", o.type === n.type ? B("", "(") : "", G(u), o.type === n.type ? B("", ")") : "", x, ": ", G(i)];
    y.push(m.type !== n.type || m[i] === n || C ? ue : t.useTabs ? Rr(f(ue)) : Be(Math.max(0, t.tabWidth - 2), ue));
  }
  let v = [u, i, ...a].some((G) => T(n[G], (ue) => ee(ue) && de(t.originalText, q(ue), k(ue)))), j = (G) => m === g ? l(G, { shouldBreak: v }) : v ? [G, Ee] : G, I = !D && (W(m) || m.type === "NGPipeExpression" && m.left === n) && !m.computed, U = Xl(e), P = j([Yl(e, t, r), c ? y : f(y), s && I && !U ? E : ""]);
  return C || U ? l([f([E, P]), E]) : P;
}
function Hl(e, t) {
  return (W(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed;
}
function Vl(e, t, r, n) {
  return [...e.map((u) => ct(u)), ct(t), ct(r)].flat().some((u) => ee(u) && de(n.originalText, q(u), k(u)));
}
var $l = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
function Kl(e) {
  let { node: t } = e;
  if (t.type !== "ConditionalExpression") return false;
  let r, n = t;
  for (let s = 0; !r; s++) {
    let u = e.getParentNode(s);
    if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || W(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
      n = u;
      continue;
    }
    u.type === "NewExpression" && u.callee === n || Ae(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
  }
  return n === t ? false : r[$l.get(r.type)] === n;
}
var Os = (e) => [B("("), f([E, e]), E, B(")")];
function Kt(e, t, r, n) {
  if (!t.experimentalTernaries) return xa(e, t, r);
  let { node: s } = e, u = s.type === "ConditionalExpression", i = s.type === "TSConditionalType" || s.type === "ConditionalTypeAnnotation", a = u ? "consequent" : "trueType", o = u ? "alternate" : "falseType", p = u ? ["test"] : ["checkType", "extendsType"], y = s[a], D = s[o], m = p.map((Ue) => s[Ue]), { parent: C } = e, c = C.type === s.type, A = c && p.some((Ue) => C[Ue] === s), d = c && C[o] === s, S = y.type === s.type, g = D.type === s.type, _ = g || d, v = t.tabWidth > 2 || t.useTabs, j, I, U = 0;
  do
    I = j || s, j = e.getParentNode(U), U++;
  while (j && j.type === s.type && p.every((Ue) => j[Ue] !== I));
  let P = j || C, G = n && n.assignmentLayout && n.assignmentLayout !== "break-after-operator" && (C.type === "AssignmentExpression" || C.type === "VariableDeclarator" || C.type === "ClassProperty" || C.type === "PropertyDefinition" || C.type === "ClassPrivateProperty" || C.type === "ObjectProperty" || C.type === "Property"), ue = (C.type === "ReturnStatement" || C.type === "ThrowStatement") && !(S || g), Q = u && P.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", St = Kl(e), Ft = Hl(s, C), w = i && ke(e, t), ne = v ? t.useTabs ? "	" : " ".repeat(t.tabWidth - 1) : "", xe = Vl(m, y, D, t) || S || g, ot = !_ && !c && !i && (Q ? y.type === "NullLiteral" || y.type === "Literal" && y.value === null : sr(y, t) && Rn(s.test, 3)), Bt = _ || d || i && !c || c && u && Rn(s.test, 1) || ot, Ms = [];
  !S && T(y, h.Dangling) && e.call((Ue) => {
    Ms.push(J(Ue, t), F);
  }, "consequent");
  let zt = [];
  T(s.test, h.Dangling) && e.call((Ue) => {
    zt.push(J(Ue, t));
  }, "test"), !g && T(D, h.Dangling) && e.call((Ue) => {
    zt.push(J(Ue, t));
  }, "alternate"), T(s, h.Dangling) && zt.push(J(e, t));
  let Rs = Symbol("test"), Ga = Symbol("consequent"), Cr = Symbol("test-and-consequent"), Ua = u ? [Os(r("test")), s.test.type === "ConditionalExpression" ? Ee : ""] : [r("checkType"), " ", "extends", " ", s.extendsType.type === "TSConditionalType" || s.extendsType.type === "ConditionalTypeAnnotation" || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Os(r("extendsType")))], Js = l([Ua, " ?"], { id: Rs }), Ya = r(a), Ar = f([S || Q && (X(y) || c || _) ? F : x, Ms, Ya]), Na = Bt ? l([Js, _ ? Ar : B(Ar, l(Ar, { id: Ga }), { groupId: Rs })], { id: Cr }) : [Js, Ar], In = r(o), qs = ot ? B(In, Rr(Os(In)), { groupId: Cr }) : In, Zt = [Na, zt.length > 0 ? [f([F, zt]), F] : g ? F : ot ? B(x, " ", { groupId: Cr }) : x, ":", g ? " " : v ? Bt ? B(ne, B(_ || ot ? " " : ne, " "), { groupId: Cr }) : B(ne, " ") : " ", g ? qs : l([f(qs), Q && !ot ? E : ""]), Ft && !St ? E : "", xe ? Ee : ""];
  return G && !xe ? l(f([E, l(Zt)])) : G || ue ? l(f(Zt)) : St || i && A ? l([f([E, Zt]), w ? E : ""]) : C === P ? l(Zt) : Zt;
}
function ha(e, t, r, n) {
  let { node: s } = e;
  if (Ir(s)) return Da(e, t);
  let u = t.semi ? ";" : "", i = [];
  switch (s.type) {
    case "JsExpressionRoot":
      return r("node");
    case "JsonRoot":
      return [r("node"), F];
    case "File":
      return la(e, t, r) ?? r("program");
    case "EmptyStatement":
      return "";
    case "ExpressionStatement":
      return ca(e, t, r);
    case "ChainExpression":
      return r("expression");
    case "ParenthesizedExpression":
      return !T(s.expression) && (se(s.expression) || Y(s.expression)) ? ["(", r("expression"), ")"] : l(["(", f([E, r("expression")]), E, ")"]);
    case "AssignmentExpression":
      return vi(e, t, r);
    case "VariableDeclarator":
      return ji(e, t, r);
    case "BinaryExpression":
    case "LogicalExpression":
      return Vr(e, t, r);
    case "AssignmentPattern":
      return [r("left"), " = ", r("right")];
    case "OptionalMemberExpression":
    case "MemberExpression":
      return Ii(e, t, r);
    case "MetaProperty":
      return [r("meta"), ".", r("property")];
    case "BindExpression":
      return s.object && i.push(r("object")), i.push(l(f([E, $r(e, t, r)]))), i;
    case "Identifier":
      return [s.name, $(e), ln(e), H(e, r)];
    case "V8IntrinsicIdentifier":
      return ["%", s.name];
    case "SpreadElement":
    case "SpreadElementPattern":
    case "SpreadPropertyPattern":
    case "RestElement":
      return mn(e, r);
    case "FunctionDeclaration":
    case "FunctionExpression":
      return fn(e, r, t, n);
    case "ArrowFunctionExpression":
      return Qi(e, t, r, n);
    case "YieldExpression":
      return i.push("yield"), s.delegate && i.push("*"), s.argument && i.push(" ", r("argument")), i;
    case "AwaitExpression":
      if (i.push("await"), s.argument) {
        i.push(" ", r("argument"));
        let { parent: a } = e;
        if (L(a) && a.callee === s || W(a) && a.object === s) {
          i = [f([E, ...i]), E];
          let o = e.findAncestor((p) => p.type === "AwaitExpression" || p.type === "BlockStatement");
          if ((o == null ? void 0 : o.type) !== "AwaitExpression" || !ae(o.argument, (p) => p === s)) return l(i);
        }
      }
      return i;
    case "ExportDefaultDeclaration":
    case "ExportNamedDeclaration":
    case "ExportAllDeclaration":
      return Sn(e, t, r);
    case "ImportDeclaration":
      return fa(e, t, r);
    case "ImportSpecifier":
    case "ExportSpecifier":
    case "ImportNamespaceSpecifier":
    case "ExportNamespaceSpecifier":
    case "ImportDefaultSpecifier":
    case "ExportDefaultSpecifier":
      return da(e, t, r);
    case "ImportAttribute":
      return Dn(e, t, r);
    case "Program":
    case "BlockStatement":
    case "StaticBlock":
      return Cn(e, t, r);
    case "ClassBody":
      return ua(e, t, r);
    case "ThrowStatement":
      return Vi(e, t, r);
    case "ReturnStatement":
      return Hi(e, t, r);
    case "NewExpression":
    case "ImportExpression":
    case "OptionalCallExpression":
    case "CallExpression":
      return Kr(e, t, r);
    case "ObjectExpression":
    case "ObjectPattern":
    case "RecordExpression":
      return ht(e, t, r);
    case "Property":
      return Pt(s) ? fr(e, t, r) : Dn(e, t, r);
    case "ObjectProperty":
      return Dn(e, t, r);
    case "ObjectMethod":
      return fr(e, t, r);
    case "Decorator":
      return ["@", r("expression")];
    case "ArrayExpression":
    case "ArrayPattern":
    case "TupleExpression":
      return Vt(e, t, r);
    case "SequenceExpression": {
      let { parent: a } = e;
      if (a.type === "ExpressionStatement" || a.type === "ForStatement") {
        let o = [];
        return e.each(({ isFirst: p }) => {
          p ? o.push(r()) : o.push(",", f([x, r()]));
        }, "expressions"), l(o);
      }
      return l(b([",", x], e.map(r, "expressions")));
    }
    case "ThisExpression":
      return "this";
    case "Super":
      return "super";
    case "Directive":
      return [r("value"), u];
    case "UnaryExpression":
      return i.push(s.operator), /[a-z]$/u.test(s.operator) && i.push(" "), T(s.argument) ? i.push(l(["(", f([E, r("argument")]), E, ")"])) : i.push(r("argument")), i;
    case "UpdateExpression":
      return [s.prefix ? s.operator : "", r("argument"), s.prefix ? "" : s.operator];
    case "ConditionalExpression":
      return Kt(e, t, r, n);
    case "VariableDeclaration": {
      let a = e.map(r, "declarations"), o = e.parent, p = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", y = s.declarations.some((m) => m.init), D;
      return a.length === 1 && !T(s.declarations[0]) ? D = a[0] : a.length > 0 && (D = f(a[0])), i = [K(e), s.kind, D ? [" ", D] : "", f(a.slice(1).map((m) => [",", y && !p ? F : x, m]))], p && o.body !== s || i.push(u), l(i);
    }
    case "WithStatement":
      return l(["with (", r("object"), ")", Dt(s.body, r("body"))]);
    case "IfStatement": {
      let a = Dt(s.consequent, r("consequent")), o = l(["if (", l([f([E, r("test")]), E]), ")", a]);
      if (i.push(o), s.alternate) {
        let p = T(s.consequent, h.Trailing | h.Line) || Or(s), y = s.consequent.type === "BlockStatement" && !p;
        i.push(y ? " " : F), T(s, h.Dangling) && i.push(J(e, t), p ? F : " "), i.push("else", l(Dt(s.alternate, r("alternate"), s.alternate.type === "IfStatement")));
      }
      return i;
    }
    case "ForStatement": {
      let a = Dt(s.body, r("body")), o = J(e, t), p = o ? [o, E] : "";
      return !s.init && !s.test && !s.update ? [p, l(["for (;;)", a])] : [p, l(["for (", l([f([E, r("init"), ";", x, r("test"), ";", x, r("update")]), E]), ")", a])];
    }
    case "WhileStatement":
      return l(["while (", l([f([E, r("test")]), E]), ")", Dt(s.body, r("body"))]);
    case "ForInStatement":
      return l(["for (", r("left"), " in ", r("right"), ")", Dt(s.body, r("body"))]);
    case "ForOfStatement":
      return l(["for", s.await ? " await" : "", " (", r("left"), " of ", r("right"), ")", Dt(s.body, r("body"))]);
    case "DoWhileStatement": {
      let a = Dt(s.body, r("body"));
      return i = [l(["do", a])], s.body.type === "BlockStatement" ? i.push(" ") : i.push(F), i.push("while (", l([f([E, r("test")]), E]), ")", u), i;
    }
    case "DoExpression":
      return [s.async ? "async " : "", "do ", r("body")];
    case "BreakStatement":
    case "ContinueStatement":
      return i.push(s.type === "BreakStatement" ? "break" : "continue"), s.label && i.push(" ", r("label")), i.push(u), i;
    case "LabeledStatement":
      return s.body.type === "EmptyStatement" ? [r("label"), ":;"] : [r("label"), ": ", r("body")];
    case "TryStatement":
      return ["try ", r("block"), s.handler ? [" ", r("handler")] : "", s.finalizer ? [" finally ", r("finalizer")] : ""];
    case "CatchClause":
      if (s.param) {
        let a = T(s.param, (p) => !ee(p) || p.leading && Z(t.originalText, k(p)) || p.trailing && Z(t.originalText, q(p), { backwards: true })), o = r("param");
        return ["catch ", a ? ["(", f([E, o]), E, ") "] : ["(", o, ") "], r("body")];
      }
      return ["catch ", r("body")];
    case "SwitchStatement":
      return [l(["switch (", f([E, r("discriminant")]), E, ")"]), " {", s.cases.length > 0 ? f([F, b(F, e.map(({ node: a, isLast: o }) => [r(), !o && ce(a, t) ? F : ""], "cases"))]) : "", F, "}"];
    case "SwitchCase": {
      s.test ? i.push("case ", r("test"), ":") : i.push("default:"), T(s, h.Dangling) && i.push(" ", J(e, t));
      let a = s.consequent.filter((o) => o.type !== "EmptyStatement");
      if (a.length > 0) {
        let o = Er(e, t, r, "consequent");
        i.push(a.length === 1 && a[0].type === "BlockStatement" ? [" ", o] : f([F, o]));
      }
      return i;
    }
    case "DebuggerStatement":
      return ["debugger", u];
    case "ClassDeclaration":
    case "ClassExpression":
      return dn(e, t, r);
    case "ClassMethod":
    case "ClassPrivateMethod":
    case "MethodDefinition":
      return xn(e, t, r);
    case "ClassProperty":
    case "PropertyDefinition":
    case "ClassPrivateProperty":
    case "ClassAccessorProperty":
    case "AccessorProperty":
      return hn(e, t, r);
    case "TemplateElement":
      return _e(s.value.raw);
    case "TemplateLiteral":
      return Gr(e, r, t);
    case "TaggedTemplateExpression":
      return Xu(e, r);
    case "PrivateIdentifier":
      return ["#", s.name];
    case "PrivateName":
      return ["#", r("id")];
    case "TopicReference":
      return "%";
    case "ArgumentPlaceholder":
      return "?";
    case "ModuleExpression":
      return ["module ", r("body")];
    case "InterpreterDirective":
    default:
      throw new qe(s, "ESTree");
  }
}
function Bn(e, t, r) {
  let { parent: n, node: s, key: u } = e, i = [r("expression")];
  switch (s.type) {
    case "AsConstExpression":
      i.push(" as const");
      break;
    case "AsExpression":
    case "TSAsExpression":
      i.push(" as ", r("typeAnnotation"));
      break;
    case "SatisfiesExpression":
    case "TSSatisfiesExpression":
      i.push(" satisfies ", r("typeAnnotation"));
      break;
  }
  return u === "callee" && L(n) || u === "object" && W(n) ? l([f([E, ...i]), E]) : i;
}
function ga(e, t, r) {
  let { node: n } = e, s = [K(e), "component"];
  n.id && s.push(" ", r("id")), s.push(r("typeParameters"));
  let u = Ql(e, r, t);
  return n.rendersType ? s.push(l([u, " ", r("rendersType")])) : s.push(l([u])), n.body && s.push(" ", r("body")), t.semi && n.type === "DeclareComponent" && s.push(";"), s;
}
function Ql(e, t, r) {
  let { node: n } = e, s = n.params;
  if (n.rest && (s = [...s, n.rest]), s.length === 0) return ["(", J(e, r, { filter: (i) => be(r.originalText, k(i)) === ")" }), ")"];
  let u = [];
  return Zl(e, (i, a) => {
    let o = a === s.length - 1;
    o && n.rest && u.push("..."), u.push(t()), !o && (u.push(","), ce(s[a], r) ? u.push(F, F) : u.push(x));
  }), ["(", f([E, ...u]), B(oe(r, "all") && !zl(n, s) ? "," : ""), E, ")"];
}
function zl(e, t) {
  var r;
  return e.rest || ((r = M(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
}
function Zl(e, t) {
  let { node: r } = e, n = 0, s = (u) => t(u, n++);
  e.each(s, "params"), r.rest && e.call(s, "rest");
}
function Sa(e, t, r) {
  let { node: n } = e;
  return n.shorthand ? r("local") : [r("name"), " as ", r("local")];
}
function Ba(e, t, r) {
  let { node: n } = e, s = [];
  return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s;
}
function ba(e, t, r) {
  return ht(e, r, t);
}
function bn(e, t) {
  let { node: r } = e, n = t("id");
  r.computed && (n = ["[", n, "]"]);
  let s = "";
  return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [n, " = ", s] : n;
}
function Pa(e, t, r) {
  let { node: n } = e, s;
  if (n.type === "EnumSymbolBody" || n.explicitType) switch (n.type) {
    case "EnumBooleanBody":
      s = "boolean";
      break;
    case "EnumNumberBody":
      s = "number";
      break;
    case "EnumBigIntBody":
      s = "bigint";
      break;
    case "EnumStringBody":
      s = "string";
      break;
    case "EnumSymbolBody":
      s = "symbol";
      break;
  }
  return [s ? `of ${s} ` : "", ba(e, t, r)];
}
function Pn(e, t, r) {
  let { node: n } = e;
  return [K(e), n.const ? "const " : "", "enum ", t("id"), " ", n.type === "TSEnumDeclaration" ? ba(e, t, r) : t("body")];
}
function Ia(e, t, r) {
  let { node: n } = e, s = ["hook"];
  n.id && s.push(" ", r("id"));
  let u = Ge(e, r, t, false, true), i = $t(e, r), a = at(n, i);
  return s.push(l([a ? l(u) : u, i]), n.body ? " " : "", r("body")), s;
}
function La(e, t, r) {
  let { node: n } = e, s = [K(e), "hook"];
  return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s;
}
function ka(e) {
  var r;
  let { node: t } = e;
  return t.type === "HookTypeAnnotation" && ((r = e.getParentNode(2)) == null ? void 0 : r.type) === "DeclareHook";
}
function wa(e, t, r) {
  let { node: n } = e, s = [];
  s.push(ka(e) ? "" : "hook ");
  let u = Ge(e, r, t, false, true), i = [];
  return i.push(ka(e) ? ": " : " => ", r("returnType")), at(n, i) && (u = l(u)), s.push(u, i), l(s);
}
function kn(e, t, r) {
  let { node: n } = e, s = [K(e), "interface"], u = [], i = [];
  n.type !== "InterfaceTypeAnnotation" && u.push(" ", r("id"), r("typeParameters"));
  let a = n.typeParameters && !T(n.typeParameters, h.Trailing | h.Line);
  return O(n.extends) && i.push(a ? B(" ", x, { groupId: Fr(n.typeParameters) }) : x, "extends ", (n.extends.length === 1 ? fu : f)(b([",", x], e.map(r, "extends")))), T(n.id, h.Trailing) || O(n.extends) ? a ? s.push(l([...u, f(i)])) : s.push(l(f([...u, ...i]))) : s.push(...u, ...i), s.push(" ", r("body")), l(s);
}
function Oa(e, t, r) {
  let { node: n } = e;
  if (Br(n)) return n.type.slice(0, -14).toLowerCase();
  let s = t.semi ? ";" : "";
  switch (n.type) {
    case "ComponentDeclaration":
    case "DeclareComponent":
    case "ComponentTypeAnnotation":
      return ga(e, t, r);
    case "ComponentParameter":
      return Sa(e, t, r);
    case "ComponentTypeParameter":
      return Ba(e, t, r);
    case "HookDeclaration":
      return Ia(e, t, r);
    case "DeclareHook":
      return La(e, t, r);
    case "HookTypeAnnotation":
      return wa(e, t, r);
    case "DeclareClass":
      return dn(e, t, r);
    case "DeclareFunction":
      return [K(e), "function ", r("id"), r("predicate"), s];
    case "DeclareModule":
      return ["declare module ", r("id"), " ", r("body")];
    case "DeclareModuleExports":
      return ["declare module.exports", H(e, r), s];
    case "DeclareNamespace":
      return ["declare namespace ", r("id"), " ", r("body")];
    case "DeclareVariable":
      return [K(e), n.kind ?? "var", " ", r("id"), s];
    case "DeclareExportDeclaration":
    case "DeclareExportAllDeclaration":
      return Sn(e, t, r);
    case "DeclareOpaqueType":
    case "OpaqueType":
      return qi(e, t, r);
    case "DeclareTypeAlias":
    case "TypeAlias":
      return zr(e, t, r);
    case "IntersectionTypeAnnotation":
      return Zr(e, t, r);
    case "UnionTypeAnnotation":
      return en(e, t, r);
    case "ConditionalTypeAnnotation":
      return Kt(e, t, r);
    case "InferTypeAnnotation":
      return nn(e, t, r);
    case "FunctionTypeAnnotation":
      return tn(e, t, r);
    case "TupleTypeAnnotation":
      return Vt(e, t, r);
    case "TupleTypeLabeledElement":
      return un(e, t, r);
    case "TupleTypeSpreadElement":
      return sn(e, t, r);
    case "GenericTypeAnnotation":
      return [r("id"), wt(e, t, r, "typeParameters")];
    case "IndexedAccessType":
    case "OptionalIndexedAccessType":
      return rn(e, t, r);
    case "TypeAnnotation":
      return an(e, t, r);
    case "TypeParameter":
      return Tn(e, t, r);
    case "TypeofTypeAnnotation":
      return pn(e, r);
    case "ExistsTypeAnnotation":
      return "*";
    case "ArrayTypeAnnotation":
      return on(r);
    case "DeclareEnum":
    case "EnumDeclaration":
      return Pn(e, r, t);
    case "EnumBooleanBody":
    case "EnumNumberBody":
    case "EnumBigIntBody":
    case "EnumStringBody":
    case "EnumSymbolBody":
      return Pa(e, r, t);
    case "EnumBooleanMember":
    case "EnumNumberMember":
    case "EnumBigIntMember":
    case "EnumStringMember":
    case "EnumDefaultedMember":
      return bn(e, r);
    case "FunctionTypeParam": {
      let u = n.name ? r("name") : e.parent.this === n ? "this" : "";
      return [u, $(e), u ? ": " : "", r("typeAnnotation")];
    }
    case "DeclareInterface":
    case "InterfaceDeclaration":
    case "InterfaceTypeAnnotation":
      return kn(e, t, r);
    case "ClassImplements":
    case "InterfaceExtends":
      return [r("id"), r("typeParameters")];
    case "NullableTypeAnnotation":
      return ["?", r("typeAnnotation")];
    case "Variance": {
      let { kind: u } = n;
      return jt.ok(u === "plus" || u === "minus"), u === "plus" ? "+" : "-";
    }
    case "KeyofTypeAnnotation":
      return ["keyof ", r("argument")];
    case "ObjectTypeCallProperty":
      return [n.static ? "static " : "", r("value")];
    case "ObjectTypeMappedTypeProperty":
      return Zi(e, t, r);
    case "ObjectTypeIndexer":
      return [n.static ? "static " : "", n.variance ? r("variance") : "", "[", r("id"), n.id ? ": " : "", r("key"), "]: ", r("value")];
    case "ObjectTypeProperty": {
      let u = "";
      return n.proto ? u = "proto " : n.static && (u = "static "), [u, n.kind !== "init" ? n.kind + " " : "", n.variance ? r("variance") : "", Et(e, t, r), $(e), Pt(n) ? "" : ": ", r("value")];
    }
    case "ObjectTypeAnnotation":
      return ht(e, t, r);
    case "ObjectTypeInternalSlot":
      return [n.static ? "static " : "", "[[", r("id"), "]]", $(e), n.method ? "" : ": ", r("value")];
    case "ObjectTypeSpreadProperty":
      return mn(e, r);
    case "QualifiedTypeofIdentifier":
    case "QualifiedTypeIdentifier":
      return [r("qualification"), ".", r("id")];
    case "NullLiteralTypeAnnotation":
      return "null";
    case "BooleanLiteralTypeAnnotation":
      return String(n.value);
    case "StringLiteralTypeAnnotation":
      return _e(rt(fe(n), t));
    case "NumberLiteralTypeAnnotation":
      return ft(n.raw ?? n.extra.raw);
    case "BigIntLiteralTypeAnnotation":
      return gn(n.raw ?? n.extra.raw);
    case "TypeCastExpression":
      return ["(", r("expression"), H(e, r), ")"];
    case "TypePredicate":
      return cn(e, r);
    case "TypeOperator":
      return [n.operator, " ", r("typeAnnotation")];
    case "TypeParameterDeclaration":
    case "TypeParameterInstantiation":
      return wt(e, t, r, "params");
    case "InferredPredicate":
    case "DeclaredPredicate":
      return [e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", "%checks", ...n.type === "DeclaredPredicate" ? ["(", r("value"), ")"] : []];
    case "AsExpression":
    case "AsConstExpression":
    case "SatisfiesExpression":
      return Bn(e, t, r);
  }
}
function _a(e, t, r) {
  var i;
  let { node: n } = e;
  if (!n.type.startsWith("TS")) return;
  if (br(n)) return n.type.slice(2, -7).toLowerCase();
  let s = t.semi ? ";" : "", u = [];
  switch (n.type) {
    case "TSThisType":
      return "this";
    case "TSTypeAssertion": {
      let a = !(Y(n.expression) || se(n.expression)), o = l(["<", f([E, r("typeAnnotation")]), E, ">"]), p = [B("("), f([E, r("expression")]), E, B(")")];
      return a ? Ze([[o, r("expression")], [o, l(p, { shouldBreak: true })], [o, r("expression")]]) : l([o, r("expression")]);
    }
    case "TSDeclareFunction":
      return fn(e, r, t);
    case "TSExportAssignment":
      return ["export = ", r("expression"), s];
    case "TSModuleBlock":
      return Cn(e, t, r);
    case "TSInterfaceBody":
    case "TSTypeLiteral":
      return ht(e, t, r);
    case "TSTypeAliasDeclaration":
      return zr(e, t, r);
    case "TSQualifiedName":
      return [r("left"), ".", r("right")];
    case "TSAbstractMethodDefinition":
    case "TSDeclareMethod":
      return xn(e, t, r);
    case "TSAbstractAccessorProperty":
    case "TSAbstractPropertyDefinition":
      return hn(e, t, r);
    case "TSInterfaceHeritage":
    case "TSClassImplements":
    case "TSExpressionWithTypeArguments":
    case "TSInstantiationExpression":
      return [r("expression"), r(n.typeArguments ? "typeArguments" : "typeParameters")];
    case "TSTemplateLiteralType":
      return Gr(e, r, t);
    case "TSNamedTupleMember":
      return un(e, t, r);
    case "TSRestType":
      return sn(e, t, r);
    case "TSOptionalType":
      return [r("typeAnnotation"), "?"];
    case "TSInterfaceDeclaration":
      return kn(e, t, r);
    case "TSTypeParameterDeclaration":
    case "TSTypeParameterInstantiation":
      return wt(e, t, r, "params");
    case "TSTypeParameter":
      return Tn(e, t, r);
    case "TSAsExpression":
    case "TSSatisfiesExpression":
      return Bn(e, t, r);
    case "TSArrayType":
      return on(r);
    case "TSPropertySignature":
      return [n.readonly ? "readonly " : "", Et(e, t, r), $(e), H(e, r)];
    case "TSParameterProperty":
      return [Ht(n), n.static ? "static " : "", n.override ? "override " : "", n.readonly ? "readonly " : "", r("parameter")];
    case "TSTypeQuery":
      return pn(e, r);
    case "TSIndexSignature": {
      let a = n.parameters.length > 1 ? B(oe(t) ? "," : "") : "", o = l([f([E, b([", ", E], e.map(r, "parameters"))]), a, E]), p = e.parent.type === "ClassBody" && e.key === "body";
      return [p && n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? o : "", "]", H(e, r), p ? s : ""];
    }
    case "TSTypePredicate":
      return cn(e, r);
    case "TSNonNullExpression":
      return [r("expression"), "!"];
    case "TSImportType":
      return ["import(", r("argument"), ")", n.qualifier ? [".", r("qualifier")] : "", wt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
    case "TSLiteralType":
      return r("literal");
    case "TSIndexedAccessType":
      return rn(e, t, r);
    case "TSTypeOperator":
      return [n.operator, " ", r("typeAnnotation")];
    case "TSMappedType":
      return ea(e, t, r);
    case "TSMethodSignature": {
      let a = n.kind && n.kind !== "method" ? `${n.kind} ` : "";
      u.push(Ht(n), a, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", $(e));
      let o = Ge(e, r, t, false, true), p = n.returnType ? "returnType" : "typeAnnotation", y = n[p], D = y ? H(e, r, p) : "", m = at(n, D);
      return u.push(m ? l(o) : o), y && u.push(l(D)), l(u);
    }
    case "TSNamespaceExportDeclaration":
      return ["export as namespace ", r("id"), t.semi ? ";" : ""];
    case "TSEnumDeclaration":
      return Pn(e, r, t);
    case "TSEnumMember":
      return bn(e, r);
    case "TSImportEqualsDeclaration":
      return [n.isExport ? "export " : "", "import ", Ls(n, false), r("id"), " = ", r("moduleReference"), t.semi ? ";" : ""];
    case "TSExternalModuleReference":
      return ["require(", r("expression"), ")"];
    case "TSModuleDeclaration": {
      let { parent: a } = e, o = a.type === "TSModuleDeclaration", p = ((i = n.body) == null ? void 0 : i.type) === "TSModuleDeclaration";
      return o ? u.push(".") : (u.push(K(e)), n.kind !== "global" && u.push(n.kind, " ")), u.push(r("id")), p ? u.push(r("body")) : n.body ? u.push(" ", l(r("body"))) : u.push(s), u;
    }
    case "TSConditionalType":
      return Kt(e, t, r);
    case "TSInferType":
      return nn(e, t, r);
    case "TSIntersectionType":
      return Zr(e, t, r);
    case "TSUnionType":
      return en(e, t, r);
    case "TSFunctionType":
    case "TSCallSignatureDeclaration":
    case "TSConstructorType":
    case "TSConstructSignatureDeclaration":
      return tn(e, t, r);
    case "TSTupleType":
      return Vt(e, t, r);
    case "TSTypeReference":
      return [r("typeName"), wt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
    case "TSTypeAnnotation":
      return an(e, t, r);
    case "TSEmptyBodyFunctionExpression":
      return En(e, t, r);
    case "TSJSDocAllType":
      return "*";
    case "TSJSDocUnknownType":
      return "?";
    case "TSJSDocNullableType":
      return xs(e, r, "?");
    case "TSJSDocNonNullableType":
      return xs(e, r, "!");
    case "TSParenthesizedType":
    default:
      throw new qe(n, "TypeScript");
  }
}
function em(e, t, r, n) {
  if (Hr(e)) return yi(e, t);
  for (let s of [hi, Ai, Oa, _a, ha]) {
    let u = s(e, t, r, n);
    if (u !== void 0) return u;
  }
}
var tm = R(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
function rm(e, t, r, n) {
  var D;
  e.isRoot && ((D = t.__onHtmlBindingRoot) == null || D.call(t, e.node, t));
  let s = em(e, t, r, n);
  if (!s) return "";
  let { node: u } = e;
  if (tm(u)) return s;
  let i = O(u.decorators), a = Si(e, t, r), o = u.type === "ClassExpression";
  if (i && !o) return pr(s, (m) => l([a, m]));
  let p = ke(e, t), y = oa(e, t);
  return !a && !p && !y ? s : pr(s, (m) => [y ? ";" : "", p ? "(" : "", p && o && i ? [f([x, a, m]), x] : [a, m], p ? ")" : ""]);
}
var va = rm;
var nm = { avoidAstMutation: true };
var ja = [{ linguistLanguageId: 174, name: "JSON.stringify", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".importmap"], filenames: ["package.json", "package-lock.json", "composer.json"], parsers: ["json-stringify"], vscodeLanguageIds: ["json"] }, { linguistLanguageId: 174, name: "JSON", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".mcmeta", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], filenames: [".all-contributorsrc", ".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", "Pipfile.lock", "composer.lock", "flake.lock", "mcmod.info", ".babelrc", ".jscsrc", ".jshintrc", ".jslintrc", ".swcrc"], parsers: ["json"], vscodeLanguageIds: ["json"] }, { linguistLanguageId: 423, name: "JSON with Comments", type: "data", color: "#292929", group: "JSON", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", aliases: ["jsonc"], extensions: [".jsonc", ".code-snippets", ".code-workspace", ".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"], filenames: [], parsers: ["jsonc"], vscodeLanguageIds: ["jsonc"] }, { linguistLanguageId: 175, name: "JSON5", type: "data", color: "#267CB9", extensions: [".json5"], tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json5"], vscodeLanguageIds: ["json5"] }];
var vs = {};
Tr(vs, { getVisitorKeys: () => Ra, massageAstNode: () => qa, print: () => im });
var sm = { JsonRoot: ["node"], ArrayExpression: ["elements"], ObjectExpression: ["properties"], ObjectProperty: ["key", "value"], UnaryExpression: ["argument"], NullLiteral: [], BooleanLiteral: [], StringLiteral: [], NumericLiteral: [], Identifier: [], TemplateLiteral: ["quasis"], TemplateElement: [] };
var Ma = sm;
var um = gr(Ma);
var Ra = um;
function im(e, t, r) {
  let { node: n } = e;
  switch (n.type) {
    case "JsonRoot":
      return [r("node"), F];
    case "ArrayExpression": {
      if (n.elements.length === 0) return "[]";
      let s = e.map(() => e.node === null ? "null" : r(), "elements");
      return ["[", f([F, b([",", F], s)]), F, "]"];
    }
    case "ObjectExpression":
      return n.properties.length === 0 ? "{}" : ["{", f([F, b([",", F], e.map(r, "properties"))]), F, "}"];
    case "ObjectProperty":
      return [r("key"), ": ", r("value")];
    case "UnaryExpression":
      return [n.operator === "+" ? "" : n.operator, r("argument")];
    case "NullLiteral":
      return "null";
    case "BooleanLiteral":
      return n.value ? "true" : "false";
    case "StringLiteral":
      return JSON.stringify(n.value);
    case "NumericLiteral":
      return Ja(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value);
    case "Identifier":
      return Ja(e) ? JSON.stringify(n.name) : n.name;
    case "TemplateLiteral":
      return r(["quasis", 0]);
    case "TemplateElement":
      return JSON.stringify(n.value.cooked);
    default:
      throw new qe(n, "JSON");
  }
}
function Ja(e) {
  return e.key === "key" && e.parent.type === "ObjectProperty";
}
var am = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]);
function qa(e, t) {
  let { type: r } = e;
  if (r === "ObjectProperty") {
    let { key: n } = e;
    n.type === "Identifier" ? t.key = { type: "StringLiteral", value: n.name } : n.type === "NumericLiteral" && (t.key = { type: "StringLiteral", value: String(n.value) });
    return;
  }
  if (r === "UnaryExpression" && e.operator === "+") return t.argument;
  if (r === "ArrayExpression") {
    for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" });
    return;
  }
  if (r === "TemplateLiteral") return { type: "StringLiteral", value: e.quasis[0].value.cooked };
}
qa.ignoredProperties = am;
var Qt = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } };
var gt = "JavaScript";
var om = { arrowParens: { category: gt, type: "choice", default: "always", description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: Qt.bracketSameLine, objectWrap: Qt.objectWrap, bracketSpacing: Qt.bracketSpacing, jsxBracketSameLine: { category: gt, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: gt, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalOperatorPosition: { category: gt, type: "choice", default: "end", description: "Where to print operators when binary expressions wrap lines.", choices: [{ value: "start", description: "Print operators at the start of new lines." }, { value: "end", description: "Print operators at the end of previous lines." }] }, experimentalTernaries: { category: gt, type: "boolean", default: false, description: "Use curious ternaries, with the question mark after the condition.", oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." }, singleQuote: Qt.singleQuote, jsxSingleQuote: { category: gt, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: gt, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { category: gt, type: "choice", default: "all", description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "all", description: "Trailing commas wherever possible (including function arguments)." }, { value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }] }, singleAttributePerLine: Qt.singleAttributePerLine };
var Wa = om;
var pm = { estree: _s, "estree-json": vs };
var cm = [...Ns, ...ja];
var cx = js;
export {
  cx as default,
  cm as languages,
  Wa as options,
  pm as printers
};
//# sourceMappingURL=estree-H4XUELNR.js.map