@kubb/core 3.0.0-alpha.16 → 3.0.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +0 -4
  2. package/dist/{chunk-IS3U2E4B.js → chunk-7PAEMBYT.js} +2 -2
  3. package/dist/{chunk-IS3U2E4B.js.map → chunk-7PAEMBYT.js.map} +1 -1
  4. package/dist/{chunk-UEIL3SRH.cjs → chunk-E43AVT66.cjs} +4 -4
  5. package/dist/{chunk-UEIL3SRH.cjs.map → chunk-E43AVT66.cjs.map} +1 -1
  6. package/dist/{chunk-JSL2IBGJ.js → chunk-E6CN2CZC.js} +3 -3
  7. package/dist/{chunk-JSL2IBGJ.js.map → chunk-E6CN2CZC.js.map} +1 -1
  8. package/dist/{chunk-Q7NER2U2.cjs → chunk-EUAXE6GO.cjs} +6 -6
  9. package/dist/{chunk-Q7NER2U2.cjs.map → chunk-EUAXE6GO.cjs.map} +1 -1
  10. package/dist/{chunk-ZEL4DI72.js → chunk-HBQM723K.js} +3 -3
  11. package/dist/{chunk-ZEL4DI72.js.map → chunk-HBQM723K.js.map} +1 -1
  12. package/dist/{chunk-CLBBHMA3.cjs → chunk-JADTPS46.cjs} +8 -8
  13. package/dist/{chunk-CLBBHMA3.cjs.map → chunk-JADTPS46.cjs.map} +1 -1
  14. package/dist/{chunk-HRFBE6CG.cjs → chunk-JQBK4O73.cjs} +10 -10
  15. package/dist/{chunk-HRFBE6CG.cjs.map → chunk-JQBK4O73.cjs.map} +1 -1
  16. package/dist/{chunk-KQAXIDXD.cjs → chunk-PRMNQKHD.cjs} +33 -33
  17. package/dist/{chunk-KQAXIDXD.cjs.map → chunk-PRMNQKHD.cjs.map} +1 -1
  18. package/dist/{chunk-J23TXIBZ.cjs → chunk-SUJDHIMI.cjs} +4 -12
  19. package/dist/chunk-SUJDHIMI.cjs.map +1 -0
  20. package/dist/index.cjs +34 -34
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.js +4 -5
  23. package/dist/index.js.map +1 -1
  24. package/dist/logger.cjs +7 -7
  25. package/dist/logger.js +2 -3
  26. package/dist/mocks.cjs +14 -23336
  27. package/dist/mocks.cjs.map +1 -1
  28. package/dist/mocks.js +6 -23297
  29. package/dist/mocks.js.map +1 -1
  30. package/dist/{prompt-FDRFKJA5.cjs → prompt-644XZMFU.cjs} +62 -62
  31. package/dist/{prompt-FDRFKJA5.cjs.map → prompt-644XZMFU.cjs.map} +1 -1
  32. package/dist/{prompt-EWVFJSYF.js → prompt-WQQUN22Z.js} +3 -4
  33. package/dist/prompt-WQQUN22Z.js.map +1 -0
  34. package/dist/transformers.cjs +23 -23
  35. package/dist/transformers.cjs.map +1 -1
  36. package/dist/transformers.js +0 -1
  37. package/dist/transformers.js.map +1 -1
  38. package/dist/utils.cjs +17 -17
  39. package/dist/utils.js +1 -2
  40. package/package.json +6 -9
  41. package/src/BarrelManager.ts +1 -1
  42. package/src/FileManager.ts +1 -1
  43. package/src/PromiseManager.ts +1 -1
  44. package/src/transformers/escape.ts +0 -10
  45. package/src/utils/executeStrategies.ts +2 -2
  46. package/src/utils/parser.ts +2 -2
  47. package/dist/acorn-75VVZH4M.cjs +0 -3015
  48. package/dist/acorn-75VVZH4M.cjs.map +0 -1
  49. package/dist/acorn-BDQRFTH5.js +0 -3009
  50. package/dist/acorn-BDQRFTH5.js.map +0 -1
  51. package/dist/angular-7QLNOURG.js +0 -1537
  52. package/dist/angular-7QLNOURG.js.map +0 -1
  53. package/dist/angular-G25ZDZ3P.cjs +0 -1543
  54. package/dist/angular-G25ZDZ3P.cjs.map +0 -1
  55. package/dist/babel-CZJUWSVJ.cjs +0 -6905
  56. package/dist/babel-CZJUWSVJ.cjs.map +0 -1
  57. package/dist/babel-GWHGORSH.js +0 -6899
  58. package/dist/babel-GWHGORSH.js.map +0 -1
  59. package/dist/chunk-J23TXIBZ.cjs.map +0 -1
  60. package/dist/chunk-OSWGRZMH.js +0 -12927
  61. package/dist/chunk-OSWGRZMH.js.map +0 -1
  62. package/dist/chunk-PXLB77EH.cjs +0 -12933
  63. package/dist/chunk-PXLB77EH.cjs.map +0 -1
  64. package/dist/chunk-PZ5AY32C.js +0 -9
  65. package/dist/chunk-PZ5AY32C.js.map +0 -1
  66. package/dist/estree-4BFMOGHF.js +0 -4367
  67. package/dist/estree-4BFMOGHF.js.map +0 -1
  68. package/dist/estree-TXDUNIHF.cjs +0 -4375
  69. package/dist/estree-TXDUNIHF.cjs.map +0 -1
  70. package/dist/flow-VXQDDICF.js +0 -26262
  71. package/dist/flow-VXQDDICF.js.map +0 -1
  72. package/dist/flow-XCGHVA4N.cjs +0 -26268
  73. package/dist/flow-XCGHVA4N.cjs.map +0 -1
  74. package/dist/glimmer-FBL5UTXI.js +0 -2844
  75. package/dist/glimmer-FBL5UTXI.js.map +0 -1
  76. package/dist/glimmer-SRXJA5DC.cjs +0 -2852
  77. package/dist/glimmer-SRXJA5DC.cjs.map +0 -1
  78. package/dist/graphql-FUGWBNAY.cjs +0 -1250
  79. package/dist/graphql-FUGWBNAY.cjs.map +0 -1
  80. package/dist/graphql-VWUEBAX7.js +0 -1241
  81. package/dist/graphql-VWUEBAX7.js.map +0 -1
  82. package/dist/html-PE4V7PIZ.cjs +0 -2754
  83. package/dist/html-PE4V7PIZ.cjs.map +0 -1
  84. package/dist/html-SRQHPYU4.js +0 -2745
  85. package/dist/html-SRQHPYU4.js.map +0 -1
  86. package/dist/markdown-7H53GZRF.js +0 -3319
  87. package/dist/markdown-7H53GZRF.js.map +0 -1
  88. package/dist/markdown-MR7POCQ6.cjs +0 -3328
  89. package/dist/markdown-MR7POCQ6.cjs.map +0 -1
  90. package/dist/meriyah-GDT4GDJH.cjs +0 -2356
  91. package/dist/meriyah-GDT4GDJH.cjs.map +0 -1
  92. package/dist/meriyah-MBZURH4I.js +0 -2350
  93. package/dist/meriyah-MBZURH4I.js.map +0 -1
  94. package/dist/postcss-4NLPAMPV.cjs +0 -4945
  95. package/dist/postcss-4NLPAMPV.cjs.map +0 -1
  96. package/dist/postcss-TPQQRMEX.js +0 -4936
  97. package/dist/postcss-TPQQRMEX.js.map +0 -1
  98. package/dist/prompt-EWVFJSYF.js.map +0 -1
  99. package/dist/typescript-FX5DO2QH.cjs +0 -19
  100. package/dist/typescript-FX5DO2QH.cjs.map +0 -1
  101. package/dist/typescript-IRGFXOHK.js +0 -4
  102. package/dist/typescript-IRGFXOHK.js.map +0 -1
  103. package/dist/yaml-KXYJMJO6.cjs +0 -4216
  104. package/dist/yaml-KXYJMJO6.cjs.map +0 -1
  105. package/dist/yaml-Q6KMUOXF.js +0 -4207
  106. package/dist/yaml-Q6KMUOXF.js.map +0 -1
