All files / prettier standalone.js

57.46% Statements 3002/5224
72.19% Branches 618/856
48.04% Functions 184/383
57.46% Lines 3002/5224

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 52241x 1x 1x 1x 1x 1x 1x 1x 1x                         1x 1x 1x 1x 1x 1x 1x 1x 1x   1x 1x 1x 1x 1x 3x 3x 1x 1x 2x 2x 2x 10x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x     1x 1x                                                                                                               1x                                                                                     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                     1x 1x 1x 1x 1x 1x                           1x                                                                                                                                                                       1x                           1x                                 1x             1x                 1x 1x     1x 1x     1x     1x     1x     1x                                                                       1x 1x 1x 1x 1x     1x     1x     1x 1x 1x     1x 1x 1x             1x 25x 25x   25x   25x 25x 25x 25x 1x                                   1x                 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 30016x     30016x 30016x 30016x   1x 1x 1x 1x 1x 9x 9x     9x 9x 1x 1x 1x 30279x 12504x 12504x 30279x 9638x 9638x 30279x     8137x 8137x 8137x 8137x 30279x 1x 1x 1x 1x 1x                                     1x           1x 1x 1x 1x 1x 1x 25x 25x 20202x 20202x 10101x 10101x 10101x 10101x 10101x 10101x 10101x 20202x     20202x 31x 31x 10070x 20202x 20202x 3230x 3230x 8605x 8605x 3230x 3230x 20202x 117x 117x 20202x 833x 27x 49x 49x 833x 806x 806x 833x 20202x 20202x 20202x 20202x 20202x 382x 382x 20202x 20202x 20202x 20202x 20202x 20202x 5508x 20202x   20202x 20202x 25x 1x 1x 1x 1x 9x     9x 9x 9x 884x 329x 329x 555x 555x 555x 884x 9x 555x 555x 264x 555x 1x 555x 12x 12x 12x 12x 12x 555x 68x 68x 2x 2x 68x 66x 66x 68x 68x 555x 555x 555x 555x 555x 36x 555x 555x 555x 555x 555x 555x 174x 555x   555x 555x 9x 1x                               1x                     1x     1x 528x 324x 324x 324x 324x 324x 324x 324x 151x 151x 324x 528x 528x 1x 25x 25x 25x 10101x 351x 351x 10101x 864x 864x 31x 31x 833x 833x 10101x 25x 10101x 864x 864x 177x 177x 864x 10101x 25x 25x 25x 25x 25x 25x 25x 25x 1x                 1x     1x 11x 11x 18x 18x 18x 18x 11x 8x 8x 8x 8x 11x 8x 8x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 1x 24x 24x 24x 24x 24x 24x 4x 4x 4x 24x           24x   24x 11x 24x 9x 24x 24x 24x 24x 24x 24x   24x   24x   24x 1x 9x 9x 1x 555x 555x 1x     1x 555x 68x     68x 3x 3x 65x 555x 555x 555x 555x 36x 4x 4x 32x 555x 12x     12x 555x 264x 264x 744x 203x 203x 744x 744x 316x 316x 316x 316x 744x 91x 744x 450x 450x 541x 541x 264x 15x 15x 264x 123x 123x 126x 126x 555x 555x 555x 555x 555x 555x 555x 174x 555x   555x 284x 555x 1x 9x 9x 1x           1x         1x     1x 7x 7x 1x 1x 1x 1x 1x                 1x 1x                   1x 1x                                             1x 1x 1x 1x       1x       1x                             1x     1x     1x     1x     1x       1x                       1x                 1x       1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                       1x                       1x       1x 1x 1x                                                                                 1x                                                                                                                                                                                                         1x 1x 1x   1x 1x 1x 1x     1x     1x 1x 1x 1x 1x 1x 1x 8017x 3220x 3220x 4797x 4797x 4797x                           8017x 1x 1x 1x 1x 1x 1x 1x 1x 25x 25x 1x 281x 281x 1x 57x     57x 4x 4x 57x 4x 4x 57x 5x 5x 57x 57x 57x 1x 329x 329x 329x 329x 329x 329x 862x 862x 808x 808x   808x 808x 808x 808x 862x 22x 22x 22x 22x 862x 32x 32x 32x 862x   862x 862x 329x 329x 329x       329x 840x 840x 840x 329x 830x   830x 830x 830x 830x 329x           329x 1159x 32x 32x 1159x 1159x 329x 1159x 1159x 1159x 329x 1x 541x 541x 541x 541x 749x 749x       749x     749x 585x 585x 44x 585x 541x 541x 541x 585x 208x 541x 21x 21x     21x 541x 541x 1x 503x     503x 503x 503x 503x 10326x 618x 205x 205x 413x 413x 413x 9708x 9708x 9708x 10326x 4272x 4272x 4272x 10326x 10326x 3100x 3100x 3100x 8290x 8290x 3100x 3100x 10326x 10326x 10326x 10326x 485x 485x 10326x     10326x 656x     656x 656x         656x 656x 656x 656x 10326x 148x 148x 148x 48x 48x 148x 148x 10326x 957x 246x 246x 957x 463x 463x 463x 711x 10326x     10326x 75x     75x 10326x 10326x 52x 503x 1x 25x 25x 25x 25x 25x 25x 25x 25x 25x 25x 25x 9336x 9336x 9336x 3747x           3747x 3747x 3747x 3745x 3745x 3747x 3747x 9336x 2924x 7789x 7789x 2924x 9336x             9336x 281x 281x 9336x 57x 57x 57x 57x 57x 57x 9336x     9336x 814x 814x 372x 370x 370x 370x 370x 370x 370x 370x 814x 814x 444x 444x 444x 444x 444x 239x 444x 205x 4x 4x 4x 4x 4x 4x 4x     4x 4x 4x     4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 205x 201x 201x 205x 444x 444x 814x 814x 116x 116x 116x 116x 116x 116x 116x 814x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 9336x 142x 142x 142x 142x 142x     142x 142x 142x 142x 142x 142x 142x 142x 142x 142x 142x 142x 142x 74x 74x 74x     74x 74x 68x 68x 142x               68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 142x 66x 142x 2x 2x     68x 68x 9336x 9336x 131x 131x 65x 65x 57x 57x 65x 131x 66x 66x 23x 23x 66x 131x 131x 9336x     9336x 55x     55x 9336x 860x 860x 323x 316x 185x 185x 185x 316x 323x 7x 7x 860x 860x 544x         544x 3x 3x 3x 3x       544x 541x 541x 541x 541x 544x 860x 860x 9336x 12x 12x 9336x 313x 9336x   9336x 9336x       9336x 25x 25x                                     25x 25x 1x 1x 1x                     1x 1x 1x 1x 1x 1x 34x 34x 34x 1x 1x 1137x 1137x 1137x 1137x 1137x 1137x 1137x 1137x 1x 1x 861x 857x 857x 857x 857x 861x 861x 1x 1x 21348x 21348x 21348x 21348x 21348x 21348x 21348x 1x 1x 4327x 4327x 1x 1x 73x 73x 1x 1x 38x 38x 1x 1x 2517x 2517x 2517x 2517x 2517x 2517x 2517x 2517x 2517x 1x 1x 121x 121x 121x 1x 1x 251x 251x 251x 1x 1x 21x 21x 1x 1x 77x 77x 77x 1x 1x 1914x 1914x 1x 1x 29x 29x 1x 1x 3x 3x 1x 1x 1x                         1x 1x 1x               1x 4434x 4434x 4434x 1x 34x 34x 1x 1x 1x 1x 1x 1x 2508x 2508x 2508x 2508x 2508x 2508x 2508x 2508x 2508x 2495x 2495x 2495x 2508x 2508x 2508x 2508x 2508x 2508x 1x 1x 1x 1x 1x 1x 1x 10x 10x 10x 10x 10x 10x 10x 10x 1x 1x 1x 1x 1x 818x 818x 818x 818x 818x 818x 818x 818x 818x 818x 818x 818x 818x 818x 1365x 1365x 1365x 1365x 818x 818x 818x 818x 1x 1x 1x 1x 213x 213x 213x 392x 213x 213x 213x 213x 213x 1x 1x 1x 1x 1x 1x 1x 1379x 1379x 1379x 1379x 2264x     2264x 2264x 35x 35x 35x 35x 2264x 1370x 1370x 894x 894x 894x 9x 1379x 1x 1x 1x 1x 1x 1x 1x 1x 320x 1345x 102x 102x 1345x 320x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 4x     4x 2x 2x 1x 1x 1x 4444x 4444x 10480x 4381x 4381x 10480x 63x 1x 1x 325x 325x 2265x 2265x 1368x 1266x 2265x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 106x 106x 1x 1x 1x 1x 34x 34x 34x 92x 92x 32x 46x 46x 46x 46x 92x 24x 24x 92x 34x 1x                   1x     1x 1x 1x 4x 20x 20x     20x 20x 20x 93x 93x       93x 20x 20x 93x 93x 20x       4x 4x 1x 1x 1x 1x 1x 1x 1x 20x 20x     20x 20x 7x     7x 6x 6x 20x 13x     13x 6x 6x 13x 8x 20x 1x 1x 1x 1x 14x 14x 14x 14x 14x 14x 14x 14x 1x 1x 1x 1x 34x 34x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 66x 66x 1x 1x 1x 1x 7x 7x 7x 7x 7x     7x 7x 1x 7x 7x 7x 7x 7x 1x 6x 6x 6x 6x 1x 1x 1x 1x     1x 1x 1x         1x 1x 1x 1x 35x     35x 35x 35x 35x 35x 35x 35x 35x 35x 35x     35x 34x 34x 34x 35x 35x 35x 35x 35x 35x 35x 35x 35x 1x 31x 31x 31x 31x 31x 31x 31x 31x 31x 44x 44x 44x 44x 44x 24x 24x 44x 11x 11x 11x 11x 9x 9x 9x 9x 9x     31x                           7x 31x 1x 1x 34x 34x 34x 27x 27x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x           7x 6x 6x 6x 6x 6x             7x                       1x 1x 1x 1x                 1x   1x   1x 1x 1x     1x 7x 7x 34x             34x 1x 1x 7x 7x 7x 7x 4x             4x 7x 7x 1x 1x 1x 1x 1x                 1x 1x 1x 7x 7x 7x 7x 7x                                                               7x 1x                 1x 1x 1x               1x 1x 1x 1x 6x 6x 6x 6x 1x 6x 6x 6x 6x 6x 6x         6x 6x 6x 6x 6x 6x 6x 6x     6x 6x 1x                                                   1x 918x 918x     918x 918x 918x 918x 918x 911x 911x 7x 7x 7x 7x 7x 7x     7x 7x 6x 7x               7x 7x 918x 1x 918x 918x 911x 911x 7x 918x 1x 34x 34x 34x 34x 34x 7x         7x 7x 34x 1x 1x 1x 34x 34x 34x 34x                                         34x 1x 1x 1x 1x   1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 34x 34x 34x 34x 34x 1020x     1020x 340x     340x 34x 34x 34x 34x 34x 340x 1020x 1020x 13260x 13260x 1020x 1020x 1020x 1020x 34x 34x 1x 34x 34x 782x 782x 1326x                     1326x 782x 782x 34x 1x 34x 34x 1020x 1020x 34x 34x 34x 34x 34x 34x 34x 1020x 1020x 34x 34x 1x 1x 1x               1x 1x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x               1x     1x 1x 1x 1x 1x 1x 1x                     1x           1x                                   1x                               1x                           1x 1x 1x 1x 1x 1x                 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x               1x 1x 1x 1x 1x 1x 1x 1x 1x                   1x 1x             1x                   1x               1x 1x 1x 1x 1x                                                                                           1x 1x 1x                 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1054x 1054x 1054x 9486x 1054x 1054x 9486x 1054x 1054x 1x 1x 1054x 1054x 1x 1054x 1054x 1x 68x 68x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1020x 1020x 1x 1020x 1020x 1x 1020x 1020x 1x     1x 952x 952x 1x 952x 952x 1x 1x 1054x 1054x 1x 1x 1x 1x       1x     1x     1x     1x 1x 1x 1x 1x     1x     1x 1x 1x 1x 1x 34x 34x 34x 1x                   1x 34x     34x 34x 442x 442x     442x 34x 34x 1x 34x 34x 442x 442x         442x 34x 34x 1x 34x 34x 442x 442x 442x 34x 34x 1x 34x 34x 34x 442x 442x 442x 442x 442x 442x 34x 34x 1x     1x 1x     1x 1x 1x 1x     1x 408x 408x 1x 1x 1x 1x 34x 34x 1020x 1020x     1020x 1020x 34x 34x 1x 340x 340x 1666x 1666x     1666x 1666x 340x 340x 1x 34x 34x             34x 34x 1x 34x 34x 34x 1136x 952x 1136x 184x 184x 1136x 34x 34x 1x 170x 170x 1x                                           1x 34x     34x 34x 1x 68x 68x 1x                                 1x 1564x 1564x 1x 1394x 1394x 1x     1x 2788x 2788x 1x 1394x 1394x 1394x 1x         1x 1x 1x 1x 340x 340x 340x 1x                         1x 306x 306x 1x 340x 340x 340x 1x 340x 340x 340x 1x 340x 340x 340x 1x 1x 1x 1x 1x     1x 170x 170x 1x 1x 1x 1x 1x     1x 170x 170x 1x 1x 1x 1x 1x     1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 34x 34x 34x 34x 1x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 1x 34x 34x 1x 34x 34x 34x 34x 68x 34x 34x 34x 34x 34x 34x 34x 1020x 1020x 68x 68x     68x 1020x 34x 34x 1020x 68x 68x 952x 952x 952x 952x 952x 952x       34x 34x 34x 34x 1x 34x 34x 34x 952x 952x 952x 952x   952x 952x 952x 952x 952x 952x 952x 952x 952x 952x 952x                           952x 952x 952x 952x 952x 952x 952x 952x 952x 952x 952x     952x 34x 184x 184x   184x 184x 34x 34x 1x 34x 1020x 68x     68x 1020x 34x 1x 34x 34x 34x 1x 952x 952x     952x 1x 184x 184x     184x 184x     184x 184x   184x 184x 184x 184x 184x 1x 34x 34x 34x 34x                                           34x 1x 1x 1x 1x 1x 34x 34x 34x 34x 34x 34x 34x             34x 34x 34x 34x           34x 34x 34x 34x 34x 34x 34x 34x 34x     34x 34x     34x 34x 1x 34x 34x     34x 1020x 1020x 1020x 1020x 1020x 1020x 1020x 1020x                 1020x 34x 34x 1x 1020x 1020x 1020x 1020x 1020x 1020x 170x 170x     170x 1020x     1020x 340x 340x 340x         1666x 340x 340x 1020x 442x 442x 1020x                   1020x 68x 68x 1020x   1020x 1020x 68x 1020x 952x 952x 1020x               1020x 34x 34x 1020x                       1020x 34x 34x 34x 34x 1020x 1020x 1x 1x 1x 1x 88x     88x 88x 88x             1x 1x 1x 1x 1x 68x     68x 68x 68x 68x 68x 68x 68x 68x 68x           68x 1x 20x     20x 20x 20x 20x 20x 20x 20x 20x 20x           20x 1x 34x 34x 34x 1x 68x 68x 68x 1x 34x 34x 34x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 34x 34x 34x                               34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x       34x 34x 34x 1088x 677x 677x 1088x 34x 1x 1x 34x 34x 34x 34x 34x 1x 1x 1x 1x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x     34x 34x 1x                   1x 1x 1x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 2x 2x 34x         32x 34x 34x 34x 34x 34x 34x 10x 10x 10x 10x 10x 10x 10x         10x 32x 32x 9x 9x 32x 2090x 2090x 774x 774x 2090x 1878x 417x 1878x 1461x 1461x 1878x 1316x 2090x 1306x 1306x 10x 10x 10x 10x 10x 10x 10x 10x             2090x 34x 1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 1x 1x 1x                                   1x 1x 1x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x               34x 34x 1589x 727x 727x 1589x     862x 1589x 34x 1589x 1589x 1589x 35x 35x 1589x 1589x 28x 28x 1526x 1589x 1331x 1331x 1526x 1589x 34x 1x 1560x 1560x 1560x 1560x 1560x   1560x 10x 1560x 1550x 1550x 1560x 1560x     1560x     1560x     1560x 1560x 918x 918x 1560x 1560x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 1x 1x 1x                                                                                               1x 1x 1x 1x                                                                             1x 1x 1x 1x                           1x 1x 1x 1x 1x 1x                         1x                       1x                                                                 1x                                                     1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                                                           1x                                                                                                                     1x 1x 1x 1x 1x 25x     25x 25x           25x 25x     25x 25x                           25x 25x                                                                                                                               25x 25x 1x                                                                                                 1x 150x 75x 75x 75x 150x 1x 50x 50x 50x 50x 50x 50x 1x 25x 25x 25x 25x 25x 25x           25x     25x             25x 25x 25x 25x 25x 25x 25x 25x 25x 25x 25x 25x 1x       1x         1x 25x 25x 25x 25x 25x             25x 25x   25x 25x     25x 25x 25x           25x 25x 1x                               1x         1x               1x                     1x           1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                         1x 1x 1x 1x                 1x 1x 1x 1x                       1x 1x 1x 1x                         1x 1x 1x 1x                     1x 1x 1x 1x           1x 1x 1x                       1x 1x 1x 1x       1x 1x 1x 1x 1x 1x                           1x 1x 1x 1x               1x 1x 1x 1x               1x 1x 1x 1x                                             1x 1x 1x 1x           1x             1x     1x             1x     1x             1x 1x 1x 7x 25x 25x 25x 25x 25x 25x 25x 7x 7x 1x 1x 25x 25x 25x 25x 25x 25x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
(function (factory) {
  function interopModuleDefault() {
    var module = factory();
    return module.default || module;
  }
 
  if (typeof exports === "object" && typeof module === "object") {
    module.exports = interopModuleDefault();
  } else if (typeof define === "function" && define.amd) {
    define(interopModuleDefault);
  } else {
    var root =
      typeof globalThis !== "undefined"
        ? globalThis
        : typeof global !== "undefined"
          ? global
          : typeof self !== "undefined"
            ? self
            : this || {};
    root.prettier = interopModuleDefault();
  }
})(function () {
  "use strict";
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __typeError = (msg) => {
    throw TypeError(msg);
  };
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
 
  // node_modules/@babel/code-frame/lib/index.js
  var require_lib = __commonJS({
    "node_modules/@babel/code-frame/lib/index.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      function getDefs() {
        return new Proxy({}, { get: () => (text) => text });
      }
      function highlight(text) {
        return text;
      }
      var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
      function getMarkerLines(loc, source, opts) {
        const startLoc = Object.assign({
          column: 0,
          line: -1
        }, loc.start);
        const endLoc = Object.assign({}, startLoc, loc.end);
        const {
          linesAbove = 2,
          linesBelow = 3
        } = opts || {};
        const startLine = startLoc.line;
        const startColumn = startLoc.column;
        const endLine = endLoc.line;
        const endColumn = endLoc.column;
        let start = Math.max(startLine - (linesAbove + 1), 0);
        let end = Math.min(source.length, endLine + linesBelow);
        if (startLine === -1) {
          start = 0;
        }
        if (endLine === -1) {
          end = source.length;
        }
        const lineDiff = endLine - startLine;
        const markerLines = {};
        if (lineDiff) {
          for (let i = 0; i <= lineDiff; i++) {
            const lineNumber = i + startLine;
            if (!startColumn) {
              markerLines[lineNumber] = true;
            } else if (i === 0) {
              const sourceLength = source[lineNumber - 1].length;
              markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
            } else if (i === lineDiff) {
              markerLines[lineNumber] = [0, endColumn];
            } else {
              const sourceLength = source[lineNumber - i].length;
              markerLines[lineNumber] = [0, sourceLength];
            }
          }
        } else {
          if (startColumn === endColumn) {
            if (startColumn) {
              markerLines[startLine] = [startColumn, 0];
            } else {
              markerLines[startLine] = true;
            }
          } else {
            markerLines[startLine] = [startColumn, endColumn - startColumn];
          }
        }
        return {
          start,
          end,
          markerLines
        };
      }
      function codeFrameColumns2(rawLines, loc, opts = {}) {
        const shouldHighlight = false;
        const defs = getDefs(shouldHighlight);
        const lines = rawLines.split(NEWLINE);
        const {
          start,
          end,
          markerLines
        } = getMarkerLines(loc, lines, opts);
        const hasColumns = loc.start && typeof loc.start.column === "number";
        const numberMaxWidth = String(end).length;
        const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
        let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line2, index2) => {
          const number = start + 1 + index2;
          const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
          const gutter = ` ${paddedNumber} |`;
          const hasMarker = markerLines[number];
          const lastMarkerLine = !markerLines[number + 1];
          if (hasMarker) {
            let markerLine = "";
            if (Array.isArray(hasMarker)) {
              const markerSpacing = line2.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
              const numberOfMarkers = hasMarker[1] || 1;
              markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
              if (lastMarkerLine && opts.message) {
                markerLine += " " + defs.message(opts.message);
              }
            }
            return [defs.marker(">"), defs.gutter(gutter), line2.length > 0 ? ` ${line2}` : "", markerLine].join("");
          } else {
            return ` ${defs.gutter(gutter)}${line2.length > 0 ? ` ${line2}` : ""}`;
          }
        }).join("\n");
        if (opts.message && !hasColumns) {
          frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
${frame}`;
        }
        if (shouldHighlight) {
          return defs.reset(frame);
        } else {
          return frame;
        }
      }
      exports.codeFrameColumns = codeFrameColumns2;
    }
  });
 
  // src/standalone.js
  var standalone_exports = {};
  __export(standalone_exports, {
    __debug: () => debugApis,
    check: () => check,
    doc: () => public_exports,
    format: () => format,
    formatWithCursor: () => formatWithCursor2,
    getSupportInfo: () => getSupportInfo2,
    util: () => public_exports2,
    version: () => version_evaluate_default
  });
 
  // scripts/build/shims/string-replace-all.js
  var stringReplaceAll = (isOptionalObject, original, pattern, replacement) => {
    if (isOptionalObject && (original === void 0 || original === null)) {
      return;
    }
    if (original.replaceAll) {
      return original.replaceAll(pattern, replacement);
    }
    if (pattern.global) {
      return original.replace(pattern, replacement);
    }
    return original.split(pattern).join(replacement);
  };
  var string_replace_all_default = stringReplaceAll;
 
  // node_modules/diff/libesm/diff/base.js
  var Diff = class {
    diff(oldStr, newStr, options = {}) {
      let callback;
      if (typeof options === "function") {
        callback = options;
        options = {};
      } else if ("callback" in options) {
        callback = options.callback;
      }
      const oldString = this.castInput(oldStr, options);
      const newString = this.castInput(newStr, options);
      const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
      const newTokens = this.removeEmpty(this.tokenize(newString, options));
      return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
    }
    diffWithOptionsObj(oldTokens, newTokens, options, callback) {
      var _a2;
      const done = (value) => {
        value = this.postProcess(value, options);
        if (callback) {
          setTimeout(function() {
            callback(value);
          }, 0);
          return void 0;
        } else {
          return value;
        }
      };
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let editLength = 1;
      let maxEditLength = newLen + oldLen;
      if (options.maxEditLength != null) {
        maxEditLength = Math.min(maxEditLength, options.maxEditLength);
      }
      const maxExecutionTime = (_a2 = options.timeout) !== null && _a2 !== void 0 ? _a2 : Infinity;
      const abortAfterTimestamp = Date.now() + maxExecutionTime;
      const bestPath = [{ oldPos: -1, lastComponent: void 0 }];
      let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
      if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
        return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
      }
      let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
      const execEditLength = () => {
        for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
          let basePath;
          const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
          if (removePath) {
            bestPath[diagonalPath - 1] = void 0;
          }
          let canAdd = false;
          if (addPath) {
            const addPathNewPos = addPath.oldPos - diagonalPath;
            canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
          }
          const canRemove = removePath && removePath.oldPos + 1 < oldLen;
          if (!canAdd && !canRemove) {
            bestPath[diagonalPath] = void 0;
            continue;
          }
          if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) {
            basePath = this.addToPath(addPath, true, false, 0, options);
          } else {
            basePath = this.addToPath(removePath, false, true, 1, options);
          }
          newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
          if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
            return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
          } else {
            bestPath[diagonalPath] = basePath;
            if (basePath.oldPos + 1 >= oldLen) {
              maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
            }
            if (newPos + 1 >= newLen) {
              minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
            }
          }
        }
        editLength++;
      };
      if (callback) {
        (function exec() {
          setTimeout(function() {
            if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
              return callback(void 0);
            }
            if (!execEditLength()) {
              exec();
            }
          }, 0);
        })();
      } else {
        while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
          const ret = execEditLength();
          if (ret) {
            return ret;
          }
        }
      }
    }
    addToPath(path, added, removed, oldPosInc, options) {
      const last = path.lastComponent;
      if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: last.count + 1, added, removed, previousComponent: last.previousComponent }
        };
      } else {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: 1, added, removed, previousComponent: last }
        };
      }
    }
    extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
        newPos++;
        oldPos++;
        commonCount++;
        if (options.oneChangePerToken) {
          basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };
        }
      }
      if (commonCount && !options.oneChangePerToken) {
        basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };
      }
      basePath.oldPos = oldPos;
      return newPos;
    }
    equals(left, right, options) {
      if (options.comparator) {
        return options.comparator(left, right);
      } else {
        return left === right || !!options.ignoreCase && left.toLowerCase() === right.toLowerCase();
      }
    }
    removeEmpty(array2) {
      const ret = [];
      for (let i = 0; i < array2.length; i++) {
        if (array2[i]) {
          ret.push(array2[i]);
        }
      }
      return ret;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    castInput(value, options) {
      return value;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    tokenize(value, options) {
      return Array.from(value);
    }
    join(chars) {
      return chars.join("");
    }
    postProcess(changeObjects, options) {
      return changeObjects;
    }
    get useLongestToken() {
      return false;
    }
    buildValues(lastComponent, newTokens, oldTokens) {
      const components = [];
      let nextComponent;
      while (lastComponent) {
        components.push(lastComponent);
        nextComponent = lastComponent.previousComponent;
        delete lastComponent.previousComponent;
        lastComponent = nextComponent;
      }
      components.reverse();
      const componentLen = components.length;
      let componentPos = 0, newPos = 0, oldPos = 0;
      for (; componentPos < componentLen; componentPos++) {
        const component = components[componentPos];
        if (!component.removed) {
          if (!component.added && this.useLongestToken) {
            let value = newTokens.slice(newPos, newPos + component.count);
            value = value.map(function(value2, i) {
              const oldValue = oldTokens[oldPos + i];
              return oldValue.length > value2.length ? oldValue : value2;
            });
            component.value = this.join(value);
          } else {
            component.value = this.join(newTokens.slice(newPos, newPos + component.count));
          }
          newPos += component.count;
          if (!component.added) {
            oldPos += component.count;
          }
        } else {
          component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
          oldPos += component.count;
        }
      }
      return components;
    }
  };
 
  // node_modules/diff/libesm/diff/array.js
  var ArrayDiff = class extends Diff {
    tokenize(value) {
      return value.slice();
    }
    join(value) {
      return value;
    }
    removeEmpty(value) {
      return value;
    }
  };
  var arrayDiff = new ArrayDiff();
  function diffArrays(oldArr, newArr, options) {
    return arrayDiff.diff(oldArr, newArr, options);
  }
 
  // src/common/end-of-line.js
  function guessEndOfLine(text) {
    const index = text.indexOf("\r");
    if (index !== -1) {
      return text.charAt(index + 1) === "\n" ? "crlf" : "cr";
    }
    return "lf";
  }
  function convertEndOfLineToChars(value) {
    switch (value) {
      case "cr":
        return "\r";
      case "crlf":
        return "\r\n";
      default:
        return "\n";
    }
  }
  function countEndOfLineChars(text, eol) {
    let regex;
    switch (eol) {
      case "\n":
        regex = /\n/gu;
        break;
      case "\r":
        regex = /\r/gu;
        break;
      case "\r\n":
        regex = /\r\n/gu;
        break;
      default:
        throw new Error(`Unexpected "eol" ${JSON.stringify(eol)}.`);
    }
    const endOfLines = text.match(regex);
    return endOfLines ? endOfLines.length : 0;
  }
  function normalizeEndOfLine(text) {
    return string_replace_all_default(
      /* isOptionalObject */
      false,
      text,
      /\r\n?/gu,
      "\n"
    );
  }
 
  // src/document/constants.js
  var DOC_TYPE_STRING = "string";
  var DOC_TYPE_ARRAY = "array";
  var DOC_TYPE_CURSOR = "cursor";
  var DOC_TYPE_INDENT = "indent";
  var DOC_TYPE_ALIGN = "align";
  var DOC_TYPE_TRIM = "trim";
  var DOC_TYPE_GROUP = "group";
  var DOC_TYPE_FILL = "fill";
  var DOC_TYPE_IF_BREAK = "if-break";
  var DOC_TYPE_INDENT_IF_BREAK = "indent-if-break";
  var DOC_TYPE_LINE_SUFFIX = "line-suffix";
  var DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary";
  var DOC_TYPE_LINE = "line";
  var DOC_TYPE_LABEL = "label";
  var DOC_TYPE_BREAK_PARENT = "break-parent";
  var VALID_OBJECT_DOC_TYPES = /* @__PURE__ */ new Set([
    DOC_TYPE_CURSOR,
    DOC_TYPE_INDENT,
    DOC_TYPE_ALIGN,
    DOC_TYPE_TRIM,
    DOC_TYPE_GROUP,
    DOC_TYPE_FILL,
    DOC_TYPE_IF_BREAK,
    DOC_TYPE_INDENT_IF_BREAK,
    DOC_TYPE_LINE_SUFFIX,
    DOC_TYPE_LINE_SUFFIX_BOUNDARY,
    DOC_TYPE_LINE,
    DOC_TYPE_LABEL,
    DOC_TYPE_BREAK_PARENT
  ]);
 
  // scripts/build/shims/at.js
  var at = (isOptionalObject, object, index) => {
    if (isOptionalObject && (object === void 0 || object === null)) {
      return;
    }
    if (Array.isArray(object) || typeof object === "string") {
      return object[index < 0 ? object.length + index : index];
    }
    return object.at(index);
  };
  var at_default = at;
 
  // node_modules/trim-newlines/index.js
  function trimNewlinesEnd(string) {
    let end = string.length;
    while (end > 0 && (string[end - 1] === "\r" || string[end - 1] === "\n")) {
      end--;
    }
    return end < string.length ? string.slice(0, end) : string;
  }
 
  // src/document/utils/get-doc-type.js
  function getDocType(doc) {
    if (typeof doc === "string") {
      return DOC_TYPE_STRING;
    }
    if (Array.isArray(doc)) {
      return DOC_TYPE_ARRAY;
    }
    if (!doc) {
      return;
    }
    const { type } = doc;
    if (VALID_OBJECT_DOC_TYPES.has(type)) {
      return type;
    }
  }
  var get_doc_type_default = getDocType;
 
  // src/document/invalid-doc-error.js
  var disjunctionListFormat = (list) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list);
  function getDocErrorMessage(doc) {
    const type = doc === null ? "null" : typeof doc;
    if (type !== "string" && type !== "object") {
      return `Unexpected doc '${type}', 
Expected it to be 'string' or 'object'.`;
    }
    if (get_doc_type_default(doc)) {
      throw new Error("doc is valid.");
    }
    const objectType = Object.prototype.toString.call(doc);
    if (objectType !== "[object Object]") {
      return `Unexpected doc '${objectType}'.`;
    }
    const EXPECTED_TYPE_VALUES = disjunctionListFormat(
      [...VALID_OBJECT_DOC_TYPES].map((type2) => `'${type2}'`)
    );
    return `Unexpected doc.type '${doc.type}'.
Expected it to be ${EXPECTED_TYPE_VALUES}.`;
  }
  var InvalidDocError = class extends Error {
    name = "InvalidDocError";
    constructor(doc) {
      super(getDocErrorMessage(doc));
      this.doc = doc;
    }
  };
  var invalid_doc_error_default = InvalidDocError;
 
  // src/document/utils/traverse-doc.js
  var traverseDocOnExitStackMarker = {};
  function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
    const docsStack = [doc];
    while (docsStack.length > 0) {
      const doc2 = docsStack.pop();
      if (doc2 === traverseDocOnExitStackMarker) {
        onExit(docsStack.pop());
        continue;
      }
      if (onExit) {
        docsStack.push(doc2, traverseDocOnExitStackMarker);
      }
      const docType = get_doc_type_default(doc2);
      if (!docType) {
        throw new invalid_doc_error_default(doc2);
      }
      if ((onEnter == null ? void 0 : onEnter(doc2)) === false) {
        continue;
      }
      switch (docType) {
        case DOC_TYPE_ARRAY:
        case DOC_TYPE_FILL: {
          const parts = docType === DOC_TYPE_ARRAY ? doc2 : doc2.parts;
          for (let ic = parts.length, i = ic - 1; i >= 0; --i) {
            docsStack.push(parts[i]);
          }
          break;
        }
        case DOC_TYPE_IF_BREAK:
          docsStack.push(doc2.flatContents, doc2.breakContents);
          break;
        case DOC_TYPE_GROUP:
          if (shouldTraverseConditionalGroups && doc2.expandedStates) {
            for (let ic = doc2.expandedStates.length, i = ic - 1; i >= 0; --i) {
              docsStack.push(doc2.expandedStates[i]);
            }
          } else {
            docsStack.push(doc2.contents);
          }
          break;
        case DOC_TYPE_ALIGN:
        case DOC_TYPE_INDENT:
        case DOC_TYPE_INDENT_IF_BREAK:
        case DOC_TYPE_LABEL:
        case DOC_TYPE_LINE_SUFFIX:
          docsStack.push(doc2.contents);
          break;
        case DOC_TYPE_STRING:
        case DOC_TYPE_CURSOR:
        case DOC_TYPE_TRIM:
        case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
        case DOC_TYPE_LINE:
        case DOC_TYPE_BREAK_PARENT:
          break;
        default:
          throw new invalid_doc_error_default(doc2);
      }
    }
  }
  var traverse_doc_default = traverseDoc;
 
  // src/document/utils.js
  function mapDoc(doc, cb) {
    if (typeof doc === "string") {
      return cb(doc);
    }
    const mapped = /* @__PURE__ */ new Map();
    return rec(doc);
    function rec(doc2) {
      if (mapped.has(doc2)) {
        return mapped.get(doc2);
      }
      const result = process2(doc2);
      mapped.set(doc2, result);
      return result;
    }
    function process2(doc2) {
      switch (get_doc_type_default(doc2)) {
        case DOC_TYPE_ARRAY:
          return cb(doc2.map(rec));
        case DOC_TYPE_FILL:
          return cb({ ...doc2, parts: doc2.parts.map(rec) });
        case DOC_TYPE_IF_BREAK:
          return cb({
            ...doc2,
            breakContents: rec(doc2.breakContents),
            flatContents: rec(doc2.flatContents)
          });
        case DOC_TYPE_GROUP: {
          let { expandedStates, contents } = doc2;
          if (expandedStates) {
            expandedStates = expandedStates.map(rec);
            contents = expandedStates[0];
          } else {
            contents = rec(contents);
          }
          return cb({ ...doc2, contents, expandedStates });
        }
        case DOC_TYPE_ALIGN:
        case DOC_TYPE_INDENT:
        case DOC_TYPE_INDENT_IF_BREAK:
        case DOC_TYPE_LABEL:
        case DOC_TYPE_LINE_SUFFIX:
          return cb({ ...doc2, contents: rec(doc2.contents) });
        case DOC_TYPE_STRING:
        case DOC_TYPE_CURSOR:
        case DOC_TYPE_TRIM:
        case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
        case DOC_TYPE_LINE:
        case DOC_TYPE_BREAK_PARENT:
          return cb(doc2);
        default:
          throw new invalid_doc_error_default(doc2);
      }
    }
  }
  function findInDoc(doc, fn, defaultValue) {
    let result = defaultValue;
    let shouldSkipFurtherProcessing = false;
    function findInDocOnEnterFn(doc2) {
      if (shouldSkipFurtherProcessing) {
        return false;
      }
      const maybeResult = fn(doc2);
      if (maybeResult !== void 0) {
        shouldSkipFurtherProcessing = true;
        result = maybeResult;
      }
    }
    traverse_doc_default(doc, findInDocOnEnterFn);
    return result;
  }
  function willBreakFn(doc) {
    if (doc.type === DOC_TYPE_GROUP && doc.break) {
      return true;
    }
    if (doc.type === DOC_TYPE_LINE && doc.hard) {
      return true;
    }
    if (doc.type === DOC_TYPE_BREAK_PARENT) {
      return true;
    }
  }
  function willBreak(doc) {
    return findInDoc(doc, willBreakFn, false);
  }
  function breakParentGroup(groupStack) {
    if (groupStack.length > 0) {
      const parentGroup = at_default(
        /* isOptionalObject */
        false,
        groupStack,
        -1
      );
      if (!parentGroup.expandedStates && !parentGroup.break) {
        parentGroup.break = "propagated";
      }
    }
    return null;
  }
  function propagateBreaks(doc) {
    const alreadyVisitedSet = /* @__PURE__ */ new Set();
    const groupStack = [];
    function propagateBreaksOnEnterFn(doc2) {
      if (doc2.type === DOC_TYPE_BREAK_PARENT) {
        breakParentGroup(groupStack);
      }
      if (doc2.type === DOC_TYPE_GROUP) {
        groupStack.push(doc2);
        if (alreadyVisitedSet.has(doc2)) {
          return false;
        }
        alreadyVisitedSet.add(doc2);
      }
    }
    function propagateBreaksOnExitFn(doc2) {
      if (doc2.type === DOC_TYPE_GROUP) {
        const group2 = groupStack.pop();
        if (group2.break) {
          breakParentGroup(groupStack);
        }
      }
    }
    traverse_doc_default(
      doc,
      propagateBreaksOnEnterFn,
      propagateBreaksOnExitFn,
      /* shouldTraverseConditionalGroups */
      true
    );
  }
  function removeLinesFn(doc) {
    if (doc.type === DOC_TYPE_LINE && !doc.hard) {
      return doc.soft ? "" : " ";
    }
    if (doc.type === DOC_TYPE_IF_BREAK) {
      return doc.flatContents;
    }
    return doc;
  }
  function removeLines(doc) {
    return mapDoc(doc, removeLinesFn);
  }
  function stripTrailingHardlineFromParts(parts) {
    parts = [...parts];
    while (parts.length >= 2 && at_default(
      /* isOptionalObject */
      false,
      parts,
      -2
    ).type === DOC_TYPE_LINE && at_default(
      /* isOptionalObject */
      false,
      parts,
      -1
    ).type === DOC_TYPE_BREAK_PARENT) {
      parts.length -= 2;
    }
    if (parts.length > 0) {
      const lastPart = stripTrailingHardlineFromDoc(at_default(
        /* isOptionalObject */
        false,
        parts,
        -1
      ));
      parts[parts.length - 1] = lastPart;
    }
    return parts;
  }
  function stripTrailingHardlineFromDoc(doc) {
    switch (get_doc_type_default(doc)) {
      case DOC_TYPE_INDENT:
      case DOC_TYPE_INDENT_IF_BREAK:
      case DOC_TYPE_GROUP:
      case DOC_TYPE_LINE_SUFFIX:
      case DOC_TYPE_LABEL: {
        const contents = stripTrailingHardlineFromDoc(doc.contents);
        return { ...doc, contents };
      }
      case DOC_TYPE_IF_BREAK:
        return {
          ...doc,
          breakContents: stripTrailingHardlineFromDoc(doc.breakContents),
          flatContents: stripTrailingHardlineFromDoc(doc.flatContents)
        };
      case DOC_TYPE_FILL:
        return { ...doc, parts: stripTrailingHardlineFromParts(doc.parts) };
      case DOC_TYPE_ARRAY:
        return stripTrailingHardlineFromParts(doc);
      case DOC_TYPE_STRING:
        return trimNewlinesEnd(doc);
      case DOC_TYPE_ALIGN:
      case DOC_TYPE_CURSOR:
      case DOC_TYPE_TRIM:
      case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
      case DOC_TYPE_LINE:
      case DOC_TYPE_BREAK_PARENT:
        break;
      default:
        throw new invalid_doc_error_default(doc);
    }
    return doc;
  }
  function stripTrailingHardline(doc) {
    return stripTrailingHardlineFromDoc(cleanDoc(doc));
  }
  function cleanDocFn(doc) {
    switch (get_doc_type_default(doc)) {
      case DOC_TYPE_FILL:
        if (doc.parts.every((part) => part === "")) {
          return "";
        }
        break;
      case DOC_TYPE_GROUP:
        if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) {
          return "";
        }
        if (doc.contents.type === DOC_TYPE_GROUP && doc.contents.id === doc.id && doc.contents.break === doc.break && doc.contents.expandedStates === doc.expandedStates) {
          return doc.contents;
        }
        break;
      case DOC_TYPE_ALIGN:
      case DOC_TYPE_INDENT:
      case DOC_TYPE_INDENT_IF_BREAK:
      case DOC_TYPE_LINE_SUFFIX:
        if (!doc.contents) {
          return "";
        }
        break;
      case DOC_TYPE_IF_BREAK:
        if (!doc.flatContents && !doc.breakContents) {
          return "";
        }
        break;
      case DOC_TYPE_ARRAY: {
        const parts = [];
        for (const part of doc) {
          if (!part) {
            continue;
          }
          const [currentPart, ...restParts] = Array.isArray(part) ? part : [part];
          if (typeof currentPart === "string" && typeof at_default(
            /* isOptionalObject */
            false,
            parts,
            -1
          ) === "string") {
            parts[parts.length - 1] += currentPart;
          } else {
            parts.push(currentPart);
          }
          parts.push(...restParts);
        }
        if (parts.length === 0) {
          return "";
        }
        if (parts.length === 1) {
          return parts[0];
        }
        return parts;
      }
      case DOC_TYPE_STRING:
      case DOC_TYPE_CURSOR:
      case DOC_TYPE_TRIM:
      case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
      case DOC_TYPE_LINE:
      case DOC_TYPE_LABEL:
      case DOC_TYPE_BREAK_PARENT:
        break;
      default:
        throw new invalid_doc_error_default(doc);
    }
    return doc;
  }
  function cleanDoc(doc) {
    return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
  }
  function replaceEndOfLine(doc, replacement = literalline) {
    return mapDoc(
      doc,
      (currentDoc) => typeof currentDoc === "string" ? join(replacement, currentDoc.split("\n")) : currentDoc
    );
  }
  function canBreakFn(doc) {
    if (doc.type === DOC_TYPE_LINE) {
      return true;
    }
  }
  function canBreak(doc) {
    return findInDoc(doc, canBreakFn, false);
  }
  function inheritLabel(doc, fn) {
    return doc.type === DOC_TYPE_LABEL ? { ...doc, contents: fn(doc.contents) } : fn(doc);
  }
 
  // src/document/utils/assert-doc.js
  var noop = () => {
  };
  var assertDoc = true ? noop : function(doc) {
    traverse_doc_default(doc, (doc2) => {
      if (checked.has(doc2)) {
        return false;
      }
      if (typeof doc2 !== "string") {
        checked.add(doc2);
      }
    });
  };
  var assertDocArray = true ? noop : function(docs, optional = false) {
    if (optional && !docs) {
      return;
    }
    if (!Array.isArray(docs)) {
      throw new TypeError("Unexpected doc array.");
    }
    for (const doc of docs) {
      assertDoc(doc);
    }
  };
  var assertDocFillParts = true ? noop : (
    /**
     * @param {Doc[]} parts
     */
    function(parts) {
      assertDocArray(parts);
      if (parts.length > 1 && isEmptyDoc(at_default(
        /* isOptionalObject */
        false,
        parts,
        -1
      ))) {
        parts = parts.slice(0, -1);
      }
      for (const [i, doc] of parts.entries()) {
        if (i % 2 === 1 && !isValidSeparator(doc)) {
          const type = get_doc_type_default(doc);
          throw new Error(
            `Unexpected non-line-break doc at ${i}. Doc type is ${type}.`
          );
        }
      }
    }
  );
 
  // src/document/builders.js
  function indent(contents) {
    assertDoc(contents);
    return { type: DOC_TYPE_INDENT, contents };
  }
  function align(widthOrString, contents) {
    assertDoc(contents);
    return { type: DOC_TYPE_ALIGN, contents, n: widthOrString };
  }
  function group(contents, opts = {}) {
    assertDoc(contents);
    assertDocArray(
      opts.expandedStates,
      /* optional */
      true
    );
    return {
      type: DOC_TYPE_GROUP,
      id: opts.id,
      contents,
      break: Boolean(opts.shouldBreak),
      expandedStates: opts.expandedStates
    };
  }
  function dedentToRoot(contents) {
    return align(Number.NEGATIVE_INFINITY, contents);
  }
  function markAsRoot(contents) {
    return align({ type: "root" }, contents);
  }
  function dedent(contents) {
    return align(-1, contents);
  }
  function conditionalGroup(states, opts) {
    return group(states[0], { ...opts, expandedStates: states });
  }
  function fill(parts) {
    assertDocFillParts(parts);
    return { type: DOC_TYPE_FILL, parts };
  }
  function ifBreak(breakContents, flatContents = "", opts = {}) {
    assertDoc(breakContents);
    if (flatContents !== "") {
      assertDoc(flatContents);
    }
    return {
      type: DOC_TYPE_IF_BREAK,
      breakContents,
      flatContents,
      groupId: opts.groupId
    };
  }
  function indentIfBreak(contents, opts) {
    assertDoc(contents);
    return {
      type: DOC_TYPE_INDENT_IF_BREAK,
      contents,
      groupId: opts.groupId,
      negate: opts.negate
    };
  }
  function lineSuffix(contents) {
    assertDoc(contents);
    return { type: DOC_TYPE_LINE_SUFFIX, contents };
  }
  var lineSuffixBoundary = { type: DOC_TYPE_LINE_SUFFIX_BOUNDARY };
  var breakParent = { type: DOC_TYPE_BREAK_PARENT };
  var trim = { type: DOC_TYPE_TRIM };
  var hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true };
  var literallineWithoutBreakParent = {
    type: DOC_TYPE_LINE,
    hard: true,
    literal: true
  };
  var line = { type: DOC_TYPE_LINE };
  var softline = { type: DOC_TYPE_LINE, soft: true };
  var hardline = [hardlineWithoutBreakParent, breakParent];
  var literalline = [literallineWithoutBreakParent, breakParent];
  var cursor = { type: DOC_TYPE_CURSOR };
  function join(separator, docs) {
    assertDoc(separator);
    assertDocArray(docs);
    const parts = [];
    for (let i = 0; i < docs.length; i++) {
      if (i !== 0) {
        parts.push(separator);
      }
      parts.push(docs[i]);
    }
    return parts;
  }
  function addAlignmentToDoc(doc, size, tabWidth) {
    assertDoc(doc);
    let aligned = doc;
    if (size > 0) {
      for (let i = 0; i < Math.floor(size / tabWidth); ++i) {
        aligned = indent(aligned);
      }
      aligned = align(size % tabWidth, aligned);
      aligned = align(Number.NEGATIVE_INFINITY, aligned);
    }
    return aligned;
  }
  function label(label2, contents) {
    assertDoc(contents);
    return label2 ? { type: DOC_TYPE_LABEL, label: label2, contents } : contents;
  }
 
  // src/document/debug.js
  function flattenDoc(doc) {
    var _a2;
    if (!doc) {
      return "";
    }
    if (Array.isArray(doc)) {
      const res = [];
      for (const part of doc) {
        if (Array.isArray(part)) {
          res.push(...flattenDoc(part));
        } else {
          const flattened = flattenDoc(part);
          if (flattened !== "") {
            res.push(flattened);
          }
        }
      }
      return res;
    }
    if (doc.type === DOC_TYPE_IF_BREAK) {
      return {
        ...doc,
        breakContents: flattenDoc(doc.breakContents),
        flatContents: flattenDoc(doc.flatContents)
      };
    }
    if (doc.type === DOC_TYPE_GROUP) {
      return {
        ...doc,
        contents: flattenDoc(doc.contents),
        expandedStates: (_a2 = doc.expandedStates) == null ? void 0 : _a2.map(flattenDoc)
      };
    }
    if (doc.type === DOC_TYPE_FILL) {
      return { type: "fill", parts: doc.parts.map(flattenDoc) };
    }
    if (doc.contents) {
      return { ...doc, contents: flattenDoc(doc.contents) };
    }
    return doc;
  }
  function printDocToDebug(doc) {
    const printedSymbols = /* @__PURE__ */ Object.create(null);
    const usedKeysForSymbols = /* @__PURE__ */ new Set();
    return printDoc(flattenDoc(doc));
    function printDoc(doc2, index, parentParts) {
      var _a2, _b2;
      if (typeof doc2 === "string") {
        return JSON.stringify(doc2);
      }
      if (Array.isArray(doc2)) {
        const printed = doc2.map(printDoc).filter(Boolean);
        return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`;
      }
      if (doc2.type === DOC_TYPE_LINE) {
        const withBreakParent = ((_a2 = parentParts == null ? void 0 : parentParts[index + 1]) == null ? void 0 : _a2.type) === DOC_TYPE_BREAK_PARENT;
        if (doc2.literal) {
          return withBreakParent ? "literalline" : "literallineWithoutBreakParent";
        }
        if (doc2.hard) {
          return withBreakParent ? "hardline" : "hardlineWithoutBreakParent";
        }
        if (doc2.soft) {
          return "softline";
        }
        return "line";
      }
      if (doc2.type === DOC_TYPE_BREAK_PARENT) {
        const afterHardline = ((_b2 = parentParts == null ? void 0 : parentParts[index - 1]) == null ? void 0 : _b2.type) === DOC_TYPE_LINE && parentParts[index - 1].hard;
        return afterHardline ? void 0 : "breakParent";
      }
      if (doc2.type === DOC_TYPE_TRIM) {
        return "trim";
      }
      if (doc2.type === DOC_TYPE_INDENT) {
        return "indent(" + printDoc(doc2.contents) + ")";
      }
      if (doc2.type === DOC_TYPE_ALIGN) {
        return doc2.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + printDoc(doc2.contents) + ")" : doc2.n < 0 ? "dedent(" + printDoc(doc2.contents) + ")" : doc2.n.type === "root" ? "markAsRoot(" + printDoc(doc2.contents) + ")" : "align(" + JSON.stringify(doc2.n) + ", " + printDoc(doc2.contents) + ")";
      }
      if (doc2.type === DOC_TYPE_IF_BREAK) {
        return "ifBreak(" + printDoc(doc2.breakContents) + (doc2.flatContents ? ", " + printDoc(doc2.flatContents) : "") + (doc2.groupId ? (!doc2.flatContents ? ', ""' : "") + `, { groupId: ${printGroupId(doc2.groupId)} }` : "") + ")";
      }
      if (doc2.type === DOC_TYPE_INDENT_IF_BREAK) {
        const optionsParts = [];
        if (doc2.negate) {
          optionsParts.push("negate: true");
        }
        if (doc2.groupId) {
          optionsParts.push(`groupId: ${printGroupId(doc2.groupId)}`);
        }
        const options = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : "";
        return `indentIfBreak(${printDoc(doc2.contents)}${options})`;
      }
      if (doc2.type === DOC_TYPE_GROUP) {
        const optionsParts = [];
        if (doc2.break && doc2.break !== "propagated") {
          optionsParts.push("shouldBreak: true");
        }
        if (doc2.id) {
          optionsParts.push(`id: ${printGroupId(doc2.id)}`);
        }
        const options = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : "";
        if (doc2.expandedStates) {
          return `conditionalGroup([${doc2.expandedStates.map((part) => printDoc(part)).join(",")}]${options})`;
        }
        return `group(${printDoc(doc2.contents)}${options})`;
      }
      if (doc2.type === DOC_TYPE_FILL) {
        return `fill([${doc2.parts.map((part) => printDoc(part)).join(", ")}])`;
      }
      if (doc2.type === DOC_TYPE_LINE_SUFFIX) {
        return "lineSuffix(" + printDoc(doc2.contents) + ")";
      }
      if (doc2.type === DOC_TYPE_LINE_SUFFIX_BOUNDARY) {
        return "lineSuffixBoundary";
      }
      if (doc2.type === DOC_TYPE_LABEL) {
        return `label(${JSON.stringify(doc2.label)}, ${printDoc(doc2.contents)})`;
      }
      if (doc2.type === DOC_TYPE_CURSOR) {
        return "cursor";
      }
      throw new Error("Unknown doc type " + doc2.type);
    }
    function printGroupId(id) {
      if (typeof id !== "symbol") {
        return JSON.stringify(String(id));
      }
      if (id in printedSymbols) {
        return printedSymbols[id];
      }
      const prefix = id.description || "symbol";
      for (let counter = 0; ; counter++) {
        const key = prefix + (counter > 0 ? ` #${counter}` : "");
        if (!usedKeysForSymbols.has(key)) {
          usedKeysForSymbols.add(key);
          return printedSymbols[id] = `Symbol.for(${JSON.stringify(key)})`;
        }
      }
    }
  }
 
  // node_modules/emoji-regex/index.mjs
  var emoji_regex_default = () => {
    return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
  };
 
  // node_modules/get-east-asian-width/lookup.js
  function isFullWidth(x) {
    return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
  }
  function isWide(x) {
    return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
  }
 
  // node_modules/get-east-asian-width/index.js
  var _isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint));
 
  // src/utils/get-string-width.js
  var notAsciiRegex = /[^\x20-\x7F]/u;
  function getStringWidth(text) {
    if (!text) {
      return 0;
    }
    if (!notAsciiRegex.test(text)) {
      return text.length;
    }
    text = text.replace(emoji_regex_default(), "  ");
    let width = 0;
    for (const character of text) {
      const codePoint = character.codePointAt(0);
      if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
        continue;
      }
      if (codePoint >= 768 && codePoint <= 879) {
        continue;
      }
      width += _isNarrowWidth(codePoint) ? 1 : 2;
    }
    return width;
  }
  var get_string_width_default = getStringWidth;
 
  // src/document/printer.js
  var MODE_BREAK = Symbol("MODE_BREAK");
  var MODE_FLAT = Symbol("MODE_FLAT");
  var CURSOR_PLACEHOLDER = Symbol("cursor");
  var DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
  function rootIndent() {
    return { value: "", length: 0, queue: [] };
  }
  function makeIndent(ind, options) {
    return generateInd(ind, { type: "indent" }, options);
  }
  function makeAlign(indent2, widthOrDoc, options) {
    if (widthOrDoc === Number.NEGATIVE_INFINITY) {
      return indent2.root || rootIndent();
    }
    if (widthOrDoc < 0) {
      return generateInd(indent2, { type: "dedent" }, options);
    }
    if (!widthOrDoc) {
      return indent2;
    }
    if (widthOrDoc.type === "root") {
      return { ...indent2, root: indent2 };
    }
    const alignType = typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign";
    return generateInd(indent2, { type: alignType, n: widthOrDoc }, options);
  }
  function generateInd(ind, newPart, options) {
    const queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : [...ind.queue, newPart];
    let value = "";
    let length = 0;
    let lastTabs = 0;
    let lastSpaces = 0;
    for (const part of queue) {
      switch (part.type) {
        case "indent":
          flush();
          if (options.useTabs) {
            addTabs(1);
          } else {
            addSpaces(options.tabWidth);
          }
          break;
        case "stringAlign":
          flush();
          value += part.n;
          length += part.n.length;
          break;
        case "numberAlign":
          lastTabs += 1;
          lastSpaces += part.n;
          break;
        default:
          throw new Error(`Unexpected type '${part.type}'`);
      }
    }
    flushSpaces();
    return { ...ind, value, length, queue };
    function addTabs(count) {
      value += "	".repeat(count);
      length += options.tabWidth * count;
    }
    function addSpaces(count) {
      value += " ".repeat(count);
      length += count;
    }
    function flush() {
      if (options.useTabs) {
        flushTabs();
      } else {
        flushSpaces();
      }
    }
    function flushTabs() {
      if (lastTabs > 0) {
        addTabs(lastTabs);
      }
      resetLast();
    }
    function flushSpaces() {
      if (lastSpaces > 0) {
        addSpaces(lastSpaces);
      }
      resetLast();
    }
    function resetLast() {
      lastTabs = 0;
      lastSpaces = 0;
    }
  }
  function trim2(out) {
    let trimCount = 0;
    let cursorCount = 0;
    let outIndex = out.length;
    outer: while (outIndex--) {
      const last = out[outIndex];
      if (last === CURSOR_PLACEHOLDER) {
        cursorCount++;
        continue;
      }
      if (false) {
        throw new Error(`Unexpected value in trim: '${typeof last}'`);
      }
      for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) {
        const char = last[charIndex];
        if (char === " " || char === "	") {
          trimCount++;
        } else {
          out[outIndex] = last.slice(0, charIndex + 1);
          break outer;
        }
      }
    }
    if (trimCount > 0 || cursorCount > 0) {
      out.length = outIndex + 1;
      while (cursorCount-- > 0) {
        out.push(CURSOR_PLACEHOLDER);
      }
    }
    return trimCount;
  }
  function fits(next, restCommands, width, hasLineSuffix, groupModeMap, mustBeFlat) {
    if (width === Number.POSITIVE_INFINITY) {
      return true;
    }
    let restIdx = restCommands.length;
    const cmds = [next];
    const out = [];
    while (width >= 0) {
      if (cmds.length === 0) {
        if (restIdx === 0) {
          return true;
        }
        cmds.push(restCommands[--restIdx]);
        continue;
      }
      const { mode, doc } = cmds.pop();
      const docType = get_doc_type_default(doc);
      switch (docType) {
        case DOC_TYPE_STRING:
          out.push(doc);
          width -= get_string_width_default(doc);
          break;
        case DOC_TYPE_ARRAY:
        case DOC_TYPE_FILL: {
          const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts;
          const end = doc[DOC_FILL_PRINTED_LENGTH] ?? 0;
          for (let i = parts.length - 1; i >= end; i--) {
            cmds.push({ mode, doc: parts[i] });
          }
          break;
        }
        case DOC_TYPE_INDENT:
        case DOC_TYPE_ALIGN:
        case DOC_TYPE_INDENT_IF_BREAK:
        case DOC_TYPE_LABEL:
          cmds.push({ mode, doc: doc.contents });
          break;
        case DOC_TYPE_TRIM:
          width += trim2(out);
          break;
        case DOC_TYPE_GROUP: {
          if (mustBeFlat && doc.break) {
            return false;
          }
          const groupMode = doc.break ? MODE_BREAK : mode;
          const contents = doc.expandedStates && groupMode === MODE_BREAK ? at_default(
            /* isOptionalObject */
            false,
            doc.expandedStates,
            -1
          ) : doc.contents;
          cmds.push({ mode: groupMode, doc: contents });
          break;
        }
        case DOC_TYPE_IF_BREAK: {
          const groupMode = doc.groupId ? groupModeMap[doc.groupId] || MODE_FLAT : mode;
          const contents = groupMode === MODE_BREAK ? doc.breakContents : doc.flatContents;
          if (contents) {
            cmds.push({ mode, doc: contents });
          }
          break;
        }
        case DOC_TYPE_LINE:
          if (mode === MODE_BREAK || doc.hard) {
            return true;
          }
          if (!doc.soft) {
            out.push(" ");
            width--;
          }
          break;
        case DOC_TYPE_LINE_SUFFIX:
          hasLineSuffix = true;
          break;
        case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
          if (hasLineSuffix) {
            return false;
          }
          break;
      }
    }
    return false;
  }
  function printDocToString(doc, options) {
    const groupModeMap = {};
    const width = options.printWidth;
    const newLine = convertEndOfLineToChars(options.endOfLine);
    let pos = 0;
    const cmds = [{ ind: rootIndent(), mode: MODE_BREAK, doc }];
    const out = [];
    let shouldRemeasure = false;
    const lineSuffix2 = [];
    let printedCursorCount = 0;
    propagateBreaks(doc);
    while (cmds.length > 0) {
      const { ind, mode, doc: doc2 } = cmds.pop();
      switch (get_doc_type_default(doc2)) {
        case DOC_TYPE_STRING: {
          const formatted = newLine !== "\n" ? string_replace_all_default(
            /* isOptionalObject */
            false,
            doc2,
            "\n",
            newLine
          ) : doc2;
          out.push(formatted);
          if (cmds.length > 0) {
            pos += get_string_width_default(formatted);
          }
          break;
        }
        case DOC_TYPE_ARRAY:
          for (let i = doc2.length - 1; i >= 0; i--) {
            cmds.push({ ind, mode, doc: doc2[i] });
          }
          break;
        case DOC_TYPE_CURSOR:
          if (printedCursorCount >= 2) {
            throw new Error("There are too many 'cursor' in doc.");
          }
          out.push(CURSOR_PLACEHOLDER);
          printedCursorCount++;
          break;
        case DOC_TYPE_INDENT:
          cmds.push({ ind: makeIndent(ind, options), mode, doc: doc2.contents });
          break;
        case DOC_TYPE_ALIGN:
          cmds.push({
            ind: makeAlign(ind, doc2.n, options),
            mode,
            doc: doc2.contents
          });
          break;
        case DOC_TYPE_TRIM:
          pos -= trim2(out);
          break;
        case DOC_TYPE_GROUP:
          switch (mode) {
            case MODE_FLAT:
              if (!shouldRemeasure) {
                cmds.push({
                  ind,
                  mode: doc2.break ? MODE_BREAK : MODE_FLAT,
                  doc: doc2.contents
                });
                break;
              }
            // fallthrough
            case MODE_BREAK: {
              shouldRemeasure = false;
              const next = { ind, mode: MODE_FLAT, doc: doc2.contents };
              const rem = width - pos;
              const hasLineSuffix = lineSuffix2.length > 0;
              if (!doc2.break && fits(next, cmds, rem, hasLineSuffix, groupModeMap)) {
                cmds.push(next);
              } else {
                if (doc2.expandedStates) {
                  const mostExpanded = at_default(
                    /* isOptionalObject */
                    false,
                    doc2.expandedStates,
                    -1
                  );
                  if (doc2.break) {
                    cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded });
                    break;
                  } else {
                    for (let i = 1; i < doc2.expandedStates.length + 1; i++) {
                      if (i >= doc2.expandedStates.length) {
                        cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded });
                        break;
                      } else {
                        const state = doc2.expandedStates[i];
                        const cmd = { ind, mode: MODE_FLAT, doc: state };
                        if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) {
                          cmds.push(cmd);
                          break;
                        }
                      }
                    }
                  }
                } else {
                  cmds.push({ ind, mode: MODE_BREAK, doc: doc2.contents });
                }
              }
              break;
            }
          }
          if (doc2.id) {
            groupModeMap[doc2.id] = at_default(
              /* isOptionalObject */
              false,
              cmds,
              -1
            ).mode;
          }
          break;
        // Fills each line with as much code as possible before moving to a new
        // line with the same indentation.
        //
        // Expects doc.parts to be an array of alternating content and
        // whitespace. The whitespace contains the linebreaks.
        //
        // For example:
        //   ["I", line, "love", line, "monkeys"]
        // or
        //   [{ type: group, ... }, softline, { type: group, ... }]
        //
        // It uses this parts structure to handle three main layout cases:
        // * The first two content items fit on the same line without
        //   breaking
        //   -> output the first content item and the whitespace "flat".
        // * Only the first content item fits on the line without breaking
        //   -> output the first content item "flat" and the whitespace with
        //   "break".
        // * Neither content item fits on the line without breaking
        //   -> output the first content item and the whitespace with "break".
        case DOC_TYPE_FILL: {
          const rem = width - pos;
          const offset = doc2[DOC_FILL_PRINTED_LENGTH] ?? 0;
          const { parts } = doc2;
          const length = parts.length - offset;
          if (length === 0) {
            break;
          }
          const content = parts[offset + 0];
          const whitespace = parts[offset + 1];
          const contentFlatCmd = { ind, mode: MODE_FLAT, doc: content };
          const contentBreakCmd = { ind, mode: MODE_BREAK, doc: content };
          const contentFits = fits(
            contentFlatCmd,
            [],
            rem,
            lineSuffix2.length > 0,
            groupModeMap,
            true
          );
          if (length === 1) {
            if (contentFits) {
              cmds.push(contentFlatCmd);
            } else {
              cmds.push(contentBreakCmd);
            }
            break;
          }
          const whitespaceFlatCmd = { ind, mode: MODE_FLAT, doc: whitespace };
          const whitespaceBreakCmd = { ind, mode: MODE_BREAK, doc: whitespace };
          if (length === 2) {
            if (contentFits) {
              cmds.push(whitespaceFlatCmd, contentFlatCmd);
            } else {
              cmds.push(whitespaceBreakCmd, contentBreakCmd);
            }
            break;
          }
          const secondContent = parts[offset + 2];
          const remainingCmd = {
            ind,
            mode,
            doc: { ...doc2, [DOC_FILL_PRINTED_LENGTH]: offset + 2 }
          };
          const firstAndSecondContentFlatCmd = {
            ind,
            mode: MODE_FLAT,
            doc: [content, whitespace, secondContent]
          };
          const firstAndSecondContentFits = fits(
            firstAndSecondContentFlatCmd,
            [],
            rem,
            lineSuffix2.length > 0,
            groupModeMap,
            true
          );
          if (firstAndSecondContentFits) {
            cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd);
          } else if (contentFits) {
            cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd);
          } else {
            cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd);
          }
          break;
        }
        case DOC_TYPE_IF_BREAK:
        case DOC_TYPE_INDENT_IF_BREAK: {
          const groupMode = doc2.groupId ? groupModeMap[doc2.groupId] : mode;
          if (groupMode === MODE_BREAK) {
            const breakContents = doc2.type === DOC_TYPE_IF_BREAK ? doc2.breakContents : doc2.negate ? doc2.contents : indent(doc2.contents);
            if (breakContents) {
              cmds.push({ ind, mode, doc: breakContents });
            }
          }
          if (groupMode === MODE_FLAT) {
            const flatContents = doc2.type === DOC_TYPE_IF_BREAK ? doc2.flatContents : doc2.negate ? indent(doc2.contents) : doc2.contents;
            if (flatContents) {
              cmds.push({ ind, mode, doc: flatContents });
            }
          }
          break;
        }
        case DOC_TYPE_LINE_SUFFIX:
          lineSuffix2.push({ ind, mode, doc: doc2.contents });
          break;
        case DOC_TYPE_LINE_SUFFIX_BOUNDARY:
          if (lineSuffix2.length > 0) {
            cmds.push({ ind, mode, doc: hardlineWithoutBreakParent });
          }
          break;
        case DOC_TYPE_LINE:
          switch (mode) {
            case MODE_FLAT:
              if (!doc2.hard) {
                if (!doc2.soft) {
                  out.push(" ");
                  pos += 1;
                }
                break;
              } else {
                shouldRemeasure = true;
              }
            // fallthrough
            case MODE_BREAK:
              if (lineSuffix2.length > 0) {
                cmds.push({ ind, mode, doc: doc2 }, ...lineSuffix2.reverse());
                lineSuffix2.length = 0;
                break;
              }
              if (doc2.literal) {
                if (ind.root) {
                  out.push(newLine, ind.root.value);
                  pos = ind.root.length;
                } else {
                  out.push(newLine);
                  pos = 0;
                }
              } else {
                pos -= trim2(out);
                out.push(newLine + ind.value);
                pos = ind.length;
              }
              break;
          }
          break;
        case DOC_TYPE_LABEL:
          cmds.push({ ind, mode, doc: doc2.contents });
          break;
        case DOC_TYPE_BREAK_PARENT:
          break;
        default:
          throw new invalid_doc_error_default(doc2);
      }
      if (cmds.length === 0 && lineSuffix2.length > 0) {
        cmds.push(...lineSuffix2.reverse());
        lineSuffix2.length = 0;
      }
    }
    const cursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER);
    if (cursorPlaceholderIndex !== -1) {
      const otherCursorPlaceholderIndex = out.indexOf(
        CURSOR_PLACEHOLDER,
        cursorPlaceholderIndex + 1
      );
      if (otherCursorPlaceholderIndex === -1) {
        return {
          formatted: out.filter((char) => char !== CURSOR_PLACEHOLDER).join("")
        };
      }
      const beforeCursor = out.slice(0, cursorPlaceholderIndex).join("");
      const aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join("");
      const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join("");
      return {
        formatted: beforeCursor + aroundCursor + afterCursor,
        cursorNodeStart: beforeCursor.length,
        cursorNodeText: aroundCursor
      };
    }
    return { formatted: out.join("") };
  }
 
  // src/utils/get-alignment-size.js
  function getAlignmentSize(text, tabWidth, startIndex = 0) {
    let size = 0;
    for (let i = startIndex; i < text.length; ++i) {
      if (text[i] === "	") {
        size = size + tabWidth - size % tabWidth;
      } else {
        size++;
      }
    }
    return size;
  }
  var get_alignment_size_default = getAlignmentSize;
 
  // src/common/ast-path.js
  var _AstPath_instances, getNodeStackIndex_fn, getAncestors_fn;
  var AstPath = class {
    constructor(value) {
      __privateAdd(this, _AstPath_instances);
      this.stack = [value];
    }
    /** @type {string | null} */
    get key() {
      const { stack, siblings } = this;
      return at_default(
        /* isOptionalObject */
        false,
        stack,
        siblings === null ? -2 : -4
      ) ?? null;
    }
    /** @type {number | null} */
    get index() {
      return this.siblings === null ? null : at_default(
        /* isOptionalObject */
        false,
        this.stack,
        -2
      );
    }
    /** @type {object} */
    get node() {
      return at_default(
        /* isOptionalObject */
        false,
        this.stack,
        -1
      );
    }
    /** @type {object | null} */
    get parent() {
      return this.getNode(1);
    }
    /** @type {object | null} */
    get grandparent() {
      return this.getNode(2);
    }
    /** @type {boolean} */
    get isInArray() {
      return this.siblings !== null;
    }
    /** @type {object[] | null} */
    get siblings() {
      const { stack } = this;
      const maybeArray = at_default(
        /* isOptionalObject */
        false,
        stack,
        -3
      );
      return Array.isArray(maybeArray) ? maybeArray : null;
    }
    /** @type {object | null} */
    get next() {
      const { siblings } = this;
      return siblings === null ? null : siblings[this.index + 1];
    }
    /** @type {object | null} */
    get previous() {
      const { siblings } = this;
      return siblings === null ? null : siblings[this.index - 1];
    }
    /** @type {boolean} */
    get isFirst() {
      return this.index === 0;
    }
    /** @type {boolean} */
    get isLast() {
      const { siblings, index } = this;
      return siblings !== null && index === siblings.length - 1;
    }
    /** @type {boolean} */
    get isRoot() {
      return this.stack.length === 1;
    }
    /** @type {object} */
    get root() {
      return this.stack[0];
    }
    /** @type {object[]} */
    get ancestors() {
      return [...__privateMethod(this, _AstPath_instances, getAncestors_fn).call(this)];
    }
    // The name of the current property is always the penultimate element of
    // this.stack, and always a string/number/symbol.
    getName() {
      const { stack } = this;
      const { length } = stack;
      if (length > 1) {
        return at_default(
          /* isOptionalObject */
          false,
          stack,
          -2
        );
      }
      return null;
    }
    // The value of the current property is always the final element of
    // this.stack.
    getValue() {
      return at_default(
        /* isOptionalObject */
        false,
        this.stack,
        -1
      );
    }
    getNode(count = 0) {
      const stackIndex = __privateMethod(this, _AstPath_instances, getNodeStackIndex_fn).call(this, count);
      return stackIndex === -1 ? null : this.stack[stackIndex];
    }
    getParentNode(count = 0) {
      return this.getNode(count + 1);
    }
    // Temporarily push properties named by string arguments given after the
    // callback function onto this.stack, then call the callback with a
    // reference to this (modified) AstPath object. Note that the stack will
    // be restored to its original state after the callback is finished, so it
    // is probably a mistake to retain a reference to the path.
    call(callback, ...names) {
      const { stack } = this;
      const { length } = stack;
      let value = at_default(
        /* isOptionalObject */
        false,
        stack,
        -1
      );
      for (const name of names) {
        value = value[name];
        stack.push(name, value);
      }
      try {
        return callback(this);
      } finally {
        stack.length = length;
      }
    }
    /**
     * @template {(path: AstPath) => any} T
     * @param {T} callback
     * @param {number} [count=0]
     * @returns {ReturnType<T>}
     */
    callParent(callback, count = 0) {
      const stackIndex = __privateMethod(this, _AstPath_instances, getNodeStackIndex_fn).call(this, count + 1);
      const parentValues = this.stack.splice(stackIndex + 1);
      try {
        return callback(this);
      } finally {
        this.stack.push(...parentValues);
      }
    }
    // Similar to AstPath.prototype.call, except that the value obtained by
    // accessing this.getValue()[name1][name2]... should be array. The
    // callback will be called with a reference to this path object for each
    // element of the array.
    each(callback, ...names) {
      const { stack } = this;
      const { length } = stack;
      let value = at_default(
        /* isOptionalObject */
        false,
        stack,
        -1
      );
      for (const name of names) {
        value = value[name];
        stack.push(name, value);
      }
      try {
        for (let i = 0; i < value.length; ++i) {
          stack.push(i, value[i]);
          callback(this, i, value);
          stack.length -= 2;
        }
      } finally {
        stack.length = length;
      }
    }
    // Similar to AstPath.prototype.each, except that the results of the
    // callback function invocations are stored in an array and returned at
    // the end of the iteration.
    map(callback, ...names) {
      const result = [];
      this.each(
        (path, index, value) => {
          result[index] = callback(path, index, value);
        },
        ...names
      );
      return result;
    }
    /**
     * @param {...(
     *   | ((node: any, name: string | null, number: number | null) => boolean)
     *   | undefined
     * )} predicates
     */
    match(...predicates) {
      let stackPointer = this.stack.length - 1;
      let name = null;
      let node = this.stack[stackPointer--];
      for (const predicate of predicates) {
        if (node === void 0) {
          return false;
        }
        let number = null;
        if (typeof name === "number") {
          number = name;
          name = this.stack[stackPointer--];
          node = this.stack[stackPointer--];
        }
        if (predicate && !predicate(node, name, number)) {
          return false;
        }
        name = this.stack[stackPointer--];
        node = this.stack[stackPointer--];
      }
      return true;
    }
    /**
     * Traverses the ancestors of the current node heading toward the tree root
     * until it finds a node that matches the provided predicate function. Will
     * return the first matching ancestor. If no such node exists, returns undefined.
     * @param {(node: any) => boolean} predicate
     * @internal Unstable API. Don't use in plugins for now.
     */
    findAncestor(predicate) {
      for (const node of __privateMethod(this, _AstPath_instances, getAncestors_fn).call(this)) {
        if (predicate(node)) {
          return node;
        }
      }
    }
    /**
     * Traverses the ancestors of the current node heading toward the tree root
     * until it finds a node that matches the provided predicate function.
     * returns true if matched node found.
     * @param {(node: any) => boolean} predicate
     * @returns {boolean}
     * @internal Unstable API. Don't use in plugins for now.
     */
    hasAncestor(predicate) {
      for (const node of __privateMethod(this, _AstPath_instances, getAncestors_fn).call(this)) {
        if (predicate(node)) {
          return true;
        }
      }
      return false;
    }
  };
  _AstPath_instances = new WeakSet();
  getNodeStackIndex_fn = function(count) {
    const { stack } = this;
    for (let i = stack.length - 1; i >= 0; i -= 2) {
      if (!Array.isArray(stack[i]) && --count < 0) {
        return i;
      }
    }
    return -1;
  };
  getAncestors_fn = function* () {
    const { stack } = this;
    for (let index = stack.length - 3; index >= 0; index -= 2) {
      const value = stack[index];
      if (!Array.isArray(value)) {
        yield value;
      }
    }
  };
  var ast_path_default = AstPath;
 
  // scripts/build/shims/assert.js
  var assert = new Proxy(() => {
  }, { get: () => assert });
  var assert_default = assert;
 
  // src/utils/is-object.js
  function isObject(object) {
    return object !== null && typeof object === "object";
  }
  var is_object_default = isObject;
 
  // src/utils/ast-utils.js
  function* getChildren(node, options) {
    const { getVisitorKeys, filter = () => true } = options;
    const isMatchedNode = (node2) => is_object_default(node2) && filter(node2);
    for (const key of getVisitorKeys(node)) {
      const value = node[key];
      if (Array.isArray(value)) {
        for (const child of value) {
          if (isMatchedNode(child)) {
            yield child;
          }
        }
      } else if (isMatchedNode(value)) {
        yield value;
      }
    }
  }
  function* getDescendants(node, options) {
    const queue = [node];
    for (let index = 0; index < queue.length; index++) {
      const node2 = queue[index];
      for (const child of getChildren(node2, options)) {
        yield child;
        queue.push(child);
      }
    }
  }
  function isLeaf(node, options) {
    return getChildren(node, options).next().done;
  }
 
  // src/utils/skip.js
  function skip(characters) {
    return (text, startIndex, options) => {
      const backwards = Boolean(options == null ? void 0 : options.backwards);
      if (startIndex === false) {
        return false;
      }
      const { length } = text;
      let cursor2 = startIndex;
      while (cursor2 >= 0 && cursor2 < length) {
        const character = text.charAt(cursor2);
        if (characters instanceof RegExp) {
          if (!characters.test(character)) {
            return cursor2;
          }
        } else if (!characters.includes(character)) {
          return cursor2;
        }
        backwards ? cursor2-- : cursor2++;
      }
      if (cursor2 === -1 || cursor2 === length) {
        return cursor2;
      }
      return false;
    };
  }
  var skipWhitespace = skip(/\s/u);
  var skipSpaces = skip(" 	");
  var skipToLineEnd = skip(",; 	");
  var skipEverythingButNewLine = skip(/[^\n\r]/u);
 
  // src/utils/skip-newline.js
  function skipNewline(text, startIndex, options) {
    const backwards = Boolean(options == null ? void 0 : options.backwards);
    if (startIndex === false) {
      return false;
    }
    const character = text.charAt(startIndex);
    if (backwards) {
      if (text.charAt(startIndex - 1) === "\r" && character === "\n") {
        return startIndex - 2;
      }
      if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
        return startIndex - 1;
      }
    } else {
      if (character === "\r" && text.charAt(startIndex + 1) === "\n") {
        return startIndex + 2;
      }
      if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
        return startIndex + 1;
      }
    }
    return startIndex;
  }
  var skip_newline_default = skipNewline;
 
  // src/utils/has-newline.js
  function hasNewline(text, startIndex, options = {}) {
    const idx = skipSpaces(
      text,
      options.backwards ? startIndex - 1 : startIndex,
      options
    );
    const idx2 = skip_newline_default(text, idx, options);
    return idx !== idx2;
  }
  var has_newline_default = hasNewline;
 
  // src/utils/is-non-empty-array.js
  function isNonEmptyArray(object) {
    return Array.isArray(object) && object.length > 0;
  }
  var is_non_empty_array_default = isNonEmptyArray;
 
  // src/main/create-get-visitor-keys-function.js
  var nonTraversableKeys = /* @__PURE__ */ new Set([
    "tokens",
    "comments",
    "parent",
    "enclosingNode",
    "precedingNode",
    "followingNode"
  ]);
  var defaultGetVisitorKeys = (node) => Object.keys(node).filter((key) => !nonTraversableKeys.has(key));
  function createGetVisitorKeysFunction(printerGetVisitorKeys) {
    return printerGetVisitorKeys ? (node) => printerGetVisitorKeys(node, nonTraversableKeys) : defaultGetVisitorKeys;
  }
  var create_get_visitor_keys_function_default = createGetVisitorKeysFunction;
 
  // src/main/comments/utils.js
  function describeNodeForDebugging(node) {
    const nodeType = node.type || node.kind || "(unknown type)";
    let nodeName = String(
      node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || ""
    );
    if (nodeName.length > 20) {
      nodeName = nodeName.slice(0, 19) + "\u2026";
    }
    return nodeType + (nodeName ? " " + nodeName : "");
  }
  function addCommentHelper(node, comment) {
    const comments = node.comments ?? (node.comments = []);
    comments.push(comment);
    comment.printed = false;
    comment.nodeDescription = describeNodeForDebugging(node);
  }
  function addLeadingComment(node, comment) {
    comment.leading = true;
    comment.trailing = false;
    addCommentHelper(node, comment);
  }
  function addDanglingComment(node, comment, marker) {
    comment.leading = false;
    comment.trailing = false;
    if (marker) {
      comment.marker = marker;
    }
    addCommentHelper(node, comment);
  }
  function addTrailingComment(node, comment) {
    comment.leading = false;
    comment.trailing = true;
    addCommentHelper(node, comment);
  }
 
  // src/main/comments/attach.js
  var childNodesCache = /* @__PURE__ */ new WeakMap();
  function getSortedChildNodes(node, options) {
    if (childNodesCache.has(node)) {
      return childNodesCache.get(node);
    }
    const {
      printer: {
        getCommentChildNodes,
        canAttachComment,
        getVisitorKeys: printerGetVisitorKeys
      },
      locStart,
      locEnd
    } = options;
    if (!canAttachComment) {
      return [];
    }
    const childNodes = ((getCommentChildNodes == null ? void 0 : getCommentChildNodes(node, options)) ?? [
      ...getChildren(node, {
        getVisitorKeys: create_get_visitor_keys_function_default(printerGetVisitorKeys)
      })
    ]).flatMap(
      (node2) => canAttachComment(node2) ? [node2] : getSortedChildNodes(node2, options)
    );
    childNodes.sort(
      (nodeA, nodeB) => locStart(nodeA) - locStart(nodeB) || locEnd(nodeA) - locEnd(nodeB)
    );
    childNodesCache.set(node, childNodes);
    return childNodes;
  }
  function decorateComment(node, comment, options, enclosingNode) {
    const { locStart, locEnd } = options;
    const commentStart = locStart(comment);
    const commentEnd = locEnd(comment);
    const childNodes = getSortedChildNodes(node, options);
    let precedingNode;
    let followingNode;
    let left = 0;
    let right = childNodes.length;
    while (left < right) {
      const middle = left + right >> 1;
      const child = childNodes[middle];
      const start = locStart(child);
      const end = locEnd(child);
      if (start <= commentStart && commentEnd <= end) {
        return decorateComment(child, comment, options, child);
      }
      if (end <= commentStart) {
        precedingNode = child;
        left = middle + 1;
        continue;
      }
      if (commentEnd <= start) {
        followingNode = child;
        right = middle;
        continue;
      }
      throw new Error("Comment location overlaps with node location");
    }
    if ((enclosingNode == null ? void 0 : enclosingNode.type) === "TemplateLiteral") {
      const { quasis } = enclosingNode;
      const commentIndex = findExpressionIndexForComment(
        quasis,
        comment,
        options
      );
      if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) {
        precedingNode = null;
      }
      if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) {
        followingNode = null;
      }
    }
    return { enclosingNode, precedingNode, followingNode };
  }
  var returnFalse = () => false;
  function attachComments(ast, options) {
    const { comments } = ast;
    delete ast.comments;
    if (!is_non_empty_array_default(comments) || !options.printer.canAttachComment) {
      return;
    }
    const tiesToBreak = [];
    const {
      printer: {
        experimentalFeatures: {
          // TODO: Make this as default behavior
          avoidAstMutation = false
        } = {},
        handleComments = {}
      },
      originalText: text
    } = options;
    const {
      ownLine: handleOwnLineComment = returnFalse,
      endOfLine: handleEndOfLineComment = returnFalse,
      remaining: handleRemainingComment = returnFalse
    } = handleComments;
    const decoratedComments = comments.map((comment, index) => ({
      ...decorateComment(ast, comment, options),
      comment,
      text,
      options,
      ast,
      isLastComment: comments.length - 1 === index
    }));
    for (const [index, context] of decoratedComments.entries()) {
      const {
        comment,
        precedingNode,
        enclosingNode,
        followingNode,
        text: text2,
        options: options2,
        ast: ast2,
        isLastComment
      } = context;
      let args;
      if (avoidAstMutation) {
        args = [context];
      } else {
        comment.enclosingNode = enclosingNode;
        comment.precedingNode = precedingNode;
        comment.followingNode = followingNode;
        args = [comment, text2, options2, ast2, isLastComment];
      }
      if (isOwnLineComment(text2, options2, decoratedComments, index)) {
        comment.placement = "ownLine";
        if (handleOwnLineComment(...args)) {
        } else if (followingNode) {
          addLeadingComment(followingNode, comment);
        } else if (precedingNode) {
          addTrailingComment(precedingNode, comment);
        } else if (enclosingNode) {
          addDanglingComment(enclosingNode, comment);
        } else {
          addDanglingComment(ast2, comment);
        }
      } else if (isEndOfLineComment(text2, options2, decoratedComments, index)) {
        comment.placement = "endOfLine";
        if (handleEndOfLineComment(...args)) {
        } else if (precedingNode) {
          addTrailingComment(precedingNode, comment);
        } else if (followingNode) {
          addLeadingComment(followingNode, comment);
        } else if (enclosingNode) {
          addDanglingComment(enclosingNode, comment);
        } else {
          addDanglingComment(ast2, comment);
        }
      } else {
        comment.placement = "remaining";
        if (handleRemainingComment(...args)) {
        } else if (precedingNode && followingNode) {
          const tieCount = tiesToBreak.length;
          if (tieCount > 0) {
            const lastTie = tiesToBreak[tieCount - 1];
            if (lastTie.followingNode !== followingNode) {
              breakTies(tiesToBreak, options2);
            }
          }
          tiesToBreak.push(context);
        } else if (precedingNode) {
          addTrailingComment(precedingNode, comment);
        } else if (followingNode) {
          addLeadingComment(followingNode, comment);
        } else if (enclosingNode) {
          addDanglingComment(enclosingNode, comment);
        } else {
          addDanglingComment(ast2, comment);
        }
      }
    }
    breakTies(tiesToBreak, options);
    if (!avoidAstMutation) {
      for (const comment of comments) {
        delete comment.precedingNode;
        delete comment.enclosingNode;
        delete comment.followingNode;
      }
    }
  }
  var isAllEmptyAndNoLineBreak = (text) => !/[\S\n\u2028\u2029]/u.test(text);
  function isOwnLineComment(text, options, decoratedComments, commentIndex) {
    const { comment, precedingNode } = decoratedComments[commentIndex];
    const { locStart, locEnd } = options;
    let start = locStart(comment);
    if (precedingNode) {
      for (let index = commentIndex - 1; index >= 0; index--) {
        const { comment: comment2, precedingNode: currentCommentPrecedingNode } = decoratedComments[index];
        if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text.slice(locEnd(comment2), start))) {
          break;
        }
        start = locStart(comment2);
      }
    }
    return has_newline_default(text, start, { backwards: true });
  }
  function isEndOfLineComment(text, options, decoratedComments, commentIndex) {
    const { comment, followingNode } = decoratedComments[commentIndex];
    const { locStart, locEnd } = options;
    let end = locEnd(comment);
    if (followingNode) {
      for (let index = commentIndex + 1; index < decoratedComments.length; index++) {
        const { comment: comment2, followingNode: currentCommentFollowingNode } = decoratedComments[index];
        if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text.slice(end, locStart(comment2)))) {
          break;
        }
        end = locEnd(comment2);
      }
    }
    return has_newline_default(text, end);
  }
  function breakTies(tiesToBreak, options) {
    var _a2, _b2;
    const tieCount = tiesToBreak.length;
    if (tieCount === 0) {
      return;
    }
    const { precedingNode, followingNode } = tiesToBreak[0];
    let gapEndPos = options.locStart(followingNode);
    let indexOfFirstLeadingComment;
    for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
      const {
        comment,
        precedingNode: currentCommentPrecedingNode,
        followingNode: currentCommentFollowingNode
      } = tiesToBreak[indexOfFirstLeadingComment - 1];
      assert_default.strictEqual(currentCommentPrecedingNode, precedingNode);
      assert_default.strictEqual(currentCommentFollowingNode, followingNode);
      const gap = options.originalText.slice(options.locEnd(comment), gapEndPos);
      if (((_b2 = (_a2 = options.printer).isGap) == null ? void 0 : _b2.call(_a2, gap, options)) ?? /^[\s(]*$/u.test(gap)) {
        gapEndPos = options.locStart(comment);
      } else {
        break;
      }
    }
    for (const [i, { comment }] of tiesToBreak.entries()) {
      if (i < indexOfFirstLeadingComment) {
        addTrailingComment(precedingNode, comment);
      } else {
        addLeadingComment(followingNode, comment);
      }
    }
    for (const node of [precedingNode, followingNode]) {
      if (node.comments && node.comments.length > 1) {
        node.comments.sort((a, b) => options.locStart(a) - options.locStart(b));
      }
    }
    tiesToBreak.length = 0;
  }
  function findExpressionIndexForComment(quasis, comment, options) {
    const startPos = options.locStart(comment) - 1;
    for (let i = 1; i < quasis.length; ++i) {
      if (startPos < options.locStart(quasis[i])) {
        return i - 1;
      }
    }
    return 0;
  }
 
  // src/utils/is-previous-line-empty.js
  function isPreviousLineEmpty(text, startIndex) {
    let idx = startIndex - 1;
    idx = skipSpaces(text, idx, { backwards: true });
    idx = skip_newline_default(text, idx, { backwards: true });
    idx = skipSpaces(text, idx, { backwards: true });
    const idx2 = skip_newline_default(text, idx, { backwards: true });
    return idx !== idx2;
  }
  var is_previous_line_empty_default = isPreviousLineEmpty;
 
  // src/main/comments/print.js
  function printComment(path, options) {
    const comment = path.node;
    comment.printed = true;
    return options.printer.printComment(path, options);
  }
  function printLeadingComment(path, options) {
    var _a2;
    const comment = path.node;
    const parts = [printComment(path, options)];
    const { printer: printer2, originalText, locStart, locEnd } = options;
    const isBlock = (_a2 = printer2.isBlockComment) == null ? void 0 : _a2.call(printer2, comment);
    if (isBlock) {
      const lineBreak = has_newline_default(originalText, locEnd(comment)) ? has_newline_default(originalText, locStart(comment), {
        backwards: true
      }) ? hardline : line : " ";
      parts.push(lineBreak);
    } else {
      parts.push(hardline);
    }
    const index = skip_newline_default(
      originalText,
      skipSpaces(originalText, locEnd(comment))
    );
    if (index !== false && has_newline_default(originalText, index)) {
      parts.push(hardline);
    }
    return parts;
  }
  function printTrailingComment(path, options, previousComment) {
    var _a2;
    const comment = path.node;
    const printed = printComment(path, options);
    const { printer: printer2, originalText, locStart } = options;
    const isBlock = (_a2 = printer2.isBlockComment) == null ? void 0 : _a2.call(printer2, comment);
    if ((previousComment == null ? void 0 : previousComment.hasLineSuffix) && !(previousComment == null ? void 0 : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) {
      const isLineBeforeEmpty = is_previous_line_empty_default(
        originalText,
        locStart(comment)
      );
      return {
        doc: lineSuffix([hardline, isLineBeforeEmpty ? hardline : "", printed]),
        isBlock,
        hasLineSuffix: true
      };
    }
    if (!isBlock || (previousComment == null ? void 0 : previousComment.hasLineSuffix)) {
      return {
        doc: [lineSuffix([" ", printed]), breakParent],
        isBlock,
        hasLineSuffix: true
      };
    }
    return { doc: [" ", printed], isBlock, hasLineSuffix: false };
  }
  function printCommentsSeparately(path, options) {
    const value = path.node;
    if (!value) {
      return {};
    }
    const ignored = options[Symbol.for("printedComments")];
    const comments = (value.comments || []).filter(
      (comment) => !ignored.has(comment)
    );
    if (comments.length === 0) {
      return { leading: "", trailing: "" };
    }
    const leadingParts = [];
    const trailingParts = [];
    let printedTrailingComment;
    path.each(() => {
      const comment = path.node;
      if (ignored == null ? void 0 : ignored.has(comment)) {
        return;
      }
      const { leading, trailing } = comment;
      if (leading) {
        leadingParts.push(printLeadingComment(path, options));
      } else if (trailing) {
        printedTrailingComment = printTrailingComment(
          path,
          options,
          printedTrailingComment
        );
        trailingParts.push(printedTrailingComment.doc);
      }
    }, "comments");
    return { leading: leadingParts, trailing: trailingParts };
  }
  function printComments(path, doc, options) {
    const { leading, trailing } = printCommentsSeparately(path, options);
    if (!leading && !trailing) {
      return doc;
    }
    return inheritLabel(doc, (doc2) => [leading, doc2, trailing]);
  }
  function ensureAllCommentsPrinted(options) {
    const {
      [Symbol.for("comments")]: comments,
      [Symbol.for("printedComments")]: printedComments
    } = options;
    for (const comment of comments) {
      if (!comment.printed && !printedComments.has(comment)) {
        throw new Error(
          'Comment "' + comment.value.trim() + '" was not printed. Please report this error!'
        );
      }
      delete comment.printed;
    }
  }
 
  // src/main/create-print-pre-check-function.js
  function createPrintPreCheckFunction(options) {
    if (true) {
      return () => {
      };
    }
    const getVisitorKeys = create_get_visitor_keys_function_default(
      options.printer.getVisitorKeys
    );
    return function(path) {
      if (path.isRoot) {
        return;
      }
      const { key, parent } = path;
      const visitorKeys = getVisitorKeys(parent);
      if (visitorKeys.includes(key)) {
        return;
      }
      throw Object.assign(new Error("Calling `print()` on non-node object."), {
        parentNode: parent,
        allowedProperties: visitorKeys,
        printingProperty: key,
        printingValue: path.node,
        pathStack: path.stack.length > 5 ? ["...", ...path.stack.slice(-5)] : [...path.stack]
      });
    };
  }
  var create_print_pre_check_function_default = createPrintPreCheckFunction;
 
  // src/common/errors.js
  var ConfigError = class extends Error {
    name = "ConfigError";
  };
  var UndefinedParserError = class extends Error {
    name = "UndefinedParserError";
  };
 
  // src/main/core-options.evaluate.js
  var core_options_evaluate_default = {
    "checkIgnorePragma": {
      "category": "Special",
      "type": "boolean",
      "default": false,
      "description": "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",
      "cliCategory": "Other"
    },
    "cursorOffset": {
      "category": "Special",
      "type": "int",
      "default": -1,
      "range": {
        "start": -1,
        "end": Infinity,
        "step": 1
      },
      "description": "Print (to stderr) where a cursor at the given position would move to after formatting.",
      "cliCategory": "Editor"
    },
    "endOfLine": {
      "category": "Global",
      "type": "choice",
      "default": "lf",
      "description": "Which end of line characters to apply.",
      "choices": [
        {
          "value": "lf",
          "description": "Line Feed only (\\n), common on Linux and macOS as well as inside git repos"
        },
        {
          "value": "crlf",
          "description": "Carriage Return + Line Feed characters (\\r\\n), common on Windows"
        },
        {
          "value": "cr",
          "description": "Carriage Return character only (\\r), used very rarely"
        },
        {
          "value": "auto",
          "description": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"
        }
      ]
    },
    "filepath": {
      "category": "Special",
      "type": "path",
      "description": "Specify the input filepath. This will be used to do parser inference.",
      "cliName": "stdin-filepath",
      "cliCategory": "Other",
      "cliDescription": "Path to the file to pretend that stdin comes from."
    },
    "insertPragma": {
      "category": "Special",
      "type": "boolean",
      "default": false,
      "description": "Insert @format pragma into file's first docblock comment.",
      "cliCategory": "Other"
    },
    "parser": {
      "category": "Global",
      "type": "choice",
      "default": void 0,
      "description": "Which parser to use.",
      "exception": (value) => typeof value === "string" || typeof value === "function",
      "choices": [
        {
          "value": "flow",
          "description": "Flow"
        },
        {
          "value": "babel",
          "description": "JavaScript"
        },
        {
          "value": "babel-flow",
          "description": "Flow"
        },
        {
          "value": "babel-ts",
          "description": "TypeScript"
        },
        {
          "value": "typescript",
          "description": "TypeScript"
        },
        {
          "value": "acorn",
          "description": "JavaScript"
        },
        {
          "value": "espree",
          "description": "JavaScript"
        },
        {
          "value": "meriyah",
          "description": "JavaScript"
        },
        {
          "value": "css",
          "description": "CSS"
        },
        {
          "value": "less",
          "description": "Less"
        },
        {
          "value": "scss",
          "description": "SCSS"
        },
        {
          "value": "json",
          "description": "JSON"
        },
        {
          "value": "json5",
          "description": "JSON5"
        },
        {
          "value": "jsonc",
          "description": "JSON with Comments"
        },
        {
          "value": "json-stringify",
          "description": "JSON.stringify"
        },
        {
          "value": "graphql",
          "description": "GraphQL"
        },
        {
          "value": "markdown",
          "description": "Markdown"
        },
        {
          "value": "mdx",
          "description": "MDX"
        },
        {
          "value": "vue",
          "description": "Vue"
        },
        {
          "value": "yaml",
          "description": "YAML"
        },
        {
          "value": "glimmer",
          "description": "Ember / Handlebars"
        },
        {
          "value": "html",
          "description": "HTML"
        },
        {
          "value": "angular",
          "description": "Angular"
        },
        {
          "value": "lwc",
          "description": "Lightning Web Components"
        },
        {
          "value": "mjml",
          "description": "MJML"
        }
      ]
    },
    "plugins": {
      "type": "path",
      "array": true,
      "default": [
        {
          "value": []
        }
      ],
      "category": "Global",
      "description": "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",
      "exception": (value) => typeof value === "string" || typeof value === "object",
      "cliName": "plugin",
      "cliCategory": "Config"
    },
    "printWidth": {
      "category": "Global",
      "type": "int",
      "default": 80,
      "description": "The line length where Prettier will try wrap.",
      "range": {
        "start": 0,
        "end": Infinity,
        "step": 1
      }
    },
    "rangeEnd": {
      "category": "Special",
      "type": "int",
      "default": Infinity,
      "range": {
        "start": 0,
        "end": Infinity,
        "step": 1
      },
      "description": "Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.",
      "cliCategory": "Editor"
    },
    "rangeStart": {
      "category": "Special",
      "type": "int",
      "default": 0,
      "range": {
        "start": 0,
        "end": Infinity,
        "step": 1
      },
      "description": "Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.",
      "cliCategory": "Editor"
    },
    "requirePragma": {
      "category": "Special",
      "type": "boolean",
      "default": false,
      "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",
      "cliCategory": "Other"
    },
    "tabWidth": {
      "type": "int",
      "category": "Global",
      "default": 2,
      "description": "Number of spaces per indentation level.",
      "range": {
        "start": 0,
        "end": Infinity,
        "step": 1
      }
    },
    "useTabs": {
      "category": "Global",
      "type": "boolean",
      "default": false,
      "description": "Indent with tabs instead of spaces."
    },
    "embeddedLanguageFormatting": {
      "category": "Global",
      "type": "choice",
      "default": "auto",
      "description": "Control how Prettier formats quoted code embedded in the file.",
      "choices": [
        {
          "value": "auto",
          "description": "Format embedded code if Prettier can automatically identify it."
        },
        {
          "value": "off",
          "description": "Never automatically format embedded code."
        }
      ]
    }
  };
 
  // src/main/support.js
  function getSupportInfo({ plugins = [], showDeprecated = false } = {}) {
    const languages = plugins.flatMap((plugin) => plugin.languages ?? []);
    const options = [];
    for (const option of normalizeOptionSettings(
      Object.assign({}, ...plugins.map(({ options: options2 }) => options2), core_options_evaluate_default)
    )) {
      if (!showDeprecated && option.deprecated) {
        continue;
      }
      if (Array.isArray(option.choices)) {
        if (!showDeprecated) {
          option.choices = option.choices.filter((choice) => !choice.deprecated);
        }
        if (option.name === "parser") {
          option.choices = [
            ...option.choices,
            ...collectParsersFromLanguages(option.choices, languages, plugins)
          ];
        }
      }
      option.pluginDefaults = Object.fromEntries(
        plugins.filter((plugin) => {
          var _a2;
          return ((_a2 = plugin.defaultOptions) == null ? void 0 : _a2[option.name]) !== void 0;
        }).map((plugin) => [plugin.name, plugin.defaultOptions[option.name]])
      );
      options.push(option);
    }
    return { languages, options };
  }
  function* collectParsersFromLanguages(parserChoices, languages, plugins) {
    const existingParsers = new Set(parserChoices.map((choice) => choice.value));
    for (const language of languages) {
      if (language.parsers) {
        for (const parserName of language.parsers) {
          if (!existingParsers.has(parserName)) {
            existingParsers.add(parserName);
            const plugin = plugins.find(
              (plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)
            );
            let description = language.name;
            if (plugin == null ? void 0 : plugin.name) {
              description += ` (plugin: ${plugin.name})`;
            }
            yield { value: parserName, description };
          }
        }
      }
    }
  }
  function normalizeOptionSettings(settings) {
    const options = [];
    for (const [name, originalOption] of Object.entries(settings)) {
      const option = { name, ...originalOption };
      if (Array.isArray(option.default)) {
        option.default = at_default(
          /* isOptionalObject */
          false,
          option.default,
          -1
        ).value;
      }
      options.push(option);
    }
    return options;
  }
 
  // scripts/build/shims/array-to-reversed.js
  var arrayToReversed = (isOptionalObject, array2) => {
    if (isOptionalObject && (array2 === void 0 || array2 === null)) {
      return;
    }
    if (array2.toReversed || !Array.isArray(array2)) {
      return array2.toReversed();
    }
    return [...array2].reverse();
  };
  var array_to_reversed_default = arrayToReversed;
 
  // src/utils/get-interpreter.js
  var get_interpreter_default = void 0;
 
  // node_modules/deno-path-from-file-url/index.js
  var _a, _b, _c, _d, _e;
  var isWindows = ((_a = globalThis.Deno) == null ? void 0 : _a.build.os) === "windows" || ((_c = (_b = globalThis.navigator) == null ? void 0 : _b.platform) == null ? void 0 : _c.startsWith("Win")) || ((_e = (_d = globalThis.process) == null ? void 0 : _d.platform) == null ? void 0 : _e.startsWith("win")) || false;
  function assertArg(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol !== "file:") {
      throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
    }
    return url;
  }
  function fromFileUrl(url) {
    url = assertArg(url);
    return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
  }
  function fromFileUrl2(url) {
    url = assertArg(url);
    let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
    if (url.hostname !== "") {
      path = `\\\\${url.hostname}${path}`;
    }
    return path;
  }
  function fromFileUrl3(url) {
    return isWindows ? fromFileUrl2(url) : fromFileUrl(url);
  }
 
  // src/utils/universal-to-path.js
  var universal_to_path_default = true ? fromFileUrl3 : fileURLToPath;
 
  // src/utils/infer-parser.js
  var getFileBasename = (file) => String(file).split(/[/\\]/u).pop();
  function getLanguageByFileName(languages, file) {
    if (!file) {
      return;
    }
    const basename = getFileBasename(file).toLowerCase();
    return languages.find(
      ({ filenames }) => filenames == null ? void 0 : filenames.some((name) => name.toLowerCase() === basename)
    ) ?? languages.find(
      ({ extensions }) => extensions == null ? void 0 : extensions.some((extension) => basename.endsWith(extension))
    );
  }
  function getLanguageByLanguageName(languages, languageName) {
    if (!languageName) {
      return;
    }
    return languages.find(({ name }) => name.toLowerCase() === languageName) ?? languages.find(({ aliases }) => aliases == null ? void 0 : aliases.includes(languageName)) ?? languages.find(({ extensions }) => extensions == null ? void 0 : extensions.includes(`.${languageName}`));
  }
  function getLanguageByInterpreter(languages, file) {
    if (true) {
      return;
    }
    const languagesWithInterpreters = languages.filter(
      ({ interpreters }) => is_non_empty_array_default(interpreters)
    );
    if (languagesWithInterpreters.length === 0) {
      return;
    }
    const interpreter = get_interpreter_default(file);
    if (!interpreter) {
      return;
    }
    return languagesWithInterpreters.find(
      ({ interpreters }) => interpreters.includes(interpreter)
    );
  }
  function getLanguageByIsSupported(languages, file) {
    if (!file) {
      return;
    }
    if (String(file).startsWith("file:")) {
      try {
        file = universal_to_path_default(file);
      } catch {
        return;
      }
    }
    if (typeof file !== "string") {
      return;
    }
    return languages.find(({ isSupported }) => isSupported == null ? void 0 : isSupported({ filepath: file }));
  }
  function inferParser(options, fileInfo) {
    const languages = array_to_reversed_default(
      /* isOptionalObject */
      false,
      options.plugins
    ).flatMap(
      (plugin) => (
        // @ts-expect-error -- Safe
        plugin.languages ?? []
      )
    );
    const language = getLanguageByLanguageName(languages, fileInfo.language) ?? getLanguageByFileName(languages, fileInfo.physicalFile) ?? getLanguageByFileName(languages, fileInfo.file) ?? getLanguageByIsSupported(languages, fileInfo.physicalFile) ?? getLanguageByIsSupported(languages, fileInfo.file) ?? getLanguageByInterpreter(languages, fileInfo.physicalFile);
    return language == null ? void 0 : language.parsers[0];
  }
  var infer_parser_default = inferParser;
 
  // node_modules/vnopts/lib/descriptors/api.js
  var apiDescriptor = {
    key: (key) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(key) ? key : JSON.stringify(key),
    value(value) {
      if (value === null || typeof value !== "object") {
        return JSON.stringify(value);
      }
      if (Array.isArray(value)) {
        return `[${value.map((subValue) => apiDescriptor.value(subValue)).join(", ")}]`;
      }
      const keys = Object.keys(value);
      return keys.length === 0 ? "{}" : `{ ${keys.map((key) => `${apiDescriptor.key(key)}: ${apiDescriptor.value(value[key])}`).join(", ")} }`;
    },
    pair: ({ key, value }) => apiDescriptor.value({ [key]: value })
  };
 
  // scripts/build/shims/colors.js
  var colors = new Proxy(String, { get: () => colors });
  var colors_default = colors;
 
  // node_modules/vnopts/lib/handlers/deprecated/common.js
  var commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => {
    const messages = [
      `${colors_default.yellow(typeof keyOrPair === "string" ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated`
    ];
    if (redirectTo) {
      messages.push(`we now treat it as ${colors_default.blue(typeof redirectTo === "string" ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`);
    }
    return messages.join("; ") + ".";
  };
 
  // node_modules/vnopts/lib/constants.js
  var VALUE_NOT_EXIST = Symbol.for("vnopts.VALUE_NOT_EXIST");
  var VALUE_UNCHANGED = Symbol.for("vnopts.VALUE_UNCHANGED");
 
  // node_modules/vnopts/lib/handlers/invalid/common.js
  var INDENTATION = " ".repeat(2);
  var commonInvalidHandler = (key, value, utils2) => {
    const { text, list } = utils2.normalizeExpectedResult(utils2.schemas[key].expected(utils2));
    const descriptions = [];
    if (text) {
      descriptions.push(getDescription(key, value, text, utils2.descriptor));
    }
    if (list) {
      descriptions.push([getDescription(key, value, list.title, utils2.descriptor)].concat(list.values.map((valueDescription) => getListDescription(valueDescription, utils2.loggerPrintWidth))).join("\n"));
    }
    return chooseDescription(descriptions, utils2.loggerPrintWidth);
  };
  function getDescription(key, value, expected, descriptor) {
    return [
      `Invalid ${colors_default.red(descriptor.key(key))} value.`,
      `Expected ${colors_default.blue(expected)},`,
      `but received ${value === VALUE_NOT_EXIST ? colors_default.gray("nothing") : colors_default.red(descriptor.value(value))}.`
    ].join(" ");
  }
  function getListDescription({ text, list }, printWidth) {
    const descriptions = [];
    if (text) {
      descriptions.push(`- ${colors_default.blue(text)}`);
    }
    if (list) {
      descriptions.push([`- ${colors_default.blue(list.title)}:`].concat(list.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join("\n"));
    }
    return chooseDescription(descriptions, printWidth);
  }
  function chooseDescription(descriptions, printWidth) {
    if (descriptions.length === 1) {
      return descriptions[0];
    }
    const [firstDescription, secondDescription] = descriptions;
    const [firstWidth, secondWidth] = descriptions.map((description) => description.split("\n", 1)[0].length);
    return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription;
  }
 
  // node_modules/leven/index.js
  var array = [];
  var characterCodeCache = [];
  function leven(first, second) {
    if (first === second) {
      return 0;
    }
    const swap = first;
    if (first.length > second.length) {
      first = second;
      second = swap;
    }
    let firstLength = first.length;
    let secondLength = second.length;
    while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
      firstLength--;
      secondLength--;
    }
    let start = 0;
    while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
      start++;
    }
    firstLength -= start;
    secondLength -= start;
    if (firstLength === 0) {
      return secondLength;
    }
    let bCharacterCode;
    let result;
    let temporary;
    let temporary2;
    let index = 0;
    let index2 = 0;
    while (index < firstLength) {
      characterCodeCache[index] = first.charCodeAt(start + index);
      array[index] = ++index;
    }
    while (index2 < secondLength) {
      bCharacterCode = second.charCodeAt(start + index2);
      temporary = index2++;
      result = index2;
      for (index = 0; index < firstLength; index++) {
        temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
        temporary = array[index];
        result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
      }
    }
    return result;
  }
 
  // node_modules/vnopts/lib/handlers/unknown/leven.js
  var levenUnknownHandler = (key, value, { descriptor, logger, schemas }) => {
    const messages = [
      `Ignored unknown option ${colors_default.yellow(descriptor.pair({ key, value }))}.`
    ];
    const suggestion = Object.keys(schemas).sort().find((knownKey) => leven(key, knownKey) < 3);
    if (suggestion) {
      messages.push(`Did you mean ${colors_default.blue(descriptor.key(suggestion))}?`);
    }
    logger.warn(messages.join(" "));
  };
 
  // node_modules/vnopts/lib/schema.js
  var HANDLER_KEYS = [
    "default",
    "expected",
    "validate",
    "deprecated",
    "forward",
    "redirect",
    "overlap",
    "preprocess",
    "postprocess"
  ];
  function createSchema(SchemaConstructor, parameters) {
    const schema = new SchemaConstructor(parameters);
    const subSchema = Object.create(schema);
    for (const handlerKey of HANDLER_KEYS) {
      if (handlerKey in parameters) {
        subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length);
      }
    }
    return subSchema;
  }
  var Schema = class {
    static create(parameters) {
      return createSchema(this, parameters);
    }
    constructor(parameters) {
      this.name = parameters.name;
    }
    default(_utils) {
      return void 0;
    }
    // this is actually an abstract method but we need a placeholder to get `function.length`
    /* c8 ignore start */
    expected(_utils) {
      return "nothing";
    }
    /* c8 ignore stop */
    // this is actually an abstract method but we need a placeholder to get `function.length`
    /* c8 ignore start */
    validate(_value, _utils) {
      return false;
    }
    /* c8 ignore stop */
    deprecated(_value, _utils) {
      return false;
    }
    forward(_value, _utils) {
      return void 0;
    }
    redirect(_value, _utils) {
      return void 0;
    }
    overlap(currentValue, _newValue, _utils) {
      return currentValue;
    }
    preprocess(value, _utils) {
      return value;
    }
    postprocess(_value, _utils) {
      return VALUE_UNCHANGED;
    }
  };
  function normalizeHandler(handler, superSchema, handlerArgumentsLength) {
    return typeof handler === "function" ? (...args) => handler(...args.slice(0, handlerArgumentsLength - 1), superSchema, ...args.slice(handlerArgumentsLength - 1)) : () => handler;
  }
 
  // node_modules/vnopts/lib/schemas/alias.js
  var AliasSchema = class extends Schema {
    constructor(parameters) {
      super(parameters);
      this._sourceName = parameters.sourceName;
    }
    expected(utils2) {
      return utils2.schemas[this._sourceName].expected(utils2);
    }
    validate(value, utils2) {
      return utils2.schemas[this._sourceName].validate(value, utils2);
    }
    redirect(_value, _utils) {
      return this._sourceName;
    }
  };
 
  // node_modules/vnopts/lib/schemas/any.js
  var AnySchema = class extends Schema {
    expected() {
      return "anything";
    }
    validate() {
      return true;
    }
  };
 
  // node_modules/vnopts/lib/schemas/array.js
  var ArraySchema = class extends Schema {
    constructor({ valueSchema, name = valueSchema.name, ...handlers }) {
      super({ ...handlers, name });
      this._valueSchema = valueSchema;
    }
    expected(utils2) {
      const { text, list } = utils2.normalizeExpectedResult(this._valueSchema.expected(utils2));
      return {
        text: text && `an array of ${text}`,
        list: list && {
          title: `an array of the following values`,
          values: [{ list }]
        }
      };
    }
    validate(value, utils2) {
      if (!Array.isArray(value)) {
        return false;
      }
      const invalidValues = [];
      for (const subValue of value) {
        const subValidateResult = utils2.normalizeValidateResult(this._valueSchema.validate(subValue, utils2), subValue);
        if (subValidateResult !== true) {
          invalidValues.push(subValidateResult.value);
        }
      }
      return invalidValues.length === 0 ? true : { value: invalidValues };
    }
    deprecated(value, utils2) {
      const deprecatedResult = [];
      for (const subValue of value) {
        const subDeprecatedResult = utils2.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils2), subValue);
        if (subDeprecatedResult !== false) {
          deprecatedResult.push(...subDeprecatedResult.map(({ value: deprecatedValue }) => ({
            value: [deprecatedValue]
          })));
        }
      }
      return deprecatedResult;
    }
    forward(value, utils2) {
      const forwardResult = [];
      for (const subValue of value) {
        const subForwardResult = utils2.normalizeForwardResult(this._valueSchema.forward(subValue, utils2), subValue);
        forwardResult.push(...subForwardResult.map(wrapTransferResult));
      }
      return forwardResult;
    }
    redirect(value, utils2) {
      const remain = [];
      const redirect = [];
      for (const subValue of value) {
        const subRedirectResult = utils2.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils2), subValue);
        if ("remain" in subRedirectResult) {
          remain.push(subRedirectResult.remain);
        }
        redirect.push(...subRedirectResult.redirect.map(wrapTransferResult));
      }
      return remain.length === 0 ? { redirect } : { redirect, remain };
    }
    overlap(currentValue, newValue) {
      return currentValue.concat(newValue);
    }
  };
  function wrapTransferResult({ from, to }) {
    return { from: [from], to };
  }
 
  // node_modules/vnopts/lib/schemas/boolean.js
  var BooleanSchema = class extends Schema {
    expected() {
      return "true or false";
    }
    validate(value) {
      return typeof value === "boolean";
    }
  };
 
  // node_modules/vnopts/lib/utils.js
  function recordFromArray(array2, mainKey) {
    const record = /* @__PURE__ */ Object.create(null);
    for (const value of array2) {
      const key = value[mainKey];
      if (record[key]) {
        throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`);
      }
      record[key] = value;
    }
    return record;
  }
  function mapFromArray(array2, mainKey) {
    const map = /* @__PURE__ */ new Map();
    for (const value of array2) {
      const key = value[mainKey];
      if (map.has(key)) {
        throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`);
      }
      map.set(key, value);
    }
    return map;
  }
  function createAutoChecklist() {
    const map = /* @__PURE__ */ Object.create(null);
    return (id) => {
      const idString = JSON.stringify(id);
      if (map[idString]) {
        return true;
      }
      map[idString] = true;
      return false;
    };
  }
  function partition(array2, predicate) {
    const trueArray = [];
    const falseArray = [];
    for (const value of array2) {
      if (predicate(value)) {
        trueArray.push(value);
      } else {
        falseArray.push(value);
      }
    }
    return [trueArray, falseArray];
  }
  function isInt(value) {
    return value === Math.floor(value);
  }
  function comparePrimitive(a, b) {
    if (a === b) {
      return 0;
    }
    const typeofA = typeof a;
    const typeofB = typeof b;
    const orders = [
      "undefined",
      "object",
      // null
      "boolean",
      "number",
      "string"
    ];
    if (typeofA !== typeofB) {
      return orders.indexOf(typeofA) - orders.indexOf(typeofB);
    }
    if (typeofA !== "string") {
      return Number(a) - Number(b);
    }
    return a.localeCompare(b);
  }
  function normalizeInvalidHandler(invalidHandler) {
    return (...args) => {
      const errorMessageOrError = invalidHandler(...args);
      return typeof errorMessageOrError === "string" ? new Error(errorMessageOrError) : errorMessageOrError;
    };
  }
  function normalizeDefaultResult(result) {
    return result === void 0 ? {} : result;
  }
  function normalizeExpectedResult(result) {
    if (typeof result === "string") {
      return { text: result };
    }
    const { text, list } = result;
    assert2((text || list) !== void 0, "Unexpected `expected` result, there should be at least one field.");
    if (!list) {
      return { text };
    }
    return {
      text,
      list: {
        title: list.title,
        values: list.values.map(normalizeExpectedResult)
      }
    };
  }
  function normalizeValidateResult(result, value) {
    return result === true ? true : result === false ? { value } : result;
  }
  function normalizeDeprecatedResult(result, value, doNotNormalizeTrue = false) {
    return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ value }] : "value" in result ? [result] : result.length === 0 ? false : result;
  }
  function normalizeTransferResult(result, value) {
    return typeof result === "string" || "key" in result ? { from: value, to: result } : "from" in result ? { from: result.from, to: result.to } : { from: value, to: result.to };
  }
  function normalizeForwardResult(result, value) {
    return result === void 0 ? [] : Array.isArray(result) ? result.map((transferResult) => normalizeTransferResult(transferResult, value)) : [normalizeTransferResult(result, value)];
  }
  function normalizeRedirectResult(result, value) {
    const redirect = normalizeForwardResult(typeof result === "object" && "redirect" in result ? result.redirect : result, value);
    return redirect.length === 0 ? { remain: value, redirect } : typeof result === "object" && "remain" in result ? { remain: result.remain, redirect } : { redirect };
  }
  function assert2(isValid, message) {
    if (!isValid) {
      throw new Error(message);
    }
  }
 
  // node_modules/vnopts/lib/schemas/choice.js
  var ChoiceSchema = class extends Schema {
    constructor(parameters) {
      super(parameters);
      this._choices = mapFromArray(parameters.choices.map((choice) => choice && typeof choice === "object" ? choice : { value: choice }), "value");
    }
    expected({ descriptor }) {
      const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor.value);
      const head = choiceDescriptions.slice(0, -2);
      const tail = choiceDescriptions.slice(-2);
      const message = head.concat(tail.join(" or ")).join(", ");
      return {
        text: message,
        list: {
          title: "one of the following values",
          values: choiceDescriptions
        }
      };
    }
    validate(value) {
      return this._choices.has(value);
    }
    deprecated(value) {
      const choiceInfo = this._choices.get(value);
      return choiceInfo && choiceInfo.deprecated ? { value } : false;
    }
    forward(value) {
      const choiceInfo = this._choices.get(value);
      return choiceInfo ? choiceInfo.forward : void 0;
    }
    redirect(value) {
      const choiceInfo = this._choices.get(value);
      return choiceInfo ? choiceInfo.redirect : void 0;
    }
  };
 
  // node_modules/vnopts/lib/schemas/number.js
  var NumberSchema = class extends Schema {
    expected() {
      return "a number";
    }
    validate(value, _utils) {
      return typeof value === "number";
    }
  };
 
  // node_modules/vnopts/lib/schemas/integer.js
  var IntegerSchema = class extends NumberSchema {
    expected() {
      return "an integer";
    }
    validate(value, utils2) {
      return utils2.normalizeValidateResult(super.validate(value, utils2), value) === true && isInt(value);
    }
  };
 
  // node_modules/vnopts/lib/schemas/string.js
  var StringSchema = class extends Schema {
    expected() {
      return "a string";
    }
    validate(value) {
      return typeof value === "string";
    }
  };
 
  // node_modules/vnopts/lib/defaults.js
  var defaultDescriptor = apiDescriptor;
  var defaultUnknownHandler = levenUnknownHandler;
  var defaultInvalidHandler = commonInvalidHandler;
  var defaultDeprecatedHandler = commonDeprecatedHandler;
 
  // node_modules/vnopts/lib/normalize.js
  var Normalizer = class {
    constructor(schemas, opts) {
      const { logger = console, loggerPrintWidth = 80, descriptor = defaultDescriptor, unknown = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required = () => false, preprocess = (x) => x, postprocess = () => VALUE_UNCHANGED } = opts || {};
      this._utils = {
        descriptor,
        logger: (
          /* c8 ignore next */
          logger || { warn: () => {
          } }
        ),
        loggerPrintWidth,
        schemas: recordFromArray(schemas, "name"),
        normalizeDefaultResult,
        normalizeExpectedResult,
        normalizeDeprecatedResult,
        normalizeForwardResult,
        normalizeRedirectResult,
        normalizeValidateResult
      };
      this._unknownHandler = unknown;
      this._invalidHandler = normalizeInvalidHandler(invalid);
      this._deprecatedHandler = deprecated;
      this._identifyMissing = (k, o) => !(k in o) || missing(k, o);
      this._identifyRequired = required;
      this._preprocess = preprocess;
      this._postprocess = postprocess;
      this.cleanHistory();
    }
    cleanHistory() {
      this._hasDeprecationWarned = createAutoChecklist();
    }
    normalize(options) {
      const newOptions = {};
      const preprocessed = this._preprocess(options, this._utils);
      const restOptionsArray = [preprocessed];
      const applyNormalization = () => {
        while (restOptionsArray.length !== 0) {
          const currentOptions = restOptionsArray.shift();
          const transferredOptionsArray = this._applyNormalization(currentOptions, newOptions);
          restOptionsArray.push(...transferredOptionsArray);
        }
      };
      applyNormalization();
      for (const key of Object.keys(this._utils.schemas)) {
        const schema = this._utils.schemas[key];
        if (!(key in newOptions)) {
          const defaultResult = normalizeDefaultResult(schema.default(this._utils));
          if ("value" in defaultResult) {
            restOptionsArray.push({ [key]: defaultResult.value });
          }
        }
      }
      applyNormalization();
      for (const key of Object.keys(this._utils.schemas)) {
        if (!(key in newOptions)) {
          continue;
        }
        const schema = this._utils.schemas[key];
        const value = newOptions[key];
        const newValue = schema.postprocess(value, this._utils);
        if (newValue === VALUE_UNCHANGED) {
          continue;
        }
        this._applyValidation(newValue, key, schema);
        newOptions[key] = newValue;
      }
      this._applyPostprocess(newOptions);
      this._applyRequiredCheck(newOptions);
      return newOptions;
    }
    _applyNormalization(options, newOptions) {
      const transferredOptionsArray = [];
      const { knownKeys, unknownKeys } = this._partitionOptionKeys(options);
      for (const key of knownKeys) {
        const schema = this._utils.schemas[key];
        const value = schema.preprocess(options[key], this._utils);
        this._applyValidation(value, key, schema);
        const appendTransferredOptions = ({ from, to }) => {
          transferredOptionsArray.push(typeof to === "string" ? { [to]: from } : { [to.key]: to.value });
        };
        const warnDeprecated = ({ value: currentValue, redirectTo }) => {
          const deprecatedResult = normalizeDeprecatedResult(
            schema.deprecated(currentValue, this._utils),
            value,
            /* doNotNormalizeTrue */
            true
          );
          if (deprecatedResult === false) {
            return;
          }
          if (deprecatedResult === true) {
            if (!this._hasDeprecationWarned(key)) {
              this._utils.logger.warn(this._deprecatedHandler(key, redirectTo, this._utils));
            }
          } else {
            for (const { value: deprecatedValue } of deprecatedResult) {
              const pair = { key, value: deprecatedValue };
              if (!this._hasDeprecationWarned(pair)) {
                const redirectToPair = typeof redirectTo === "string" ? { key: redirectTo, value: deprecatedValue } : redirectTo;
                this._utils.logger.warn(this._deprecatedHandler(pair, redirectToPair, this._utils));
              }
            }
          }
        };
        const forwardResult = normalizeForwardResult(schema.forward(value, this._utils), value);
        forwardResult.forEach(appendTransferredOptions);
        const redirectResult = normalizeRedirectResult(schema.redirect(value, this._utils), value);
        redirectResult.redirect.forEach(appendTransferredOptions);
        if ("remain" in redirectResult) {
          const remainingValue = redirectResult.remain;
          newOptions[key] = key in newOptions ? schema.overlap(newOptions[key], remainingValue, this._utils) : remainingValue;
          warnDeprecated({ value: remainingValue });
        }
        for (const { from, to } of redirectResult.redirect) {
          warnDeprecated({ value: from, redirectTo: to });
        }
      }
      for (const key of unknownKeys) {
        const value = options[key];
        this._applyUnknownHandler(key, value, newOptions, (knownResultKey, knownResultValue) => {
          transferredOptionsArray.push({ [knownResultKey]: knownResultValue });
        });
      }
      return transferredOptionsArray;
    }
    _applyRequiredCheck(options) {
      for (const key of Object.keys(this._utils.schemas)) {
        if (this._identifyMissing(key, options)) {
          if (this._identifyRequired(key)) {
            throw this._invalidHandler(key, VALUE_NOT_EXIST, this._utils);
          }
        }
      }
    }
    _partitionOptionKeys(options) {
      const [knownKeys, unknownKeys] = partition(Object.keys(options).filter((key) => !this._identifyMissing(key, options)), (key) => key in this._utils.schemas);
      return { knownKeys, unknownKeys };
    }
    _applyValidation(value, key, schema) {
      const validateResult = normalizeValidateResult(schema.validate(value, this._utils), value);
      if (validateResult !== true) {
        throw this._invalidHandler(key, validateResult.value, this._utils);
      }
    }
    _applyUnknownHandler(key, value, newOptions, knownResultHandler) {
      const unknownResult = this._unknownHandler(key, value, this._utils);
      if (!unknownResult) {
        return;
      }
      for (const resultKey of Object.keys(unknownResult)) {
        if (this._identifyMissing(resultKey, unknownResult)) {
          continue;
        }
        const resultValue = unknownResult[resultKey];
        if (resultKey in this._utils.schemas) {
          knownResultHandler(resultKey, resultValue);
        } else {
          newOptions[resultKey] = resultValue;
        }
      }
    }
    _applyPostprocess(options) {
      const postprocessed = this._postprocess(options, this._utils);
      if (postprocessed === VALUE_UNCHANGED) {
        return;
      }
      if (postprocessed.delete) {
        for (const deleteKey of postprocessed.delete) {
          delete options[deleteKey];
        }
      }
      if (postprocessed.override) {
        const { knownKeys, unknownKeys } = this._partitionOptionKeys(postprocessed.override);
        for (const key of knownKeys) {
          const value = postprocessed.override[key];
          this._applyValidation(value, key, this._utils.schemas[key]);
          options[key] = value;
        }
        for (const key of unknownKeys) {
          const value = postprocessed.override[key];
          this._applyUnknownHandler(key, value, options, (knownResultKey, knownResultValue) => {
            const schema = this._utils.schemas[knownResultKey];
            this._applyValidation(knownResultValue, knownResultKey, schema);
            options[knownResultKey] = knownResultValue;
          });
        }
      }
    }
  };
 
  // src/main/normalize-options.js
  var hasDeprecationWarned;
  function normalizeOptions(options, optionInfos, {
    logger = false,
    isCLI = false,
    passThrough = false,
    FlagSchema,
    descriptor
  } = {}) {
    if (isCLI) {
      if (!FlagSchema) {
        throw new Error("'FlagSchema' option is required.");
      }
      if (!descriptor) {
        throw new Error("'descriptor' option is required.");
      }
    } else {
      descriptor = apiDescriptor;
    }
    const unknown = !passThrough ? (key, value, options2) => {
      const { _, ...schemas2 } = options2.schemas;
      return levenUnknownHandler(key, value, {
        ...options2,
        schemas: schemas2
      });
    } : Array.isArray(passThrough) ? (key, value) => !passThrough.includes(key) ? void 0 : { [key]: value } : (key, value) => ({ [key]: value });
    const schemas = optionInfosToSchemas(optionInfos, { isCLI, FlagSchema });
    const normalizer = new Normalizer(schemas, {
      logger,
      unknown,
      descriptor
    });
    const shouldSuppressDuplicateDeprecationWarnings = logger !== false;
    if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) {
      normalizer._hasDeprecationWarned = hasDeprecationWarned;
    }
    const normalized = normalizer.normalize(options);
    if (shouldSuppressDuplicateDeprecationWarnings) {
      hasDeprecationWarned = normalizer._hasDeprecationWarned;
    }
    return normalized;
  }
  function optionInfosToSchemas(optionInfos, { isCLI, FlagSchema }) {
    const schemas = [];
    if (isCLI) {
      schemas.push(AnySchema.create({ name: "_" }));
    }
    for (const optionInfo of optionInfos) {
      schemas.push(
        optionInfoToSchema(optionInfo, {
          isCLI,
          optionInfos,
          FlagSchema
        })
      );
      if (optionInfo.alias && isCLI) {
        schemas.push(
          AliasSchema.create({
            // @ts-expect-error
            name: optionInfo.alias,
            sourceName: optionInfo.name
          })
        );
      }
    }
    return schemas;
  }
  function optionInfoToSchema(optionInfo, { isCLI, optionInfos, FlagSchema }) {
    const { name } = optionInfo;
    const parameters = { name };
    let SchemaConstructor;
    const handlers = {};
    switch (optionInfo.type) {
      case "int":
        SchemaConstructor = IntegerSchema;
        if (isCLI) {
          parameters.preprocess = Number;
        }
        break;
      case "string":
        SchemaConstructor = StringSchema;
        break;
      case "choice":
        SchemaConstructor = ChoiceSchema;
        parameters.choices = optionInfo.choices.map(
          (choiceInfo) => (choiceInfo == null ? void 0 : choiceInfo.redirect) ? {
            ...choiceInfo,
            redirect: {
              to: { key: optionInfo.name, value: choiceInfo.redirect }
            }
          } : choiceInfo
        );
        break;
      case "boolean":
        SchemaConstructor = BooleanSchema;
        break;
      case "flag":
        SchemaConstructor = FlagSchema;
        parameters.flags = optionInfos.flatMap(
          (optionInfo2) => [
            optionInfo2.alias,
            optionInfo2.description && optionInfo2.name,
            optionInfo2.oppositeDescription && `no-${optionInfo2.name}`
          ].filter(Boolean)
        );
        break;
      case "path":
        SchemaConstructor = StringSchema;
        break;
      default:
        throw new Error(`Unexpected type ${optionInfo.type}`);
    }
    if (optionInfo.exception) {
      parameters.validate = (value, schema, utils2) => optionInfo.exception(value) || schema.validate(value, utils2);
    } else {
      parameters.validate = (value, schema, utils2) => value === void 0 || schema.validate(value, utils2);
    }
    if (optionInfo.redirect) {
      handlers.redirect = (value) => !value ? void 0 : {
        to: typeof optionInfo.redirect === "string" ? optionInfo.redirect : {
          key: optionInfo.redirect.option,
          value: optionInfo.redirect.value
        }
      };
    }
    if (optionInfo.deprecated) {
      handlers.deprecated = true;
    }
    if (isCLI && !optionInfo.array) {
      const originalPreprocess = parameters.preprocess || ((x) => x);
      parameters.preprocess = (value, schema, utils2) => schema.preprocess(
        originalPreprocess(Array.isArray(value) ? at_default(
          /* isOptionalObject */
          false,
          value,
          -1
        ) : value),
        utils2
      );
    }
    return optionInfo.array ? ArraySchema.create({
      ...isCLI ? { preprocess: (v) => Array.isArray(v) ? v : [v] } : {},
      ...handlers,
      // @ts-expect-error
      valueSchema: SchemaConstructor.create(parameters)
    }) : SchemaConstructor.create({ ...parameters, ...handlers });
  }
  var normalize_options_default = normalizeOptions;
 
  // scripts/build/shims/array-find-last.js
  var arrayFindLast = (isOptionalObject, array2, callback) => {
    if (isOptionalObject && (array2 === void 0 || array2 === null)) {
      return;
    }
    if (array2.findLast) {
      return array2.findLast(callback);
    }
    for (let index = array2.length - 1; index >= 0; index--) {
      const element = array2[index];
      if (callback(element, index, array2)) {
        return element;
      }
    }
  };
  var array_find_last_default = arrayFindLast;
 
  // src/main/parser-and-printer.js
  function getParserPluginByParserName(plugins, parserName) {
    if (!parserName) {
      throw new Error("parserName is required.");
    }
    const plugin = array_find_last_default(
      /* isOptionalObject */
      false,
      plugins,
      (plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)
    );
    if (plugin) {
      return plugin;
    }
    let message = `Couldn't resolve parser "${parserName}".`;
    if (true) {
      message += " Plugins must be explicitly added to the standalone bundle.";
    }
    throw new ConfigError(message);
  }
  function getPrinterPluginByAstFormat(plugins, astFormat) {
    if (!astFormat) {
      throw new Error("astFormat is required.");
    }
    const plugin = array_find_last_default(
      /* isOptionalObject */
      false,
      plugins,
      (plugin2) => plugin2.printers && Object.prototype.hasOwnProperty.call(plugin2.printers, astFormat)
    );
    if (plugin) {
      return plugin;
    }
    let message = `Couldn't find plugin for AST format "${astFormat}".`;
    if (true) {
      message += " Plugins must be explicitly added to the standalone bundle.";
    }
    throw new ConfigError(message);
  }
  function resolveParser({ plugins, parser }) {
    const plugin = getParserPluginByParserName(plugins, parser);
    return initParser(plugin, parser);
  }
  function initParser(plugin, parserName) {
    const parserOrParserInitFunction = plugin.parsers[parserName];
    return typeof parserOrParserInitFunction === "function" ? parserOrParserInitFunction() : parserOrParserInitFunction;
  }
  function initPrinter(plugin, astFormat) {
    const printerOrPrinterInitFunction = plugin.printers[astFormat];
    return typeof printerOrPrinterInitFunction === "function" ? printerOrPrinterInitFunction() : printerOrPrinterInitFunction;
  }
 
  // src/main/normalize-format-options.js
  var formatOptionsHiddenDefaults = {
    astFormat: "estree",
    printer: {},
    originalText: void 0,
    locStart: null,
    locEnd: null
  };
  async function normalizeFormatOptions(options, opts = {}) {
    var _a2;
    const rawOptions = { ...options };
    if (!rawOptions.parser) {
      if (!rawOptions.filepath) {
        throw new UndefinedParserError(
          "No parser and no file path given, couldn't infer a parser."
        );
      } else {
        rawOptions.parser = infer_parser_default(rawOptions, {
          physicalFile: rawOptions.filepath
        });
        if (!rawOptions.parser) {
          throw new UndefinedParserError(
            `No parser could be inferred for file "${rawOptions.filepath}".`
          );
        }
      }
    }
    const supportOptions = getSupportInfo({
      plugins: options.plugins,
      showDeprecated: true
    }).options;
    const defaults = {
      ...formatOptionsHiddenDefaults,
      ...Object.fromEntries(
        supportOptions.filter((optionInfo) => optionInfo.default !== void 0).map((option) => [option.name, option.default])
      )
    };
    const parserPlugin = getParserPluginByParserName(
      rawOptions.plugins,
      rawOptions.parser
    );
    const parser = await initParser(parserPlugin, rawOptions.parser);
    rawOptions.astFormat = parser.astFormat;
    rawOptions.locEnd = parser.locEnd;
    rawOptions.locStart = parser.locStart;
    const printerPlugin = ((_a2 = parserPlugin.printers) == null ? void 0 : _a2[parser.astFormat]) ? parserPlugin : getPrinterPluginByAstFormat(rawOptions.plugins, parser.astFormat);
    const printer2 = await initPrinter(printerPlugin, parser.astFormat);
    rawOptions.printer = printer2;
    const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries(
      Object.entries(printerPlugin.defaultOptions).filter(
        ([, value]) => value !== void 0
      )
    ) : {};
    const mixedDefaults = { ...defaults, ...pluginDefaults };
    for (const [k, value] of Object.entries(mixedDefaults)) {
      if (rawOptions[k] === null || rawOptions[k] === void 0) {
        rawOptions[k] = value;
      }
    }
    if (rawOptions.parser === "json") {
      rawOptions.trailingComma = "none";
    }
    return normalize_options_default(rawOptions, supportOptions, {
      passThrough: Object.keys(formatOptionsHiddenDefaults),
      ...opts
    });
  }
  var normalize_format_options_default = normalizeFormatOptions;
 
  // src/main/parse.js
  var import_code_frame = __toESM(require_lib(), 1);
  async function parse(originalText, options) {
    const parser = await resolveParser(options);
    const text = parser.preprocess ? parser.preprocess(originalText, options) : originalText;
    options.originalText = text;
    let ast;
    try {
      ast = await parser.parse(
        text,
        options,
        // TODO: remove the third argument in v4
        // The duplicated argument is passed as intended, see #10156
        options
      );
    } catch (error) {
      handleParseError(error, originalText);
    }
    return { text, ast };
  }
  function handleParseError(error, text) {
    const { loc } = error;
    if (loc) {
      const codeFrame = (0, import_code_frame.codeFrameColumns)(text, loc, { highlightCode: true });
      error.message += "\n" + codeFrame;
      error.codeFrame = codeFrame;
      throw error;
    }
    throw error;
  }
  var parse_default = parse;
 
  // src/main/multiparser.js
  async function printEmbeddedLanguages(path, genericPrint, options, printAstToDoc2, embeds) {
    const {
      embeddedLanguageFormatting,
      printer: {
        embed,
        hasPrettierIgnore = () => false,
        getVisitorKeys: printerGetVisitorKeys
      }
    } = options;
    if (!embed || embeddedLanguageFormatting !== "auto") {
      return;
    }
    if (embed.length > 2) {
      throw new Error(
        "printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed"
      );
    }
    const getVisitorKeys = create_get_visitor_keys_function_default(
      embed.getVisitorKeys ?? printerGetVisitorKeys
    );
    const embedCallResults = [];
    recurse();
    const originalPathStack = path.stack;
    for (const { print, node, pathStack } of embedCallResults) {
      try {
        path.stack = pathStack;
        const doc = await print(textToDocForEmbed, genericPrint, path, options);
        if (doc) {
          embeds.set(node, doc);
        }
      } catch (error) {
        if (globalThis.PRETTIER_DEBUG) {
          throw error;
        }
      }
    }
    path.stack = originalPathStack;
    function textToDocForEmbed(text, partialNextOptions) {
      return textToDoc(text, partialNextOptions, options, printAstToDoc2);
    }
    function recurse() {
      const { node } = path;
      if (node === null || typeof node !== "object" || hasPrettierIgnore(path)) {
        return;
      }
      for (const key of getVisitorKeys(node)) {
        if (Array.isArray(node[key])) {
          path.each(recurse, key);
        } else {
          path.call(recurse, key);
        }
      }
      const result = embed(path, options);
      if (!result) {
        return;
      }
      if (typeof result === "function") {
        embedCallResults.push({
          print: result,
          node,
          pathStack: [...path.stack]
        });
        return;
      }
      if (false) {
        throw new Error(
          "`embed` should return an async function instead of Promise."
        );
      }
      embeds.set(node, result);
    }
  }
  async function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc2) {
    const options = await normalize_format_options_default(
      {
        ...parentOptions,
        ...partialNextOptions,
        parentParser: parentOptions.parser,
        originalText: text,
        // Improve this if we calculate the relative index
        cursorOffset: void 0,
        rangeStart: void 0,
        rangeEnd: void 0
      },
      { passThrough: true }
    );
    const { ast } = await parse_default(text, options);
    const doc = await printAstToDoc2(ast, options);
    return stripTrailingHardline(doc);
  }
 
  // src/main/print-ignored.js
  function printIgnored(path, options) {
    const {
      originalText,
      [Symbol.for("comments")]: comments,
      locStart,
      locEnd,
      [Symbol.for("printedComments")]: printedComments
    } = options;
    const { node } = path;
    const start = locStart(node);
    const end = locEnd(node);
    for (const comment of comments) {
      if (locStart(comment) >= start && locEnd(comment) <= end) {
        printedComments.add(comment);
      }
    }
    return originalText.slice(start, end);
  }
  var print_ignored_default = printIgnored;
 
  // src/main/ast-to-doc.js
  async function printAstToDoc(ast, options) {
    ({ ast } = await prepareToPrint(ast, options));
    const cache = /* @__PURE__ */ new Map();
    const path = new ast_path_default(ast);
    const ensurePrintingNode = create_print_pre_check_function_default(options);
    const embeds = /* @__PURE__ */ new Map();
    await printEmbeddedLanguages(path, mainPrint, options, printAstToDoc, embeds);
    const doc = await callPluginPrintFunction(
      path,
      options,
      mainPrint,
      void 0,
      embeds
    );
    ensureAllCommentsPrinted(options);
    if (options.cursorOffset >= 0) {
      if (options.nodeAfterCursor && !options.nodeBeforeCursor) {
        return [cursor, doc];
      }
      if (options.nodeBeforeCursor && !options.nodeAfterCursor) {
        return [doc, cursor];
      }
    }
    return doc;
    function mainPrint(selector, args) {
      if (selector === void 0 || selector === path) {
        return mainPrintInternal(args);
      }
      if (Array.isArray(selector)) {
        return path.call(() => mainPrintInternal(args), ...selector);
      }
      return path.call(() => mainPrintInternal(args), selector);
    }
    function mainPrintInternal(args) {
      ensurePrintingNode(path);
      const value = path.node;
      if (value === void 0 || value === null) {
        return "";
      }
      const shouldCache = value && typeof value === "object" && args === void 0;
      if (shouldCache && cache.has(value)) {
        return cache.get(value);
      }
      const doc2 = callPluginPrintFunction(path, options, mainPrint, args, embeds);
      if (shouldCache) {
        cache.set(value, doc2);
      }
      return doc2;
    }
  }
  function callPluginPrintFunction(path, options, printPath, args, embeds) {
    var _a2;
    const { node } = path;
    const { printer: printer2 } = options;
    let doc;
    if ((_a2 = printer2.hasPrettierIgnore) == null ? void 0 : _a2.call(printer2, path)) {
      doc = print_ignored_default(path, options);
    } else if (embeds.has(node)) {
      doc = embeds.get(node);
    } else {
      doc = printer2.print(path, options, printPath, args);
    }
    switch (node) {
      case options.cursorNode:
        doc = inheritLabel(doc, (doc2) => [cursor, doc2, cursor]);
        break;
      case options.nodeBeforeCursor:
        doc = inheritLabel(doc, (doc2) => [doc2, cursor]);
        break;
      case options.nodeAfterCursor:
        doc = inheritLabel(doc, (doc2) => [cursor, doc2]);
        break;
    }
    if (printer2.printComment && (!printer2.willPrintOwnComments || !printer2.willPrintOwnComments(path, options))) {
      doc = printComments(path, doc, options);
    }
    return doc;
  }
  async function prepareToPrint(ast, options) {
    const comments = ast.comments ?? [];
    options[Symbol.for("comments")] = comments;
    options[Symbol.for("printedComments")] = /* @__PURE__ */ new Set();
    attachComments(ast, options);
    const {
      printer: { preprocess }
    } = options;
    ast = preprocess ? await preprocess(ast, options) : ast;
    return { ast, comments };
  }
 
  // src/main/get-cursor-node.js
  function getCursorLocation(ast, options) {
    const { cursorOffset, locStart, locEnd } = options;
    const getVisitorKeys = create_get_visitor_keys_function_default(
      options.printer.getVisitorKeys
    );
    const nodeContainsCursor = (node) => locStart(node) <= cursorOffset && locEnd(node) >= cursorOffset;
    let cursorNode = ast;
    const nodesContainingCursor = [ast];
    for (const node of getDescendants(ast, {
      getVisitorKeys,
      filter: nodeContainsCursor
    })) {
      nodesContainingCursor.push(node);
      cursorNode = node;
    }
    if (isLeaf(cursorNode, { getVisitorKeys })) {
      return { cursorNode };
    }
    let nodeBeforeCursor;
    let nodeAfterCursor;
    let nodeBeforeCursorEndIndex = -1;
    let nodeAfterCursorStartIndex = Number.POSITIVE_INFINITY;
    while (nodesContainingCursor.length > 0 && (nodeBeforeCursor === void 0 || nodeAfterCursor === void 0)) {
      cursorNode = nodesContainingCursor.pop();
      const foundBeforeNode = nodeBeforeCursor !== void 0;
      const foundAfterNode = nodeAfterCursor !== void 0;
      for (const node of getChildren(cursorNode, { getVisitorKeys })) {
        if (!foundBeforeNode) {
          const nodeEnd = locEnd(node);
          if (nodeEnd <= cursorOffset && nodeEnd > nodeBeforeCursorEndIndex) {
            nodeBeforeCursor = node;
            nodeBeforeCursorEndIndex = nodeEnd;
          }
        }
        if (!foundAfterNode) {
          const nodeStart = locStart(node);
          if (nodeStart >= cursorOffset && nodeStart < nodeAfterCursorStartIndex) {
            nodeAfterCursor = node;
            nodeAfterCursorStartIndex = nodeStart;
          }
        }
      }
    }
    return {
      nodeBeforeCursor,
      nodeAfterCursor
    };
  }
  var get_cursor_node_default = getCursorLocation;
 
  // src/main/massage-ast.js
  function massageAst(ast, options) {
    const {
      printer: {
        massageAstNode: cleanFunction,
        getVisitorKeys: printerGetVisitorKeys
      }
    } = options;
    if (!cleanFunction) {
      return ast;
    }
    const getVisitorKeys = create_get_visitor_keys_function_default(printerGetVisitorKeys);
    const ignoredProperties = cleanFunction.ignoredProperties ?? /* @__PURE__ */ new Set();
    return recurse(ast);
    function recurse(original, parent) {
      if (!(original !== null && typeof original === "object")) {
        return original;
      }
      if (Array.isArray(original)) {
        return original.map((child) => recurse(child, parent)).filter(Boolean);
      }
      const cloned = {};
      const childrenKeys = new Set(getVisitorKeys(original));
      for (const key in original) {
        if (!Object.prototype.hasOwnProperty.call(original, key) || ignoredProperties.has(key)) {
          continue;
        }
        if (childrenKeys.has(key)) {
          cloned[key] = recurse(original[key], original);
        } else {
          cloned[key] = original[key];
        }
      }
      const result = cleanFunction(original, cloned, parent);
      if (result === null) {
        return;
      }
      return result ?? cloned;
    }
  }
  var massage_ast_default = massageAst;
 
  // scripts/build/shims/array-find-last-index.js
  var arrayFindLastIndex = (isOptionalObject, array2, callback) => {
    if (isOptionalObject && (array2 === void 0 || array2 === null)) {
      return;
    }
    if (array2.findLastIndex) {
      return array2.findLastIndex(callback);
    }
    for (let index = array2.length - 1; index >= 0; index--) {
      const element = array2[index];
      if (callback(element, index, array2)) {
        return index;
      }
    }
    return -1;
  };
  var array_find_last_index_default = arrayFindLastIndex;
 
  // src/main/range-util.js
  var isJsonParser = ({ parser }) => parser === "json" || parser === "json5" || parser === "jsonc" || parser === "json-stringify";
  function findCommonAncestor(startNodeAndParents, endNodeAndParents) {
    const startNodeAndAncestors = [
      startNodeAndParents.node,
      ...startNodeAndParents.parentNodes
    ];
    const endNodeAndAncestors = /* @__PURE__ */ new Set([
      endNodeAndParents.node,
      ...endNodeAndParents.parentNodes
    ]);
    return startNodeAndAncestors.find(
      (node) => jsonSourceElements.has(node.type) && endNodeAndAncestors.has(node)
    );
  }
  function dropRootParents(parents) {
    const index = array_find_last_index_default(
      /* isOptionalObject */
      false,
      parents,
      (node) => node.type !== "Program" && node.type !== "File"
    );
    if (index === -1) {
      return parents;
    }
    return parents.slice(0, index + 1);
  }
  function findSiblingAncestors(startNodeAndParents, endNodeAndParents, { locStart, locEnd }) {
    let resultStartNode = startNodeAndParents.node;
    let resultEndNode = endNodeAndParents.node;
    if (resultStartNode === resultEndNode) {
      return {
        startNode: resultStartNode,
        endNode: resultEndNode
      };
    }
    const startNodeStart = locStart(startNodeAndParents.node);
    for (const endParent of dropRootParents(endNodeAndParents.parentNodes)) {
      if (locStart(endParent) >= startNodeStart) {
        resultEndNode = endParent;
      } else {
        break;
      }
    }
    const endNodeEnd = locEnd(endNodeAndParents.node);
    for (const startParent of dropRootParents(startNodeAndParents.parentNodes)) {
      if (locEnd(startParent) <= endNodeEnd) {
        resultStartNode = startParent;
      } else {
        break;
      }
      if (resultStartNode === resultEndNode) {
        break;
      }
    }
    return {
      startNode: resultStartNode,
      endNode: resultEndNode
    };
  }
  function findNodeAtOffset(node, offset, options, predicate, parentNodes = [], type) {
    const { locStart, locEnd } = options;
    const start = locStart(node);
    const end = locEnd(node);
    if (offset > end || offset < start || type === "rangeEnd" && offset === start || type === "rangeStart" && offset === end) {
      return;
    }
    for (const childNode of getSortedChildNodes(node, options)) {
      const childResult = findNodeAtOffset(
        childNode,
        offset,
        options,
        predicate,
        [node, ...parentNodes],
        type
      );
      if (childResult) {
        return childResult;
      }
    }
    if (!predicate || predicate(node, parentNodes[0])) {
      return {
        node,
        parentNodes
      };
    }
  }
  function isJsSourceElement(type, parentType) {
    return parentType !== "DeclareExportDeclaration" && type !== "TypeParameterDeclaration" && (type === "Directive" || type === "TypeAlias" || type === "TSExportAssignment" || type.startsWith("Declare") || type.startsWith("TSDeclare") || type.endsWith("Statement") || type.endsWith("Declaration"));
  }
  var jsonSourceElements = /* @__PURE__ */ new Set([
    "JsonRoot",
    "ObjectExpression",
    "ArrayExpression",
    "StringLiteral",
    "NumericLiteral",
    "BooleanLiteral",
    "NullLiteral",
    "UnaryExpression",
    "TemplateLiteral"
  ]);
  var graphqlSourceElements = /* @__PURE__ */ new Set([
    "OperationDefinition",
    "FragmentDefinition",
    "VariableDefinition",
    "TypeExtensionDefinition",
    "ObjectTypeDefinition",
    "FieldDefinition",
    "DirectiveDefinition",
    "EnumTypeDefinition",
    "EnumValueDefinition",
    "InputValueDefinition",
    "InputObjectTypeDefinition",
    "SchemaDefinition",
    "OperationTypeDefinition",
    "InterfaceTypeDefinition",
    "UnionTypeDefinition",
    "ScalarTypeDefinition"
  ]);
  function isSourceElement(opts, node, parentNode) {
    if (!node) {
      return false;
    }
    switch (opts.parser) {
      case "flow":
      case "hermes":
      case "babel":
      case "babel-flow":
      case "babel-ts":
      case "typescript":
      case "acorn":
      case "espree":
      case "meriyah":
      case "oxc":
      case "oxc-ts":
      case "__babel_estree":
        return isJsSourceElement(node.type, parentNode == null ? void 0 : parentNode.type);
      case "json":
      case "json5":
      case "jsonc":
      case "json-stringify":
        return jsonSourceElements.has(node.type);
      case "graphql":
        return graphqlSourceElements.has(node.kind);
      case "vue":
        return node.tag !== "root";
    }
    return false;
  }
  function calculateRange(text, opts, ast) {
    let { rangeStart: start, rangeEnd: end, locStart, locEnd } = opts;
    assert_default.ok(end > start);
    const firstNonWhitespaceCharacterIndex = text.slice(start, end).search(/\S/u);
    const isAllWhitespace = firstNonWhitespaceCharacterIndex === -1;
    if (!isAllWhitespace) {
      start += firstNonWhitespaceCharacterIndex;
      for (; end > start; --end) {
        if (/\S/u.test(text[end - 1])) {
          break;
        }
      }
    }
    const startNodeAndParents = findNodeAtOffset(
      ast,
      start,
      opts,
      (node, parentNode) => isSourceElement(opts, node, parentNode),
      [],
      "rangeStart"
    );
    const endNodeAndParents = (
      // No need find Node at `end`, it will be the same as `startNodeAndParents`
      isAllWhitespace ? startNodeAndParents : findNodeAtOffset(
        ast,
        end,
        opts,
        (node) => isSourceElement(opts, node),
        [],
        "rangeEnd"
      )
    );
    if (!startNodeAndParents || !endNodeAndParents) {
      return {
        rangeStart: 0,
        rangeEnd: 0
      };
    }
    let startNode;
    let endNode;
    if (isJsonParser(opts)) {
      const commonAncestor = findCommonAncestor(
        startNodeAndParents,
        endNodeAndParents
      );
      startNode = commonAncestor;
      endNode = commonAncestor;
    } else {
      ({ startNode, endNode } = findSiblingAncestors(
        startNodeAndParents,
        endNodeAndParents,
        opts
      ));
    }
    return {
      rangeStart: Math.min(locStart(startNode), locStart(endNode)),
      rangeEnd: Math.max(locEnd(startNode), locEnd(endNode))
    };
  }
 
  // src/main/core.js
  var BOM = "\uFEFF";
  var CURSOR = Symbol("cursor");
  async function coreFormat(originalText, opts, addAlignmentSize = 0) {
    if (!originalText || originalText.trim().length === 0) {
      return { formatted: "", cursorOffset: -1, comments: [] };
    }
    const { ast, text } = await parse_default(originalText, opts);
    if (opts.cursorOffset >= 0) {
      opts = {
        ...opts,
        ...get_cursor_node_default(ast, opts)
      };
    }
    let doc = await printAstToDoc(ast, opts, addAlignmentSize);
    if (addAlignmentSize > 0) {
      doc = addAlignmentToDoc([hardline, doc], addAlignmentSize, opts.tabWidth);
    }
    const result = printDocToString(doc, opts);
    if (addAlignmentSize > 0) {
      const trimmed = result.formatted.trim();
      if (result.cursorNodeStart !== void 0) {
        result.cursorNodeStart -= result.formatted.indexOf(trimmed);
        if (result.cursorNodeStart < 0) {
          result.cursorNodeStart = 0;
          result.cursorNodeText = result.cursorNodeText.trimStart();
        }
        if (result.cursorNodeStart + result.cursorNodeText.length > trimmed.length) {
          result.cursorNodeText = result.cursorNodeText.trimEnd();
        }
      }
      result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine);
    }
    const comments = opts[Symbol.for("comments")];
    if (opts.cursorOffset >= 0) {
      let oldCursorRegionStart;
      let oldCursorRegionText;
      let newCursorRegionStart;
      let newCursorRegionText;
      if ((opts.cursorNode || opts.nodeBeforeCursor || opts.nodeAfterCursor) && result.cursorNodeText) {
        newCursorRegionStart = result.cursorNodeStart;
        newCursorRegionText = result.cursorNodeText;
        if (opts.cursorNode) {
          oldCursorRegionStart = opts.locStart(opts.cursorNode);
          oldCursorRegionText = text.slice(
            oldCursorRegionStart,
            opts.locEnd(opts.cursorNode)
          );
        } else {
          if (!opts.nodeBeforeCursor && !opts.nodeAfterCursor) {
            throw new Error(
              "Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor"
            );
          }
          oldCursorRegionStart = opts.nodeBeforeCursor ? opts.locEnd(opts.nodeBeforeCursor) : 0;
          const oldCursorRegionEnd = opts.nodeAfterCursor ? opts.locStart(opts.nodeAfterCursor) : text.length;
          oldCursorRegionText = text.slice(
            oldCursorRegionStart,
            oldCursorRegionEnd
          );
        }
      } else {
        oldCursorRegionStart = 0;
        oldCursorRegionText = text;
        newCursorRegionStart = 0;
        newCursorRegionText = result.formatted;
      }
      const cursorOffsetRelativeToOldCursorRegionStart = opts.cursorOffset - oldCursorRegionStart;
      if (oldCursorRegionText === newCursorRegionText) {
        return {
          formatted: result.formatted,
          cursorOffset: newCursorRegionStart + cursorOffsetRelativeToOldCursorRegionStart,
          comments
        };
      }
      const oldCursorNodeCharArray = oldCursorRegionText.split("");
      oldCursorNodeCharArray.splice(
        cursorOffsetRelativeToOldCursorRegionStart,
        0,
        CURSOR
      );
      const newCursorNodeCharArray = newCursorRegionText.split("");
      const cursorNodeDiff = diffArrays(
        oldCursorNodeCharArray,
        newCursorNodeCharArray
      );
      let cursorOffset = newCursorRegionStart;
      for (const entry of cursorNodeDiff) {
        if (entry.removed) {
          if (entry.value.includes(CURSOR)) {
            break;
          }
        } else {
          cursorOffset += entry.count;
        }
      }
      return { formatted: result.formatted, cursorOffset, comments };
    }
    return { formatted: result.formatted, cursorOffset: -1, comments };
  }
  async function formatRange(originalText, opts) {
    const { ast, text } = await parse_default(originalText, opts);
    const { rangeStart, rangeEnd } = calculateRange(text, opts, ast);
    const rangeString = text.slice(rangeStart, rangeEnd);
    const rangeStart2 = Math.min(
      rangeStart,
      text.lastIndexOf("\n", rangeStart) + 1
    );
    const indentString = text.slice(rangeStart2, rangeStart).match(/^\s*/u)[0];
    const alignmentSize = get_alignment_size_default(indentString, opts.tabWidth);
    const rangeResult = await coreFormat(
      rangeString,
      {
        ...opts,
        rangeStart: 0,
        rangeEnd: Number.POSITIVE_INFINITY,
        // Track the cursor offset only if it's within our range
        cursorOffset: opts.cursorOffset > rangeStart && opts.cursorOffset <= rangeEnd ? opts.cursorOffset - rangeStart : -1,
        // Always use `lf` to format, we'll replace it later
        endOfLine: "lf"
      },
      alignmentSize
    );
    const rangeTrimmed = rangeResult.formatted.trimEnd();
    let { cursorOffset } = opts;
    if (cursorOffset > rangeEnd) {
      cursorOffset += rangeTrimmed.length - rangeString.length;
    } else if (rangeResult.cursorOffset >= 0) {
      cursorOffset = rangeResult.cursorOffset + rangeStart;
    }
    let formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd);
    if (opts.endOfLine !== "lf") {
      const eol = convertEndOfLineToChars(opts.endOfLine);
      if (cursorOffset >= 0 && eol === "\r\n") {
        cursorOffset += countEndOfLineChars(
          formatted.slice(0, cursorOffset),
          "\n"
        );
      }
      formatted = string_replace_all_default(
        /* isOptionalObject */
        false,
        formatted,
        "\n",
        eol
      );
    }
    return { formatted, cursorOffset, comments: rangeResult.comments };
  }
  function ensureIndexInText(text, index, defaultValue) {
    if (typeof index !== "number" || Number.isNaN(index) || index < 0 || index > text.length) {
      return defaultValue;
    }
    return index;
  }
  function normalizeIndexes(text, options) {
    let { cursorOffset, rangeStart, rangeEnd } = options;
    cursorOffset = ensureIndexInText(text, cursorOffset, -1);
    rangeStart = ensureIndexInText(text, rangeStart, 0);
    rangeEnd = ensureIndexInText(text, rangeEnd, text.length);
    return { ...options, cursorOffset, rangeStart, rangeEnd };
  }
  function normalizeInputAndOptions(text, options) {
    let { cursorOffset, rangeStart, rangeEnd, endOfLine } = normalizeIndexes(
      text,
      options
    );
    const hasBOM = text.charAt(0) === BOM;
    if (hasBOM) {
      text = text.slice(1);
      cursorOffset--;
      rangeStart--;
      rangeEnd--;
    }
    if (endOfLine === "auto") {
      endOfLine = guessEndOfLine(text);
    }
    if (text.includes("\r")) {
      const countCrlfBefore = (index) => countEndOfLineChars(text.slice(0, Math.max(index, 0)), "\r\n");
      cursorOffset -= countCrlfBefore(cursorOffset);
      rangeStart -= countCrlfBefore(rangeStart);
      rangeEnd -= countCrlfBefore(rangeEnd);
      text = normalizeEndOfLine(text);
    }
    return {
      hasBOM,
      text,
      options: normalizeIndexes(text, {
        ...options,
        cursorOffset,
        rangeStart,
        rangeEnd,
        endOfLine
      })
    };
  }
  async function hasPragma(text, options) {
    const selectedParser = await resolveParser(options);
    return !selectedParser.hasPragma || selectedParser.hasPragma(text);
  }
  async function hasIgnorePragma(text, options) {
    var _a2;
    const selectedParser = await resolveParser(options);
    return (_a2 = selectedParser.hasIgnorePragma) == null ? void 0 : _a2.call(selectedParser, text);
  }
  async function formatWithCursor(originalText, originalOptions) {
    let { hasBOM, text, options } = normalizeInputAndOptions(
      originalText,
      await normalize_format_options_default(originalOptions)
    );
    if (options.rangeStart >= options.rangeEnd && text !== "" || options.requirePragma && !await hasPragma(text, options) || options.checkIgnorePragma && await hasIgnorePragma(text, options)) {
      return {
        formatted: originalText,
        cursorOffset: originalOptions.cursorOffset,
        comments: []
      };
    }
    let result;
    if (options.rangeStart > 0 || options.rangeEnd < text.length) {
      result = await formatRange(text, options);
    } else {
      if (!options.requirePragma && options.insertPragma && options.printer.insertPragma && !await hasPragma(text, options)) {
        text = options.printer.insertPragma(text);
      }
      result = await coreFormat(text, options);
    }
    if (hasBOM) {
      result.formatted = BOM + result.formatted;
      if (result.cursorOffset >= 0) {
        result.cursorOffset++;
      }
    }
    return result;
  }
  async function parse2(originalText, originalOptions, devOptions) {
    const { text, options } = normalizeInputAndOptions(
      originalText,
      await normalize_format_options_default(originalOptions)
    );
    const parsed = await parse_default(text, options);
    if (devOptions) {
      if (devOptions.preprocessForPrint) {
        parsed.ast = await prepareToPrint(parsed.ast, options);
      }
      if (devOptions.massage) {
        parsed.ast = massage_ast_default(parsed.ast, options);
      }
    }
    return parsed;
  }
  async function formatAst(ast, options) {
    options = await normalize_format_options_default(options);
    const doc = await printAstToDoc(ast, options);
    return printDocToString(doc, options);
  }
  async function formatDoc(doc, options) {
    const text = printDocToDebug(doc);
    const { formatted } = await formatWithCursor(text, {
      ...options,
      parser: "__js_expression"
    });
    return formatted;
  }
  async function printToDoc(originalText, options) {
    options = await normalize_format_options_default(options);
    const { ast } = await parse_default(originalText, options);
    if (options.cursorOffset >= 0) {
      options = {
        ...options,
        ...get_cursor_node_default(ast, options)
      };
    }
    return printAstToDoc(ast, options);
  }
  async function printDocToString2(doc, options) {
    return printDocToString(
      doc,
      await normalize_format_options_default(options)
    );
  }
 
  // src/document/public.js
  var public_exports = {};
  __export(public_exports, {
    builders: () => builders,
    printer: () => printer,
    utils: () => utils
  });
  var builders = {
    join,
    line,
    softline,
    hardline,
    literalline,
    group,
    conditionalGroup,
    fill,
    lineSuffix,
    lineSuffixBoundary,
    cursor,
    breakParent,
    ifBreak,
    trim,
    indent,
    indentIfBreak,
    align,
    addAlignmentToDoc,
    markAsRoot,
    dedentToRoot,
    dedent,
    hardlineWithoutBreakParent,
    literallineWithoutBreakParent,
    label,
    // TODO: Remove this in v4
    concat: (parts) => parts
  };
  var printer = { printDocToString };
  var utils = {
    willBreak,
    traverseDoc: traverse_doc_default,
    findInDoc,
    mapDoc,
    removeLines,
    stripTrailingHardline,
    replaceEndOfLine,
    canBreak
  };
 
  // src/main/version.evaluate.js
  var version_evaluate_default = "3.6.0-dev";
 
  // src/utils/public.js
  var public_exports2 = {};
  __export(public_exports2, {
    addDanglingComment: () => addDanglingComment,
    addLeadingComment: () => addLeadingComment,
    addTrailingComment: () => addTrailingComment,
    getAlignmentSize: () => get_alignment_size_default,
    getIndentSize: () => get_indent_size_default,
    getMaxContinuousCount: () => get_max_continuous_count_default,
    getNextNonSpaceNonCommentCharacter: () => get_next_non_space_non_comment_character_default,
    getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2,
    getPreferredQuote: () => get_preferred_quote_default,
    getStringWidth: () => get_string_width_default,
    hasNewline: () => has_newline_default,
    hasNewlineInRange: () => has_newline_in_range_default,
    hasSpaces: () => has_spaces_default,
    isNextLineEmpty: () => isNextLineEmpty2,
    isNextLineEmptyAfterIndex: () => is_next_line_empty_default,
    isPreviousLineEmpty: () => isPreviousLineEmpty2,
    makeString: () => make_string_default,
    skip: () => skip,
    skipEverythingButNewLine: () => skipEverythingButNewLine,
    skipInlineComment: () => skip_inline_comment_default,
    skipNewline: () => skip_newline_default,
    skipSpaces: () => skipSpaces,
    skipToLineEnd: () => skipToLineEnd,
    skipTrailingComment: () => skip_trailing_comment_default,
    skipWhitespace: () => skipWhitespace
  });
 
  // src/utils/skip-inline-comment.js
  function skipInlineComment(text, startIndex) {
    if (startIndex === false) {
      return false;
    }
    if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "*") {
      for (let i = startIndex + 2; i < text.length; ++i) {
        if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
          return i + 2;
        }
      }
    }
    return startIndex;
  }
  var skip_inline_comment_default = skipInlineComment;
 
  // src/utils/skip-trailing-comment.js
  function skipTrailingComment(text, startIndex) {
    if (startIndex === false) {
      return false;
    }
    if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "/") {
      return skipEverythingButNewLine(text, startIndex);
    }
    return startIndex;
  }
  var skip_trailing_comment_default = skipTrailingComment;
 
  // src/utils/get-next-non-space-non-comment-character-index.js
  function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) {
    let oldIdx = null;
    let nextIdx = startIndex;
    while (nextIdx !== oldIdx) {
      oldIdx = nextIdx;
      nextIdx = skipSpaces(text, nextIdx);
      nextIdx = skip_inline_comment_default(text, nextIdx);
      nextIdx = skip_trailing_comment_default(text, nextIdx);
      nextIdx = skip_newline_default(text, nextIdx);
    }
    return nextIdx;
  }
  var get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex;
 
  // src/utils/is-next-line-empty.js
  function isNextLineEmpty(text, startIndex) {
    let oldIdx = null;
    let idx = startIndex;
    while (idx !== oldIdx) {
      oldIdx = idx;
      idx = skipToLineEnd(text, idx);
      idx = skip_inline_comment_default(text, idx);
      idx = skipSpaces(text, idx);
    }
    idx = skip_trailing_comment_default(text, idx);
    idx = skip_newline_default(text, idx);
    return idx !== false && has_newline_default(text, idx);
  }
  var is_next_line_empty_default = isNextLineEmpty;
 
  // src/utils/get-indent-size.js
  function getIndentSize(value, tabWidth) {
    const lastNewlineIndex = value.lastIndexOf("\n");
    if (lastNewlineIndex === -1) {
      return 0;
    }
    return get_alignment_size_default(
      // All the leading whitespaces
      value.slice(lastNewlineIndex + 1).match(/^[\t ]*/u)[0],
      tabWidth
    );
  }
  var get_indent_size_default = getIndentSize;
 
  // node_modules/escape-string-regexp/index.js
  function escapeStringRegexp(string) {
    if (typeof string !== "string") {
      throw new TypeError("Expected a string");
    }
    return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
  }
 
  // src/utils/get-max-continuous-count.js
  function getMaxContinuousCount(text, searchString) {
    const results = text.match(
      new RegExp(`(${escapeStringRegexp(searchString)})+`, "gu")
    );
    if (results === null) {
      return 0;
    }
    return results.reduce(
      (maxCount, result) => Math.max(maxCount, result.length / searchString.length),
      0
    );
  }
  var get_max_continuous_count_default = getMaxContinuousCount;
 
  // src/utils/get-next-non-space-non-comment-character.js
  function getNextNonSpaceNonCommentCharacter(text, startIndex) {
    const index = get_next_non_space_non_comment_character_index_default(text, startIndex);
    return index === false ? "" : text.charAt(index);
  }
  var get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter;
 
  // src/utils/get-preferred-quote.js
  var SINGLE_QUOTE = "'";
  var DOUBLE_QUOTE = '"';
  function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) {
    const preferred = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE : DOUBLE_QUOTE;
    const alternate = preferred === SINGLE_QUOTE ? DOUBLE_QUOTE : SINGLE_QUOTE;
    let preferredQuoteCount = 0;
    let alternateQuoteCount = 0;
    for (const character of text) {
      if (character === preferred) {
        preferredQuoteCount++;
      } else if (character === alternate) {
        alternateQuoteCount++;
      }
    }
    return preferredQuoteCount > alternateQuoteCount ? alternate : preferred;
  }
  var get_preferred_quote_default = getPreferredQuote;
 
  // src/utils/has-newline-in-range.js
  function hasNewlineInRange(text, startIndex, endIndex) {
    for (let i = startIndex; i < endIndex; ++i) {
      if (text.charAt(i) === "\n") {
        return true;
      }
    }
    return false;
  }
  var has_newline_in_range_default = hasNewlineInRange;
 
  // src/utils/has-spaces.js
  function hasSpaces(text, startIndex, options = {}) {
    const idx = skipSpaces(
      text,
      options.backwards ? startIndex - 1 : startIndex,
      options
    );
    return idx !== startIndex;
  }
  var has_spaces_default = hasSpaces;
 
  // src/utils/make-string.js
  function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
    const otherQuote = enclosingQuote === '"' ? "'" : '"';
    const regex = /\\(.)|(["'])/gsu;
    const raw = string_replace_all_default(
      /* isOptionalObject */
      false,
      rawText,
      regex,
      (match, escaped, quote) => {
        if (escaped === otherQuote) {
          return escaped;
        }
        if (quote === enclosingQuote) {
          return "\\" + quote;
        }
        if (quote) {
          return quote;
        }
        return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped;
      }
    );
    return enclosingQuote + raw + enclosingQuote;
  }
  var make_string_default = makeString;
 
  // src/utils/public.js
  function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
    return get_next_non_space_non_comment_character_index_default(
      text,
      locEnd(node)
    );
  }
  function getNextNonSpaceNonCommentCharacterIndex2(text, startIndex) {
    return arguments.length === 2 || typeof startIndex === "number" ? get_next_non_space_non_comment_character_index_default(text, startIndex) : (
      // @ts-expect-error -- expected
      // eslint-disable-next-line prefer-rest-params
      legacyGetNextNonSpaceNonCommentCharacterIndex(...arguments)
    );
  }
  function legacyIsPreviousLineEmpty(text, node, locStart) {
    return is_previous_line_empty_default(text, locStart(node));
  }
  function isPreviousLineEmpty2(text, startIndex) {
    return arguments.length === 2 || typeof startIndex === "number" ? is_previous_line_empty_default(text, startIndex) : (
      // @ts-expect-error -- expected
      // eslint-disable-next-line prefer-rest-params
      legacyIsPreviousLineEmpty(...arguments)
    );
  }
  function legacyIsNextLineEmpty(text, node, locEnd) {
    return is_next_line_empty_default(text, locEnd(node));
  }
  function isNextLineEmpty2(text, startIndex) {
    return arguments.length === 2 || typeof startIndex === "number" ? is_next_line_empty_default(text, startIndex) : (
      // @ts-expect-error -- expected
      // eslint-disable-next-line prefer-rest-params
      legacyIsNextLineEmpty(...arguments)
    );
  }
 
  // src/standalone.js
  function withPlugins(fn, optionsArgumentIndex = 1) {
    return async (...args) => {
      const options = args[optionsArgumentIndex] ?? {};
      const plugins = options.plugins ?? [];
      args[optionsArgumentIndex] = {
        ...options,
        plugins: Array.isArray(plugins) ? plugins : Object.values(plugins)
      };
      return fn(...args);
    };
  }
  var formatWithCursor2 = withPlugins(formatWithCursor);
  async function format(text, options) {
    const { formatted } = await formatWithCursor2(text, {
      ...options,
      cursorOffset: -1
    });
    return formatted;
  }
  async function check(text, options) {
    return await format(text, options) === text;
  }
  var getSupportInfo2 = withPlugins(getSupportInfo, 0);
  var debugApis = {
    parse: withPlugins(parse2),
    formatAST: withPlugins(formatAst),
    formatDoc: withPlugins(formatDoc),
    printToDoc: withPlugins(printToDoc),
    printDocToString: withPlugins(printDocToString2)
  };
  return __toCommonJS(standalone_exports);
});