@@ -1,4375 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var chunkJ23TXIBZ_cjs = require('./chunk-J23TXIBZ.cjs');
6
-
7
- // ../../node_modules/.pnpm/prettier@3.3.3/node_modules/prettier/plugins/estree.mjs
8
- chunkJ23TXIBZ_cjs.init_cjs_shims();
9
- var Wa = Object.defineProperty;
10
- var Js = (e) => {
11
- throw TypeError(e);
12
- };
13
- var Ar = (e, t) => {
14
- for (var r in t) Wa(e, r, { get: t[r], enumerable: true });
15
- };
16
- var qs = (e, t, r) => t.has(e) || Js("Cannot " + r);
17
- var pt = (e, t, r) => (qs(e, t, "read from private field"), t.get(e));
18
- var Ws = (e, t, r) => t.has(e) ? Js("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
19
- var Gs = (e, t, r, n) => (qs(e, t, "write to private field"), t.set(e, r), r);
20
- var _s = {};
21
- Ar(_s, { languages: () => nm, options: () => va, printers: () => rm });
22
- var Us = [{ 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"] }];
23
- var ws = {};
24
- Ar(ws, { canAttachComment: () => fp, embed: () => Qu, experimentalFeatures: () => Kl, getCommentChildNodes: () => Ep, getVisitorKeys: () => gr, handleComments: () => Kn, insertPragma: () => pi, isBlockComment: () => re, isGap: () => Fp, massageAstNode: () => Cu, print: () => Ia, printComment: () => Pu, willPrintOwnComments: () => zn });
25
- var Ga = (e, t, r, n) => {
26
- if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
27
- };
28
- var N = Ga;
29
- var Ua = (e, t, r) => {
30
- if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
31
- };
32
- var O = Ua;
33
- function Na(e) {
34
- return e !== null && typeof e == "object";
35
- }
36
- var Ns = Na;
37
- function* Xa(e, t) {
38
- let { getVisitorKeys: r, filter: n = () => true } = t, s = (u) => Ns(u) && n(u);
39
- for (let u of r(e)) {
40
- let i = e[u];
41
- if (Array.isArray(i)) for (let a of i) s(a) && (yield a);
42
- else s(i) && (yield i);
43
- }
44
- }
45
- function* Ya(e, t) {
46
- let r = [e];
47
- for (let n = 0; n < r.length; n++) {
48
- let s = r[n];
49
- for (let u of Xa(s, t)) yield u, r.push(u);
50
- }
51
- }
52
- function Xs(e, { getVisitorKeys: t, predicate: r }) {
53
- for (let n of Ya(e, { getVisitorKeys: t })) if (r(n)) return true;
54
- return false;
55
- }
56
- var Ys = () => /[#*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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\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;
57
- function Hs(e) {
58
- return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
59
- }
60
- function Vs(e) {
61
- 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 >= 9800 && e <= 9811 || e === 9855 || 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 <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && 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 >= 101632 && 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 === 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 <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
62
- }
63
- var $s = (e) => !(Hs(e) || Vs(e));
64
- var Ha = /[^\x20-\x7F]/u;
65
- function Va(e) {
66
- if (!e) return 0;
67
- if (!Ha.test(e)) return e.length;
68
- e = e.replace(Ys(), " ");
69
- let t = 0;
70
- for (let r of e) {
71
- let n = r.codePointAt(0);
72
- n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || (t += $s(n) ? 1 : 2);
73
- }
74
- return t;
75
- }
76
- var et = Va;
77
- function Tr(e) {
78
- return (t, r, n) => {
79
- let s = !!(n != null && n.backwards);
80
- if (r === false) return false;
81
- let { length: u } = t, i = r;
82
- for (; i >= 0 && i < u; ) {
83
- let a = t.charAt(i);
84
- if (e instanceof RegExp) {
85
- if (!e.test(a)) return i;
86
- } else if (!e.includes(a)) return i;
87
- s ? i-- : i++;
88
- }
89
- return i === -1 || i === u ? i : false;
90
- };
91
- }
92
- var Ge = Tr(" ");
93
- var Ks = Tr(",; ");
94
- var zs = Tr(/[^\n\r]/u);
95
- function $a(e, t, r) {
96
- let n = !!(r != null && r.backwards);
97
- if (t === false) return false;
98
- let s = e.charAt(t);
99
- if (n) {
100
- if (e.charAt(t - 1) === "\r" && s === `
101
- `) return t - 2;
102
- if (s === `
103
- ` || s === "\r" || s === "\u2028" || s === "\u2029") return t - 1;
104
- } else {
105
- if (s === "\r" && e.charAt(t + 1) === `
106
- `) return t + 2;
107
- if (s === `
108
- ` || s === "\r" || s === "\u2028" || s === "\u2029") return t + 1;
109
- }
110
- return t;
111
- }
112
- var Ue = $a;
113
- function Ka(e, t, r = {}) {
114
- let n = Ge(e, r.backwards ? t - 1 : t, r), s = Ue(e, n, r);
115
- return n !== s;
116
- }
117
- var te = Ka;
118
- function za(e, t) {
119
- if (t === false) return false;
120
- if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
121
- for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
122
- }
123
- return t;
124
- }
125
- var Lt = za;
126
- function Qa(e, t) {
127
- return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? zs(e, t) : t;
128
- }
129
- var wt = Qa;
130
- function Za(e, t) {
131
- let r = null, n = t;
132
- for (; n !== r; ) r = n, n = Ks(e, n), n = Lt(e, n), n = Ge(e, n);
133
- return n = wt(e, n), n = Ue(e, n), n !== false && te(e, n);
134
- }
135
- var Ot = Za;
136
- function eo(e) {
137
- return Array.isArray(e) && e.length > 0;
138
- }
139
- var w = eo;
140
- var dr = "'";
141
- var Qs = '"';
142
- function to(e, t) {
143
- let r = t === true || t === dr ? dr : Qs, n = r === dr ? Qs : dr, s = 0, u = 0;
144
- for (let i of e) i === r ? s++ : i === n && u++;
145
- return s > u ? n : r;
146
- }
147
- var xr = to;
148
- function ro(e, t, r) {
149
- 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));
150
- return t + u + t;
151
- }
152
- var Zs = ro;
153
- function no(e, t) {
154
- let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? '"' : t.__isInHtmlAttribute ? "'" : xr(r, t.singleQuote);
155
- return Zs(r, n, !(t.parser === "css" || t.parser === "less" || t.parser === "scss" || t.__embeddedInHtml));
156
- }
157
- var tt = no;
158
- function R(e) {
159
- var n, s, u;
160
- 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];
161
- return r ? Math.min(R(r), t) : t;
162
- }
163
- function k(e) {
164
- var t;
165
- return ((t = e.range) == null ? void 0 : t[1]) ?? e.end;
166
- }
167
- function ht(e, t) {
168
- let r = R(e);
169
- return Number.isInteger(r) && r === R(t);
170
- }
171
- function so(e, t) {
172
- let r = k(e);
173
- return Number.isInteger(r) && r === k(t);
174
- }
175
- function eu(e, t) {
176
- return ht(e, t) && so(e, t);
177
- }
178
- var Qt = null;
179
- function Zt(e) {
180
- if (Qt !== null && typeof Qt.property) {
181
- let t = Qt;
182
- return Qt = Zt.prototype = null, t;
183
- }
184
- return Qt = Zt.prototype = e ?? /* @__PURE__ */ Object.create(null), new Zt();
185
- }
186
- var uo = 10;
187
- for (let e = 0; e <= uo; e++) Zt();
188
- function In(e) {
189
- return Zt(e);
190
- }
191
- function io(e, t = "type") {
192
- In(e);
193
- function r(n) {
194
- let s = n[t], u = e[s];
195
- if (!Array.isArray(u)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: n });
196
- return u;
197
- }
198
- return r;
199
- }
200
- var hr = io;
201
- var tu = { 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: ["test", "body"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "params", "body", "returnType", "typeParameters", "predicate"], FunctionExpression: ["id", "params", "body", "returnType", "typeParameters"], 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: ["key", "params", "body", "decorators", "returnType", "typeParameters"], 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: ["params", "body", "returnType", "typeParameters", "predicate"], ClassBody: ["body"], ClassExpression: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators", "superTypeArguments"], ClassDeclaration: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators", "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: ["local", "imported"], ImportExpression: ["source", "options", "attributes"], MetaProperty: ["meta", "property"], ClassMethod: ["key", "params", "body", "decorators", "returnType", "typeParameters"], ObjectPattern: ["properties", "typeAnnotation", "decorators"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "quasi", "typeParameters", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], Import: [], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "arguments", "typeParameters", "typeArguments"], ClassProperty: ["key", "value", "typeAnnotation", "decorators", "variance"], ClassAccessorProperty: ["key", "value", "typeAnnotation", "decorators"], ClassPrivateProperty: ["key", "value", "decorators", "typeAnnotation", "variance"], ClassPrivateMethod: ["key", "params", "body", "decorators", "returnType", "typeParameters"], 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"], DeclareExportAllDeclaration: ["source"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "params", "rest", "returnType", "this"], 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: ["id", "key", "value", "variance"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["id", "qualification"], 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", "attributes", "typeArguments", "typeParameters"], 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"], DecimalLiteral: [], 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", "typeAnnotation", "nameType"], 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"], TSEnumDeclaration: ["id", "members"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "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"], TSEnumBody: ["members"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], TSTemplateLiteralType: ["quasis", "types"], 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"] };
202
- var ao = hr(tu);
203
- var gr = ao;
204
- function oo(e) {
205
- let t = new Set(e);
206
- return (r) => t.has(r == null ? void 0 : r.type);
207
- }
208
- var v = oo;
209
- var po = v(["Block", "CommentBlock", "MultiLine"]);
210
- var re = po;
211
- var co = v(["AnyTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "BooleanTypeAnnotation", "BigIntTypeAnnotation", "SymbolTypeAnnotation", "StringTypeAnnotation", "NeverTypeAnnotation", "UndefinedTypeAnnotation", "UnknownTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation"]);
212
- var Sr = co;
213
- function lo(e, t) {
214
- let r = t.split(".");
215
- for (let n = r.length - 1; n >= 0; n--) {
216
- let s = r[n];
217
- if (n === 0) return e.type === "Identifier" && e.name === s;
218
- if (e.type !== "MemberExpression" || e.optional || e.computed || e.property.type !== "Identifier" || e.property.name !== s) return false;
219
- e = e.object;
220
- }
221
- }
222
- function mo(e, t) {
223
- return t.some((r) => lo(e, r));
224
- }
225
- var ru = mo;
226
- function yo({ type: e }) {
227
- return e.startsWith("TS") && e.endsWith("Keyword");
228
- }
229
- var Br = yo;
230
- function tr(e, t) {
231
- return t(e) || Xs(e, { getVisitorKeys: gr, predicate: t });
232
- }
233
- function jt(e) {
234
- return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || L(e) || q(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || Te(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression";
235
- }
236
- function uu(e) {
237
- return e.expressions ? e.expressions[0] : e.left ?? e.test ?? e.callee ?? e.object ?? e.tag ?? e.argument ?? e.expression;
238
- }
239
- function Pr(e) {
240
- if (e.expressions) return ["expressions", 0];
241
- if (e.left) return ["left"];
242
- if (e.test) return ["test"];
243
- if (e.object) return ["object"];
244
- if (e.callee) return ["callee"];
245
- if (e.tag) return ["tag"];
246
- if (e.argument) return ["argument"];
247
- if (e.expression) return ["expression"];
248
- throw new Error("Unexpected node has no left side.");
249
- }
250
- var vt = v(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
251
- var iu = v(["ExportDefaultDeclaration", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportAllDeclaration"]);
252
- var U = v(["ArrayExpression", "TupleExpression"]);
253
- var se = v(["ObjectExpression", "RecordExpression"]);
254
- function au(e) {
255
- return e.type === "LogicalExpression" && e.operator === "??";
256
- }
257
- function Ce(e) {
258
- return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number";
259
- }
260
- function jn(e) {
261
- return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && Ce(e.argument);
262
- }
263
- function Q(e) {
264
- return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string"));
265
- }
266
- function vn(e) {
267
- return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex;
268
- }
269
- var kr = v(["Literal", "BooleanLiteral", "BigIntLiteral", "DecimalLiteral", "DirectiveLiteral", "NullLiteral", "NumericLiteral", "RegExpLiteral", "StringLiteral"]);
270
- var Do = v(["Identifier", "ThisExpression", "Super", "PrivateName", "PrivateIdentifier", "Import"]);
271
- var we = v(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]);
272
- var _t = v(["FunctionExpression", "ArrowFunctionExpression"]);
273
- function fo(e) {
274
- return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement";
275
- }
276
- function Ln(e) {
277
- return L(e) && e.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(e.callee.name);
278
- }
279
- var X = v(["JSXElement", "JSXFragment"]);
280
- function gt(e) {
281
- return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set";
282
- }
283
- function Ir(e) {
284
- return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation";
285
- }
286
- function ou(e) {
287
- return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !ht(e, e.typeAnnotation);
288
- }
289
- var De = v(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
290
- function Ft(e) {
291
- return q(e) || e.type === "BindExpression" && !!e.object;
292
- }
293
- var Eo = v(["TSThisType", "NullLiteralTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType"]);
294
- function Mt(e) {
295
- return Br(e) || Sr(e) || Eo(e) || (e.type === "GenericTypeAnnotation" || e.type === "TSTypeReference") && !e.typeParameters && !e.typeArguments;
296
- }
297
- function Fo(e) {
298
- return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll");
299
- }
300
- var Co = ["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"];
301
- function Ao(e) {
302
- return ru(e, Co);
303
- }
304
- function St(e, t) {
305
- if ((e == null ? void 0 : e.type) !== "CallExpression" || e.optional) return false;
306
- let r = oe(e);
307
- if (r.length === 1) {
308
- if (Ln(e) && St(t)) return _t(r[0]);
309
- if (Fo(e.callee)) return Ln(r[0]);
310
- } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || Q(r[0])) && Ao(e.callee)) return r[2] && !Ce(r[2]) ? false : (r.length === 2 ? _t(r[1]) : fo(r[1]) && K(r[1]).length <= 1) || Ln(r[1]);
311
- return false;
312
- }
313
- var pu = (e) => (t) => ((t == null ? void 0 : t.type) === "ChainExpression" && (t = t.expression), e(t));
314
- var L = pu(v(["CallExpression", "OptionalCallExpression"]));
315
- var q = pu(v(["MemberExpression", "OptionalMemberExpression"]));
316
- function Mn(e, t = 5) {
317
- return cu(e, t) <= t;
318
- }
319
- function cu(e, t) {
320
- let r = 0;
321
- for (let n in e) {
322
- let s = e[n];
323
- if (s && typeof s == "object" && typeof s.type == "string" && (r++, r += cu(s, t - r)), r > t) return r;
324
- }
325
- return r;
326
- }
327
- var To = 0.25;
328
- function rr(e, t) {
329
- let { printWidth: r } = t;
330
- if (d(e)) return false;
331
- let n = r * To;
332
- if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || jn(e) && !d(e.argument)) return true;
333
- let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern;
334
- return s ? s.length <= n : Q(e) ? tt(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(`
335
- `) : e.type === "UnaryExpression" ? rr(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : kr(e);
336
- }
337
- function Oe(e, t) {
338
- return X(t) ? Bt(t) : d(t, g.Leading, (r) => te(e, k(r)));
339
- }
340
- function nu(e) {
341
- return e.quasis.some((t) => t.value.raw.includes(`
342
- `));
343
- }
344
- function Lr(e, t) {
345
- return (e.type === "TemplateLiteral" && nu(e) || e.type === "TaggedTemplateExpression" && nu(e.quasi)) && !te(t, R(e), { backwards: true });
346
- }
347
- function wr(e) {
348
- if (!d(e)) return false;
349
- let t = O(false, ct(e, g.Dangling), -1);
350
- return t && !re(t);
351
- }
352
- function lu(e) {
353
- if (e.length <= 1) return false;
354
- let t = 0;
355
- for (let r of e) if (_t(r)) {
356
- if (t += 1, t > 1) return true;
357
- } else if (L(r)) {
358
- for (let n of oe(r)) if (_t(n)) return true;
359
- }
360
- return false;
361
- }
362
- function Or(e) {
363
- let { node: t, parent: r, key: n } = e;
364
- return n === "callee" && L(t) && L(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length;
365
- }
366
- var xo = /* @__PURE__ */ new Set(["!", "-", "+", "~"]);
367
- function be(e, t = 2) {
368
- if (t <= 0) return false;
369
- if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return be(e.expression, t);
370
- let r = (n) => be(n, t - 1);
371
- if (vn(e)) return et(e.pattern ?? e.regex.pattern) <= 5;
372
- if (kr(e) || Do(e) || e.type === "ArgumentPlaceholder") return true;
373
- if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(`
374
- `)) && e.expressions.every(r);
375
- if (se(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value)));
376
- if (U(e)) return e.elements.every((n) => n === null || r(n));
377
- if (lt(e)) {
378
- if (e.type === "ImportExpression" || be(e.callee, t)) {
379
- let n = oe(e);
380
- return n.length <= t && n.every(r);
381
- }
382
- return false;
383
- }
384
- return q(e) ? be(e.object, t) && be(e.property, t) : e.type === "UnaryExpression" && xo.has(e.operator) || e.type === "UpdateExpression" ? be(e.argument, t) : false;
385
- }
386
- function fe(e) {
387
- var t;
388
- return ((t = e.extra) == null ? void 0 : t.raw) ?? e.raw;
389
- }
390
- function mu(e) {
391
- return e;
392
- }
393
- function ae(e, t = "es5") {
394
- return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5");
395
- }
396
- function ie(e, t) {
397
- switch (e.type) {
398
- case "BinaryExpression":
399
- case "LogicalExpression":
400
- case "AssignmentExpression":
401
- case "NGPipeExpression":
402
- return ie(e.left, t);
403
- case "MemberExpression":
404
- case "OptionalMemberExpression":
405
- return ie(e.object, t);
406
- case "TaggedTemplateExpression":
407
- return e.tag.type === "FunctionExpression" ? false : ie(e.tag, t);
408
- case "CallExpression":
409
- case "OptionalCallExpression":
410
- return e.callee.type === "FunctionExpression" ? false : ie(e.callee, t);
411
- case "ConditionalExpression":
412
- return ie(e.test, t);
413
- case "UpdateExpression":
414
- return !e.prefix && ie(e.argument, t);
415
- case "BindExpression":
416
- return e.object && ie(e.object, t);
417
- case "SequenceExpression":
418
- return ie(e.expressions[0], t);
419
- case "ChainExpression":
420
- case "TSSatisfiesExpression":
421
- case "TSAsExpression":
422
- case "TSNonNullExpression":
423
- case "AsExpression":
424
- case "AsConstExpression":
425
- case "SatisfiesExpression":
426
- return ie(e.expression, t);
427
- default:
428
- return t(e);
429
- }
430
- }
431
- var su = { "==": true, "!=": true, "===": true, "!==": true };
432
- var br = { "*": true, "/": true, "%": true };
433
- var _n = { ">>": true, ">>>": true, "<<": true };
434
- function nr(e, t) {
435
- return !(er(t) !== er(e) || e === "**" || su[e] && su[t] || t === "%" && br[e] || e === "%" && br[t] || t !== e && br[t] && br[e] || _n[e] && _n[t]);
436
- }
437
- var ho = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((e, t) => e.map((r) => [r, t])));
438
- function er(e) {
439
- return ho.get(e);
440
- }
441
- function yu(e) {
442
- return !!_n[e] || e === "|" || e === "^" || e === "&";
443
- }
444
- function Du(e) {
445
- var r;
446
- if (e.rest) return true;
447
- let t = K(e);
448
- return ((r = O(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
449
- }
450
- var wn = /* @__PURE__ */ new WeakMap();
451
- function K(e) {
452
- if (wn.has(e)) return wn.get(e);
453
- let t = [];
454
- 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), wn.set(e, t), t;
455
- }
456
- function fu(e, t) {
457
- let { node: r } = e, n = 0, s = (u) => t(u, n++);
458
- 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");
459
- }
460
- var On = /* @__PURE__ */ new WeakMap();
461
- function oe(e) {
462
- if (On.has(e)) return On.get(e);
463
- if (e.type === "ChainExpression") return oe(e.expression);
464
- let t = e.arguments;
465
- return e.type === "ImportExpression" && (t = [e.source], e.attributes && t.push(e.attributes), e.options && t.push(e.options)), On.set(e, t), t;
466
- }
467
- function Rt(e, t) {
468
- let { node: r } = e;
469
- if (r.type === "ChainExpression") return e.call(() => Rt(e, t), "expression");
470
- r.type === "ImportExpression" ? (e.call((n) => t(n, 0), "source"), r.attributes && e.call((n) => t(n, 1), "attributes"), r.options && e.call((n) => t(n, 1), "options")) : e.each(t, "arguments");
471
- }
472
- function Rn(e, t) {
473
- let r = [];
474
- if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression") {
475
- if (t === 0 || t === (e.attributes || e.options ? -2 : -1)) return [...r, "source"];
476
- if (e.attributes && (t === 1 || t === -1)) return [...r, "attributes"];
477
- if (e.options && (t === 1 || t === -1)) return [...r, "options"];
478
- throw new RangeError("Invalid argument index");
479
- }
480
- if (t < 0 && (t = e.arguments.length + t), t < 0 || t >= e.arguments.length) throw new RangeError("Invalid argument index");
481
- return [...r, "arguments", t];
482
- }
483
- function sr(e) {
484
- return e.value.trim() === "prettier-ignore" && !e.unignore;
485
- }
486
- function Bt(e) {
487
- return (e == null ? void 0 : e.prettierIgnore) || d(e, g.PrettierIgnore);
488
- }
489
- var g = { Leading: 2, Trailing: 4, Dangling: 8, Block: 16, Line: 32, PrettierIgnore: 64, First: 128, Last: 256 };
490
- var Eu = (e, t) => {
491
- if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & g.Leading && !r.leading || e & g.Trailing && !r.trailing || e & g.Dangling && (r.leading || r.trailing) || e & g.Block && !re(r) || e & g.Line && !vt(r) || e & g.First && n !== 0 || e & g.Last && n !== s.length - 1 || e & g.PrettierIgnore && !sr(r) || t && !t(r));
492
- };
493
- function d(e, t, r) {
494
- if (!w(e == null ? void 0 : e.comments)) return false;
495
- let n = Eu(t, r);
496
- return n ? e.comments.some(n) : true;
497
- }
498
- function ct(e, t, r) {
499
- if (!Array.isArray(e == null ? void 0 : e.comments)) return [];
500
- let n = Eu(t, r);
501
- return n ? e.comments.filter(n) : e.comments;
502
- }
503
- var pe = (e, { originalText: t }) => Ot(t, k(e));
504
- function lt(e) {
505
- return L(e) || e.type === "NewExpression" || e.type === "ImportExpression";
506
- }
507
- function Ae(e) {
508
- return e && (e.type === "ObjectProperty" || e.type === "Property" && !gt(e));
509
- }
510
- var Te = v(["TSAsExpression", "TSSatisfiesExpression", "AsExpression", "AsConstExpression", "SatisfiesExpression"]);
511
- var Ne = v(["UnionTypeAnnotation", "TSUnionType"]);
512
- var _r = v(["IntersectionTypeAnnotation", "TSIntersectionType"]);
513
- var go = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]);
514
- var Jt = (e) => {
515
- for (let t of e.quasis) delete t.value;
516
- };
517
- function Fu(e, t, r) {
518
- var s, u;
519
- 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 === "DecimalLiteral" && (t.value = Number(e.value)), e.type === "Literal" && t.decimal && (t.decimal = Number(e.decimal)), e.type === "EmptyStatement" || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null;
520
- 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) {
521
- let { key: i } = e;
522
- Q(i) || Ce(i) ? t.key = String(i.value) : i.type === "Identifier" && (t.key = i.name);
523
- }
524
- 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" && Jt(a);
525
- e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Jt(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, '"'));
526
- let n = e.expression || e.callee;
527
- if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) {
528
- let i = e.expression.arguments[0].properties;
529
- for (let [a, o] of t.expression.arguments[0].properties.entries()) switch (i[a].key.name) {
530
- case "styles":
531
- U(o.value) && Jt(o.value.elements[0]);
532
- break;
533
- case "template":
534
- o.value.type === "TemplateLiteral" && Jt(o.value);
535
- break;
536
- }
537
- }
538
- 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") && Jt(t.quasi), e.type === "TemplateLiteral" && ((u = e.leadingComments) != null && u.some((a) => re(a) && ["GraphQL", "HTML"].some((o) => a.value === ` ${o} `)) || r.type === "CallExpression" && r.callee.name === "graphql" || !e.leadingComments) && Jt(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;
539
- }
540
- Fu.ignoredProperties = go;
541
- var Cu = Fu;
542
- var rt = "string";
543
- var _e = "array";
544
- var nt = "cursor";
545
- var Xe = "indent";
546
- var Ye = "align";
547
- var st = "trim";
548
- var le = "group";
549
- var Pe = "fill";
550
- var xe = "if-break";
551
- var He = "indent-if-break";
552
- var Ve = "line-suffix";
553
- var $e = "line-suffix-boundary";
554
- var me = "line";
555
- var je = "label";
556
- var ve = "break-parent";
557
- var jr = /* @__PURE__ */ new Set([nt, Xe, Ye, st, le, Pe, xe, He, Ve, $e, me, je, ve]);
558
- function So(e) {
559
- if (typeof e == "string") return rt;
560
- if (Array.isArray(e)) return _e;
561
- if (!e) return;
562
- let { type: t } = e;
563
- if (jr.has(t)) return t;
564
- }
565
- var ut = So;
566
- var Bo = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
567
- function bo(e) {
568
- let t = e === null ? "null" : typeof e;
569
- if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
570
- Expected it to be 'string' or 'object'.`;
571
- if (ut(e)) throw new Error("doc is valid.");
572
- let r = Object.prototype.toString.call(e);
573
- if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
574
- let n = Bo([...jr].map((s) => `'${s}'`));
575
- return `Unexpected doc.type '${e.type}'.
576
- Expected it to be ${n}.`;
577
- }
578
- var Jn = class extends Error {
579
- name = "InvalidDocError";
580
- constructor(t) {
581
- super(bo(t)), this.doc = t;
582
- }
583
- };
584
- var Ct = Jn;
585
- var Au = {};
586
- function Po(e, t, r, n) {
587
- let s = [e];
588
- for (; s.length > 0; ) {
589
- let u = s.pop();
590
- if (u === Au) {
591
- r(s.pop());
592
- continue;
593
- }
594
- r && s.push(u, Au);
595
- let i = ut(u);
596
- if (!i) throw new Ct(u);
597
- if ((t == null ? void 0 : t(u)) !== false) switch (i) {
598
- case _e:
599
- case Pe: {
600
- let a = i === _e ? u : u.parts;
601
- for (let o = a.length, c = o - 1; c >= 0; --c) s.push(a[c]);
602
- break;
603
- }
604
- case xe:
605
- s.push(u.flatContents, u.breakContents);
606
- break;
607
- case le:
608
- if (n && u.expandedStates) for (let a = u.expandedStates.length, o = a - 1; o >= 0; --o) s.push(u.expandedStates[o]);
609
- else s.push(u.contents);
610
- break;
611
- case Ye:
612
- case Xe:
613
- case He:
614
- case je:
615
- case Ve:
616
- s.push(u.contents);
617
- break;
618
- case rt:
619
- case nt:
620
- case st:
621
- case $e:
622
- case me:
623
- case ve:
624
- break;
625
- default:
626
- throw new Ct(u);
627
- }
628
- }
629
- }
630
- var qn = Po;
631
- var Tu = () => {
632
- };
633
- var vr = Tu;
634
- function f(e) {
635
- return { type: Xe, contents: e };
636
- }
637
- function he(e, t) {
638
- return { type: Ye, contents: t, n: e };
639
- }
640
- function l(e, t = {}) {
641
- return vr(t.expandedStates), { type: le, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
642
- }
643
- function du(e) {
644
- return he(Number.NEGATIVE_INFINITY, e);
645
- }
646
- function Mr(e) {
647
- return he(-1, e);
648
- }
649
- function ze(e, t) {
650
- return l(e[0], { ...t, expandedStates: e });
651
- }
652
- function qt(e) {
653
- return { type: Pe, parts: e };
654
- }
655
- function b(e, t = "", r = {}) {
656
- return { type: xe, breakContents: e, flatContents: t, groupId: r.groupId };
657
- }
658
- function At(e, t) {
659
- return { type: He, contents: e, groupId: t.groupId, negate: t.negate };
660
- }
661
- function Wn(e) {
662
- return { type: Ve, contents: e };
663
- }
664
- var ke = { type: $e };
665
- var Ee = { type: ve };
666
- var Gn = { type: me, hard: true };
667
- var ko = { type: me, hard: true, literal: true };
668
- var x = { type: me };
669
- var E = { type: me, soft: true };
670
- var F = [Gn, Ee];
671
- var Rr = [ko, Ee];
672
- var Un = { type: nt };
673
- function P(e, t) {
674
- let r = [];
675
- for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
676
- return r;
677
- }
678
- function xu(e, t, r) {
679
- let n = e;
680
- if (t > 0) {
681
- for (let s = 0; s < Math.floor(t / r); ++s) n = f(n);
682
- n = he(t % r, n), n = he(Number.NEGATIVE_INFINITY, n);
683
- }
684
- return n;
685
- }
686
- function it(e, t) {
687
- return e ? { type: je, label: e, contents: t } : t;
688
- }
689
- function mt(e, t) {
690
- if (typeof e == "string") return t(e);
691
- let r = /* @__PURE__ */ new Map();
692
- return n(e);
693
- function n(u) {
694
- if (r.has(u)) return r.get(u);
695
- let i = s(u);
696
- return r.set(u, i), i;
697
- }
698
- function s(u) {
699
- switch (ut(u)) {
700
- case _e:
701
- return t(u.map(n));
702
- case Pe:
703
- return t({ ...u, parts: u.parts.map(n) });
704
- case xe:
705
- return t({ ...u, breakContents: n(u.breakContents), flatContents: n(u.flatContents) });
706
- case le: {
707
- let { expandedStates: i, contents: a } = u;
708
- return i ? (i = i.map(n), a = i[0]) : a = n(a), t({ ...u, contents: a, expandedStates: i });
709
- }
710
- case Ye:
711
- case Xe:
712
- case He:
713
- case je:
714
- case Ve:
715
- return t({ ...u, contents: n(u.contents) });
716
- case rt:
717
- case nt:
718
- case st:
719
- case $e:
720
- case me:
721
- case ve:
722
- return t(u);
723
- default:
724
- throw new Ct(u);
725
- }
726
- }
727
- }
728
- function gu(e, t, r) {
729
- let n = r, s = false;
730
- function u(i) {
731
- if (s) return false;
732
- let a = t(i);
733
- a !== void 0 && (s = true, n = a);
734
- }
735
- return qn(e, u), n;
736
- }
737
- function Io(e) {
738
- if (e.type === le && e.break || e.type === me && e.hard || e.type === ve) return true;
739
- }
740
- function ne(e) {
741
- return gu(e, Io, false);
742
- }
743
- function hu(e) {
744
- if (e.length > 0) {
745
- let t = O(false, e, -1);
746
- !t.expandedStates && !t.break && (t.break = "propagated");
747
- }
748
- return null;
749
- }
750
- function Su(e) {
751
- let t = /* @__PURE__ */ new Set(), r = [];
752
- function n(u) {
753
- if (u.type === ve && hu(r), u.type === le) {
754
- if (r.push(u), t.has(u)) return false;
755
- t.add(u);
756
- }
757
- }
758
- function s(u) {
759
- u.type === le && r.pop().break && hu(r);
760
- }
761
- qn(e, n, s, true);
762
- }
763
- function Lo(e) {
764
- return e.type === me && !e.hard ? e.soft ? "" : " " : e.type === xe ? e.flatContents : e;
765
- }
766
- function ur(e) {
767
- return mt(e, Lo);
768
- }
769
- function wo(e) {
770
- switch (ut(e)) {
771
- case Pe:
772
- if (e.parts.every((t) => t === "")) return "";
773
- break;
774
- case le:
775
- if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
776
- if (e.contents.type === le && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
777
- break;
778
- case Ye:
779
- case Xe:
780
- case He:
781
- case Ve:
782
- if (!e.contents) return "";
783
- break;
784
- case xe:
785
- if (!e.flatContents && !e.breakContents) return "";
786
- break;
787
- case _e: {
788
- let t = [];
789
- for (let r of e) {
790
- if (!r) continue;
791
- let [n, ...s] = Array.isArray(r) ? r : [r];
792
- typeof n == "string" && typeof O(false, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s);
793
- }
794
- return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
795
- }
796
- case rt:
797
- case nt:
798
- case st:
799
- case $e:
800
- case me:
801
- case je:
802
- case ve:
803
- break;
804
- default:
805
- throw new Ct(e);
806
- }
807
- return e;
808
- }
809
- function Wt(e) {
810
- return mt(e, (t) => wo(t));
811
- }
812
- function Ie(e, t = Rr) {
813
- return mt(e, (r) => typeof r == "string" ? P(t, r.split(`
814
- `)) : r);
815
- }
816
- function Oo(e) {
817
- if (e.type === me) return true;
818
- }
819
- function Bu(e) {
820
- return gu(e, Oo, false);
821
- }
822
- function ir(e, t) {
823
- return e.type === je ? { ...e, contents: t(e.contents) } : t(e);
824
- }
825
- function _o(e) {
826
- let t = `*${e.value}*`.split(`
827
- `);
828
- return t.length > 1 && t.every((r) => r.trimStart()[0] === "*");
829
- }
830
- var bu = _o;
831
- function Pu(e, t) {
832
- let r = e.node;
833
- if (vt(r)) return t.originalText.slice(R(r), k(r)).trimEnd();
834
- if (re(r)) return bu(r) ? jo(r) : ["/*", Ie(r.value), "*/"];
835
- throw new Error("Not a comment: " + JSON.stringify(r));
836
- }
837
- function jo(e) {
838
- let t = e.value.split(`
839
- `);
840
- return ["/*", P(F, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), "*/"];
841
- }
842
- var Kn = {};
843
- Ar(Kn, { endOfLine: () => Go, ownLine: () => Wo, remaining: () => Uo });
844
- function vo(e) {
845
- 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 || "");
846
- return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
847
- }
848
- function Nn(e, t) {
849
- (e.comments ?? (e.comments = [])).push(t), t.printed = false, t.nodeDescription = vo(e);
850
- }
851
- function ce(e, t) {
852
- t.leading = true, t.trailing = false, Nn(e, t);
853
- }
854
- function Le(e, t, r) {
855
- t.leading = false, t.trailing = false, r && (t.marker = r), Nn(e, t);
856
- }
857
- function z(e, t) {
858
- t.leading = false, t.trailing = true, Nn(e, t);
859
- }
860
- function Mo(e, t) {
861
- let r = null, n = t;
862
- for (; n !== r; ) r = n, n = Ge(e, n), n = Lt(e, n), n = wt(e, n), n = Ue(e, n);
863
- return n;
864
- }
865
- var yt = Mo;
866
- function Ro(e, t) {
867
- let r = yt(e, t);
868
- return r === false ? "" : e.charAt(r);
869
- }
870
- var ge = Ro;
871
- function Jo(e, t, r) {
872
- for (let n = t; n < r; ++n) if (e.charAt(n) === `
873
- `) return true;
874
- return false;
875
- }
876
- var de = Jo;
877
- function qo(e) {
878
- return re(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value);
879
- }
880
- var ku = qo;
881
- function Wo(e) {
882
- return [Mu, Lu, _u, ep, Xo, Yn, Hn, Iu, wu, sp, rp, $n, vu, up, Ou, ju, Vn, Yo, yp].some((t) => t(e));
883
- }
884
- function Go(e) {
885
- return [No, _u, Lu, vu, Yn, Hn, Iu, wu, ju, tp, np, $n, op, Vn, lp, mp].some((t) => t(e));
886
- }
887
- function Uo(e) {
888
- return [Mu, Yn, Hn, Ho, Zo, Ou, $n, Qo, zo, cp, Vn, pp].some((t) => t(e));
889
- }
890
- function bt(e, t) {
891
- let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement");
892
- r ? ce(r, t) : Le(e, t);
893
- }
894
- function Xn(e, t) {
895
- e.type === "BlockStatement" ? bt(e, t) : ce(e, t);
896
- }
897
- function No({ comment: e, followingNode: t }) {
898
- return t && ku(e) ? (ce(t, e), true) : false;
899
- }
900
- function Yn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
901
- if ((r == null ? void 0 : r.type) !== "IfStatement" || !n) return false;
902
- if (ge(s, k(e)) === ")") return z(t, e), true;
903
- if (t === r.consequent && n === r.alternate) {
904
- if (t.type === "BlockStatement") z(t, e);
905
- else {
906
- let i = vt(e) || e.loc.start.line === e.loc.end.line, a = e.loc.start.line === t.loc.start.line;
907
- i && a ? z(t, e) : Le(r, e);
908
- }
909
- return true;
910
- }
911
- return n.type === "BlockStatement" ? (bt(n, e), true) : n.type === "IfStatement" ? (Xn(n.consequent, e), true) : r.consequent === n ? (ce(n, e), true) : false;
912
- }
913
- function Hn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
914
- return (r == null ? void 0 : r.type) !== "WhileStatement" || !n ? false : ge(s, k(e)) === ")" ? (z(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : r.body === n ? (ce(n, e), true) : false;
915
- }
916
- function Iu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
917
- return (r == null ? void 0 : r.type) !== "TryStatement" && (r == null ? void 0 : r.type) !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? (z(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : n.type === "TryStatement" ? (Xn(n.finalizer, e), true) : n.type === "CatchClause" ? (Xn(n.body, e), true) : false;
918
- }
919
- function Xo({ comment: e, enclosingNode: t, followingNode: r }) {
920
- return q(t) && (r == null ? void 0 : r.type) === "Identifier" ? (ce(t, e), true) : false;
921
- }
922
- function Yo({ comment: e, enclosingNode: t, followingNode: r, options: n }) {
923
- 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" ? (Le(t, e), true) : false;
924
- }
925
- function Lu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: u }) {
926
- let i = t && !de(s, k(t), R(e));
927
- 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 && !(re(e) && !de(u.originalText, R(e), k(e))) ? (Le(r, e), true) : (ce(n, e), true) : false;
928
- }
929
- function Ho({ comment: e, precedingNode: t, enclosingNode: r }) {
930
- return Ae(r) && r.shorthand && r.key === t && r.value.type === "AssignmentPattern" ? (z(r.value.left, e), true) : false;
931
- }
932
- var Vo = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
933
- function wu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
934
- if (Vo.has(r == null ? void 0 : r.type)) {
935
- if (w(r.decorators) && (n == null ? void 0 : n.type) !== "Decorator") return z(O(false, r.decorators, -1), e), true;
936
- if (r.body && n === r.body) return bt(r.body, e), true;
937
- if (n) {
938
- if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return z(t, e), true;
939
- 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) ? z(t, e) : Le(r, e, s), true;
940
- }
941
- }
942
- return false;
943
- }
944
- var $o = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty"]);
945
- function Ou({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
946
- return r && t && ge(n, k(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && ge(n, k(t)) !== ":" ? (z(t, e), true) : (t == null ? void 0 : t.type) === "Decorator" && $o.has(r == null ? void 0 : r.type) ? (z(t, e), true) : false;
947
- }
948
- var Ko = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
949
- function zo({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
950
- return ge(n, k(e)) !== "(" ? false : t && Ko.has(r == null ? void 0 : r.type) ? (z(t, e), true) : false;
951
- }
952
- function Qo({ comment: e, enclosingNode: t, text: r }) {
953
- if ((t == null ? void 0 : t.type) !== "ArrowFunctionExpression") return false;
954
- let n = yt(r, k(e));
955
- return n !== false && r.slice(n, n + 2) === "=>" ? (Le(t, e), true) : false;
956
- }
957
- function Zo({ comment: e, enclosingNode: t, text: r }) {
958
- return ge(r, k(e)) !== ")" ? false : t && (Ru(t) && K(t).length === 0 || lt(t) && oe(t).length === 0) ? (Le(t, e), true) : ((t == null ? void 0 : t.type) === "MethodDefinition" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && K(t.value).length === 0 ? (Le(t.value, e), true) : false;
959
- }
960
- function ep({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
961
- 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" ? (z(t, e), true) : ((t == null ? void 0 : t.type) === "ComponentParameter" || (t == null ? void 0 : t.type) === "RestElement") && (r == null ? void 0 : r.type) === "ComponentDeclaration" && ge(s, k(e)) === ")" ? (z(t, e), true) : false;
962
- }
963
- function _u({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
964
- return (t == null ? void 0 : t.type) === "FunctionTypeParam" && (r == null ? void 0 : r.type) === "FunctionTypeAnnotation" && (n == null ? void 0 : n.type) !== "FunctionTypeParam" ? (z(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") && Ru(r) && ge(s, k(e)) === ")" ? (z(t, e), true) : !re(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 && yt(s, k(e)) === R(n) ? (bt(n, e), true) : false;
965
- }
966
- function ju({ comment: e, enclosingNode: t }) {
967
- return (t == null ? void 0 : t.type) === "LabeledStatement" ? (ce(t, e), true) : false;
968
- }
969
- function Vn({ comment: e, enclosingNode: t }) {
970
- return ((t == null ? void 0 : t.type) === "ContinueStatement" || (t == null ? void 0 : t.type) === "BreakStatement") && !t.label ? (z(t, e), true) : false;
971
- }
972
- function tp({ comment: e, precedingNode: t, enclosingNode: r }) {
973
- return L(r) && t && r.callee === t && r.arguments.length > 0 ? (ce(r.arguments[0], e), true) : false;
974
- }
975
- function rp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
976
- return Ne(r) ? (sr(e) && (n.prettierIgnore = true, e.unignore = true), t ? (z(t, e), true) : false) : (Ne(n) && sr(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
977
- }
978
- function np({ comment: e, enclosingNode: t }) {
979
- return Ae(t) ? (ce(t, e), true) : false;
980
- }
981
- function $n({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) {
982
- var s;
983
- return ((s = r == null ? void 0 : r.body) == null ? void 0 : s.length) === 0 ? (n ? Le(r, e) : ce(r, e), true) : (t == null ? void 0 : t.type) === "Program" && t.body.length === 0 && !w(t.directives) ? (n ? Le(t, e) : ce(t, e), true) : false;
984
- }
985
- function sp({ comment: e, enclosingNode: t }) {
986
- return (t == null ? void 0 : t.type) === "ForInStatement" || (t == null ? void 0 : t.type) === "ForOfStatement" ? (ce(t, e), true) : false;
987
- }
988
- function vu({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
989
- if ((r == null ? void 0 : r.type) === "ImportSpecifier" || (r == null ? void 0 : r.type) === "ExportSpecifier") return ce(r, e), true;
990
- 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";
991
- return (s || u) && te(n, k(e)) ? (z(t, e), true) : false;
992
- }
993
- function up({ comment: e, enclosingNode: t }) {
994
- return (t == null ? void 0 : t.type) === "AssignmentPattern" ? (ce(t, e), true) : false;
995
- }
996
- var ip = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
997
- var ap = /* @__PURE__ */ new Set(["ObjectExpression", "RecordExpression", "ArrayExpression", "TupleExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
998
- function op({ comment: e, enclosingNode: t, followingNode: r }) {
999
- return ip.has(t == null ? void 0 : t.type) && r && (ap.has(r.type) || re(e)) ? (ce(r, e), true) : false;
1000
- }
1001
- function pp({ comment: e, enclosingNode: t, followingNode: r, text: n }) {
1002
- return !r && ((t == null ? void 0 : t.type) === "TSMethodSignature" || (t == null ? void 0 : t.type) === "TSDeclareFunction" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && ge(n, k(e)) === ";" ? (z(t, e), true) : false;
1003
- }
1004
- function Mu({ comment: e, enclosingNode: t, followingNode: r }) {
1005
- if (sr(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;
1006
- }
1007
- function cp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1008
- return (r == null ? void 0 : r.type) !== "TSMappedType" ? false : (n == null ? void 0 : n.type) === "TSTypeParameter" && n.name ? (ce(n.name, e), true) : (t == null ? void 0 : t.type) === "TSTypeParameter" && t.constraint ? (z(t.constraint, e), true) : false;
1009
- }
1010
- function lp({ comment: e, enclosingNode: t, followingNode: r }) {
1011
- return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? false : (r.type === "BlockStatement" && vt(e) ? bt(r, e) : Le(t, e), true);
1012
- }
1013
- function mp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1014
- return Ne(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || _r(r)) ? (z(O(false, t.types, -1), e), true) : false;
1015
- }
1016
- function yp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) {
1017
- if (((t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern") && (n == null ? void 0 : n.type) === "TSTypeAnnotation") return r ? z(r, e) : Le(t, e), true;
1018
- }
1019
- var Ru = v(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
1020
- var Dp = /* @__PURE__ */ new Set(["EmptyStatement", "TemplateElement", "Import", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
1021
- function fp(e) {
1022
- return !Dp.has(e.type);
1023
- }
1024
- function Ep(e, t) {
1025
- var r;
1026
- 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" && K(e.value).length === 0 && !e.value.returnType && !w(e.value.typeParameters) && e.value.body) return [...e.decorators || [], e.key, e.value.body];
1027
- }
1028
- function zn(e) {
1029
- let { node: t, parent: r } = e;
1030
- return (X(t) || r && (r.type === "JSXSpreadAttribute" || r.type === "JSXSpreadChild" || Ne(r) || (r.type === "ClassDeclaration" || r.type === "ClassExpression") && r.superClass === t)) && (!Bt(t) || Ne(r));
1031
- }
1032
- function Fp(e, { parser: t }) {
1033
- if (t === "flow" || t === "babel-flow") return e = N(false, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::";
1034
- }
1035
- function Ju(e) {
1036
- switch (e) {
1037
- case "cr":
1038
- return "\r";
1039
- case "crlf":
1040
- return `\r
1041
- `;
1042
- default:
1043
- return `
1044
- `;
1045
- }
1046
- }
1047
- var Se = Symbol("MODE_BREAK");
1048
- var at = Symbol("MODE_FLAT");
1049
- var ar = Symbol("cursor");
1050
- function qu() {
1051
- return { value: "", length: 0, queue: [] };
1052
- }
1053
- function Cp(e, t) {
1054
- return Qn(e, { type: "indent" }, t);
1055
- }
1056
- function Ap(e, t, r) {
1057
- return t === Number.NEGATIVE_INFINITY ? e.root || qu() : t < 0 ? Qn(e, { type: "dedent" }, r) : t ? t.type === "root" ? { ...e, root: e } : Qn(e, { type: typeof t == "string" ? "stringAlign" : "numberAlign", n: t }, r) : e;
1058
- }
1059
- function Qn(e, t, r) {
1060
- let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t], s = "", u = 0, i = 0, a = 0;
1061
- for (let p of n) switch (p.type) {
1062
- case "indent":
1063
- m(), r.useTabs ? o(1) : c(r.tabWidth);
1064
- break;
1065
- case "stringAlign":
1066
- m(), s += p.n, u += p.n.length;
1067
- break;
1068
- case "numberAlign":
1069
- i += 1, a += p.n;
1070
- break;
1071
- default:
1072
- throw new Error(`Unexpected type '${p.type}'`);
1073
- }
1074
- return y(), { ...e, value: s, length: u, queue: n };
1075
- function o(p) {
1076
- s += " ".repeat(p), u += r.tabWidth * p;
1077
- }
1078
- function c(p) {
1079
- s += " ".repeat(p), u += p;
1080
- }
1081
- function m() {
1082
- r.useTabs ? D() : y();
1083
- }
1084
- function D() {
1085
- i > 0 && o(i), C();
1086
- }
1087
- function y() {
1088
- a > 0 && c(a), C();
1089
- }
1090
- function C() {
1091
- i = 0, a = 0;
1092
- }
1093
- }
1094
- function Zn(e) {
1095
- let t = 0, r = 0, n = e.length;
1096
- e: for (; n--; ) {
1097
- let s = e[n];
1098
- if (s === ar) {
1099
- r++;
1100
- continue;
1101
- }
1102
- for (let u = s.length - 1; u >= 0; u--) {
1103
- let i = s[u];
1104
- if (i === " " || i === " ") t++;
1105
- else {
1106
- e[n] = s.slice(0, u + 1);
1107
- break e;
1108
- }
1109
- }
1110
- }
1111
- if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(ar);
1112
- return t;
1113
- }
1114
- function Jr(e, t, r, n, s, u) {
1115
- if (r === Number.POSITIVE_INFINITY) return true;
1116
- let i = t.length, a = [e], o = [];
1117
- for (; r >= 0; ) {
1118
- if (a.length === 0) {
1119
- if (i === 0) return true;
1120
- a.push(t[--i]);
1121
- continue;
1122
- }
1123
- let { mode: c, doc: m } = a.pop(), D = ut(m);
1124
- switch (D) {
1125
- case rt:
1126
- o.push(m), r -= et(m);
1127
- break;
1128
- case _e:
1129
- case Pe: {
1130
- let y = D === _e ? m : m.parts;
1131
- for (let C = y.length - 1; C >= 0; C--) a.push({ mode: c, doc: y[C] });
1132
- break;
1133
- }
1134
- case Xe:
1135
- case Ye:
1136
- case He:
1137
- case je:
1138
- a.push({ mode: c, doc: m.contents });
1139
- break;
1140
- case st:
1141
- r += Zn(o);
1142
- break;
1143
- case le: {
1144
- if (u && m.break) return false;
1145
- let y = m.break ? Se : c, C = m.expandedStates && y === Se ? O(false, m.expandedStates, -1) : m.contents;
1146
- a.push({ mode: y, doc: C });
1147
- break;
1148
- }
1149
- case xe: {
1150
- let C = (m.groupId ? s[m.groupId] || at : c) === Se ? m.breakContents : m.flatContents;
1151
- C && a.push({ mode: c, doc: C });
1152
- break;
1153
- }
1154
- case me:
1155
- if (c === Se || m.hard) return true;
1156
- m.soft || (o.push(" "), r--);
1157
- break;
1158
- case Ve:
1159
- n = true;
1160
- break;
1161
- case $e:
1162
- if (n) return false;
1163
- break;
1164
- }
1165
- }
1166
- return false;
1167
- }
1168
- function es(e, t) {
1169
- let r = {}, n = t.printWidth, s = Ju(t.endOfLine), u = 0, i = [{ ind: qu(), mode: Se, doc: e }], a = [], o = false, c = [], m = 0;
1170
- for (Su(e); i.length > 0; ) {
1171
- let { ind: y, mode: C, doc: p } = i.pop();
1172
- switch (ut(p)) {
1173
- case rt: {
1174
- let A = s !== `
1175
- ` ? N(false, p, `
1176
- `, s) : p;
1177
- a.push(A), i.length > 0 && (u += et(A));
1178
- break;
1179
- }
1180
- case _e:
1181
- for (let A = p.length - 1; A >= 0; A--) i.push({ ind: y, mode: C, doc: p[A] });
1182
- break;
1183
- case nt:
1184
- if (m >= 2) throw new Error("There are too many 'cursor' in doc.");
1185
- a.push(ar), m++;
1186
- break;
1187
- case Xe:
1188
- i.push({ ind: Cp(y, t), mode: C, doc: p.contents });
1189
- break;
1190
- case Ye:
1191
- i.push({ ind: Ap(y, p.n, t), mode: C, doc: p.contents });
1192
- break;
1193
- case st:
1194
- u -= Zn(a);
1195
- break;
1196
- case le:
1197
- switch (C) {
1198
- case at:
1199
- if (!o) {
1200
- i.push({ ind: y, mode: p.break ? Se : at, doc: p.contents });
1201
- break;
1202
- }
1203
- case Se: {
1204
- o = false;
1205
- let A = { ind: y, mode: at, doc: p.contents }, T = n - u, S = c.length > 0;
1206
- if (!p.break && Jr(A, i, T, S, r)) i.push(A);
1207
- else if (p.expandedStates) {
1208
- let B = O(false, p.expandedStates, -1);
1209
- if (p.break) {
1210
- i.push({ ind: y, mode: Se, doc: B });
1211
- break;
1212
- } else for (let _ = 1; _ < p.expandedStates.length + 1; _++) if (_ >= p.expandedStates.length) {
1213
- i.push({ ind: y, mode: Se, doc: B });
1214
- break;
1215
- } else {
1216
- let J = p.expandedStates[_], j = { ind: y, mode: at, doc: J };
1217
- if (Jr(j, i, T, S, r)) {
1218
- i.push(j);
1219
- break;
1220
- }
1221
- }
1222
- } else i.push({ ind: y, mode: Se, doc: p.contents });
1223
- break;
1224
- }
1225
- }
1226
- p.id && (r[p.id] = O(false, i, -1).mode);
1227
- break;
1228
- case Pe: {
1229
- let A = n - u, { parts: T } = p;
1230
- if (T.length === 0) break;
1231
- let [S, B] = T, _ = { ind: y, mode: at, doc: S }, J = { ind: y, mode: Se, doc: S }, j = Jr(_, [], A, c.length > 0, r, true);
1232
- if (T.length === 1) {
1233
- j ? i.push(_) : i.push(J);
1234
- break;
1235
- }
1236
- let h = { ind: y, mode: at, doc: B }, W = { ind: y, mode: Se, doc: B };
1237
- if (T.length === 2) {
1238
- j ? i.push(h, _) : i.push(W, J);
1239
- break;
1240
- }
1241
- T.splice(0, 2);
1242
- let Fe = { ind: y, mode: C, doc: qt(T) }, H = T[0];
1243
- Jr({ ind: y, mode: at, doc: [S, B, H] }, [], A, c.length > 0, r, true) ? i.push(Fe, h, _) : j ? i.push(Fe, W, _) : i.push(Fe, W, J);
1244
- break;
1245
- }
1246
- case xe:
1247
- case He: {
1248
- let A = p.groupId ? r[p.groupId] : C;
1249
- if (A === Se) {
1250
- let T = p.type === xe ? p.breakContents : p.negate ? p.contents : f(p.contents);
1251
- T && i.push({ ind: y, mode: C, doc: T });
1252
- }
1253
- if (A === at) {
1254
- let T = p.type === xe ? p.flatContents : p.negate ? f(p.contents) : p.contents;
1255
- T && i.push({ ind: y, mode: C, doc: T });
1256
- }
1257
- break;
1258
- }
1259
- case Ve:
1260
- c.push({ ind: y, mode: C, doc: p.contents });
1261
- break;
1262
- case $e:
1263
- c.length > 0 && i.push({ ind: y, mode: C, doc: Gn });
1264
- break;
1265
- case me:
1266
- switch (C) {
1267
- case at:
1268
- if (p.hard) o = true;
1269
- else {
1270
- p.soft || (a.push(" "), u += 1);
1271
- break;
1272
- }
1273
- case Se:
1274
- if (c.length > 0) {
1275
- i.push({ ind: y, mode: C, doc: p }, ...c.reverse()), c.length = 0;
1276
- break;
1277
- }
1278
- p.literal ? y.root ? (a.push(s, y.root.value), u = y.root.length) : (a.push(s), u = 0) : (u -= Zn(a), a.push(s + y.value), u = y.length);
1279
- break;
1280
- }
1281
- break;
1282
- case je:
1283
- i.push({ ind: y, mode: C, doc: p.contents });
1284
- break;
1285
- case ve:
1286
- break;
1287
- default:
1288
- throw new Ct(p);
1289
- }
1290
- i.length === 0 && c.length > 0 && (i.push(...c.reverse()), c.length = 0);
1291
- }
1292
- let D = a.indexOf(ar);
1293
- if (D !== -1) {
1294
- let y = a.indexOf(ar, D + 1), C = a.slice(0, D).join(""), p = a.slice(D + 1, y).join(""), A = a.slice(y + 1).join("");
1295
- return { formatted: C + p + A, cursorNodeStart: C.length, cursorNodeText: p };
1296
- }
1297
- return { formatted: a.join("") };
1298
- }
1299
- function Tp(e, t, r = 0) {
1300
- let n = 0;
1301
- for (let s = r; s < e.length; ++s) e[s] === " " ? n = n + t - n % t : n++;
1302
- return n;
1303
- }
1304
- var Wu = Tp;
1305
- function dp(e, t) {
1306
- let r = e.lastIndexOf(`
1307
- `);
1308
- return r === -1 ? 0 : Wu(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
1309
- }
1310
- var Gu = dp;
1311
- function qr(e, t, r) {
1312
- let { node: n } = e;
1313
- if (n.type === "TemplateLiteral" && gp(e)) {
1314
- let c = xp(e, r, t);
1315
- if (c) return c;
1316
- }
1317
- let u = "expressions";
1318
- n.type === "TSTemplateLiteralType" && (u = "types");
1319
- let i = [], a = e.map(t, u);
1320
- i.push(ke, "`");
1321
- let o = 0;
1322
- return e.each(({ index: c, node: m }) => {
1323
- if (i.push(t()), m.tail) return;
1324
- let { tabWidth: D } = r, y = m.value.raw, C = y.includes(`
1325
- `) ? Gu(y, D) : o;
1326
- o = C;
1327
- let p = a[c], A = n[u][c], T = de(r.originalText, k(m), R(n.quasis[c + 1]));
1328
- if (!T) {
1329
- let B = es(p, { ...r, printWidth: Number.POSITIVE_INFINITY }).formatted;
1330
- B.includes(`
1331
- `) ? T = true : p = B;
1332
- }
1333
- T && (d(A) || A.type === "Identifier" || q(A) || A.type === "ConditionalExpression" || A.type === "SequenceExpression" || Te(A) || De(A)) && (p = [f([E, p]), E]);
1334
- let S = C === 0 && y.endsWith(`
1335
- `) ? he(Number.NEGATIVE_INFINITY, p) : xu(p, C, D);
1336
- i.push(l(["${", S, ke, "}"]));
1337
- }, "quasis"), i.push("`"), i;
1338
- }
1339
- function Uu(e, t) {
1340
- let r = t("quasi");
1341
- return it(r.label && { tagged: true, ...r.label }, [t("tag"), t(e.node.typeArguments ? "typeArguments" : "typeParameters"), ke, r]);
1342
- }
1343
- function xp(e, t, r) {
1344
- let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);
1345
- if (s.length > 1 || s.some((u) => u.length > 0)) {
1346
- t.__inJestEach = true;
1347
- let u = e.map(r, "expressions");
1348
- t.__inJestEach = false;
1349
- let i = [], a = u.map((y) => "${" + es(y, { ...t, printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" }).formatted + "}"), o = [{ hasLineBreak: false, cells: [] }];
1350
- for (let y = 1; y < n.quasis.length; y++) {
1351
- let C = O(false, o, -1), p = a[y - 1];
1352
- C.cells.push(p), p.includes(`
1353
- `) && (C.hasLineBreak = true), n.quasis[y].value.raw.includes(`
1354
- `) && o.push({ hasLineBreak: false, cells: [] });
1355
- }
1356
- let c = Math.max(s.length, ...o.map((y) => y.cells.length)), m = Array.from({ length: c }).fill(0), D = [{ cells: s }, ...o.filter((y) => y.cells.length > 0)];
1357
- for (let { cells: y } of D.filter((C) => !C.hasLineBreak)) for (let [C, p] of y.entries()) m[C] = Math.max(m[C], et(p));
1358
- return i.push(ke, "`", f([F, P(F, D.map((y) => P(" | ", y.cells.map((C, p) => y.hasLineBreak ? C : C + " ".repeat(m[p] - et(C))))))]), F, "`"), i;
1359
- }
1360
- }
1361
- function hp(e, t) {
1362
- let { node: r } = e, n = t();
1363
- return d(r) && (n = l([f([E, n]), E])), ["${", n, ke, "}"];
1364
- }
1365
- function Gt(e, t) {
1366
- return e.map((r) => hp(r, t), "expressions");
1367
- }
1368
- function Wr(e, t) {
1369
- return mt(e, (r) => typeof r == "string" ? t ? N(false, r, /(\\*)`/gu, "$1$1\\`") : ts(r) : r);
1370
- }
1371
- function ts(e) {
1372
- return N(false, e, /([\\`]|\$\{)/gu, String.raw`\$1`);
1373
- }
1374
- function gp({ node: e, parent: t }) {
1375
- let r = /^[fx]?(?:describe|it|test)$/u;
1376
- 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));
1377
- }
1378
- var ns = [(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"];
1379
- function Nu(e) {
1380
- let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Ae(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value";
1381
- return e.match(t, (n, s) => U(n) && s === "elements", r, ...ns) || e.match(t, r, ...ns);
1382
- }
1383
- function Xu(e) {
1384
- return e.match((t) => t.type === "TemplateLiteral", (t, r) => Ae(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...ns);
1385
- }
1386
- function rs(e, t) {
1387
- return d(e, g.Block | g.Leading, ({ value: r }) => r === ` ${t} `);
1388
- }
1389
- function Gr({ node: e, parent: t }, r) {
1390
- return rs(e, r) || Sp(t) && rs(t, r) || t.type === "ExpressionStatement" && rs(t, r);
1391
- }
1392
- function Sp(e) {
1393
- return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
1394
- }
1395
- async function Bp(e, t, r) {
1396
- let { node: n } = r, s = n.quasis.map((m) => m.value.raw), u = 0, i = s.reduce((m, D, y) => y === 0 ? D : m + "@prettier-placeholder-" + u++ + "-id" + D, ""), a = await e(i, { parser: "scss" }), o = Gt(r, t), c = bp(a, o);
1397
- if (!c) throw new Error("Couldn't insert all the expressions");
1398
- return ["`", f([F, c]), E, "`"];
1399
- }
1400
- function bp(e, t) {
1401
- if (!w(t)) return e;
1402
- let r = 0, n = mt(Wt(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((u, i) => i % 2 === 0 ? Ie(u) : (r++, t[u])));
1403
- return t.length === r ? n : null;
1404
- }
1405
- function Pp({ node: e, parent: t, grandparent: r }) {
1406
- 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");
1407
- }
1408
- function Ur(e) {
1409
- return e.type === "Identifier" && e.name === "styled";
1410
- }
1411
- function Yu(e) {
1412
- return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend";
1413
- }
1414
- function kp({ parent: e }) {
1415
- if (!e || e.type !== "TaggedTemplateExpression") return false;
1416
- let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag;
1417
- switch (t.type) {
1418
- case "MemberExpression":
1419
- return Ur(t.object) || Yu(t);
1420
- case "CallExpression":
1421
- return Ur(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (Ur(t.callee.object.object) || Yu(t.callee.object)) || t.callee.object.type === "CallExpression" && Ur(t.callee.object.callee));
1422
- case "Identifier":
1423
- return t.name === "css";
1424
- default:
1425
- return false;
1426
- }
1427
- }
1428
- function Ip({ parent: e, grandparent: t }) {
1429
- return (t == null ? void 0 : t.type) === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
1430
- }
1431
- function Lp(e) {
1432
- if (Pp(e) || kp(e) || Ip(e) || Nu(e)) return Bp;
1433
- }
1434
- var Hu = Lp;
1435
- async function wp(e, t, r) {
1436
- let { node: n } = r, s = n.quasis.length, u = Gt(r, t), i = [];
1437
- for (let a = 0; a < s; a++) {
1438
- let o = n.quasis[a], c = a === 0, m = a === s - 1, D = o.value.cooked, y = D.split(`
1439
- `), C = y.length, p = u[a], A = C > 2 && y[0].trim() === "" && y[1].trim() === "", T = C > 2 && y[C - 1].trim() === "" && y[C - 2].trim() === "", S = y.every((_) => /^\s*(?:#[^\n\r]*)?$/u.test(_));
1440
- if (!m && /#[^\n\r]*$/u.test(y[C - 1])) return null;
1441
- let B = null;
1442
- S ? B = Op(y) : B = await e(D, { parser: "graphql" }), B ? (B = Wr(B, false), !c && A && i.push(""), i.push(B), !m && T && i.push("")) : !c && !m && A && i.push(""), p && i.push(p);
1443
- }
1444
- return ["`", f([F, P(F, i)]), F, "`"];
1445
- }
1446
- function Op(e) {
1447
- let t = [], r = false, n = e.map((s) => s.trim());
1448
- for (let [s, u] of n.entries()) u !== "" && (n[s - 1] === "" && r ? t.push([F, u]) : t.push(u), r = true);
1449
- return t.length === 0 ? null : P(F, t);
1450
- }
1451
- function _p({ node: e, parent: t }) {
1452
- return Gr({ 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");
1453
- }
1454
- function jp(e) {
1455
- if (_p(e)) return wp;
1456
- }
1457
- var Vu = jp;
1458
- var ss = 0;
1459
- async function $u(e, t, r, n, s) {
1460
- let { node: u } = n, i = ss;
1461
- ss = ss + 1 >>> 0;
1462
- let a = (S) => `PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`, o = u.quasis.map((S, B, _) => B === _.length - 1 ? S.value.cooked : S.value.cooked + a(B)).join(""), c = Gt(n, r), m = new RegExp(a(String.raw`(\d+)`), "gu"), D = 0, y = await t(o, { parser: e, __onHtmlRoot(S) {
1463
- D = S.children.length;
1464
- } }), C = mt(y, (S) => {
1465
- if (typeof S != "string") return S;
1466
- let B = [], _ = S.split(m);
1467
- for (let J = 0; J < _.length; J++) {
1468
- let j = _[J];
1469
- if (J % 2 === 0) {
1470
- j && (j = ts(j), s.__embeddedInHtml && (j = N(false, j, /<\/(?=script\b)/giu, String.raw`<\/`)), B.push(j));
1471
- continue;
1472
- }
1473
- let h = Number(j);
1474
- B.push(c[h]);
1475
- }
1476
- return B;
1477
- }), p = /^\s/u.test(o) ? " " : "", A = /\s$/u.test(o) ? " " : "", T = s.htmlWhitespaceSensitivity === "ignore" ? F : p && A ? x : null;
1478
- return T ? l(["`", f([T, l(C)]), T, "`"]) : it({ hug: false }, l(["`", p, D > 1 ? f(l(C)) : l(C), A, "`"]));
1479
- }
1480
- function vp(e) {
1481
- return Gr(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
1482
- }
1483
- var Mp = $u.bind(void 0, "html");
1484
- var Rp = $u.bind(void 0, "angular");
1485
- function Jp(e) {
1486
- if (vp(e)) return Mp;
1487
- if (Xu(e)) return Rp;
1488
- }
1489
- var Ku = Jp;
1490
- async function qp(e, t, r) {
1491
- let { node: n } = r, s = N(false, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (o, c) => "\\".repeat(c.length / 2) + "`"), u = Wp(s), i = u !== "";
1492
- i && (s = N(false, s, new RegExp(`^${u}`, "gmu"), ""));
1493
- let a = Wr(await e(s, { parser: "markdown", __inJsTemplate: true }), true);
1494
- return ["`", i ? f([E, a]) : [Rr, du(a)], E, "`"];
1495
- }
1496
- function Wp(e) {
1497
- let t = e.match(/^([^\S\n]*)\S/mu);
1498
- return t === null ? "" : t[1];
1499
- }
1500
- function Gp(e) {
1501
- if (Up(e)) return qp;
1502
- }
1503
- function Up({ node: e, parent: t }) {
1504
- return (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
1505
- }
1506
- var zu = Gp;
1507
- function Np(e) {
1508
- let { node: t } = e;
1509
- if (t.type !== "TemplateLiteral" || Xp(t)) return;
1510
- let r;
1511
- for (let n of [Hu, Vu, Ku, zu]) if (r = n(e), !!r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : async (...s) => {
1512
- let u = await r(...s);
1513
- return u && it({ embed: true, ...u.label }, u);
1514
- };
1515
- }
1516
- function Xp({ quasis: e }) {
1517
- return e.some(({ value: { cooked: t } }) => t === null);
1518
- }
1519
- var Qu = Np;
1520
- var Yp = /\*\/$/;
1521
- var Hp = /^\/\*\*?/;
1522
- var ri = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
1523
- var Vp = /(^|\s+)\/\/([^\n\r]*)/g;
1524
- var Zu = /^(\r?\n)+/;
1525
- var $p = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
1526
- var ei = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
1527
- var Kp = /(\r?\n|^) *\* ?/g;
1528
- var ni = [];
1529
- function si(e) {
1530
- let t = e.match(ri);
1531
- return t ? t[0].trimStart() : "";
1532
- }
1533
- function ui(e) {
1534
- let t = e.match(ri), r = t == null ? void 0 : t[0];
1535
- return r == null ? e : e.slice(r.length);
1536
- }
1537
- function ii(e) {
1538
- let t = `
1539
- `;
1540
- e = N(false, e.replace(Hp, "").replace(Yp, ""), Kp, "$1");
1541
- let r = "";
1542
- for (; r !== e; ) r = e, e = N(false, e, $p, `${t}$1 $2${t}`);
1543
- e = e.replace(Zu, "").trimEnd();
1544
- let n = /* @__PURE__ */ Object.create(null), s = N(false, e, ei, "").replace(Zu, "").trimEnd(), u;
1545
- for (; u = ei.exec(e); ) {
1546
- let i = N(false, u[2], Vp, "");
1547
- if (typeof n[u[1]] == "string" || Array.isArray(n[u[1]])) {
1548
- let a = n[u[1]];
1549
- n[u[1]] = [...ni, ...Array.isArray(a) ? a : [a], i];
1550
- } else n[u[1]] = i;
1551
- }
1552
- return { comments: s, pragmas: n };
1553
- }
1554
- function ai({ comments: e = "", pragmas: t = {} }) {
1555
- let r = `
1556
- `, n = "/**", s = " *", u = " */", i = Object.keys(t), a = i.flatMap((c) => ti(c, t[c])).map((c) => `${s} ${c}${r}`).join("");
1557
- if (!e) {
1558
- if (i.length === 0) return "";
1559
- if (i.length === 1 && !Array.isArray(t[i[0]])) {
1560
- let c = t[i[0]];
1561
- return `${n} ${ti(i[0], c)[0]}${u}`;
1562
- }
1563
- }
1564
- let o = e.split(r).map((c) => `${s} ${c}`).join(r) + r;
1565
- return n + r + (e ? o : "") + (e && i.length > 0 ? s + r : "") + a + u;
1566
- }
1567
- function ti(e, t) {
1568
- return [...ni, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim());
1569
- }
1570
- function zp(e) {
1571
- if (!e.startsWith("#!")) return "";
1572
- let t = e.indexOf(`
1573
- `);
1574
- return t === -1 ? e : e.slice(0, t);
1575
- }
1576
- var oi = zp;
1577
- function Qp(e) {
1578
- let t = oi(e);
1579
- t && (e = e.slice(t.length + 1));
1580
- let r = si(e), { pragmas: n, comments: s } = ii(r);
1581
- return { shebang: t, text: e, pragmas: n, comments: s };
1582
- }
1583
- function pi(e) {
1584
- let { shebang: t, text: r, pragmas: n, comments: s } = Qp(e), u = ui(r), i = ai({ pragmas: { format: "", ...n }, comments: s.trimStart() });
1585
- return (t ? `${t}
1586
- ` : "") + i + (u.startsWith(`
1587
- `) ? `
1588
- ` : `
1589
-
1590
- `) + u;
1591
- }
1592
- function Zp(e, t) {
1593
- let { originalText: r, [Symbol.for("comments")]: n, locStart: s, locEnd: u, [Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), c = u(a);
1594
- for (let m of n) s(m) >= o && u(m) <= c && i.add(m);
1595
- return r.slice(o, c);
1596
- }
1597
- var ci = Zp;
1598
- function us(e, t) {
1599
- var u, i, a, o, c, m, D, y, C;
1600
- if (e.isRoot) return false;
1601
- let { node: r, key: n, parent: s } = e;
1602
- if (t.__isInHtmlInterpolation && !t.bracketSpacing && nc(r) && or(e)) return true;
1603
- if (ec(r)) return false;
1604
- if (r.type === "Identifier") {
1605
- 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;
1606
- if (r.name === "let") {
1607
- let p = (i = e.findAncestor((A) => A.type === "ForOfStatement")) == null ? void 0 : i.left;
1608
- if (p && ie(p, (A) => A === r)) return true;
1609
- }
1610
- if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
1611
- let p = e.findAncestor((T) => T.type === "ExpressionStatement" || T.type === "ForStatement" || T.type === "ForInStatement"), A = p ? p.type === "ExpressionStatement" ? p.expression : p.type === "ForStatement" ? p.init : p.left : void 0;
1612
- if (A && ie(A, (T) => T === r)) return true;
1613
- }
1614
- if (n === "expression") switch (r.name) {
1615
- case "await":
1616
- case "interface":
1617
- case "module":
1618
- case "using":
1619
- case "yield":
1620
- case "let":
1621
- case "component":
1622
- case "hook":
1623
- case "type": {
1624
- let p = e.findAncestor((A) => !Te(A));
1625
- if (p !== s && p.type === "ExpressionStatement") return true;
1626
- }
1627
- }
1628
- return false;
1629
- }
1630
- if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
1631
- let p = (a = e.findAncestor((A) => A.type === "ExpressionStatement")) == null ? void 0 : a.expression;
1632
- if (p && ie(p, (A) => A === r)) return true;
1633
- }
1634
- if (r.type === "ObjectExpression") {
1635
- let p = (o = e.findAncestor((A) => A.type === "ArrowFunctionExpression")) == null ? void 0 : o.body;
1636
- if (p && p.type !== "SequenceExpression" && p.type !== "AssignmentExpression" && ie(p, (A) => A === r)) return true;
1637
- }
1638
- switch (s.type) {
1639
- case "ParenthesizedExpression":
1640
- return false;
1641
- case "ClassDeclaration":
1642
- case "ClassExpression":
1643
- 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" && w(r.decorators))) return true;
1644
- break;
1645
- case "ExportDefaultDeclaration":
1646
- return li(e, t) || r.type === "SequenceExpression";
1647
- case "Decorator":
1648
- if (n === "expression" && !uc(r)) return true;
1649
- break;
1650
- case "TypeAnnotation":
1651
- if (e.match(void 0, void 0, (p, A) => A === "returnType" && p.type === "ArrowFunctionExpression") && rc(r)) return true;
1652
- break;
1653
- case "BinaryExpression":
1654
- if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
1655
- break;
1656
- case "VariableDeclarator":
1657
- if (n === "init" && e.match(void 0, void 0, (p, A) => A === "declarations" && p.type === "VariableDeclaration", (p, A) => A === "left" && p.type === "ForInStatement")) return true;
1658
- break;
1659
- }
1660
- switch (r.type) {
1661
- case "UpdateExpression":
1662
- if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-");
1663
- case "UnaryExpression":
1664
- switch (s.type) {
1665
- case "UnaryExpression":
1666
- return r.operator === s.operator && (r.operator === "+" || r.operator === "-");
1667
- case "BindExpression":
1668
- return true;
1669
- case "MemberExpression":
1670
- case "OptionalMemberExpression":
1671
- return n === "object";
1672
- case "TaggedTemplateExpression":
1673
- return true;
1674
- case "NewExpression":
1675
- case "CallExpression":
1676
- case "OptionalCallExpression":
1677
- return n === "callee";
1678
- case "BinaryExpression":
1679
- return n === "left" && s.operator === "**";
1680
- case "TSNonNullExpression":
1681
- return true;
1682
- default:
1683
- return false;
1684
- }
1685
- case "BinaryExpression":
1686
- if (s.type === "UpdateExpression" || r.operator === "in" && tc(e)) return true;
1687
- if (r.operator === "|>" && ((c = r.extra) != null && c.parenthesized)) {
1688
- let p = e.grandparent;
1689
- if (p.type === "BinaryExpression" && p.operator === "|>") return true;
1690
- }
1691
- case "TSTypeAssertion":
1692
- case "TSAsExpression":
1693
- case "TSSatisfiesExpression":
1694
- case "AsExpression":
1695
- case "AsConstExpression":
1696
- case "SatisfiesExpression":
1697
- case "LogicalExpression":
1698
- switch (s.type) {
1699
- case "TSAsExpression":
1700
- case "TSSatisfiesExpression":
1701
- case "AsExpression":
1702
- case "AsConstExpression":
1703
- case "SatisfiesExpression":
1704
- return !Te(r);
1705
- case "ConditionalExpression":
1706
- return Te(r) || au(r);
1707
- case "CallExpression":
1708
- case "NewExpression":
1709
- case "OptionalCallExpression":
1710
- return n === "callee";
1711
- case "ClassExpression":
1712
- case "ClassDeclaration":
1713
- return n === "superClass";
1714
- case "TSTypeAssertion":
1715
- case "TaggedTemplateExpression":
1716
- case "UnaryExpression":
1717
- case "JSXSpreadAttribute":
1718
- case "SpreadElement":
1719
- case "BindExpression":
1720
- case "AwaitExpression":
1721
- case "TSNonNullExpression":
1722
- case "UpdateExpression":
1723
- return true;
1724
- case "MemberExpression":
1725
- case "OptionalMemberExpression":
1726
- return n === "object";
1727
- case "AssignmentExpression":
1728
- case "AssignmentPattern":
1729
- return n === "left" && (r.type === "TSTypeAssertion" || Te(r));
1730
- case "LogicalExpression":
1731
- if (r.type === "LogicalExpression") return s.operator !== r.operator;
1732
- case "BinaryExpression": {
1733
- let { operator: p, type: A } = r;
1734
- if (!p && A !== "TSTypeAssertion") return true;
1735
- let T = er(p), S = s.operator, B = er(S);
1736
- return B > T || n === "right" && B === T || B === T && !nr(S, p) ? true : B < T && p === "%" ? S === "+" || S === "-" : !!yu(S);
1737
- }
1738
- default:
1739
- return false;
1740
- }
1741
- case "SequenceExpression":
1742
- switch (s.type) {
1743
- case "ReturnStatement":
1744
- return false;
1745
- case "ForStatement":
1746
- return false;
1747
- case "ExpressionStatement":
1748
- return n !== "expression";
1749
- case "ArrowFunctionExpression":
1750
- return n !== "body";
1751
- default:
1752
- return true;
1753
- }
1754
- case "YieldExpression":
1755
- if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return true;
1756
- case "AwaitExpression":
1757
- switch (s.type) {
1758
- case "TaggedTemplateExpression":
1759
- case "UnaryExpression":
1760
- case "LogicalExpression":
1761
- case "SpreadElement":
1762
- case "TSAsExpression":
1763
- case "TSSatisfiesExpression":
1764
- case "TSNonNullExpression":
1765
- case "AsExpression":
1766
- case "AsConstExpression":
1767
- case "SatisfiesExpression":
1768
- case "BindExpression":
1769
- return true;
1770
- case "MemberExpression":
1771
- case "OptionalMemberExpression":
1772
- return n === "object";
1773
- case "NewExpression":
1774
- case "CallExpression":
1775
- case "OptionalCallExpression":
1776
- return n === "callee";
1777
- case "ConditionalExpression":
1778
- return n === "test";
1779
- case "BinaryExpression":
1780
- return !(!r.argument && s.operator === "|>");
1781
- default:
1782
- return false;
1783
- }
1784
- case "TSFunctionType":
1785
- if (e.match((p) => p.type === "TSFunctionType", (p, A) => A === "typeAnnotation" && p.type === "TSTypeAnnotation", (p, A) => A === "returnType" && p.type === "ArrowFunctionExpression")) return true;
1786
- case "TSConditionalType":
1787
- case "TSConstructorType":
1788
- if (n === "extendsType" && s.type === "TSConditionalType") {
1789
- if (r.type === "TSConditionalType") return true;
1790
- let { typeAnnotation: p } = r.returnType || r.typeAnnotation;
1791
- if (p.type === "TSTypePredicate" && p.typeAnnotation && (p = p.typeAnnotation.typeAnnotation), p.type === "TSInferType" && p.typeParameter.constraint) return true;
1792
- }
1793
- if (n === "checkType" && s.type === "TSConditionalType") return true;
1794
- case "TSUnionType":
1795
- case "TSIntersectionType":
1796
- if ((s.type === "TSUnionType" || s.type === "TSIntersectionType") && s.types.length > 1 && (!r.types || r.types.length > 1)) return true;
1797
- case "TSInferType":
1798
- if (r.type === "TSInferType") {
1799
- if (s.type === "TSRestType") return false;
1800
- if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return true;
1801
- }
1802
- case "TSTypeOperator":
1803
- 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");
1804
- case "TSTypeQuery":
1805
- return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType";
1806
- case "TypeOperator":
1807
- return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator";
1808
- case "TypeofTypeAnnotation":
1809
- return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation";
1810
- case "ArrayTypeAnnotation":
1811
- return s.type === "NullableTypeAnnotation";
1812
- case "IntersectionTypeAnnotation":
1813
- case "UnionTypeAnnotation":
1814
- return s.type === "TypeOperator" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1815
- case "InferTypeAnnotation":
1816
- case "NullableTypeAnnotation":
1817
- return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1818
- case "ComponentTypeAnnotation":
1819
- case "FunctionTypeAnnotation": {
1820
- if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return false;
1821
- if (e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression") || e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypePredicate", (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression")) return true;
1822
- let p = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
1823
- return p.type === "UnionTypeAnnotation" || p.type === "IntersectionTypeAnnotation" || p.type === "ArrayTypeAnnotation" || n === "objectType" && (p.type === "IndexedAccessType" || p.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && ((m = r.returnType) == null ? void 0 : m.type) === "InferTypeAnnotation" && ((D = r.returnType) == null ? void 0 : D.typeParameter.bound) || p.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && K(r).some((A) => {
1824
- var T;
1825
- return ((T = A.typeAnnotation) == null ? void 0 : T.type) === "NullableTypeAnnotation";
1826
- });
1827
- }
1828
- case "ConditionalTypeAnnotation":
1829
- if (n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.type === "ConditionalTypeAnnotation" || n === "checkType" && s.type === "ConditionalTypeAnnotation") return true;
1830
- case "OptionalIndexedAccessType":
1831
- return n === "objectType" && s.type === "IndexedAccessType";
1832
- case "StringLiteral":
1833
- case "NumericLiteral":
1834
- case "Literal":
1835
- if (typeof r.value == "string" && s.type === "ExpressionStatement" && !s.directive) {
1836
- let p = e.grandparent;
1837
- return p.type === "Program" || p.type === "BlockStatement";
1838
- }
1839
- return n === "object" && s.type === "MemberExpression" && typeof r.value == "number";
1840
- case "AssignmentExpression": {
1841
- let p = e.grandparent;
1842
- 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" && p.type === "ForStatement" && (p.init === s || p.update === s) || n === "value" && s.type === "Property" && p.type === "ObjectPattern" && p.properties.includes(s) || s.type === "NGChainedExpression");
1843
- }
1844
- case "ConditionalExpression":
1845
- switch (s.type) {
1846
- case "TaggedTemplateExpression":
1847
- case "UnaryExpression":
1848
- case "SpreadElement":
1849
- case "BinaryExpression":
1850
- case "LogicalExpression":
1851
- case "NGPipeExpression":
1852
- case "ExportDefaultDeclaration":
1853
- case "AwaitExpression":
1854
- case "JSXSpreadAttribute":
1855
- case "TSTypeAssertion":
1856
- case "TypeCastExpression":
1857
- case "TSAsExpression":
1858
- case "TSSatisfiesExpression":
1859
- case "AsExpression":
1860
- case "AsConstExpression":
1861
- case "SatisfiesExpression":
1862
- case "TSNonNullExpression":
1863
- return true;
1864
- case "NewExpression":
1865
- case "CallExpression":
1866
- case "OptionalCallExpression":
1867
- return n === "callee";
1868
- case "ConditionalExpression":
1869
- return t.experimentalTernaries ? false : n === "test";
1870
- case "MemberExpression":
1871
- case "OptionalMemberExpression":
1872
- return n === "object";
1873
- default:
1874
- return false;
1875
- }
1876
- case "FunctionExpression":
1877
- switch (s.type) {
1878
- case "NewExpression":
1879
- case "CallExpression":
1880
- case "OptionalCallExpression":
1881
- return n === "callee";
1882
- case "TaggedTemplateExpression":
1883
- return true;
1884
- default:
1885
- return false;
1886
- }
1887
- case "ArrowFunctionExpression":
1888
- switch (s.type) {
1889
- case "BinaryExpression":
1890
- return s.operator !== "|>" || ((y = r.extra) == null ? void 0 : y.parenthesized);
1891
- case "NewExpression":
1892
- case "CallExpression":
1893
- case "OptionalCallExpression":
1894
- return n === "callee";
1895
- case "MemberExpression":
1896
- case "OptionalMemberExpression":
1897
- return n === "object";
1898
- case "TSAsExpression":
1899
- case "TSSatisfiesExpression":
1900
- case "AsExpression":
1901
- case "AsConstExpression":
1902
- case "SatisfiesExpression":
1903
- case "TSNonNullExpression":
1904
- case "BindExpression":
1905
- case "TaggedTemplateExpression":
1906
- case "UnaryExpression":
1907
- case "LogicalExpression":
1908
- case "AwaitExpression":
1909
- case "TSTypeAssertion":
1910
- return true;
1911
- case "ConditionalExpression":
1912
- return n === "test";
1913
- default:
1914
- return false;
1915
- }
1916
- case "ClassExpression":
1917
- switch (s.type) {
1918
- case "NewExpression":
1919
- return n === "callee";
1920
- default:
1921
- return false;
1922
- }
1923
- case "OptionalMemberExpression":
1924
- case "OptionalCallExpression":
1925
- case "CallExpression":
1926
- case "MemberExpression":
1927
- if (sc(e)) return true;
1928
- case "TaggedTemplateExpression":
1929
- case "TSNonNullExpression":
1930
- if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) {
1931
- let p = r;
1932
- for (; p; ) switch (p.type) {
1933
- case "CallExpression":
1934
- case "OptionalCallExpression":
1935
- return true;
1936
- case "MemberExpression":
1937
- case "OptionalMemberExpression":
1938
- case "BindExpression":
1939
- p = p.object;
1940
- break;
1941
- case "TaggedTemplateExpression":
1942
- p = p.tag;
1943
- break;
1944
- case "TSNonNullExpression":
1945
- p = p.expression;
1946
- break;
1947
- default:
1948
- return false;
1949
- }
1950
- }
1951
- return false;
1952
- case "BindExpression":
1953
- return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && q(s);
1954
- case "NGPipeExpression":
1955
- return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !((C = r.extra) != null && C.parenthesized) || U(s) || n === "arguments" && L(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression");
1956
- case "JSXFragment":
1957
- case "JSXElement":
1958
- return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !U(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) && !Ae(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression";
1959
- case "TSInstantiationExpression":
1960
- return n === "object" && q(s);
1961
- }
1962
- return false;
1963
- }
1964
- var ec = v(["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"]);
1965
- function tc(e) {
1966
- let t = 0, { node: r } = e;
1967
- for (; r; ) {
1968
- let n = e.getParentNode(t++);
1969
- if ((n == null ? void 0 : n.type) === "ForStatement" && n.init === r) return true;
1970
- r = n;
1971
- }
1972
- return false;
1973
- }
1974
- function rc(e) {
1975
- return tr(e, (t) => t.type === "ObjectTypeAnnotation" && tr(t, (r) => r.type === "FunctionTypeAnnotation"));
1976
- }
1977
- function nc(e) {
1978
- return se(e);
1979
- }
1980
- function or(e) {
1981
- let { parent: t, key: r } = e;
1982
- switch (t.type) {
1983
- case "NGPipeExpression":
1984
- if (r === "arguments" && e.isLast) return e.callParent(or);
1985
- break;
1986
- case "ObjectProperty":
1987
- if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast);
1988
- break;
1989
- case "BinaryExpression":
1990
- case "LogicalExpression":
1991
- if (r === "right") return e.callParent(or);
1992
- break;
1993
- case "ConditionalExpression":
1994
- if (r === "alternate") return e.callParent(or);
1995
- break;
1996
- case "UnaryExpression":
1997
- if (t.prefix) return e.callParent(or);
1998
- break;
1999
- }
2000
- return false;
2001
- }
2002
- function li(e, t) {
2003
- let { node: r, parent: n } = e;
2004
- return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !us(e, t) : !jt(r) || n.type !== "ExportDefaultDeclaration" && us(e, t) ? false : e.call(() => li(e, t), ...Pr(r));
2005
- }
2006
- function sc(e) {
2007
- let { node: t, parent: r, grandparent: n, key: s } = e;
2008
- return !!((t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression") && (s === "object" && r.type === "MemberExpression" || s === "callee" && (r.type === "CallExpression" || r.type === "NewExpression") || r.type === "TSNonNullExpression" && n.type === "MemberExpression" && n.object === r) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "ChainExpression") && (e.match(void 0, void 0, (u, i) => i === "callee" && (u.type === "CallExpression" && !u.optional || u.type === "NewExpression") || i === "object" && u.type === "MemberExpression" && !u.optional) || e.match(void 0, void 0, (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "object" && u.type === "MemberExpression")) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "expression" && u.type === "ChainExpression", (u, i) => i === "object" && u.type === "MemberExpression"));
2009
- }
2010
- function is(e) {
2011
- return e.type === "Identifier" ? true : q(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && is(e.object) : false;
2012
- }
2013
- function uc(e) {
2014
- return e.type === "ChainExpression" && (e = e.expression), is(e) || L(e) && !e.optional && is(e.callee);
2015
- }
2016
- var Be = us;
2017
- function ic(e, t) {
2018
- let r = t - 1;
2019
- r = Ge(e, r, { backwards: true }), r = Ue(e, r, { backwards: true }), r = Ge(e, r, { backwards: true });
2020
- let n = Ue(e, r, { backwards: true });
2021
- return r !== n;
2022
- }
2023
- var mi = ic;
2024
- var ac = () => true;
2025
- function as(e, t) {
2026
- let r = e.node;
2027
- return r.printed = true, t.printer.printComment(e, t);
2028
- }
2029
- function oc(e, t) {
2030
- var m;
2031
- let r = e.node, n = [as(e, t)], { printer: s, originalText: u, locStart: i, locEnd: a } = t;
2032
- if ((m = s.isBlockComment) == null ? void 0 : m.call(s, r)) {
2033
- let D = te(u, a(r)) ? te(u, i(r), { backwards: true }) ? F : x : " ";
2034
- n.push(D);
2035
- } else n.push(F);
2036
- let c = Ue(u, Ge(u, a(r)));
2037
- return c !== false && te(u, c) && n.push(F), n;
2038
- }
2039
- function pc(e, t, r) {
2040
- var c;
2041
- let n = e.node, s = as(e, t), { printer: u, originalText: i, locStart: a } = t, o = (c = u.isBlockComment) == null ? void 0 : c.call(u, n);
2042
- if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || te(i, a(n), { backwards: true })) {
2043
- let m = mi(i, a(n));
2044
- return { doc: Wn([F, m ? F : "", s]), isBlock: o, hasLineSuffix: true };
2045
- }
2046
- return !o || r != null && r.hasLineSuffix ? { doc: [Wn([" ", s]), Ee], isBlock: o, hasLineSuffix: true } : { doc: [" ", s], isBlock: o, hasLineSuffix: false };
2047
- }
2048
- function M(e, t, r = {}) {
2049
- let { node: n } = e;
2050
- if (!w(n == null ? void 0 : n.comments)) return "";
2051
- let { indent: s = false, marker: u, filter: i = ac } = r, a = [];
2052
- if (e.each(({ node: c }) => {
2053
- c.leading || c.trailing || c.marker !== u || !i(c) || a.push(as(e, t));
2054
- }, "comments"), a.length === 0) return "";
2055
- let o = P(F, a);
2056
- return s ? f([F, o]) : o;
2057
- }
2058
- function os(e, t) {
2059
- let r = e.node;
2060
- if (!r) return {};
2061
- let n = t[Symbol.for("printedComments")];
2062
- if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
2063
- let u = [], i = [], a;
2064
- return e.each(() => {
2065
- let o = e.node;
2066
- if (n != null && n.has(o)) return;
2067
- let { leading: c, trailing: m } = o;
2068
- c ? u.push(oc(e, t)) : m && (a = pc(e, t, a), i.push(a.doc));
2069
- }, "comments"), { leading: u, trailing: i };
2070
- }
2071
- function ye(e, t, r) {
2072
- let { leading: n, trailing: s } = os(e, r);
2073
- return !n && !s ? t : ir(t, (u) => [n, u, s]);
2074
- }
2075
- var ps = class extends Error {
2076
- name = "UnexpectedNodeError";
2077
- constructor(t, r, n = "type") {
2078
- super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t;
2079
- }
2080
- };
2081
- var Me = ps;
2082
- function cs(e) {
2083
- if (typeof e != "string") throw new TypeError("Expected a string");
2084
- return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2085
- }
2086
- var Re;
2087
- var ls = class {
2088
- constructor(t) {
2089
- Ws(this, Re);
2090
- Gs(this, Re, new Set(t));
2091
- }
2092
- getLeadingWhitespaceCount(t) {
2093
- let r = pt(this, Re), n = 0;
2094
- for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++;
2095
- return n;
2096
- }
2097
- getTrailingWhitespaceCount(t) {
2098
- let r = pt(this, Re), n = 0;
2099
- for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++;
2100
- return n;
2101
- }
2102
- getLeadingWhitespace(t) {
2103
- let r = this.getLeadingWhitespaceCount(t);
2104
- return t.slice(0, r);
2105
- }
2106
- getTrailingWhitespace(t) {
2107
- let r = this.getTrailingWhitespaceCount(t);
2108
- return t.slice(t.length - r);
2109
- }
2110
- hasLeadingWhitespace(t) {
2111
- return pt(this, Re).has(t.charAt(0));
2112
- }
2113
- hasTrailingWhitespace(t) {
2114
- return pt(this, Re).has(O(false, t, -1));
2115
- }
2116
- trimStart(t) {
2117
- let r = this.getLeadingWhitespaceCount(t);
2118
- return t.slice(r);
2119
- }
2120
- trimEnd(t) {
2121
- let r = this.getTrailingWhitespaceCount(t);
2122
- return t.slice(0, t.length - r);
2123
- }
2124
- trim(t) {
2125
- return this.trimEnd(this.trimStart(t));
2126
- }
2127
- split(t, r = false) {
2128
- let n = `[${cs([...pt(this, Re)].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u");
2129
- return t.split(s);
2130
- }
2131
- hasWhitespaceCharacter(t) {
2132
- let r = pt(this, Re);
2133
- return Array.prototype.some.call(t, (n) => r.has(n));
2134
- }
2135
- hasNonWhitespaceCharacter(t) {
2136
- let r = pt(this, Re);
2137
- return Array.prototype.some.call(t, (n) => !r.has(n));
2138
- }
2139
- isWhitespaceOnly(t) {
2140
- let r = pt(this, Re);
2141
- return Array.prototype.every.call(t, (n) => r.has(n));
2142
- }
2143
- };
2144
- Re = /* @__PURE__ */ new WeakMap();
2145
- var yi = ls;
2146
- var Nr = new yi(`
2147
- \r `);
2148
- var ms = (e) => e === "" || e === x || e === F || e === E;
2149
- function cc(e, t, r) {
2150
- var _, J, j;
2151
- let { node: n } = e;
2152
- if (n.type === "JSXElement" && gc(n)) return [r("openingElement"), r("closingElement")];
2153
- let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), u = n.type === "JSXElement" ? r("closingElement") : r("closingFragment");
2154
- 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];
2155
- n.children = n.children.map((h) => Sc(h) ? { type: "JSXText", value: " ", raw: " " } : h);
2156
- let i = n.children.some(X), a = n.children.filter((h) => h.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, c = ne(s) || i || o || a, m = e.parent.rootMarker === "mdx", D = t.singleQuote ? "{' '}" : '{" "}', y = m ? " " : b([D, E], " "), C = ((J = (_ = n.openingElement) == null ? void 0 : _.name) == null ? void 0 : J.name) === "fbt", p = lc(e, t, r, y, C), A = n.children.some((h) => pr(h));
2157
- for (let h = p.length - 2; h >= 0; h--) {
2158
- let W = p[h] === "" && p[h + 1] === "", Fe = p[h] === F && p[h + 1] === "" && p[h + 2] === F, H = (p[h] === E || p[h] === F) && p[h + 1] === "" && p[h + 2] === y, ue = p[h] === y && p[h + 1] === "" && (p[h + 2] === E || p[h + 2] === F), Z = p[h] === y && p[h + 1] === "" && p[h + 2] === y, It = p[h] === E && p[h + 1] === "" && p[h + 2] === F || p[h] === F && p[h + 1] === "" && p[h + 2] === E;
2159
- Fe && A || W || H || Z || It ? p.splice(h, 2) : ue && p.splice(h + 1, 2);
2160
- }
2161
- for (; p.length > 0 && ms(O(false, p, -1)); ) p.pop();
2162
- for (; p.length > 1 && ms(p[0]) && ms(p[1]); ) p.shift(), p.shift();
2163
- let T = [];
2164
- for (let [h, W] of p.entries()) {
2165
- if (W === y) {
2166
- if (h === 1 && p[h - 1] === "") {
2167
- if (p.length === 2) {
2168
- T.push(D);
2169
- continue;
2170
- }
2171
- T.push([D, F]);
2172
- continue;
2173
- } else if (h === p.length - 1) {
2174
- T.push(D);
2175
- continue;
2176
- } else if (p[h - 1] === "" && p[h - 2] === F) {
2177
- T.push(D);
2178
- continue;
2179
- }
2180
- }
2181
- T.push(W), ne(W) && (c = true);
2182
- }
2183
- let S = A ? qt(T) : l(T, { shouldBreak: true });
2184
- if (((j = t.cursorNode) == null ? void 0 : j.type) === "JSXText" && n.children.includes(t.cursorNode) && (S = [Un, S, Un]), m) return S;
2185
- let B = l([s, f([F, S]), F, u]);
2186
- return c ? B : ze([l([s, ...p, u]), B]);
2187
- }
2188
- function lc(e, t, r, n, s) {
2189
- let u = [];
2190
- return e.each(({ node: i, next: a }) => {
2191
- if (i.type === "JSXText") {
2192
- let o = fe(i);
2193
- if (pr(i)) {
2194
- let c = Nr.split(o, true);
2195
- c[0] === "" && (u.push(""), c.shift(), /\n/u.test(c[0]) ? u.push(fi(s, c[1], i, a)) : u.push(n), c.shift());
2196
- let m;
2197
- if (O(false, c, -1) === "" && (c.pop(), m = c.pop()), c.length === 0) return;
2198
- for (let [D, y] of c.entries()) D % 2 === 1 ? u.push(x) : u.push(y);
2199
- m !== void 0 ? /\n/u.test(m) ? u.push(fi(s, O(false, u, -1), i, a)) : u.push(n) : u.push(Di(s, O(false, u, -1), i, a));
2200
- } else /\n/u.test(o) ? o.match(/\n/gu).length > 1 && u.push("", F) : u.push("", n);
2201
- } else {
2202
- let o = r();
2203
- if (u.push(o), a && pr(a)) {
2204
- let m = Nr.trim(fe(a)), [D] = Nr.split(m);
2205
- u.push(Di(s, D, i, a));
2206
- } else u.push(F);
2207
- }
2208
- }, "children"), u;
2209
- }
2210
- function Di(e, t, r, n) {
2211
- return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? t.length === 1 ? E : F : E;
2212
- }
2213
- function fi(e, t, r, n) {
2214
- return e ? F : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? F : E : F;
2215
- }
2216
- var mc = /* @__PURE__ */ new Set(["ArrayExpression", "TupleExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot"]);
2217
- function yc(e, t, r) {
2218
- let { parent: n } = e;
2219
- if (mc.has(n.type)) return t;
2220
- let s = e.match(void 0, (i) => i.type === "ArrowFunctionExpression", L, (i) => i.type === "JSXExpressionContainer"), u = Be(e, r);
2221
- return l([u ? "" : b("("), f([E, t]), E, u ? "" : b(")")], { shouldBreak: s });
2222
- }
2223
- function Dc(e, t, r) {
2224
- let { node: n } = e, s = [];
2225
- if (s.push(r("name")), n.value) {
2226
- let u;
2227
- if (Q(n.value)) {
2228
- let i = fe(n.value), a = N(false, N(false, i.slice(1, -1), "&apos;", "'"), "&quot;", '"'), o = xr(a, t.jsxSingleQuote);
2229
- a = o === '"' ? N(false, a, '"', "&quot;") : N(false, a, "'", "&apos;"), u = e.call(() => ye(e, Ie(o + a + o), t), "value");
2230
- } else u = r("value");
2231
- s.push("=", u);
2232
- }
2233
- return s;
2234
- }
2235
- function fc(e, t, r) {
2236
- let { node: n } = e, s = (u, i) => u.type === "JSXEmptyExpression" || !d(u) && (U(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)));
2237
- return s(n.expression, e.parent) ? l(["{", r("expression"), ke, "}"]) : l(["{", f([E, r("expression")]), E, ke, "}"]);
2238
- }
2239
- function Ec(e, t, r) {
2240
- var a, o;
2241
- let { node: n } = e, s = d(n.name) || d(n.typeParameters) || d(n.typeArguments);
2242
- if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " />"];
2243
- if (((a = n.attributes) == null ? void 0 : a.length) === 1 && Q(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
2244
- `) && !s && !d(n.attributes[0])) return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
2245
- let u = (o = n.attributes) == null ? void 0 : o.some((c) => Q(c.value) && c.value.value.includes(`
2246
- `)), i = t.singleAttributePerLine && n.attributes.length > 1 ? F : x;
2247
- return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), f(e.map(() => [i, r()], "attributes")), ...Fc(n, t, s)], { shouldBreak: u });
2248
- }
2249
- function Fc(e, t, r) {
2250
- return e.selfClosing ? [x, "/>"] : Cc(e, t, r) ? [">"] : [E, ">"];
2251
- }
2252
- function Cc(e, t, r) {
2253
- let n = e.attributes.length > 0 && d(O(false, e.attributes, -1), g.Trailing);
2254
- return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n;
2255
- }
2256
- function Ac(e, t, r) {
2257
- let { node: n } = e, s = [];
2258
- s.push("</");
2259
- let u = r("name");
2260
- return d(n.name, g.Leading | g.Line) ? s.push(f([F, u]), F) : d(n.name, g.Leading | g.Block) ? s.push(" ", u) : s.push(u), s.push(">"), s;
2261
- }
2262
- function Tc(e, t) {
2263
- let { node: r } = e, n = d(r), s = d(r, g.Line), u = r.type === "JSXOpeningFragment";
2264
- return [u ? "<" : "</", f([s ? F : n && !u ? " " : "", M(e, t)]), s ? F : "", ">"];
2265
- }
2266
- function dc(e, t, r) {
2267
- let n = ye(e, cc(e, t, r), t);
2268
- return yc(e, n, t);
2269
- }
2270
- function xc(e, t) {
2271
- let { node: r } = e, n = d(r, g.Line);
2272
- return [M(e, t, { indent: n }), n ? F : ""];
2273
- }
2274
- function hc(e, t, r) {
2275
- let { node: n } = e;
2276
- return ["{", e.call(({ node: s }) => {
2277
- let u = ["...", r()];
2278
- return !d(s) || !zn(e) ? u : [f([E, ye(e, u, t)]), E];
2279
- }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"];
2280
- }
2281
- function Ei(e, t, r) {
2282
- let { node: n } = e;
2283
- if (n.type.startsWith("JSX")) switch (n.type) {
2284
- case "JSXAttribute":
2285
- return Dc(e, t, r);
2286
- case "JSXIdentifier":
2287
- return n.name;
2288
- case "JSXNamespacedName":
2289
- return P(":", [r("namespace"), r("name")]);
2290
- case "JSXMemberExpression":
2291
- return P(".", [r("object"), r("property")]);
2292
- case "JSXSpreadAttribute":
2293
- case "JSXSpreadChild":
2294
- return hc(e, t, r);
2295
- case "JSXExpressionContainer":
2296
- return fc(e, t, r);
2297
- case "JSXFragment":
2298
- case "JSXElement":
2299
- return dc(e, t, r);
2300
- case "JSXOpeningElement":
2301
- return Ec(e, t, r);
2302
- case "JSXClosingElement":
2303
- return Ac(e, t, r);
2304
- case "JSXOpeningFragment":
2305
- case "JSXClosingFragment":
2306
- return Tc(e, t);
2307
- case "JSXEmptyExpression":
2308
- return xc(e, t);
2309
- case "JSXText":
2310
- throw new Error("JSXText should be handled by JSXElement");
2311
- default:
2312
- throw new Me(n, "JSX");
2313
- }
2314
- }
2315
- function gc(e) {
2316
- if (e.children.length === 0) return true;
2317
- if (e.children.length > 1) return false;
2318
- let t = e.children[0];
2319
- return t.type === "JSXText" && !pr(t);
2320
- }
2321
- function pr(e) {
2322
- return e.type === "JSXText" && (Nr.hasNonWhitespaceCharacter(fe(e)) || !/\n/u.test(fe(e)));
2323
- }
2324
- function Sc(e) {
2325
- return e.type === "JSXExpressionContainer" && Q(e.expression) && e.expression.value === " " && !d(e.expression);
2326
- }
2327
- function Fi(e) {
2328
- let { node: t, parent: r } = e;
2329
- if (!X(t) || !X(r)) return false;
2330
- let { index: n, siblings: s } = e, u;
2331
- for (let i = n; i > 0; i--) {
2332
- let a = s[i - 1];
2333
- if (!(a.type === "JSXText" && !pr(a))) {
2334
- u = a;
2335
- break;
2336
- }
2337
- }
2338
- return (u == null ? void 0 : u.type) === "JSXExpressionContainer" && u.expression.type === "JSXEmptyExpression" && Bt(u.expression);
2339
- }
2340
- function Bc(e) {
2341
- return Bt(e.node) || Fi(e);
2342
- }
2343
- var Xr = Bc;
2344
- var bc = 0;
2345
- function Yr(e, t, r) {
2346
- var J;
2347
- 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 === "|>" && ((J = e.root.extra) == null ? void 0 : J.__isUsingHackPipeline), c = ys(e, r, t, false, a);
2348
- if (a) return c;
2349
- if (o) return l(c);
2350
- if (L(s) && s.callee === n || s.type === "UnaryExpression" || q(s) && !s.computed) return l([f([E, ...c]), E]);
2351
- let m = 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" || Ae(s), y = De(n.left) && nr(n.operator, n.left.operator);
2352
- if (m || Ut(n) && !y || !Ut(n) && D) return l(c);
2353
- if (c.length === 0) return "";
2354
- let C = X(n.right), p = c.findIndex((j) => typeof j != "string" && !Array.isArray(j) && j.type === le), A = c.slice(0, p === -1 ? 1 : p + 1), T = c.slice(A.length, C ? -1 : void 0), S = Symbol("logicalChain-" + ++bc), B = l([...A, f(T)], { id: S });
2355
- if (!C) return B;
2356
- let _ = O(false, c, -1);
2357
- return l([B, At(_, { groupId: S })]);
2358
- }
2359
- function ys(e, t, r, n, s) {
2360
- var A;
2361
- let { node: u } = e;
2362
- if (!De(u)) return [l(t())];
2363
- let i = [];
2364
- nr(u.operator, u.left.operator) ? i = e.call((T) => ys(T, t, r, true, s), "left") : i.push(l(t("left")));
2365
- let a = Ut(u), o = (u.operator === "|>" || u.type === "NGPipeExpression" || Pc(e, r)) && !Oe(r.originalText, u.right), c = u.type === "NGPipeExpression" ? "|" : u.operator, m = u.type === "NGPipeExpression" && u.arguments.length > 0 ? l(f([E, ": ", P([x, ": "], e.map(() => he(2, l(t())), "arguments"))])) : "", D;
2366
- if (a) D = [c, " ", t("right"), m];
2367
- else {
2368
- let S = c === "|>" && ((A = e.root.extra) == null ? void 0 : A.__isUsingHackPipeline) ? e.call((B) => ys(B, t, r, true, s), "right") : t("right");
2369
- D = [o ? x : "", c, o ? " " : x, S, m];
2370
- }
2371
- let { parent: y } = e, C = d(u.left, g.Trailing | g.Line), p = C || !(s && u.type === "LogicalExpression") && y.type !== u.type && u.left.type !== u.type && u.right.type !== u.type;
2372
- if (i.push(o ? "" : " ", p ? l(D, { shouldBreak: C }) : D), n && d(u)) {
2373
- let T = Wt(ye(e, i, r));
2374
- return T.type === Pe ? T.parts : Array.isArray(T) ? T : [T];
2375
- }
2376
- return i;
2377
- }
2378
- function Ut(e) {
2379
- return e.type !== "LogicalExpression" ? false : !!(se(e.right) && e.right.properties.length > 0 || U(e.right) && e.right.elements.length > 0 || X(e.right));
2380
- }
2381
- var Ci = (e) => e.type === "BinaryExpression" && e.operator === "|";
2382
- function Pc(e, t) {
2383
- return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && Ci(e.node) && !e.hasAncestor((r) => !Ci(r) && r.type !== "JsExpressionRoot");
2384
- }
2385
- function Ti(e, t, r) {
2386
- let { node: n } = e;
2387
- if (n.type.startsWith("NG")) switch (n.type) {
2388
- case "NGRoot":
2389
- return [r("node"), d(n.node) ? " //" + ct(n.node)[0].value.trimEnd() : ""];
2390
- case "NGPipeExpression":
2391
- return Yr(e, t, r);
2392
- case "NGChainedExpression":
2393
- return l(P([";", x], e.map(() => Ic(e) ? r() : ["(", r(), ")"], "expressions")));
2394
- case "NGEmptyExpression":
2395
- return "";
2396
- case "NGMicrosyntax":
2397
- return e.map(() => [e.isFirst ? "" : Ai(e) ? " " : [";", x], r()], "body");
2398
- case "NGMicrosyntaxKey":
2399
- return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name);
2400
- case "NGMicrosyntaxExpression":
2401
- return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]];
2402
- case "NGMicrosyntaxKeyedExpression": {
2403
- let { index: s, parent: u } = e, i = Ai(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";
2404
- return [r("key"), i ? " " : ": ", r("expression")];
2405
- }
2406
- case "NGMicrosyntaxLet":
2407
- return ["let ", r("key"), n.value === null ? "" : [" = ", r("value")]];
2408
- case "NGMicrosyntaxAs":
2409
- return [r("key"), " as ", r("alias")];
2410
- default:
2411
- throw new Me(n, "Angular");
2412
- }
2413
- }
2414
- function Ai({ node: e, index: t }) {
2415
- return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1;
2416
- }
2417
- var kc = v(["CallExpression", "OptionalCallExpression", "AssignmentExpression"]);
2418
- function Ic({ node: e }) {
2419
- return tr(e, kc);
2420
- }
2421
- function Ds(e, t, r) {
2422
- let { node: n } = e;
2423
- return l([P(x, e.map(r, "decorators")), hi(n, t) ? F : x]);
2424
- }
2425
- function di(e, t, r) {
2426
- return gi(e.node) ? [P(F, e.map(r, "declaration", "decorators")), F] : "";
2427
- }
2428
- function xi(e, t, r) {
2429
- let { node: n, parent: s } = e, { decorators: u } = n;
2430
- if (!w(u) || gi(s) || Xr(e)) return "";
2431
- let i = n.type === "ClassExpression" || n.type === "ClassDeclaration" || hi(n, t);
2432
- return [e.key === "declaration" && iu(s) ? F : i ? Ee : "", P(x, e.map(r, "decorators")), x];
2433
- }
2434
- function hi(e, t) {
2435
- return e.decorators.some((r) => te(t.originalText, k(r)));
2436
- }
2437
- function gi(e) {
2438
- var r;
2439
- if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
2440
- let t = (r = e.declaration) == null ? void 0 : r.decorators;
2441
- return w(t) && ht(e, t[0]);
2442
- }
2443
- var Dt = class extends Error {
2444
- name = "ArgExpansionBailout";
2445
- };
2446
- function Lc(e, t, r) {
2447
- let { node: n } = e, s = oe(n);
2448
- if (s.length === 0) return ["(", M(e, t), ")"];
2449
- let u = s.length - 1;
2450
- if (_c(s)) {
2451
- let y = ["("];
2452
- return Rt(e, (C, p) => {
2453
- y.push(r()), p !== u && y.push(", ");
2454
- }), y.push(")"), y;
2455
- }
2456
- let i = false, a = [];
2457
- Rt(e, ({ node: y }, C) => {
2458
- let p = r();
2459
- C === u || (pe(y, t) ? (i = true, p = [p, ",", F, F]) : p = [p, ",", x]), a.push(p);
2460
- });
2461
- let o = n.type === "ImportExpression" || n.callee.type === "Import", c = !t.parser.startsWith("__ng_") && !o && ae(t, "all") ? "," : "";
2462
- function m() {
2463
- return l(["(", f([x, ...a]), c, x, ")"], { shouldBreak: true });
2464
- }
2465
- if (i || e.parent.type !== "Decorator" && lu(s)) return m();
2466
- if (Oc(s)) {
2467
- let y = a.slice(1);
2468
- if (y.some(ne)) return m();
2469
- let C;
2470
- try {
2471
- C = r(Rn(n, 0), { expandFirstArg: true });
2472
- } catch (p) {
2473
- if (p instanceof Dt) return m();
2474
- throw p;
2475
- }
2476
- return ne(C) ? [Ee, ze([["(", l(C, { shouldBreak: true }), ", ", ...y, ")"], m()])] : ze([["(", C, ", ", ...y, ")"], ["(", l(C, { shouldBreak: true }), ", ", ...y, ")"], m()]);
2477
- }
2478
- if (wc(s, a, t)) {
2479
- let y = a.slice(0, -1);
2480
- if (y.some(ne)) return m();
2481
- let C;
2482
- try {
2483
- C = r(Rn(n, -1), { expandLastArg: true });
2484
- } catch (p) {
2485
- if (p instanceof Dt) return m();
2486
- throw p;
2487
- }
2488
- return ne(C) ? [Ee, ze([["(", ...y, l(C, { shouldBreak: true }), ")"], m()])] : ze([["(", ...y, C, ")"], ["(", ...y, l(C, { shouldBreak: true }), ")"], m()]);
2489
- }
2490
- let D = ["(", f([E, ...a]), b(c), E, ")"];
2491
- return Or(e) ? D : l(D, { shouldBreak: a.some(ne) || i });
2492
- }
2493
- function cr(e, t = false) {
2494
- return se(e) && (e.properties.length > 0 || d(e)) || U(e) && (e.elements.length > 0 || d(e)) || e.type === "TSTypeAssertion" && cr(e.expression) || Te(e) && cr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || jc(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && cr(e.body, true) || se(e.body) || U(e.body) || !t && (L(e.body) || e.body.type === "ConditionalExpression") || X(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression";
2495
- }
2496
- function wc(e, t, r) {
2497
- var u, i;
2498
- let n = O(false, e, -1);
2499
- if (e.length === 1) {
2500
- let a = O(false, t, -1);
2501
- if ((u = a.label) != null && u.embed && ((i = a.label) == null ? void 0 : i.hug) !== false) return true;
2502
- }
2503
- let s = O(false, e, -2);
2504
- return !d(n, g.Leading) && !d(n, g.Trailing) && cr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !U(n)) && !(e.length > 1 && fs(n, r));
2505
- }
2506
- function Oc(e) {
2507
- if (e.length !== 2) return false;
2508
- let [t, r] = e;
2509
- return t.type === "ModuleExpression" && vc(r) ? true : !d(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && Bi(r) && !cr(r);
2510
- }
2511
- function Bi(e) {
2512
- if (e.type === "ParenthesizedExpression") return Bi(e.expression);
2513
- if (Te(e) || e.type === "TypeCastExpression") {
2514
- let { typeAnnotation: t } = e;
2515
- 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") {
2516
- let r = t.typeArguments ?? t.typeParameters;
2517
- (r == null ? void 0 : r.params.length) === 1 && (t = r.params[0]);
2518
- }
2519
- return Mt(t) && be(e.expression, 1);
2520
- }
2521
- return lt(e) && oe(e).length > 1 ? false : De(e) ? be(e.left, 1) && be(e.right, 1) : vn(e) || be(e);
2522
- }
2523
- function _c(e) {
2524
- return e.length === 2 ? Si(e, 0) : e.length === 3 ? e[0].type === "Identifier" && Si(e, 1) : false;
2525
- }
2526
- function Si(e, t) {
2527
- let r = e[t], n = e[t + 1];
2528
- return r.type === "ArrowFunctionExpression" && K(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => d(s));
2529
- }
2530
- function jc(e) {
2531
- return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || d(e, g.Dangling));
2532
- }
2533
- function vc(e) {
2534
- return e.type === "ObjectExpression" && e.properties.length === 1 && Ae(e.properties[0]) && e.properties[0].key.type === "Identifier" && e.properties[0].key.name === "type" && Q(e.properties[0].value) && e.properties[0].value.value === "module";
2535
- }
2536
- var lr = Lc;
2537
- var Mc = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), L(e) && oe(e).length > 0);
2538
- function bi(e, t, r) {
2539
- var c;
2540
- let n = r("object"), s = Es(e, t, r), { node: u } = e, i = e.findAncestor((m) => !(q(m) || m.type === "TSNonNullExpression")), a = e.findAncestor((m) => !(m.type === "ChainExpression" || m.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" && !q(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Mc(u.object) || ((c = n.label) == null ? void 0 : c.memberChain));
2541
- return it(n.label, [n, o ? s : l(f([E, s]))]);
2542
- }
2543
- function Es(e, t, r) {
2544
- let n = r("property"), { node: s } = e, u = V(e);
2545
- return s.computed ? !s.property || Ce(s.property) ? [u, "[", n, "]"] : l([u, "[", f([E, n]), E, "]"]) : [u, ".", n];
2546
- }
2547
- function Pi(e, t, r) {
2548
- if (e.node.type === "ChainExpression") return e.call(() => Pi(e, t, r), "expression");
2549
- let { parent: n } = e, s = !n || n.type === "ExpressionStatement", u = [];
2550
- function i(I) {
2551
- let { originalText: G } = t, ee = yt(G, k(I));
2552
- return G.charAt(ee) === ")" ? ee !== false && Ot(G, ee + 1) : pe(I, t);
2553
- }
2554
- function a(I) {
2555
- let { node: G } = I;
2556
- if (G.type === "ChainExpression") return I.call(() => a(I), "expression");
2557
- if (L(G) && (Ft(G.callee) || L(G.callee))) {
2558
- let ee = i(G);
2559
- u.unshift({ node: G, hasTrailingEmptyLine: ee, printed: [ye(I, [V(I), Qe(I, t, r), lr(I, t, r)], t), ee ? F : ""] }), I.call((qe) => a(qe), "callee");
2560
- } else Ft(G) ? (u.unshift({ node: G, needsParens: Be(I, t), printed: ye(I, q(G) ? Es(I, t, r) : Hr(I, t, r), t) }), I.call((ee) => a(ee), "object")) : G.type === "TSNonNullExpression" ? (u.unshift({ node: G, printed: ye(I, "!", t) }), I.call((ee) => a(ee), "expression")) : u.unshift({ node: G, printed: r() });
2561
- }
2562
- let { node: o } = e;
2563
- u.unshift({ node: o, printed: [V(e), Qe(e, t, r), lr(e, t, r)] }), o.callee && e.call((I) => a(I), "callee");
2564
- let c = [], m = [u[0]], D = 1;
2565
- for (; D < u.length && (u[D].node.type === "TSNonNullExpression" || L(u[D].node) || q(u[D].node) && u[D].node.computed && Ce(u[D].node.property)); ++D) m.push(u[D]);
2566
- if (!L(u[0].node)) for (; D + 1 < u.length && (Ft(u[D].node) && Ft(u[D + 1].node)); ++D) m.push(u[D]);
2567
- c.push(m), m = [];
2568
- let y = false;
2569
- for (; D < u.length; ++D) {
2570
- if (y && Ft(u[D].node)) {
2571
- if (u[D].node.computed && Ce(u[D].node.property)) {
2572
- m.push(u[D]);
2573
- continue;
2574
- }
2575
- c.push(m), m = [], y = false;
2576
- }
2577
- (L(u[D].node) || u[D].node.type === "ImportExpression") && (y = true), m.push(u[D]), d(u[D].node, g.Trailing) && (c.push(m), m = [], y = false);
2578
- }
2579
- m.length > 0 && c.push(m);
2580
- function C(I) {
2581
- return /^[A-Z]|^[$_]+$/u.test(I);
2582
- }
2583
- function p(I) {
2584
- return I.length <= t.tabWidth;
2585
- }
2586
- function A(I) {
2587
- var qe;
2588
- let G = (qe = I[1][0]) == null ? void 0 : qe.node.computed;
2589
- if (I[0].length === 1) {
2590
- let xt = I[0][0].node;
2591
- return xt.type === "ThisExpression" || xt.type === "Identifier" && (C(xt.name) || s && p(xt.name) || G);
2592
- }
2593
- let ee = O(false, I[0], -1).node;
2594
- return q(ee) && ee.property.type === "Identifier" && (C(ee.property.name) || G);
2595
- }
2596
- let T = c.length >= 2 && !d(c[1][0].node) && A(c);
2597
- function S(I) {
2598
- let G = I.map((ee) => ee.printed);
2599
- return I.length > 0 && O(false, I, -1).needsParens ? ["(", ...G, ")"] : G;
2600
- }
2601
- function B(I) {
2602
- return I.length === 0 ? "" : f([F, P(F, I.map(S))]);
2603
- }
2604
- let _ = c.map(S), J = _, j = T ? 3 : 2, h = c.flat(), W = h.slice(1, -1).some((I) => d(I.node, g.Leading)) || h.slice(0, -1).some((I) => d(I.node, g.Trailing)) || c[j] && d(c[j][0].node, g.Leading);
2605
- if (c.length <= j && !W && !c.some((I) => O(false, I, -1).hasTrailingEmptyLine)) return Or(e) ? J : l(J);
2606
- let Fe = O(false, c[T ? 1 : 0], -1).node, H = !L(Fe) && i(Fe), ue = [S(c[0]), T ? c.slice(1, 2).map(S) : "", H ? F : "", B(c.slice(T ? 2 : 1))], Z = u.map(({ node: I }) => I).filter(L);
2607
- function It() {
2608
- let I = O(false, O(false, c, -1), -1).node, G = O(false, _, -1);
2609
- return L(I) && ne(G) && Z.slice(0, -1).some((ee) => ee.arguments.some(_t));
2610
- }
2611
- let $t;
2612
- return W || Z.length > 2 && Z.some((I) => !I.arguments.every((G) => be(G))) || _.slice(0, -1).some(ne) || It() ? $t = l(ue) : $t = [ne(J) || H ? Ee : "", ze([J, ue])], it({ memberChain: true }, $t);
2613
- }
2614
- var ki = Pi;
2615
- function Vr(e, t, r) {
2616
- var m;
2617
- let { node: n } = e, s = n.type === "NewExpression", u = n.type === "ImportExpression", i = V(e), a = oe(n), o = a.length === 1 && Lr(a[0], t.originalText);
2618
- if (o || Rc(e) || St(n, e.parent)) {
2619
- let D = [];
2620
- if (Rt(e, () => {
2621
- D.push(r());
2622
- }), !(o && ((m = D[0].label) != null && m.embed))) return [s ? "new " : "", Ii(e, r), i, Qe(e, t, r), "(", P(", ", D), ")"];
2623
- }
2624
- if (!u && !s && Ft(n.callee) && !e.call((D) => Be(D, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return ki(e, t, r);
2625
- let c = [s ? "new " : "", Ii(e, r), i, Qe(e, t, r), lr(e, t, r)];
2626
- return u || L(n.callee) ? l(c) : c;
2627
- }
2628
- function Ii(e, t) {
2629
- let { node: r } = e;
2630
- return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : t("callee");
2631
- }
2632
- function Rc(e) {
2633
- let { node: t } = e;
2634
- if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return false;
2635
- let r = oe(t);
2636
- return t.callee.name === "require" ? r.length === 1 && Q(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 && Q(r[0]) && r[1].type === "ArrayExpression" : false;
2637
- }
2638
- function Tt(e, t, r, n, s, u) {
2639
- let i = Jc(e, t, r, n, u), a = u ? r(u, { assignmentLayout: i }) : "";
2640
- switch (i) {
2641
- case "break-after-operator":
2642
- return l([l(n), s, l(f([x, a]))]);
2643
- case "never-break-after-operator":
2644
- return l([l(n), s, " ", a]);
2645
- case "fluid": {
2646
- let o = Symbol("assignment");
2647
- return l([l(n), s, l(f(x), { id: o }), ke, At(a, { groupId: o })]);
2648
- }
2649
- case "break-lhs":
2650
- return l([n, s, " ", l(a)]);
2651
- case "chain":
2652
- return [l(n), s, x, a];
2653
- case "chain-tail":
2654
- return [l(n), s, f([x, a])];
2655
- case "chain-tail-arrow-chain":
2656
- return [l(n), s, a];
2657
- case "only-left":
2658
- return n;
2659
- }
2660
- }
2661
- function wi(e, t, r) {
2662
- let { node: n } = e;
2663
- return Tt(e, t, r, r("left"), [" ", n.operator], "right");
2664
- }
2665
- function Oi(e, t, r) {
2666
- return Tt(e, t, r, r("id"), " =", "init");
2667
- }
2668
- function Jc(e, t, r, n, s) {
2669
- let { node: u } = e, i = u[s];
2670
- if (!i) return "only-left";
2671
- let a = !$r(i);
2672
- if (e.match($r, _i, (y) => !a || y.type !== "ExpressionStatement" && y.type !== "VariableDeclaration")) return a ? i.type === "ArrowFunctionExpression" && i.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain";
2673
- if (!a && $r(i.right) || Oe(t.originalText, i)) return "break-after-operator";
2674
- 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";
2675
- let m = Bu(n);
2676
- if (Wc(u) || Xc(u) || Fs(u) && m) return "break-lhs";
2677
- let D = Hc(u, n, t);
2678
- return e.call(() => qc(e, t, r, D), s) ? "break-after-operator" : Gc(u) ? "break-lhs" : !m && (D || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || i.type === "BooleanLiteral" || Ce(i) || i.type === "ClassExpression") ? "never-break-after-operator" : "fluid";
2679
- }
2680
- function qc(e, t, r, n) {
2681
- let s = e.node;
2682
- if (De(s) && !Ut(s)) return true;
2683
- switch (s.type) {
2684
- case "StringLiteralTypeAnnotation":
2685
- case "SequenceExpression":
2686
- return true;
2687
- case "TSConditionalType":
2688
- case "ConditionalTypeAnnotation":
2689
- if (!t.experimentalTernaries && !Kc(s)) break;
2690
- return true;
2691
- case "ConditionalExpression": {
2692
- if (!t.experimentalTernaries) {
2693
- let { test: c } = s;
2694
- return De(c) && !Ut(c);
2695
- }
2696
- let { consequent: a, alternate: o } = s;
2697
- return a.type === "ConditionalExpression" || o.type === "ConditionalExpression";
2698
- }
2699
- case "ClassExpression":
2700
- return w(s.decorators);
2701
- }
2702
- if (n) return false;
2703
- let u = s, i = [];
2704
- for (; ; ) if (u.type === "UnaryExpression" || u.type === "AwaitExpression" || u.type === "YieldExpression" && u.argument !== null) u = u.argument, i.push("argument");
2705
- else if (u.type === "TSNonNullExpression") u = u.expression, i.push("expression");
2706
- else break;
2707
- return !!(Q(u) || e.call(() => ji(e, t, r), ...i));
2708
- }
2709
- function Wc(e) {
2710
- if (_i(e)) {
2711
- let t = e.left || e.id;
2712
- return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => {
2713
- var n;
2714
- return Ae(r) && (!r.shorthand || ((n = r.value) == null ? void 0 : n.type) === "AssignmentPattern");
2715
- });
2716
- }
2717
- return false;
2718
- }
2719
- function $r(e) {
2720
- return e.type === "AssignmentExpression";
2721
- }
2722
- function _i(e) {
2723
- return $r(e) || e.type === "VariableDeclarator";
2724
- }
2725
- function Gc(e) {
2726
- let t = Nc(e);
2727
- if (w(t)) {
2728
- let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound";
2729
- if (t.length > 1 && t.some((n) => n[r] || n.default)) return true;
2730
- }
2731
- return false;
2732
- }
2733
- var Uc = v(["TSTypeAliasDeclaration", "TypeAlias"]);
2734
- function Nc(e) {
2735
- var t;
2736
- if (Uc(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
2737
- }
2738
- function Xc(e) {
2739
- if (e.type !== "VariableDeclarator") return false;
2740
- let { typeAnnotation: t } = e.id;
2741
- if (!t || !t.typeAnnotation) return false;
2742
- let r = Li(t.typeAnnotation);
2743
- return w(r) && r.length > 1 && r.some((n) => w(Li(n)) || n.type === "TSConditionalType");
2744
- }
2745
- function Fs(e) {
2746
- var t;
2747
- return e.type === "VariableDeclarator" && ((t = e.init) == null ? void 0 : t.type) === "ArrowFunctionExpression";
2748
- }
2749
- var Yc = v(["TSTypeReference", "GenericTypeAnnotation"]);
2750
- function Li(e) {
2751
- var t;
2752
- if (Yc(e)) return (t = e.typeArguments ?? e.typeParameters) == null ? void 0 : t.params;
2753
- }
2754
- function ji(e, t, r, n = false) {
2755
- var i;
2756
- let { node: s } = e, u = () => ji(e, t, r, true);
2757
- if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(u, "expression");
2758
- if (L(s)) {
2759
- if ((i = Vr(e, t, r).label) != null && i.memberChain) return false;
2760
- let o = oe(s);
2761
- return !(o.length === 0 || o.length === 1 && rr(o[0], t)) || Vc(s, r) ? false : e.call(u, "callee");
2762
- }
2763
- return q(s) ? e.call(u, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression");
2764
- }
2765
- function Hc(e, t, r) {
2766
- return Ae(e) ? (t = Wt(t), typeof t == "string" && et(t) < r.tabWidth + 3) : false;
2767
- }
2768
- function Vc(e, t) {
2769
- let r = $c(e);
2770
- if (w(r)) {
2771
- if (r.length > 1) return true;
2772
- if (r.length === 1) {
2773
- let s = r[0];
2774
- if (Ne(s) || _r(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return true;
2775
- }
2776
- let n = e.typeParameters ? "typeParameters" : "typeArguments";
2777
- if (ne(t(n))) return true;
2778
- }
2779
- return false;
2780
- }
2781
- function $c(e) {
2782
- var t;
2783
- return (t = e.typeParameters ?? e.typeArguments) == null ? void 0 : t.params;
2784
- }
2785
- function Kc(e) {
2786
- function t(r) {
2787
- switch (r.type) {
2788
- case "FunctionTypeAnnotation":
2789
- case "GenericTypeAnnotation":
2790
- case "TSFunctionType":
2791
- return !!r.typeParameters;
2792
- case "TSTypeReference":
2793
- return !!(r.typeArguments ?? r.typeParameters);
2794
- default:
2795
- return false;
2796
- }
2797
- }
2798
- return t(e.checkType) || t(e.extendsType);
2799
- }
2800
- function Je(e, t, r, n, s) {
2801
- let u = e.node, i = K(u), a = s ? Qe(e, r, t) : "";
2802
- if (i.length === 0) return [a, "(", M(e, r, { filter: (p) => ge(r.originalText, k(p)) === ")" }), ")"];
2803
- let { parent: o } = e, c = St(o), m = Cs(u), D = [];
2804
- if (fu(e, (p, A) => {
2805
- let T = A === i.length - 1;
2806
- T && u.rest && D.push("..."), D.push(t()), !T && (D.push(","), c || m ? D.push(" ") : pe(i[A], r) ? D.push(F, F) : D.push(x));
2807
- }), n && !Qc(e)) {
2808
- if (ne(a) || ne(D)) throw new Dt();
2809
- return l([ur(a), "(", ur(D), ")"]);
2810
- }
2811
- let y = i.every((p) => !w(p.decorators));
2812
- return m && y ? [a, "(", ...D, ")"] : c ? [a, "(", ...D, ")"] : (Ir(o) || ou(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 && Mt(i[0].typeAnnotation) && !u.rest ? r.arrowParens === "always" || u.type === "HookTypeAnnotation" ? ["(", ...D, ")"] : D : [a, "(", f([E, ...D]), b(!Du(u) && ae(r, "all") ? "," : ""), E, ")"];
2813
- }
2814
- function Cs(e) {
2815
- if (!e) return false;
2816
- let t = K(e);
2817
- if (t.length !== 1) return false;
2818
- let [r] = t;
2819
- return !d(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && we(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && we(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 || U(r.right) && r.right.elements.length === 0));
2820
- }
2821
- function zc(e) {
2822
- let t;
2823
- return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t;
2824
- }
2825
- function ot(e, t) {
2826
- var s;
2827
- let r = zc(e);
2828
- if (!r) return false;
2829
- let n = (s = e.typeParameters) == null ? void 0 : s.params;
2830
- if (n) {
2831
- if (n.length > 1) return false;
2832
- if (n.length === 1) {
2833
- let u = n[0];
2834
- if (u.constraint || u.default) return false;
2835
- }
2836
- }
2837
- return K(e).length === 1 && (we(r) || ne(t));
2838
- }
2839
- function Qc(e) {
2840
- return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => {
2841
- if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") {
2842
- let n = t.callee.callee;
2843
- return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier";
2844
- }
2845
- return false;
2846
- }, (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);
2847
- }
2848
- function vi(e) {
2849
- let t = K(e);
2850
- return t.length > 1 && t.some((r) => r.type === "TSParameterProperty");
2851
- }
2852
- var Zc = v(["VoidTypeAnnotation", "TSVoidKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword"]);
2853
- var el = v(["ObjectTypeAnnotation", "TSTypeLiteral", "GenericTypeAnnotation", "TSTypeReference"]);
2854
- function tl(e) {
2855
- let { types: t } = e;
2856
- if (t.some((n) => d(n))) return false;
2857
- let r = t.find((n) => el(n));
2858
- return r ? t.every((n) => n === r || Zc(n)) : false;
2859
- }
2860
- function As(e) {
2861
- return Mt(e) || we(e) ? true : Ne(e) ? tl(e) : false;
2862
- }
2863
- function Mi(e, t, r) {
2864
- let n = t.semi ? ";" : "", { node: s } = e, u = [$(e), "opaque type ", r("id"), r("typeParameters")];
2865
- return s.supertype && u.push(": ", r("supertype")), s.impltype && u.push(" = ", r("impltype")), u.push(n), u;
2866
- }
2867
- function Kr(e, t, r) {
2868
- let n = t.semi ? ";" : "", { node: s } = e, u = [$(e)];
2869
- u.push("type ", r("id"), r("typeParameters"));
2870
- let i = s.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right";
2871
- return [Tt(e, t, r, u, " =", i), n];
2872
- }
2873
- function zr(e, t, r) {
2874
- let n = false;
2875
- return l(e.map(({ isFirst: s, previous: u, node: i, index: a }) => {
2876
- let o = r();
2877
- if (s) return o;
2878
- let c = we(i), m = we(u);
2879
- return m && c ? [" & ", n ? f(o) : o] : !m && !c ? f([" &", x, o]) : (a > 1 && (n = true), [" & ", a > 1 ? f(o) : o]);
2880
- }, "types"));
2881
- }
2882
- function Qr(e, t, r) {
2883
- 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") && Oe(t.originalText, n)), i = As(n), a = e.map((m) => {
2884
- let D = r();
2885
- return i || (D = he(2, D)), ye(m, D, t);
2886
- }, "types");
2887
- if (i) return P(" | ", a);
2888
- let o = u && !Oe(t.originalText, n), c = [b([o ? x : "", "| "]), P([x, "| "], a)];
2889
- return Be(e, t) ? l([f(c), E]) : (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? l([f([b(["(", E]), c]), E, b(")")]) : l(u ? f(c) : c);
2890
- }
2891
- function rl(e) {
2892
- var n;
2893
- let { node: t, parent: r } = e;
2894
- return t.type === "FunctionTypeAnnotation" && (Ir(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && ht(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ? void 0 : n.type) === "DeclareFunction"));
2895
- }
2896
- function Zr(e, t, r) {
2897
- let { node: n } = e, s = [Nt(e)];
2898
- (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new ");
2899
- let u = Je(e, r, t, false, true), i = [];
2900
- return n.type === "FunctionTypeAnnotation" ? i.push(rl(e) ? " => " : ": ", r("returnType")) : i.push(Y(e, r, n.returnType ? "returnType" : "typeAnnotation")), ot(n, i) && (u = l(u)), s.push(u, i), l(s);
2901
- }
2902
- function en(e, t, r) {
2903
- return [r("objectType"), V(e), "[", r("indexType"), "]"];
2904
- }
2905
- function tn(e, t, r) {
2906
- return ["infer ", r("typeParameter")];
2907
- }
2908
- function Ts(e, t, r) {
2909
- let { node: n } = e;
2910
- return [n.postfix ? "" : r, Y(e, t), n.postfix ? r : ""];
2911
- }
2912
- function rn(e, t, r) {
2913
- let { node: n } = e;
2914
- return ["...", ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], r("typeAnnotation")];
2915
- }
2916
- function nn(e, t, r) {
2917
- let { node: n } = e;
2918
- return [n.variance ? r("variance") : "", r("label"), n.optional ? "?" : "", ": ", r("elementType")];
2919
- }
2920
- var nl = /* @__PURE__ */ new WeakSet();
2921
- function Y(e, t, r = "typeAnnotation") {
2922
- let { node: { [r]: n } } = e;
2923
- if (!n) return "";
2924
- let s = false;
2925
- if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") {
2926
- let u = e.call(Ri, r);
2927
- (u === "=>" || u === ":" && d(n, g.Leading)) && (s = true), nl.add(n);
2928
- }
2929
- return s ? [" ", t(r)] : t(r);
2930
- }
2931
- var Ri = (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) ? "" : ":";
2932
- function sn(e, t, r) {
2933
- let n = Ri(e);
2934
- return n ? [n, " ", r("typeAnnotation")] : r("typeAnnotation");
2935
- }
2936
- function un(e) {
2937
- return [e("elementType"), "[]"];
2938
- }
2939
- function an({ node: e }, t) {
2940
- let r = e.type === "TSTypeQuery" ? "exprName" : "argument", n = e.type === "TypeofTypeAnnotation" || e.typeArguments ? "typeArguments" : "typeParameters";
2941
- return ["typeof ", t(r), t(n)];
2942
- }
2943
- function on(e, t) {
2944
- let { node: r } = e;
2945
- return [r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", t("parameterName"), r.typeAnnotation ? [" is ", Y(e, t)] : ""];
2946
- }
2947
- function V(e) {
2948
- let { node: t } = e;
2949
- return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : L(t) || q(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
2950
- }
2951
- function pn(e) {
2952
- return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
2953
- }
2954
- var sl = /* @__PURE__ */ new Set(["DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
2955
- function $(e) {
2956
- let { node: t } = e;
2957
- return t.declare || sl.has(t.type) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : "";
2958
- }
2959
- var ul = /* @__PURE__ */ new Set(["TSAbstractMethodDefinition", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
2960
- function Nt({ node: e }) {
2961
- return e.abstract || ul.has(e.type) ? "abstract " : "";
2962
- }
2963
- function Qe(e, t, r) {
2964
- let n = e.node;
2965
- return n.typeArguments ? r("typeArguments") : n.typeParameters ? r("typeParameters") : "";
2966
- }
2967
- function Hr(e, t, r) {
2968
- return ["::", r("callee")];
2969
- }
2970
- function ft(e, t, r) {
2971
- return e.type === "EmptyStatement" ? ";" : e.type === "BlockStatement" || r ? [" ", t] : f([x, t]);
2972
- }
2973
- function cn(e, t) {
2974
- return ["...", t("argument"), Y(e, t)];
2975
- }
2976
- function Xt(e) {
2977
- return e.accessibility ? e.accessibility + " " : "";
2978
- }
2979
- function il(e, t, r, n) {
2980
- let { node: s } = e, u = s.inexact ? "..." : "";
2981
- return d(s, g.Dangling) ? l([r, u, M(e, t, { indent: true }), E, n]) : [r, u, n];
2982
- }
2983
- function Yt(e, t, r) {
2984
- 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];
2985
- if (o.length === 0) s.push(il(e, t, u, i));
2986
- else {
2987
- let c = O(false, o, -1), m = (c == null ? void 0 : c.type) !== "RestElement" && !n.inexact, D = c === null, y = Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, S, B) => {
2988
- let _ = T == null ? void 0 : T.type;
2989
- if (!U(T) && !se(T)) return false;
2990
- let J = B[S + 1];
2991
- if (J && _ !== J.type) return false;
2992
- let j = U(T) ? "elements" : "properties";
2993
- return T[j] && T[j].length > 1;
2994
- }), p = fs(n, t), A = m ? D ? "," : ae(t) ? p ? b(",", "", { groupId: y }) : b(",") : "" : "";
2995
- s.push(l([u, f([E, p ? ol(e, t, r, A) : [al(e, t, a, n.inexact, r), A], M(e, t)]), E, i], { shouldBreak: C, id: y }));
2996
- }
2997
- return s.push(V(e), Y(e, r)), s;
2998
- }
2999
- function fs(e, t) {
3000
- return U(e) && e.elements.length > 1 && e.elements.every((r) => r && (Ce(r) || jn(r) && !d(r.argument)) && !d(r, g.Trailing | g.Line, (n) => !te(t.originalText, R(n), { backwards: true })));
3001
- }
3002
- function Ji({ node: e }, { originalText: t }) {
3003
- let r = (s) => Lt(t, wt(t, s)), n = (s) => t[s] === "," ? s : n(r(s + 1));
3004
- return Ot(t, n(k(e)));
3005
- }
3006
- function al(e, t, r, n, s) {
3007
- let u = [];
3008
- return e.each(({ node: i, isLast: a }) => {
3009
- u.push(i ? l(s()) : ""), (!a || n) && u.push([",", x, i && Ji(e, t) ? E : ""]);
3010
- }, r), n && u.push("..."), u;
3011
- }
3012
- function ol(e, t, r, n) {
3013
- let s = [];
3014
- return e.each(({ isLast: u, next: i }) => {
3015
- s.push([r(), u ? n : ","]), u || s.push(Ji(e, t) ? [F, F] : d(i, g.Leading | g.Line) ? F : x);
3016
- }, "elements"), qt(s);
3017
- }
3018
- var qi = new Proxy(() => {
3019
- }, { get: () => qi });
3020
- var ln = qi;
3021
- var pl = /^[\$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]*$/;
3022
- var cl = (e) => pl.test(e);
3023
- var Wi = cl;
3024
- function ll(e) {
3025
- 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, "");
3026
- }
3027
- var Ze = ll;
3028
- var mn = /* @__PURE__ */ new WeakMap();
3029
- function Ui(e) {
3030
- return /^(?:\d+|\d+\.\d+)$/u.test(e);
3031
- }
3032
- function Gi(e, t) {
3033
- return t.parser === "json" || t.parser === "jsonc" || !Q(e.key) || tt(fe(e.key), t).slice(1, -1) !== e.key.value ? false : !!(Wi(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || t.parser === "typescript" && e.type === "PropertyDefinition") || Ui(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"));
3034
- }
3035
- function ml(e, t) {
3036
- let { key: r } = e.node;
3037
- return (r.type === "Identifier" || Ce(r) && Ui(Ze(fe(r))) && String(r.value) === Ze(fe(r)) && !(t.parser === "typescript" || t.parser === "babel-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && mn.get(e.parent));
3038
- }
3039
- function Et(e, t, r) {
3040
- let { node: n } = e;
3041
- if (n.computed) return ["[", r("key"), "]"];
3042
- let { parent: s } = e, { key: u } = n;
3043
- if (t.quoteProps === "consistent" && !mn.has(s)) {
3044
- let i = e.siblings.some((a) => !a.computed && Q(a.key) && !Gi(a, t));
3045
- mn.set(s, i);
3046
- }
3047
- if (ml(e, t)) {
3048
- let i = tt(JSON.stringify(u.type === "Identifier" ? u.name : u.value.toString()), t);
3049
- return e.call((a) => ye(a, i, t), "key");
3050
- }
3051
- return Gi(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !mn.get(s)) ? e.call((i) => ye(i, /^\d/u.test(u.value) ? Ze(u.value) : u.value, t), "key") : r("key");
3052
- }
3053
- function yn(e, t, r) {
3054
- let { node: n } = e;
3055
- return n.shorthand ? r("value") : Tt(e, t, r, Et(e, t, r), ":", "value");
3056
- }
3057
- var yl = ({ 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" && gt(r));
3058
- function Dn(e, t, r, n) {
3059
- if (yl(e)) return fn(e, r, t);
3060
- let { node: s } = e, u = false;
3061
- if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && (n != null && n.expandLastArg)) {
3062
- let { parent: m } = e;
3063
- L(m) && (oe(m).length > 1 || K(s).every((D) => D.type === "Identifier" && !D.typeAnnotation)) && (u = true);
3064
- }
3065
- let i = [$(e), s.async ? "async " : "", `function${s.generator ? "*" : ""} `, s.id ? t("id") : ""], a = Je(e, t, r, u), o = Ht(e, t), c = ot(s, o);
3066
- return i.push(Qe(e, r, t), l([c ? l(a) : a, o]), s.body ? " " : "", t("body")), r.semi && (s.declare || !s.body) && i.push(";"), i;
3067
- }
3068
- function mr(e, t, r) {
3069
- let { node: n } = e, { kind: s } = n, u = n.value || n, i = [];
3070
- return !s || s === "init" || s === "method" || s === "constructor" ? u.async && i.push("async ") : (ln.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 ? fn(e, t, r) : r("value")), i;
3071
- }
3072
- function fn(e, t, r) {
3073
- let { node: n } = e, s = Je(e, r, t), u = Ht(e, r), i = vi(n), a = ot(n, u), o = [Qe(e, t, r), l([i ? l(s, { shouldBreak: true }) : a ? l(s) : s, u])];
3074
- return n.body ? o.push(" ", r("body")) : o.push(t.semi ? ";" : ""), o;
3075
- }
3076
- function Dl(e) {
3077
- let t = K(e);
3078
- return t.length === 1 && !e.typeParameters && !d(e, g.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !d(t[0]) && !t[0].optional && !e.predicate && !e.returnType;
3079
- }
3080
- function En(e, t) {
3081
- if (t.arrowParens === "always") return false;
3082
- if (t.arrowParens === "avoid") {
3083
- let { node: r } = e;
3084
- return Dl(r);
3085
- }
3086
- return false;
3087
- }
3088
- function Ht(e, t) {
3089
- let { node: r } = e, s = [Y(e, t, "returnType")];
3090
- return r.predicate && s.push(t("predicate")), s;
3091
- }
3092
- function Ni(e, t, r) {
3093
- let { node: n } = e, s = t.semi ? ";" : "", u = [];
3094
- if (n.argument) {
3095
- let o = r("argument");
3096
- fl(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);
3097
- }
3098
- let i = d(n, g.Dangling), a = s && i && d(n, g.Last | g.Line);
3099
- return a && u.push(s), i && u.push(" ", M(e, t)), a || u.push(s), u;
3100
- }
3101
- function Xi(e, t, r) {
3102
- return ["return", Ni(e, t, r)];
3103
- }
3104
- function Yi(e, t, r) {
3105
- return ["throw", Ni(e, t, r)];
3106
- }
3107
- function fl(e, t) {
3108
- if (Oe(e.originalText, t) || d(t, g.Leading, (r) => de(e.originalText, R(r), k(r))) && !X(t)) return true;
3109
- if (jt(t)) {
3110
- let r = t, n;
3111
- for (; n = uu(r); ) if (r = n, Oe(e.originalText, r)) return true;
3112
- }
3113
- return false;
3114
- }
3115
- var ds = /* @__PURE__ */ new WeakMap();
3116
- function Hi(e) {
3117
- return ds.has(e) || ds.set(e, e.type === "ConditionalExpression" && !ie(e, (t) => t.type === "ObjectExpression")), ds.get(e);
3118
- }
3119
- var Vi = (e) => e.type === "SequenceExpression";
3120
- function $i(e, t, r, n = {}) {
3121
- let s = [], u, i = [], a = false, o = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", c;
3122
- (function T() {
3123
- let { node: S } = e, B = El(e, t, r, n);
3124
- if (s.length === 0) s.push(B);
3125
- else {
3126
- let { leading: _, trailing: J } = os(e, t);
3127
- s.push([_, B]), i.unshift(J);
3128
- }
3129
- o && (a || (a = S.returnType && K(S).length > 0 || S.typeParameters || K(S).some((_) => _.type !== "Identifier"))), !o || S.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), c = S.body) : e.call(T, "body");
3130
- })();
3131
- let m = !Oe(t.originalText, c) && (Vi(c) || Fl(c, u, t) || !a && Hi(c)), D = e.key === "callee" && lt(e.parent), y = Symbol("arrow-chain"), C = Cl(e, n, { signatureDocs: s, shouldBreak: a }), p, A = false;
3132
- return o && (D || n.assignmentLayout) && (A = true, p = n.assignmentLayout === "chain-tail-arrow-chain" || D && !m), u = Al(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: c, shouldPutBodyOnSameLine: m }), l([l(A ? f([E, C]) : C, { shouldBreak: p, id: y }), " =>", o ? At(u, { groupId: y }) : l(u), o && D ? b(E, "", { groupId: y }) : ""]);
3133
- }
3134
- function El(e, t, r, n) {
3135
- let { node: s } = e, u = [];
3136
- if (s.async && u.push("async "), En(e, t)) u.push(r(["params", 0]));
3137
- else {
3138
- let a = n.expandLastArg || n.expandFirstArg, o = Ht(e, r);
3139
- if (a) {
3140
- if (ne(o)) throw new Dt();
3141
- o = l(ur(o));
3142
- }
3143
- u.push(l([Je(e, r, t, a, true), o]));
3144
- }
3145
- let i = M(e, t, { filter(a) {
3146
- let o = yt(t.originalText, k(a));
3147
- return o !== false && t.originalText.slice(o, o + 2) === "=>";
3148
- } });
3149
- return i && u.push(" ", i), u;
3150
- }
3151
- function Fl(e, t, r) {
3152
- var n, s;
3153
- return U(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) || Lr(e, r.originalText));
3154
- }
3155
- function Cl(e, t, { signatureDocs: r, shouldBreak: n }) {
3156
- if (r.length === 1) return r[0];
3157
- let { parent: s, key: u } = e;
3158
- return u !== "callee" && lt(s) || De(s) ? l([r[0], " =>", f([x, P([" =>", x], r.slice(1))])], { shouldBreak: n }) : u === "callee" && lt(s) || t.assignmentLayout ? l(P([" =>", x], r), { shouldBreak: n }) : l(f(P([" =>", x], r)), { shouldBreak: n });
3159
- }
3160
- function Al(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: u, shouldPutBodyOnSameLine: i }) {
3161
- let { node: a, parent: o } = e, c = r.expandLastArg && ae(t, "all") ? b(",") : "", m = (r.expandLastArg || o.type === "JSXExpressionContainer") && !d(a) ? E : "";
3162
- return i && Hi(u) ? [" ", l([b("", "("), f([E, n]), b("", ")"), c, m]), s] : (Vi(u) && (n = l(["(", f([E, n]), E, ")"])), i ? [" ", n, s] : [f([x, n, s]), c, m]);
3163
- }
3164
- var Tl = (e, t, r) => {
3165
- if (!(e && t == null)) {
3166
- if (t.findLast) return t.findLast(r);
3167
- for (let n = t.length - 1; n >= 0; n--) {
3168
- let s = t[n];
3169
- if (r(s, n, t)) return s;
3170
- }
3171
- }
3172
- };
3173
- var Ki = Tl;
3174
- function yr(e, t, r, n) {
3175
- let { node: s } = e, u = [], i = Ki(false, s[n], (a) => a.type !== "EmptyStatement");
3176
- return e.each(({ node: a }) => {
3177
- a.type !== "EmptyStatement" && (u.push(r()), a !== i && (u.push(F), pe(a, t) && u.push(F)));
3178
- }, n), u;
3179
- }
3180
- function Fn(e, t, r) {
3181
- let n = dl(e, t, r), { node: s, parent: u } = e;
3182
- if (s.type === "Program" && (u == null ? void 0 : u.type) !== "ModuleExpression") return n ? [n, F] : "";
3183
- let i = [];
3184
- if (s.type === "StaticBlock" && i.push("static "), i.push("{"), n) i.push(f([F, n]), F);
3185
- else {
3186
- let a = e.grandparent;
3187
- 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);
3188
- }
3189
- return i.push("}"), i;
3190
- }
3191
- function dl(e, t, r) {
3192
- let { node: n } = e, s = w(n.directives), u = n.body.some((o) => o.type !== "EmptyStatement"), i = d(n, g.Dangling);
3193
- if (!s && !u && !i) return "";
3194
- let a = [];
3195
- return s && (a.push(yr(e, t, r, "directives")), (u || i) && (a.push(F), pe(O(false, n.directives, -1), t) && a.push(F))), u && a.push(yr(e, t, r, "body")), i && a.push(M(e, t)), a;
3196
- }
3197
- function xl(e) {
3198
- let t = /* @__PURE__ */ new WeakMap();
3199
- return function(r) {
3200
- return t.has(r) || t.set(r, Symbol(e)), t.get(r);
3201
- };
3202
- }
3203
- var Cn = xl;
3204
- function hl(e) {
3205
- switch (e) {
3206
- case null:
3207
- return "";
3208
- case "PlusOptional":
3209
- return "+?";
3210
- case "MinusOptional":
3211
- return "-?";
3212
- case "Optional":
3213
- return "?";
3214
- }
3215
- }
3216
- function zi(e, t, r) {
3217
- let { node: n } = e;
3218
- return l([n.variance ? r("variance") : "", "[", f([r("keyTparam"), " in ", r("sourceType")]), "]", hl(n.optional), ": ", r("propType")]);
3219
- }
3220
- function xs(e, t) {
3221
- return e === "+" || e === "-" ? e + t : t;
3222
- }
3223
- function Qi(e, t, r) {
3224
- let { node: n } = e, s = de(t.originalText, R(n), R(n.typeParameter));
3225
- return l(["{", f([t.bracketSpacing ? x : E, l([r("typeParameter"), n.optional ? xs(n.optional, "?") : "", n.typeAnnotation ? ": " : "", r("typeAnnotation")]), t.semi ? b(";") : ""]), M(e, t), t.bracketSpacing ? x : E, "}"], { shouldBreak: s });
3226
- }
3227
- var Dr = Cn("typeParameters");
3228
- function gl(e, t, r) {
3229
- let { node: n } = e;
3230
- return K(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath));
3231
- }
3232
- function Pt(e, t, r, n) {
3233
- let { node: s } = e;
3234
- if (!s[n]) return "";
3235
- if (!Array.isArray(s[n])) return r(n);
3236
- let u = St(e.grandparent), i = e.match((c) => !(c[n].length === 1 && we(c[n][0])), void 0, (c, m) => m === "typeAnnotation", (c) => c.type === "Identifier", Fs);
3237
- if (s[n].length === 0 || !i && (u || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || As(s[n][0])))) return ["<", P(", ", e.map(r, n)), Sl(e, t), ">"];
3238
- let o = s.type === "TSTypeParameterInstantiation" ? "" : gl(e, t, n) ? "," : ae(t) ? b(",") : "";
3239
- return l(["<", f([E, P([",", x], e.map(r, n))]), o, E, ">"], { id: Dr(s) });
3240
- }
3241
- function Sl(e, t) {
3242
- let { node: r } = e;
3243
- if (!d(r, g.Dangling)) return "";
3244
- let n = !d(r, g.Line), s = M(e, t, { indent: !n });
3245
- return n ? s : [s, F];
3246
- }
3247
- function An(e, t, r) {
3248
- let { node: n, parent: s } = e, u = [n.type === "TSTypeParameter" && n.const ? "const " : ""], i = n.type === "TSTypeParameter" ? r("name") : n.name;
3249
- if (s.type === "TSMappedType") return s.readonly && u.push(xs(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;
3250
- 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(Y(e, r, "bound"))), n.constraint) {
3251
- let a = Symbol("constraint");
3252
- u.push(" extends", l(f(x), { id: a }), ke, At(r("constraint"), { groupId: a }));
3253
- }
3254
- return n.default && u.push(" = ", r("default")), l(u);
3255
- }
3256
- var Zi = v(["ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
3257
- function Tn(e, t, r) {
3258
- let { node: n } = e, s = [$(e), Nt(e), "class"], u = d(n.id, g.Trailing) || d(n.typeParameters, g.Trailing) || d(n.superClass) || w(n.extends) || w(n.mixins) || w(n.implements), i = [], a = [];
3259
- if (n.id && i.push(" ", r("id")), i.push(r("typeParameters")), n.superClass) {
3260
- let o = [bl(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], c = e.call((m) => ["extends ", ye(m, o, t)], "superClass");
3261
- u ? a.push(x, l(c)) : a.push(" ", c);
3262
- } else a.push(hs(e, t, r, "extends"));
3263
- if (a.push(hs(e, t, r, "mixins"), hs(e, t, r, "implements")), u) {
3264
- let o;
3265
- ta(n) ? o = [...i, f(a)] : o = f([...i, a]), s.push(l(o, { id: ea(n) }));
3266
- } else s.push(...i, ...a);
3267
- return s.push(" ", r("body")), s;
3268
- }
3269
- var ea = Cn("heritageGroup");
3270
- function gs(e) {
3271
- return b(F, "", { groupId: ea(e) });
3272
- }
3273
- function Bl(e) {
3274
- return ["extends", "mixins", "implements"].reduce((t, r) => t + (Array.isArray(e[r]) ? e[r].length : 0), e.superClass ? 1 : 0) > 1;
3275
- }
3276
- function ta(e) {
3277
- return e.typeParameters && !d(e.typeParameters, g.Trailing | g.Line) && !Bl(e);
3278
- }
3279
- function hs(e, t, r, n) {
3280
- let { node: s } = e;
3281
- if (!w(s[n])) return "";
3282
- let u = M(e, t, { marker: n });
3283
- return [ta(s) ? b(" ", x, { groupId: Dr(s.typeParameters) }) : x, u, u && F, n, l(f([x, P([",", x], e.map(r, n))]))];
3284
- }
3285
- function bl(e, t, r) {
3286
- let n = r("superClass"), { parent: s } = e;
3287
- return s.type === "AssignmentExpression" ? l(b(["(", f([E, n]), E, ")"], n)) : n;
3288
- }
3289
- function dn(e, t, r) {
3290
- let { node: n } = e, s = [];
3291
- return w(n.decorators) && s.push(Ds(e, t, r)), s.push(Xt(n)), n.static && s.push("static "), s.push(Nt(e)), n.override && s.push("override "), s.push(mr(e, t, r)), s;
3292
- }
3293
- function xn(e, t, r) {
3294
- let { node: n } = e, s = [], u = t.semi ? ";" : "";
3295
- w(n.decorators) && s.push(Ds(e, t, r)), s.push(Xt(n), $(e)), n.static && s.push("static "), s.push(Nt(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), V(e), pn(e), Y(e, r));
3296
- let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
3297
- return [Tt(e, t, r, s, " =", i ? void 0 : "value"), u];
3298
- }
3299
- function ra(e, t, r) {
3300
- let { node: n } = e, s = [];
3301
- return e.each(({ node: u, next: i, isLast: a }) => {
3302
- s.push(r()), !t.semi && Zi(u) && Pl(u, i) && s.push(";"), a || (s.push(F), pe(u, t) && s.push(F));
3303
- }, "body"), d(n, g.Dangling) && s.push(M(e, t)), [w(n.body) ? gs(e.parent) : "", "{", s.length > 0 ? [f([F, s]), F] : "", "}"];
3304
- }
3305
- function Pl(e, t) {
3306
- var s;
3307
- let { type: r, name: n } = e.key;
3308
- if (!e.computed && r === "Identifier" && (n === "static" || n === "get" || n === "set") && !e.value && !e.typeAnnotation) return true;
3309
- if (!t || t.static || t.accessibility || t.readonly) return false;
3310
- if (!t.computed) {
3311
- let u = (s = t.key) == null ? void 0 : s.name;
3312
- if (u === "in" || u === "instanceof") return true;
3313
- }
3314
- if (Zi(t) && t.variance && !t.static && !t.declare) return true;
3315
- switch (t.type) {
3316
- case "ClassProperty":
3317
- case "PropertyDefinition":
3318
- case "TSAbstractPropertyDefinition":
3319
- return t.computed;
3320
- case "MethodDefinition":
3321
- case "TSAbstractMethodDefinition":
3322
- case "ClassMethod":
3323
- case "ClassPrivateMethod": {
3324
- if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return false;
3325
- let i = t.value ? t.value.generator : t.generator;
3326
- return !!(t.computed || i);
3327
- }
3328
- case "TSIndexSignature":
3329
- return true;
3330
- }
3331
- return false;
3332
- }
3333
- function na(e, t) {
3334
- if (t.semi || Ss(e, t) || bs(e, t)) return false;
3335
- let { node: r, key: n, parent: s } = e;
3336
- 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(() => sa(e, t), "expression"));
3337
- }
3338
- function sa(e, t) {
3339
- let { node: r } = e;
3340
- switch (r.type) {
3341
- case "ParenthesizedExpression":
3342
- case "TypeCastExpression":
3343
- case "ArrayExpression":
3344
- case "ArrayPattern":
3345
- case "TemplateLiteral":
3346
- case "TemplateElement":
3347
- case "RegExpLiteral":
3348
- return true;
3349
- case "ArrowFunctionExpression":
3350
- if (!En(e, t)) return true;
3351
- break;
3352
- case "UnaryExpression": {
3353
- let { prefix: n, operator: s } = r;
3354
- if (n && (s === "+" || s === "-")) return true;
3355
- break;
3356
- }
3357
- case "BindExpression":
3358
- if (!r.object) return true;
3359
- break;
3360
- case "Literal":
3361
- if (r.regex) return true;
3362
- break;
3363
- default:
3364
- if (X(r)) return true;
3365
- }
3366
- return Be(e, t) ? true : jt(r) ? e.call(() => sa(e, t), ...Pr(r)) : false;
3367
- }
3368
- function Ss({ node: e, parent: t }, r) {
3369
- return (r.parentParser === "markdown" || r.parentParser === "mdx") && e.type === "ExpressionStatement" && X(e.expression) && t.type === "Program" && t.body.length === 1;
3370
- }
3371
- function Bs(e) {
3372
- switch (e.type) {
3373
- case "MemberExpression":
3374
- switch (e.property.type) {
3375
- case "Identifier":
3376
- case "NumericLiteral":
3377
- case "StringLiteral":
3378
- return Bs(e.object);
3379
- }
3380
- return false;
3381
- case "Identifier":
3382
- return true;
3383
- default:
3384
- return false;
3385
- }
3386
- }
3387
- function bs({ node: e, parent: t }, r) {
3388
- return (r.parser === "__vue_event_binding" || r.parser === "__vue_ts_event_binding") && e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1;
3389
- }
3390
- function ua(e, t, r) {
3391
- let n = [r("expression")];
3392
- return bs(e, t) ? Bs(e.node.expression) && n.push(";") : Ss(e, t) || t.semi && n.push(";"), n;
3393
- }
3394
- function ia(e, t, r) {
3395
- if (t.__isVueBindings || t.__isVueForBindingLeft) {
3396
- let n = e.map(r, "program", "body", 0, "params");
3397
- if (n.length === 1) return n[0];
3398
- let s = P([",", x], n);
3399
- return t.__isVueForBindingLeft ? ["(", f([E, l(s)]), E, ")"] : s;
3400
- }
3401
- if (t.__isEmbeddedTypescriptGenericParameters) {
3402
- let n = e.map(r, "program", "body", 0, "typeParameters", "params");
3403
- return P([",", x], n);
3404
- }
3405
- }
3406
- function pa(e, t) {
3407
- let { node: r } = e;
3408
- switch (r.type) {
3409
- case "RegExpLiteral":
3410
- return aa(r);
3411
- case "BigIntLiteral":
3412
- return hn(r.extra.raw);
3413
- case "NumericLiteral":
3414
- return Ze(r.extra.raw);
3415
- case "StringLiteral":
3416
- return Ie(tt(r.extra.raw, t));
3417
- case "NullLiteral":
3418
- return "null";
3419
- case "BooleanLiteral":
3420
- return String(r.value);
3421
- case "DecimalLiteral":
3422
- return Ze(r.value) + "m";
3423
- case "DirectiveLiteral":
3424
- return oa(r.extra.raw, t);
3425
- case "Literal": {
3426
- if (r.regex) return aa(r.regex);
3427
- if (r.bigint) return hn(r.raw);
3428
- if (r.decimal) return Ze(r.decimal) + "m";
3429
- let { value: n } = r;
3430
- return typeof n == "number" ? Ze(r.raw) : typeof n == "string" ? kl(e) ? oa(r.raw, t) : Ie(tt(r.raw, t)) : String(n);
3431
- }
3432
- }
3433
- }
3434
- function kl(e) {
3435
- if (e.key !== "expression") return;
3436
- let { parent: t } = e;
3437
- return t.type === "ExpressionStatement" && t.directive;
3438
- }
3439
- function hn(e) {
3440
- return e.toLowerCase();
3441
- }
3442
- function aa({ pattern: e, flags: t }) {
3443
- return t = [...t].sort().join(""), `/${e}/${t}`;
3444
- }
3445
- function oa(e, t) {
3446
- let r = e.slice(1, -1);
3447
- if (r.includes('"') || r.includes("'")) return e;
3448
- let n = t.singleQuote ? "'" : '"';
3449
- return n + r + n;
3450
- }
3451
- function Il(e, t, r) {
3452
- let n = e.originalText.slice(t, r);
3453
- for (let s of e[Symbol.for("comments")]) {
3454
- let u = R(s);
3455
- if (u > r) break;
3456
- let i = k(s);
3457
- if (i < t) continue;
3458
- let a = i - u;
3459
- n = n.slice(0, u - t) + " ".repeat(a) + n.slice(i - t);
3460
- }
3461
- return n;
3462
- }
3463
- var fr = Il;
3464
- function ca(e, t, r) {
3465
- let { node: n } = e;
3466
- return ["import", n.module ? " module" : "", n.phase ? ` ${n.phase}` : "", ks(n), ya(e, t, r), ma(e, t, r), fa(e, t, r), t.semi ? ";" : ""];
3467
- }
3468
- var la = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default;
3469
- function gn(e, t, r) {
3470
- let { node: n } = e, s = [di(e, t, r), $(e), "export", la(n) ? " default" : ""], { declaration: u, exported: i } = n;
3471
- return d(n, g.Dangling) && (s.push(" ", M(e, t)), wr(n) && s.push(F)), u ? s.push(" ", r("declaration")) : (s.push(Ol(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), i && s.push(" as ", r("exported"))) : s.push(ya(e, t, r)), s.push(ma(e, t, r), fa(e, t, r))), s.push(wl(n, t)), s;
3472
- }
3473
- var Ll = v(["ClassDeclaration", "ComponentDeclaration", "FunctionDeclaration", "TSInterfaceDeclaration", "DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "HookDeclaration", "TSDeclareFunction", "EnumDeclaration"]);
3474
- function wl(e, t) {
3475
- return t.semi && (!e.declaration || la(e) && !Ll(e.declaration)) ? ";" : "";
3476
- }
3477
- function Ps(e, t = true) {
3478
- return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : "";
3479
- }
3480
- function ks(e, t) {
3481
- return Ps(e.importKind, t);
3482
- }
3483
- function Ol(e) {
3484
- return Ps(e.exportKind);
3485
- }
3486
- function ma(e, t, r) {
3487
- let { node: n } = e;
3488
- if (!n.source) return "";
3489
- let s = [];
3490
- return Da(n, t) && s.push(" from"), s.push(" ", r("source")), s;
3491
- }
3492
- function ya(e, t, r) {
3493
- let { node: n } = e;
3494
- if (!Da(n, t)) return "";
3495
- let s = [" "];
3496
- if (w(n.specifiers)) {
3497
- let u = [], i = [];
3498
- e.each(() => {
3499
- let a = e.node.type;
3500
- if (a === "ExportNamespaceSpecifier" || a === "ExportDefaultSpecifier" || a === "ImportNamespaceSpecifier" || a === "ImportDefaultSpecifier") u.push(r());
3501
- else if (a === "ExportSpecifier" || a === "ImportSpecifier") i.push(r());
3502
- else throw new Me(n, "specifier");
3503
- }, "specifiers"), s.push(P(", ", u)), i.length > 0 && (u.length > 0 && s.push(", "), i.length > 1 || u.length > 0 || n.specifiers.some((o) => d(o)) ? s.push(l(["{", f([t.bracketSpacing ? x : E, P([",", x], i)]), b(ae(t) ? "," : ""), t.bracketSpacing ? x : E, "}"])) : s.push(["{", t.bracketSpacing ? " " : "", ...i, t.bracketSpacing ? " " : "", "}"]));
3504
- } else s.push("{}");
3505
- return s;
3506
- }
3507
- function Da(e, t) {
3508
- return e.type !== "ImportDeclaration" || w(e.specifiers) || e.importKind === "type" ? true : fr(t, R(e), R(e.source)).trimEnd().endsWith("from");
3509
- }
3510
- function _l(e, t) {
3511
- var n, s;
3512
- if ((n = e.extra) != null && n.deprecatedAssertSyntax) return "assert";
3513
- let r = fr(t, k(e.source), (s = e.attributes) != null && s[0] ? R(e.attributes[0]) : k(e)).trimStart();
3514
- return r.startsWith("assert") ? "assert" : r.startsWith("with") || w(e.attributes) ? "with" : void 0;
3515
- }
3516
- function fa(e, t, r) {
3517
- let { node: n } = e;
3518
- if (!n.source) return "";
3519
- let s = _l(n, t);
3520
- if (!s) return "";
3521
- let u = [` ${s} {`];
3522
- return w(n.attributes) && (t.bracketSpacing && u.push(" "), u.push(P(", ", e.map(r, "attributes"))), t.bracketSpacing && u.push(" ")), u.push("}"), u;
3523
- }
3524
- function Ea(e, t, r) {
3525
- let { node: n } = e, { type: s } = n, u = s.startsWith("Import"), i = u ? "imported" : "local", a = u ? "local" : "exported", o = n[i], c = n[a], m = "", D = "";
3526
- return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? m = "*" : o && (m = r(i)), c && !jl(n) && (D = r(a)), [Ps(s === "ImportSpecifier" ? n.importKind : n.exportKind, false), m, m && D ? " as " : "", D];
3527
- }
3528
- function jl(e) {
3529
- if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return false;
3530
- let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e;
3531
- if (t.type !== r.type || !eu(t, r)) return false;
3532
- if (Q(t)) return t.value === r.value && fe(t) === fe(r);
3533
- switch (t.type) {
3534
- case "Identifier":
3535
- return t.name === r.name;
3536
- default:
3537
- return false;
3538
- }
3539
- }
3540
- function dt(e, t, r) {
3541
- var j;
3542
- 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"];
3543
- u && a.push("indexers", "callProperties", "internalSlots");
3544
- let o = a.flatMap((h) => e.map(({ node: W }) => ({ node: W, printed: r(), loc: R(W) }), h));
3545
- a.length > 1 && o.sort((h, W) => h.loc - W.loc);
3546
- let { parent: c, key: m } = e, D = u && m === "body" && (c.type === "InterfaceDeclaration" || c.type === "DeclareInterface" || c.type === "DeclareClass"), y = s.type === "TSInterfaceBody" || i || D || s.type === "ObjectPattern" && c.type !== "FunctionDeclaration" && c.type !== "FunctionExpression" && c.type !== "ArrowFunctionExpression" && c.type !== "ObjectMethod" && c.type !== "ClassMethod" && c.type !== "ClassPrivateMethod" && c.type !== "AssignmentPattern" && c.type !== "CatchClause" && s.properties.some((h) => h.value && (h.value.type === "ObjectPattern" || h.value.type === "ArrayPattern")) || s.type !== "ObjectPattern" && o.length > 0 && de(t.originalText, R(s), o[0].loc), C = D ? ";" : s.type === "TSInterfaceBody" || s.type === "TSTypeLiteral" ? b(n, ";") : ",", p = s.type === "RecordExpression" ? "#{" : s.exact ? "{|" : "{", A = s.exact ? "|}" : "}", T = [], S = o.map((h) => {
3547
- let W = [...T, l(h.printed)];
3548
- return T = [C, x], (h.node.type === "TSPropertySignature" || h.node.type === "TSMethodSignature" || h.node.type === "TSConstructSignatureDeclaration" || h.node.type === "TSCallSignatureDeclaration") && d(h.node, g.PrettierIgnore) && T.shift(), pe(h.node, t) && T.push(F), W;
3549
- });
3550
- if (s.inexact || s.hasUnknownMembers) {
3551
- let h;
3552
- if (d(s, g.Dangling)) {
3553
- let W = d(s, g.Line);
3554
- h = [M(e, t), W || te(t.originalText, k(O(false, ct(s), -1))) ? F : x, "..."];
3555
- } else h = ["..."];
3556
- S.push([...T, ...h]);
3557
- }
3558
- let B = (j = O(false, o, -1)) == null ? void 0 : j.node, _ = !(s.inexact || s.hasUnknownMembers || B && (B.type === "RestElement" || (B.type === "TSPropertySignature" || B.type === "TSCallSignatureDeclaration" || B.type === "TSMethodSignature" || B.type === "TSConstructSignatureDeclaration") && d(B, g.PrettierIgnore))), J;
3559
- if (S.length === 0) {
3560
- if (!d(s, g.Dangling)) return [p, A, Y(e, r)];
3561
- J = l([p, M(e, t, { indent: true }), E, A, V(e), Y(e, r)]);
3562
- } else J = [D && w(s.properties) ? gs(c) : "", p, f([t.bracketSpacing ? x : E, ...S]), b(_ && (C !== "," || ae(t)) ? C : ""), t.bracketSpacing ? x : E, A, V(e), Y(e, r)];
3563
- return e.match((h) => h.type === "ObjectPattern" && !w(h.decorators), Is) || we(s) && (e.match(void 0, (h, W) => W === "typeAnnotation", (h, W) => W === "typeAnnotation", Is) || e.match(void 0, (h, W) => h.type === "FunctionTypeParam" && W === "typeAnnotation", Is)) || !y && e.match((h) => h.type === "ObjectPattern", (h) => h.type === "AssignmentExpression" || h.type === "VariableDeclarator") ? J : l(J, { shouldBreak: y });
3564
- }
3565
- function Is(e, t) {
3566
- return (t === "params" || t === "parameters" || t === "this" || t === "rest") && Cs(e);
3567
- }
3568
- function vl(e) {
3569
- let t = [e];
3570
- for (let r = 0; r < t.length; r++) {
3571
- let n = t[r];
3572
- for (let s of ["test", "consequent", "alternate"]) {
3573
- let u = n[s];
3574
- if (X(u)) return true;
3575
- u.type === "ConditionalExpression" && t.push(u);
3576
- }
3577
- }
3578
- return false;
3579
- }
3580
- function Ml(e, t, r) {
3581
- let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "alternate" : "falseType", { parent: i } = e, a = s ? r("test") : [r("checkType"), " ", "extends", " ", r("extendsType")];
3582
- return i.type === n.type && i[u] === n ? he(2, a) : a;
3583
- }
3584
- var Rl = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3585
- function Jl(e) {
3586
- let { node: t } = e;
3587
- if (t.type !== "ConditionalExpression") return false;
3588
- let r, n = t;
3589
- for (let s = 0; !r; s++) {
3590
- let u = e.getParentNode(s);
3591
- if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || q(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3592
- n = u;
3593
- continue;
3594
- }
3595
- u.type === "NewExpression" && u.callee === n || Te(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3596
- }
3597
- return n === t ? false : r[Rl.get(r.type)] === n;
3598
- }
3599
- function Fa(e, t, r) {
3600
- let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "consequent" : "trueType", i = s ? "alternate" : "falseType", a = s ? ["test"] : ["checkType", "extendsType"], o = n[u], c = n[i], m = [], D = false, { parent: y } = e, C = y.type === n.type && a.some((H) => y[H] === n), p = y.type === n.type && !C, A, T, S = 0;
3601
- do
3602
- T = A || n, A = e.getParentNode(S), S++;
3603
- while (A && A.type === n.type && a.every((H) => A[H] !== T));
3604
- let B = A || y, _ = T;
3605
- if (s && (X(n[a[0]]) || X(o) || X(c) || vl(_))) {
3606
- D = true, p = true;
3607
- let H = (Z) => [b("("), f([E, Z]), E, b(")")], ue = (Z) => Z.type === "NullLiteral" || Z.type === "Literal" && Z.value === null || Z.type === "Identifier" && Z.name === "undefined";
3608
- m.push(" ? ", ue(o) ? r(u) : H(r(u)), " : ", c.type === n.type || ue(c) ? r(i) : H(r(i)));
3609
- } else {
3610
- let H = (Z) => t.useTabs ? f(r(Z)) : he(2, r(Z)), ue = [x, "? ", o.type === n.type ? b("", "(") : "", H(u), o.type === n.type ? b("", ")") : "", x, ": ", H(i)];
3611
- m.push(y.type !== n.type || y[i] === n || C ? ue : t.useTabs ? Mr(f(ue)) : he(Math.max(0, t.tabWidth - 2), ue));
3612
- }
3613
- let J = [u, i, ...a].some((H) => d(n[H], (ue) => re(ue) && de(t.originalText, R(ue), k(ue)))), j = (H) => y === B ? l(H, { shouldBreak: J }) : J ? [H, Ee] : H, h = !D && (q(y) || y.type === "NGPipeExpression" && y.left === n) && !y.computed, W = Jl(e), Fe = j([Ml(e, t, r), p ? m : f(m), s && h && !W ? E : ""]);
3614
- return C || W ? l([f([E, Fe]), E]) : Fe;
3615
- }
3616
- function ql(e, t) {
3617
- return (q(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed;
3618
- }
3619
- function Wl(e, t, r, n) {
3620
- return [...e.map((u) => ct(u)), ct(t), ct(r)].flat().some((u) => re(u) && de(n.originalText, R(u), k(u)));
3621
- }
3622
- var Gl = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3623
- function Ul(e) {
3624
- let { node: t } = e;
3625
- if (t.type !== "ConditionalExpression") return false;
3626
- let r, n = t;
3627
- for (let s = 0; !r; s++) {
3628
- let u = e.getParentNode(s);
3629
- if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || q(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3630
- n = u;
3631
- continue;
3632
- }
3633
- u.type === "NewExpression" && u.callee === n || Te(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3634
- }
3635
- return n === t ? false : r[Gl.get(r.type)] === n;
3636
- }
3637
- var Ls = (e) => [b("("), f([E, e]), E, b(")")];
3638
- function Vt(e, t, r, n) {
3639
- if (!t.experimentalTernaries) return Fa(e, t, r);
3640
- let { node: s } = e, u = s.type === "ConditionalExpression", i = s.type === "TSConditionalType" || s.type === "ConditionalTypeAnnotation", a = u ? "consequent" : "trueType", o = u ? "alternate" : "falseType", c = u ? ["test"] : ["checkType", "extendsType"], m = s[a], D = s[o], y = c.map((We) => s[We]), { parent: C } = e, p = C.type === s.type, A = p && c.some((We) => C[We] === s), T = p && C[o] === s, S = m.type === s.type, B = D.type === s.type, _ = B || T, J = t.tabWidth > 2 || t.useTabs, j, h, W = 0;
3641
- do
3642
- h = j || s, j = e.getParentNode(W), W++;
3643
- while (j && j.type === s.type && c.every((We) => j[We] !== h));
3644
- let Fe = j || C, H = 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 || B), Z = u && Fe.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", It = Ul(e), $t = ql(s, C), I = i && Be(e, t), G = J ? t.useTabs ? " " : " ".repeat(t.tabWidth - 1) : "", ee = Wl(y, m, D, t) || S || B, qe = !_ && !p && !i && (Z ? m.type === "NullLiteral" || m.type === "Literal" && m.value === null : rr(m, t) && Mn(s.test, 3)), xt = _ || T || i && !p || p && u && Mn(s.test, 1) || qe, js = [];
3645
- !S && d(m, g.Dangling) && e.call((We) => {
3646
- js.push(M(We, t), F);
3647
- }, "consequent");
3648
- let Kt = [];
3649
- d(s.test, g.Dangling) && e.call((We) => {
3650
- Kt.push(M(We, t));
3651
- }, "test"), !B && d(D, g.Dangling) && e.call((We) => {
3652
- Kt.push(M(We, t));
3653
- }, "alternate"), d(s, g.Dangling) && Kt.push(M(e, t));
3654
- let vs = Symbol("test"), Ma = Symbol("consequent"), Fr = Symbol("test-and-consequent"), Ra = u ? [Ls(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(Ls(r("extendsType")))], Ms = l([Ra, " ?"], { id: vs }), Ja = r(a), Cr = f([S || Z && (X(m) || p || _) ? F : x, js, Ja]), qa = xt ? l([Ms, _ ? Cr : b(Cr, l(Cr, { id: Ma }), { groupId: vs })], { id: Fr }) : [Ms, Cr], kn = r(o), Rs = qe ? b(kn, Mr(Ls(kn)), { groupId: Fr }) : kn, zt = [qa, Kt.length > 0 ? [f([F, Kt]), F] : B ? F : qe ? b(x, " ", { groupId: Fr }) : x, ":", B ? " " : J ? xt ? b(G, b(_ || qe ? " " : G, " "), { groupId: Fr }) : b(G, " ") : " ", B ? Rs : l([f(Rs), Z && !qe ? E : ""]), $t && !It ? E : "", ee ? Ee : ""];
3655
- return H && !ee ? l(f([E, l(zt)])) : H || ue ? l(f(zt)) : It || i && A ? l([f([E, zt]), I ? E : ""]) : C === Fe ? l(zt) : zt;
3656
- }
3657
- function Ca(e, t, r, n) {
3658
- let { node: s } = e;
3659
- if (kr(s)) return pa(e, t);
3660
- let u = t.semi ? ";" : "", i = [];
3661
- switch (s.type) {
3662
- case "JsExpressionRoot":
3663
- return r("node");
3664
- case "JsonRoot":
3665
- return [r("node"), F];
3666
- case "File":
3667
- return ia(e, t, r) ?? r("program");
3668
- case "EmptyStatement":
3669
- return "";
3670
- case "ExpressionStatement":
3671
- return ua(e, t, r);
3672
- case "ChainExpression":
3673
- return r("expression");
3674
- case "ParenthesizedExpression":
3675
- return !d(s.expression) && (se(s.expression) || U(s.expression)) ? ["(", r("expression"), ")"] : l(["(", f([E, r("expression")]), E, ")"]);
3676
- case "AssignmentExpression":
3677
- return wi(e, t, r);
3678
- case "VariableDeclarator":
3679
- return Oi(e, t, r);
3680
- case "BinaryExpression":
3681
- case "LogicalExpression":
3682
- return Yr(e, t, r);
3683
- case "AssignmentPattern":
3684
- return [r("left"), " = ", r("right")];
3685
- case "OptionalMemberExpression":
3686
- case "MemberExpression":
3687
- return bi(e, t, r);
3688
- case "MetaProperty":
3689
- return [r("meta"), ".", r("property")];
3690
- case "BindExpression":
3691
- return s.object && i.push(r("object")), i.push(l(f([E, Hr(e, t, r)]))), i;
3692
- case "Identifier":
3693
- return [s.name, V(e), pn(e), Y(e, r)];
3694
- case "V8IntrinsicIdentifier":
3695
- return ["%", s.name];
3696
- case "SpreadElement":
3697
- case "SpreadElementPattern":
3698
- case "SpreadPropertyPattern":
3699
- case "RestElement":
3700
- return cn(e, r);
3701
- case "FunctionDeclaration":
3702
- case "FunctionExpression":
3703
- return Dn(e, r, t, n);
3704
- case "ArrowFunctionExpression":
3705
- return $i(e, t, r, n);
3706
- case "YieldExpression":
3707
- return i.push("yield"), s.delegate && i.push("*"), s.argument && i.push(" ", r("argument")), i;
3708
- case "AwaitExpression":
3709
- if (i.push("await"), s.argument) {
3710
- i.push(" ", r("argument"));
3711
- let { parent: a } = e;
3712
- if (L(a) && a.callee === s || q(a) && a.object === s) {
3713
- i = [f([E, ...i]), E];
3714
- let o = e.findAncestor((c) => c.type === "AwaitExpression" || c.type === "BlockStatement");
3715
- if ((o == null ? void 0 : o.type) !== "AwaitExpression" || !ie(o.argument, (c) => c === s)) return l(i);
3716
- }
3717
- }
3718
- return i;
3719
- case "ExportDefaultDeclaration":
3720
- case "ExportNamedDeclaration":
3721
- case "ExportAllDeclaration":
3722
- return gn(e, t, r);
3723
- case "ImportDeclaration":
3724
- return ca(e, t, r);
3725
- case "ImportSpecifier":
3726
- case "ExportSpecifier":
3727
- case "ImportNamespaceSpecifier":
3728
- case "ExportNamespaceSpecifier":
3729
- case "ImportDefaultSpecifier":
3730
- case "ExportDefaultSpecifier":
3731
- return Ea(e, t, r);
3732
- case "ImportAttribute":
3733
- return yn(e, t, r);
3734
- case "Import":
3735
- return "import";
3736
- case "Program":
3737
- case "BlockStatement":
3738
- case "StaticBlock":
3739
- return Fn(e, t, r);
3740
- case "ClassBody":
3741
- return ra(e, t, r);
3742
- case "ThrowStatement":
3743
- return Yi(e, t, r);
3744
- case "ReturnStatement":
3745
- return Xi(e, t, r);
3746
- case "NewExpression":
3747
- case "ImportExpression":
3748
- case "OptionalCallExpression":
3749
- case "CallExpression":
3750
- return Vr(e, t, r);
3751
- case "ObjectExpression":
3752
- case "ObjectPattern":
3753
- case "RecordExpression":
3754
- return dt(e, t, r);
3755
- case "Property":
3756
- return gt(s) ? mr(e, t, r) : yn(e, t, r);
3757
- case "ObjectProperty":
3758
- return yn(e, t, r);
3759
- case "ObjectMethod":
3760
- return mr(e, t, r);
3761
- case "Decorator":
3762
- return ["@", r("expression")];
3763
- case "ArrayExpression":
3764
- case "ArrayPattern":
3765
- case "TupleExpression":
3766
- return Yt(e, t, r);
3767
- case "SequenceExpression": {
3768
- let { parent: a } = e;
3769
- if (a.type === "ExpressionStatement" || a.type === "ForStatement") {
3770
- let o = [];
3771
- return e.each(({ isFirst: c }) => {
3772
- c ? o.push(r()) : o.push(",", f([x, r()]));
3773
- }, "expressions"), l(o);
3774
- }
3775
- return l(P([",", x], e.map(r, "expressions")));
3776
- }
3777
- case "ThisExpression":
3778
- return "this";
3779
- case "Super":
3780
- return "super";
3781
- case "Directive":
3782
- return [r("value"), u];
3783
- case "UnaryExpression":
3784
- return i.push(s.operator), /[a-z]$/u.test(s.operator) && i.push(" "), d(s.argument) ? i.push(l(["(", f([E, r("argument")]), E, ")"])) : i.push(r("argument")), i;
3785
- case "UpdateExpression":
3786
- return [s.prefix ? s.operator : "", r("argument"), s.prefix ? "" : s.operator];
3787
- case "ConditionalExpression":
3788
- return Vt(e, t, r, n);
3789
- case "VariableDeclaration": {
3790
- let a = e.map(r, "declarations"), o = e.parent, c = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", m = s.declarations.some((y) => y.init), D;
3791
- return a.length === 1 && !d(s.declarations[0]) ? D = a[0] : a.length > 0 && (D = f(a[0])), i = [$(e), s.kind, D ? [" ", D] : "", f(a.slice(1).map((y) => [",", m && !c ? F : x, y]))], c && o.body !== s || i.push(u), l(i);
3792
- }
3793
- case "WithStatement":
3794
- return l(["with (", r("object"), ")", ft(s.body, r("body"))]);
3795
- case "IfStatement": {
3796
- let a = ft(s.consequent, r("consequent")), o = l(["if (", l([f([E, r("test")]), E]), ")", a]);
3797
- if (i.push(o), s.alternate) {
3798
- let c = d(s.consequent, g.Trailing | g.Line) || wr(s), m = s.consequent.type === "BlockStatement" && !c;
3799
- i.push(m ? " " : F), d(s, g.Dangling) && i.push(M(e, t), c ? F : " "), i.push("else", l(ft(s.alternate, r("alternate"), s.alternate.type === "IfStatement")));
3800
- }
3801
- return i;
3802
- }
3803
- case "ForStatement": {
3804
- let a = ft(s.body, r("body")), o = M(e, t), c = o ? [o, E] : "";
3805
- return !s.init && !s.test && !s.update ? [c, l(["for (;;)", a])] : [c, l(["for (", l([f([E, r("init"), ";", x, r("test"), ";", x, r("update")]), E]), ")", a])];
3806
- }
3807
- case "WhileStatement":
3808
- return l(["while (", l([f([E, r("test")]), E]), ")", ft(s.body, r("body"))]);
3809
- case "ForInStatement":
3810
- return l(["for (", r("left"), " in ", r("right"), ")", ft(s.body, r("body"))]);
3811
- case "ForOfStatement":
3812
- return l(["for", s.await ? " await" : "", " (", r("left"), " of ", r("right"), ")", ft(s.body, r("body"))]);
3813
- case "DoWhileStatement": {
3814
- let a = ft(s.body, r("body"));
3815
- 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;
3816
- }
3817
- case "DoExpression":
3818
- return [s.async ? "async " : "", "do ", r("body")];
3819
- case "BreakStatement":
3820
- case "ContinueStatement":
3821
- return i.push(s.type === "BreakStatement" ? "break" : "continue"), s.label && i.push(" ", r("label")), i.push(u), i;
3822
- case "LabeledStatement":
3823
- return s.body.type === "EmptyStatement" ? [r("label"), ":;"] : [r("label"), ": ", r("body")];
3824
- case "TryStatement":
3825
- return ["try ", r("block"), s.handler ? [" ", r("handler")] : "", s.finalizer ? [" finally ", r("finalizer")] : ""];
3826
- case "CatchClause":
3827
- if (s.param) {
3828
- let a = d(s.param, (c) => !re(c) || c.leading && te(t.originalText, k(c)) || c.trailing && te(t.originalText, R(c), { backwards: true })), o = r("param");
3829
- return ["catch ", a ? ["(", f([E, o]), E, ") "] : ["(", o, ") "], r("body")];
3830
- }
3831
- return ["catch ", r("body")];
3832
- case "SwitchStatement":
3833
- return [l(["switch (", f([E, r("discriminant")]), E, ")"]), " {", s.cases.length > 0 ? f([F, P(F, e.map(({ node: a, isLast: o }) => [r(), !o && pe(a, t) ? F : ""], "cases"))]) : "", F, "}"];
3834
- case "SwitchCase": {
3835
- s.test ? i.push("case ", r("test"), ":") : i.push("default:"), d(s, g.Dangling) && i.push(" ", M(e, t));
3836
- let a = s.consequent.filter((o) => o.type !== "EmptyStatement");
3837
- if (a.length > 0) {
3838
- let o = yr(e, t, r, "consequent");
3839
- i.push(a.length === 1 && a[0].type === "BlockStatement" ? [" ", o] : f([F, o]));
3840
- }
3841
- return i;
3842
- }
3843
- case "DebuggerStatement":
3844
- return ["debugger", u];
3845
- case "ClassDeclaration":
3846
- case "ClassExpression":
3847
- return Tn(e, t, r);
3848
- case "ClassMethod":
3849
- case "ClassPrivateMethod":
3850
- case "MethodDefinition":
3851
- return dn(e, t, r);
3852
- case "ClassProperty":
3853
- case "PropertyDefinition":
3854
- case "ClassPrivateProperty":
3855
- case "ClassAccessorProperty":
3856
- case "AccessorProperty":
3857
- return xn(e, t, r);
3858
- case "TemplateElement":
3859
- return Ie(s.value.raw);
3860
- case "TemplateLiteral":
3861
- return qr(e, r, t);
3862
- case "TaggedTemplateExpression":
3863
- return Uu(e, r);
3864
- case "PrivateIdentifier":
3865
- return ["#", s.name];
3866
- case "PrivateName":
3867
- return ["#", r("id")];
3868
- case "TopicReference":
3869
- return "%";
3870
- case "ArgumentPlaceholder":
3871
- return "?";
3872
- case "ModuleExpression":
3873
- return ["module ", r("body")];
3874
- case "InterpreterDirective":
3875
- default:
3876
- throw new Me(s, "ESTree");
3877
- }
3878
- }
3879
- function Sn(e, t, r) {
3880
- let { parent: n, node: s, key: u } = e, i = [r("expression")];
3881
- switch (s.type) {
3882
- case "AsConstExpression":
3883
- i.push(" as const");
3884
- break;
3885
- case "AsExpression":
3886
- case "TSAsExpression":
3887
- i.push(" as ", r("typeAnnotation"));
3888
- break;
3889
- case "SatisfiesExpression":
3890
- case "TSSatisfiesExpression":
3891
- i.push(" satisfies ", r("typeAnnotation"));
3892
- break;
3893
- }
3894
- return u === "callee" && L(n) || u === "object" && q(n) ? l([f([E, ...i]), E]) : i;
3895
- }
3896
- function Aa(e, t, r) {
3897
- let { node: n } = e, s = [$(e), "component"];
3898
- n.id && s.push(" ", r("id")), s.push(r("typeParameters"));
3899
- let u = Nl(e, r, t);
3900
- 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;
3901
- }
3902
- function Nl(e, t, r) {
3903
- let { node: n } = e, s = n.params;
3904
- if (n.rest && (s = [...s, n.rest]), s.length === 0) return ["(", M(e, r, { filter: (i) => ge(r.originalText, k(i)) === ")" }), ")"];
3905
- let u = [];
3906
- return Yl(e, (i, a) => {
3907
- let o = a === s.length - 1;
3908
- o && n.rest && u.push("..."), u.push(t()), !o && (u.push(","), pe(s[a], r) ? u.push(F, F) : u.push(x));
3909
- }), ["(", f([E, ...u]), b(ae(r, "all") && !Xl(n, s) ? "," : ""), E, ")"];
3910
- }
3911
- function Xl(e, t) {
3912
- var r;
3913
- return e.rest || ((r = O(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
3914
- }
3915
- function Yl(e, t) {
3916
- let { node: r } = e, n = 0, s = (u) => t(u, n++);
3917
- e.each(s, "params"), r.rest && e.call(s, "rest");
3918
- }
3919
- function Ta(e, t, r) {
3920
- let { node: n } = e;
3921
- return n.shorthand ? r("local") : [r("name"), " as ", r("local")];
3922
- }
3923
- function da(e, t, r) {
3924
- let { node: n } = e, s = [];
3925
- return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s;
3926
- }
3927
- function xa(e, t, r) {
3928
- return dt(e, r, t);
3929
- }
3930
- function Bn(e, t) {
3931
- let { node: r } = e, n = t("id");
3932
- r.computed && (n = ["[", n, "]"]);
3933
- let s = "";
3934
- return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [n, " = ", s] : n;
3935
- }
3936
- function ha(e, t, r) {
3937
- let { node: n } = e, s;
3938
- if (n.type === "EnumSymbolBody" || n.explicitType) switch (n.type) {
3939
- case "EnumBooleanBody":
3940
- s = "boolean";
3941
- break;
3942
- case "EnumNumberBody":
3943
- s = "number";
3944
- break;
3945
- case "EnumBigIntBody":
3946
- s = "bigint";
3947
- break;
3948
- case "EnumStringBody":
3949
- s = "string";
3950
- break;
3951
- case "EnumSymbolBody":
3952
- s = "symbol";
3953
- break;
3954
- }
3955
- return [s ? `of ${s} ` : "", xa(e, t, r)];
3956
- }
3957
- function bn(e, t, r) {
3958
- let { node: n } = e;
3959
- return [$(e), n.const ? "const " : "", "enum ", t("id"), " ", n.type === "TSEnumDeclaration" ? xa(e, t, r) : t("body")];
3960
- }
3961
- function Sa(e, t, r) {
3962
- let { node: n } = e, s = ["hook"];
3963
- n.id && s.push(" ", r("id"));
3964
- let u = Je(e, r, t, false, true), i = Ht(e, r), a = ot(n, i);
3965
- return s.push(l([a ? l(u) : u, i]), n.body ? " " : "", r("body")), s;
3966
- }
3967
- function Ba(e, t, r) {
3968
- let { node: n } = e, s = [$(e), "hook"];
3969
- return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s;
3970
- }
3971
- function ga(e) {
3972
- var r;
3973
- let { node: t } = e;
3974
- return t.type === "HookTypeAnnotation" && ((r = e.getParentNode(2)) == null ? void 0 : r.type) === "DeclareHook";
3975
- }
3976
- function ba(e, t, r) {
3977
- let { node: n } = e, s = [];
3978
- s.push(ga(e) ? "" : "hook ");
3979
- let u = Je(e, r, t, false, true), i = [];
3980
- return i.push(ga(e) ? ": " : " => ", r("returnType")), ot(n, i) && (u = l(u)), s.push(u, i), l(s);
3981
- }
3982
- function Pn(e, t, r) {
3983
- let { node: n } = e, s = [$(e), "interface"], u = [], i = [];
3984
- n.type !== "InterfaceTypeAnnotation" && u.push(" ", r("id"), r("typeParameters"));
3985
- let a = n.typeParameters && !d(n.typeParameters, g.Trailing | g.Line);
3986
- return w(n.extends) && i.push(a ? b(" ", x, { groupId: Dr(n.typeParameters) }) : x, "extends ", (n.extends.length === 1 ? mu : f)(P([",", x], e.map(r, "extends")))), d(n.id, g.Trailing) || w(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);
3987
- }
3988
- function Pa(e, t, r) {
3989
- let { node: n } = e;
3990
- if (Sr(n)) return n.type.slice(0, -14).toLowerCase();
3991
- let s = t.semi ? ";" : "";
3992
- switch (n.type) {
3993
- case "ComponentDeclaration":
3994
- case "DeclareComponent":
3995
- case "ComponentTypeAnnotation":
3996
- return Aa(e, t, r);
3997
- case "ComponentParameter":
3998
- return Ta(e, t, r);
3999
- case "ComponentTypeParameter":
4000
- return da(e, t, r);
4001
- case "HookDeclaration":
4002
- return Sa(e, t, r);
4003
- case "DeclareHook":
4004
- return Ba(e, t, r);
4005
- case "HookTypeAnnotation":
4006
- return ba(e, t, r);
4007
- case "DeclareClass":
4008
- return Tn(e, t, r);
4009
- case "DeclareFunction":
4010
- return [$(e), "function ", r("id"), r("predicate"), s];
4011
- case "DeclareModule":
4012
- return ["declare module ", r("id"), " ", r("body")];
4013
- case "DeclareModuleExports":
4014
- return ["declare module.exports", Y(e, r), s];
4015
- case "DeclareNamespace":
4016
- return ["declare namespace ", r("id"), " ", r("body")];
4017
- case "DeclareVariable":
4018
- return [$(e), n.kind ?? "var", " ", r("id"), s];
4019
- case "DeclareExportDeclaration":
4020
- case "DeclareExportAllDeclaration":
4021
- return gn(e, t, r);
4022
- case "DeclareOpaqueType":
4023
- case "OpaqueType":
4024
- return Mi(e, t, r);
4025
- case "DeclareTypeAlias":
4026
- case "TypeAlias":
4027
- return Kr(e, t, r);
4028
- case "IntersectionTypeAnnotation":
4029
- return zr(e, t, r);
4030
- case "UnionTypeAnnotation":
4031
- return Qr(e, t, r);
4032
- case "ConditionalTypeAnnotation":
4033
- return Vt(e, t, r);
4034
- case "InferTypeAnnotation":
4035
- return tn(e, t, r);
4036
- case "FunctionTypeAnnotation":
4037
- return Zr(e, t, r);
4038
- case "TupleTypeAnnotation":
4039
- return Yt(e, t, r);
4040
- case "TupleTypeLabeledElement":
4041
- return nn(e, t, r);
4042
- case "TupleTypeSpreadElement":
4043
- return rn(e, t, r);
4044
- case "GenericTypeAnnotation":
4045
- return [r("id"), Pt(e, t, r, "typeParameters")];
4046
- case "IndexedAccessType":
4047
- case "OptionalIndexedAccessType":
4048
- return en(e, t, r);
4049
- case "TypeAnnotation":
4050
- return sn(e, t, r);
4051
- case "TypeParameter":
4052
- return An(e, t, r);
4053
- case "TypeofTypeAnnotation":
4054
- return an(e, r);
4055
- case "ExistsTypeAnnotation":
4056
- return "*";
4057
- case "ArrayTypeAnnotation":
4058
- return un(r);
4059
- case "DeclareEnum":
4060
- case "EnumDeclaration":
4061
- return bn(e, r, t);
4062
- case "EnumBooleanBody":
4063
- case "EnumNumberBody":
4064
- case "EnumBigIntBody":
4065
- case "EnumStringBody":
4066
- case "EnumSymbolBody":
4067
- return ha(e, r, t);
4068
- case "EnumBooleanMember":
4069
- case "EnumNumberMember":
4070
- case "EnumBigIntMember":
4071
- case "EnumStringMember":
4072
- case "EnumDefaultedMember":
4073
- return Bn(e, r);
4074
- case "FunctionTypeParam": {
4075
- let u = n.name ? r("name") : e.parent.this === n ? "this" : "";
4076
- return [u, V(e), u ? ": " : "", r("typeAnnotation")];
4077
- }
4078
- case "DeclareInterface":
4079
- case "InterfaceDeclaration":
4080
- case "InterfaceTypeAnnotation":
4081
- return Pn(e, t, r);
4082
- case "ClassImplements":
4083
- case "InterfaceExtends":
4084
- return [r("id"), r("typeParameters")];
4085
- case "NullableTypeAnnotation":
4086
- return ["?", r("typeAnnotation")];
4087
- case "Variance": {
4088
- let { kind: u } = n;
4089
- return ln.ok(u === "plus" || u === "minus"), u === "plus" ? "+" : "-";
4090
- }
4091
- case "KeyofTypeAnnotation":
4092
- return ["keyof ", r("argument")];
4093
- case "ObjectTypeCallProperty":
4094
- return [n.static ? "static " : "", r("value")];
4095
- case "ObjectTypeMappedTypeProperty":
4096
- return zi(e, t, r);
4097
- case "ObjectTypeIndexer":
4098
- return [n.static ? "static " : "", n.variance ? r("variance") : "", "[", r("id"), n.id ? ": " : "", r("key"), "]: ", r("value")];
4099
- case "ObjectTypeProperty": {
4100
- let u = "";
4101
- return n.proto ? u = "proto " : n.static && (u = "static "), [u, n.kind !== "init" ? n.kind + " " : "", n.variance ? r("variance") : "", Et(e, t, r), V(e), gt(n) ? "" : ": ", r("value")];
4102
- }
4103
- case "ObjectTypeAnnotation":
4104
- return dt(e, t, r);
4105
- case "ObjectTypeInternalSlot":
4106
- return [n.static ? "static " : "", "[[", r("id"), "]]", V(e), n.method ? "" : ": ", r("value")];
4107
- case "ObjectTypeSpreadProperty":
4108
- return cn(e, r);
4109
- case "QualifiedTypeofIdentifier":
4110
- case "QualifiedTypeIdentifier":
4111
- return [r("qualification"), ".", r("id")];
4112
- case "NullLiteralTypeAnnotation":
4113
- return "null";
4114
- case "BooleanLiteralTypeAnnotation":
4115
- return String(n.value);
4116
- case "StringLiteralTypeAnnotation":
4117
- return Ie(tt(fe(n), t));
4118
- case "NumberLiteralTypeAnnotation":
4119
- return Ze(n.raw ?? n.extra.raw);
4120
- case "BigIntLiteralTypeAnnotation":
4121
- return hn(n.raw ?? n.extra.raw);
4122
- case "TypeCastExpression":
4123
- return ["(", r("expression"), Y(e, r), ")"];
4124
- case "TypePredicate":
4125
- return on(e, r);
4126
- case "TypeOperator":
4127
- return [n.operator, " ", r("typeAnnotation")];
4128
- case "TypeParameterDeclaration":
4129
- case "TypeParameterInstantiation":
4130
- return Pt(e, t, r, "params");
4131
- case "InferredPredicate":
4132
- case "DeclaredPredicate":
4133
- return [e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", "%checks", ...n.type === "DeclaredPredicate" ? ["(", r("value"), ")"] : []];
4134
- case "AsExpression":
4135
- case "AsConstExpression":
4136
- case "SatisfiesExpression":
4137
- return Sn(e, t, r);
4138
- }
4139
- }
4140
- function ka(e, t, r) {
4141
- var i;
4142
- let { node: n } = e;
4143
- if (!n.type.startsWith("TS")) return;
4144
- if (Br(n)) return n.type.slice(2, -7).toLowerCase();
4145
- let s = t.semi ? ";" : "", u = [];
4146
- switch (n.type) {
4147
- case "TSThisType":
4148
- return "this";
4149
- case "TSTypeAssertion": {
4150
- let a = !(U(n.expression) || se(n.expression)), o = l(["<", f([E, r("typeAnnotation")]), E, ">"]), c = [b("("), f([E, r("expression")]), E, b(")")];
4151
- return a ? ze([[o, r("expression")], [o, l(c, { shouldBreak: true })], [o, r("expression")]]) : l([o, r("expression")]);
4152
- }
4153
- case "TSDeclareFunction":
4154
- return Dn(e, r, t);
4155
- case "TSExportAssignment":
4156
- return ["export = ", r("expression"), s];
4157
- case "TSModuleBlock":
4158
- return Fn(e, t, r);
4159
- case "TSInterfaceBody":
4160
- case "TSTypeLiteral":
4161
- return dt(e, t, r);
4162
- case "TSTypeAliasDeclaration":
4163
- return Kr(e, t, r);
4164
- case "TSQualifiedName":
4165
- return [r("left"), ".", r("right")];
4166
- case "TSAbstractMethodDefinition":
4167
- case "TSDeclareMethod":
4168
- return dn(e, t, r);
4169
- case "TSAbstractAccessorProperty":
4170
- case "TSAbstractPropertyDefinition":
4171
- return xn(e, t, r);
4172
- case "TSInterfaceHeritage":
4173
- case "TSClassImplements":
4174
- case "TSExpressionWithTypeArguments":
4175
- case "TSInstantiationExpression":
4176
- return [r("expression"), r(n.typeArguments ? "typeArguments" : "typeParameters")];
4177
- case "TSTemplateLiteralType":
4178
- return qr(e, r, t);
4179
- case "TSNamedTupleMember":
4180
- return nn(e, t, r);
4181
- case "TSRestType":
4182
- return rn(e, t, r);
4183
- case "TSOptionalType":
4184
- return [r("typeAnnotation"), "?"];
4185
- case "TSInterfaceDeclaration":
4186
- return Pn(e, t, r);
4187
- case "TSTypeParameterDeclaration":
4188
- case "TSTypeParameterInstantiation":
4189
- return Pt(e, t, r, "params");
4190
- case "TSTypeParameter":
4191
- return An(e, t, r);
4192
- case "TSAsExpression":
4193
- case "TSSatisfiesExpression":
4194
- return Sn(e, t, r);
4195
- case "TSArrayType":
4196
- return un(r);
4197
- case "TSPropertySignature":
4198
- return [n.readonly ? "readonly " : "", Et(e, t, r), V(e), Y(e, r)];
4199
- case "TSParameterProperty":
4200
- return [Xt(n), n.static ? "static " : "", n.override ? "override " : "", n.readonly ? "readonly " : "", r("parameter")];
4201
- case "TSTypeQuery":
4202
- return an(e, r);
4203
- case "TSIndexSignature": {
4204
- let a = n.parameters.length > 1 ? b(ae(t) ? "," : "") : "", o = l([f([E, P([", ", E], e.map(r, "parameters"))]), a, E]), c = e.parent.type === "ClassBody" && e.key === "body";
4205
- return [c && n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? o : "", "]", Y(e, r), c ? s : ""];
4206
- }
4207
- case "TSTypePredicate":
4208
- return on(e, r);
4209
- case "TSNonNullExpression":
4210
- return [r("expression"), "!"];
4211
- case "TSImportType":
4212
- return [n.isTypeOf ? "typeof " : "", "import(", r("argument"), ")", n.qualifier ? [".", r("qualifier")] : "", Pt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4213
- case "TSLiteralType":
4214
- return r("literal");
4215
- case "TSIndexedAccessType":
4216
- return en(e, t, r);
4217
- case "TSTypeOperator":
4218
- return [n.operator, " ", r("typeAnnotation")];
4219
- case "TSMappedType":
4220
- return Qi(e, t, r);
4221
- case "TSMethodSignature": {
4222
- let a = n.kind && n.kind !== "method" ? `${n.kind} ` : "";
4223
- u.push(Xt(n), a, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", V(e));
4224
- let o = Je(e, r, t, false, true), c = n.returnType ? "returnType" : "typeAnnotation", m = n[c], D = m ? Y(e, r, c) : "", y = ot(n, D);
4225
- return u.push(y ? l(o) : o), m && u.push(l(D)), l(u);
4226
- }
4227
- case "TSNamespaceExportDeclaration":
4228
- return ["export as namespace ", r("id"), t.semi ? ";" : ""];
4229
- case "TSEnumDeclaration":
4230
- return bn(e, r, t);
4231
- case "TSEnumMember":
4232
- return Bn(e, r);
4233
- case "TSImportEqualsDeclaration":
4234
- return [n.isExport ? "export " : "", "import ", ks(n, false), r("id"), " = ", r("moduleReference"), t.semi ? ";" : ""];
4235
- case "TSExternalModuleReference":
4236
- return ["require(", r("expression"), ")"];
4237
- case "TSModuleDeclaration": {
4238
- let { parent: a } = e, o = a.type === "TSModuleDeclaration", c = ((i = n.body) == null ? void 0 : i.type) === "TSModuleDeclaration";
4239
- if (o) u.push(".");
4240
- else if (u.push($(e)), !(n.kind === "global" || n.global)) {
4241
- let D = n.kind ?? (Q(n.id) || fr(t, R(n), R(n.id)).trim().endsWith("module") ? "module" : "namespace");
4242
- u.push(D, " ");
4243
- }
4244
- return u.push(r("id")), c ? u.push(r("body")) : n.body ? u.push(" ", l(r("body"))) : u.push(s), u;
4245
- }
4246
- case "TSConditionalType":
4247
- return Vt(e, t, r);
4248
- case "TSInferType":
4249
- return tn(e, t, r);
4250
- case "TSIntersectionType":
4251
- return zr(e, t, r);
4252
- case "TSUnionType":
4253
- return Qr(e, t, r);
4254
- case "TSFunctionType":
4255
- case "TSCallSignatureDeclaration":
4256
- case "TSConstructorType":
4257
- case "TSConstructSignatureDeclaration":
4258
- return Zr(e, t, r);
4259
- case "TSTupleType":
4260
- return Yt(e, t, r);
4261
- case "TSTypeReference":
4262
- return [r("typeName"), Pt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4263
- case "TSTypeAnnotation":
4264
- return sn(e, t, r);
4265
- case "TSEmptyBodyFunctionExpression":
4266
- return fn(e, t, r);
4267
- case "TSJSDocAllType":
4268
- return "*";
4269
- case "TSJSDocUnknownType":
4270
- return "?";
4271
- case "TSJSDocNullableType":
4272
- return Ts(e, r, "?");
4273
- case "TSJSDocNonNullableType":
4274
- return Ts(e, r, "!");
4275
- case "TSParenthesizedType":
4276
- default:
4277
- throw new Me(n, "TypeScript");
4278
- }
4279
- }
4280
- function Hl(e, t, r, n) {
4281
- if (Xr(e)) return ci(e, t);
4282
- for (let s of [Ti, Ei, Pa, ka, Ca]) {
4283
- let u = s(e, t, r, n);
4284
- if (u !== void 0) return u;
4285
- }
4286
- }
4287
- var Vl = v(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
4288
- function $l(e, t, r, n) {
4289
- var D;
4290
- e.isRoot && ((D = t.__onHtmlBindingRoot) == null || D.call(t, e.node, t));
4291
- let s = Hl(e, t, r, n);
4292
- if (!s) return "";
4293
- let { node: u } = e;
4294
- if (Vl(u)) return s;
4295
- let i = w(u.decorators), a = xi(e, t, r), o = u.type === "ClassExpression";
4296
- if (i && !o) return ir(s, (y) => l([a, y]));
4297
- let c = Be(e, t), m = na(e, t);
4298
- return !a && !c && !m ? s : ir(s, (y) => [m ? ";" : "", c ? "(" : "", c && o && i ? [f([x, a, y]), x] : [a, y], c ? ")" : ""]);
4299
- }
4300
- var Ia = $l;
4301
- var Kl = { avoidAstMutation: true };
4302
- var La = [{ 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"] }];
4303
- var Os = {};
4304
- Ar(Os, { getVisitorKeys: () => Oa, massageAstNode: () => ja, print: () => Zl });
4305
- var zl = { JsonRoot: ["node"], ArrayExpression: ["elements"], ObjectExpression: ["properties"], ObjectProperty: ["key", "value"], UnaryExpression: ["argument"], NullLiteral: [], BooleanLiteral: [], StringLiteral: [], NumericLiteral: [], Identifier: [], TemplateLiteral: ["quasis"], TemplateElement: [] };
4306
- var wa = zl;
4307
- var Ql = hr(wa);
4308
- var Oa = Ql;
4309
- function Zl(e, t, r) {
4310
- let { node: n } = e;
4311
- switch (n.type) {
4312
- case "JsonRoot":
4313
- return [r("node"), F];
4314
- case "ArrayExpression": {
4315
- if (n.elements.length === 0) return "[]";
4316
- let s = e.map(() => e.node === null ? "null" : r(), "elements");
4317
- return ["[", f([F, P([",", F], s)]), F, "]"];
4318
- }
4319
- case "ObjectExpression":
4320
- return n.properties.length === 0 ? "{}" : ["{", f([F, P([",", F], e.map(r, "properties"))]), F, "}"];
4321
- case "ObjectProperty":
4322
- return [r("key"), ": ", r("value")];
4323
- case "UnaryExpression":
4324
- return [n.operator === "+" ? "" : n.operator, r("argument")];
4325
- case "NullLiteral":
4326
- return "null";
4327
- case "BooleanLiteral":
4328
- return n.value ? "true" : "false";
4329
- case "StringLiteral":
4330
- return JSON.stringify(n.value);
4331
- case "NumericLiteral":
4332
- return _a(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value);
4333
- case "Identifier":
4334
- return _a(e) ? JSON.stringify(n.name) : n.name;
4335
- case "TemplateLiteral":
4336
- return r(["quasis", 0]);
4337
- case "TemplateElement":
4338
- return JSON.stringify(n.value.cooked);
4339
- default:
4340
- throw new Me(n, "JSON");
4341
- }
4342
- }
4343
- function _a(e) {
4344
- return e.key === "key" && e.parent.type === "ObjectProperty";
4345
- }
4346
- var em = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]);
4347
- function ja(e, t) {
4348
- let { type: r } = e;
4349
- if (r === "ObjectProperty") {
4350
- let { key: n } = e;
4351
- n.type === "Identifier" ? t.key = { type: "StringLiteral", value: n.name } : n.type === "NumericLiteral" && (t.key = { type: "StringLiteral", value: String(n.value) });
4352
- return;
4353
- }
4354
- if (r === "UnaryExpression" && e.operator === "+") return t.argument;
4355
- if (r === "ArrayExpression") {
4356
- for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" });
4357
- return;
4358
- }
4359
- if (r === "TemplateLiteral") return { type: "StringLiteral", value: e.quasis[0].value.cooked };
4360
- }
4361
- ja.ignoredProperties = em;
4362
- var Er = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, 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." } };
4363
- var kt = "JavaScript";
4364
- var tm = { arrowParens: { category: kt, 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: Er.bracketSameLine, bracketSpacing: Er.bracketSpacing, jsxBracketSameLine: { category: kt, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: kt, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalTernaries: { category: kt, 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: Er.singleQuote, jsxSingleQuote: { category: kt, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: kt, 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: kt, 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: Er.singleAttributePerLine };
4365
- var va = tm;
4366
- var rm = { estree: ws, "estree-json": Os };
4367
- var nm = [...Us, ...La];
4368
- var $d = _s;
4369
-
4370
- exports.default = $d;
4371
- exports.languages = nm;
4372
- exports.options = va;
4373
- exports.printers = rm;
4374
- //# sourceMappingURL=estree-TXDUNIHF.cjs.map
4375
- //# sourceMappingURL=estree-TXDUNIHF.cjs.map