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 | 7x 1x 1x 1x 1x 1x 1x 1x 1x 6x 6x 18x 6x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 5x 5x 5x 5x 5x 5x 1x 1x 8x 1x 1x 1x 13x 13x 16x 16x 1x 1x 1x 1x 7x 7x 7x 1x 1x 1x 1x 7x 1x 1x 12x 12x 12x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 7x 7x 7x 1x 1x 2x 2x 1x 1x 1x 1x 1x 1x 2x 2x 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 7x 1x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 4x 1x 1x 4x 4x 4x 4x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 1x 4x 4x 1x 1x 4x 12x 4x 6x 2x 4x 4x 4x 1x 1x 1x 1x 6x 6x 2x 2x 2x 4x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 1x 1x 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 2x 2x 2x 2x 2x 1x 1x 2x 2x 1x 2x 1x 1x 1x 1x 1x 1x 1x 1x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 1x 1x 1x 2x 2x 1x 1x 1x 2x 2x 2x 1x 1x 1x 2x 1x 1x 1x 1x 2x 2x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 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 2x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 12x 4x 4x 2x 4x 8x 10x 6x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 2x 6x 6x 6x 1x 1x 1x 24x 1x 20x 20x 20x 18x 20x 20x 20x 1x 1x 12x 12x 12x 1x 1x 1x 1x 1x 10x 1x 2x 2x 2x 2x 2x 12x 12x 12x 12x 12x 12x 12x 12x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 4x 4x 4x 6x 6x 6x 10x 1x 1x 7x 7x 1x 7x 7x 1x 14x 14x 7x 1x 7x 7x 7x 7x 1x 7x 7x 7x 7x 7x 1x 7x 7x 7x 7x 1x 1x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 5x 7x 5x 2x 7x 7x 7x 7x 7x 7x 7x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 6x 6x 6x 6x 8x 6x 8x 6x 6x 6x 6x 6x 2x 2x 2x 6x 6x 2x 1x 1x 1x 1x 1x 7x 6x 6x 6x 6x 1x | 'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var nodent = _interopDefault(require('nodent')); var inspectf = _interopDefault(require('inspect-f')); var indent = _interopDefault(require('indent')); var prettier = _interopDefault(require('prettier')); var marked = _interopDefault(require('marked')); var hljs = _interopDefault(require('highlight.js')); var Prism = _interopDefault(require('prismjs')); var vueify = require('vueify'); function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } function listCacheClear() { this.__data__ = []; this.size = 0; } function eq(value, other) { return value === other || value !== value && other !== other; } function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } var arrayProto = Array.prototype; var splice = arrayProto.splice; function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key,value]); } else { data[index][1] = value; } return this; } function ListCache(entries) { var this$1 = this; var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this$1.set(entry[0], entry[1]); } } ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; function stackClear() { this.__data__ = new ListCache(); this.size = 0; } function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } function stackGet(key) { return this.__data__.get(key); } function stackHas(key) { return this.__data__.has(key); } var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; var freeSelf = typeof self == 'object' && self && self.Object === Object && self; var root = freeGlobal || freeSelf || Function('return this')(); var Symbol$1 = root.Symbol; var objectProto$1 = Object.prototype; var hasOwnProperty$1 = objectProto$1.hasOwnProperty; var nativeObjectToString = objectProto$1.toString; var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; function getRawTag(value) { var isOwn = hasOwnProperty$1.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); Iif (unmasked) { if (isOwn) { value[symToStringTag$1] = tag; } else { delete value[symToStringTag$1]; } } return result; } var objectProto$2 = Object.prototype; var nativeObjectToString$1 = objectProto$2.toString; function objectToString(value) { return nativeObjectToString$1.call(value); } var nullTag = '[object Null]'; var undefinedTag = '[object Undefined]'; var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; function baseGetTag(value) { Iif (value == null) { return value === undefined ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } var asyncTag = '[object AsyncFunction]'; var funcTag = '[object Function]'; var genTag = '[object GeneratorFunction]'; var proxyTag = '[object Proxy]'; function isFunction(value) { Iif (!isObject(value)) { return false; } var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } var coreJsData = root['__core-js_shared__']; var maskSrcKey = (function () { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? 'Symbol(src)_1.' + uid : ''; })(); function isMasked(func) { return !(!maskSrcKey) && maskSrcKey in func; } var funcProto$1 = Function.prototype; var funcToString$1 = funcProto$1.toString; function toSource(func) { Eif (func != null) { try { return funcToString$1.call(func); } catch (e) {} try { return func + ''; } catch (e) {} } return ''; } var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto = Function.prototype; var objectProto = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty = objectProto.hasOwnProperty; var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); function baseIsNative(value) { Iif (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } function getValue(object, key) { return object == null ? undefined : object[key]; } function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } var Map = getNative(root, 'Map'); var nativeCreate = getNative(Object, 'create'); function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } var HASH_UNDEFINED = '__lodash_hash_undefined__'; var objectProto$3 = Object.prototype; var hasOwnProperty$2 = objectProto$3.hasOwnProperty; function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty$2.call(data, key) ? data[key] : undefined; } var objectProto$4 = Object.prototype; var hasOwnProperty$3 = objectProto$4.hasOwnProperty; function hashHas(key) { var data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty$3.call(data, key); } var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value; return this; } function Hash(entries) { var this$1 = this; var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this$1.set(entry[0], entry[1]); } } Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash(), 'map': new (Map || ListCache)(), 'string': new Hash() }; } function isKeyable(value) { var type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } function mapCacheGet(key) { return getMapData(this, key).get(key); } function mapCacheHas(key) { return getMapData(this, key).has(key); } function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } function MapCache(entries) { var this$1 = this; var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this$1.set(entry[0], entry[1]); } } MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; var LARGE_ARRAY_SIZE = 200; function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key,value]); this.size = ++data.size; return this; } data = (this.__data__ = new MapCache(pairs)); } data.set(key, value); this.size = data.size; return this; } function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; var HASH_UNDEFINED$2 = '__lodash_hash_undefined__'; function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED$2); return this; } function setCacheHas(value) { return this.__data__.has(value); } function SetCache(values) { var this$1 = this; var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { this$1.add(values[index]); } } SetCache.prototype.add = (SetCache.prototype.push = setCacheAdd); SetCache.prototype.has = setCacheHas; function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } function cacheHas(cache, key) { return cache.has(key); } var COMPARE_PARTIAL_FLAG$2 = 1; var COMPARE_UNORDERED_FLAG$1 = 2; function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } if (seen) { if (!arraySome(other, function (othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } var Uint8Array = root.Uint8Array; function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function (value, key) { result[++index] = [key,value]; }); return result; } function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function (value) { result[++index] = value; }); return result; } var COMPARE_PARTIAL_FLAG$3 = 1; var COMPARE_UNORDERED_FLAG$2 = 2; var boolTag = '[object Boolean]'; var dateTag = '[object Date]'; var errorTag = '[object Error]'; var mapTag = '[object Map]'; var numberTag = '[object Number]'; var regexpTag = '[object RegExp]'; var setTag = '[object Set]'; var stringTag = '[object String]'; var symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]'; var dataViewTag = '[object DataView]'; var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined; var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: return object == other + ''; case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG$2; stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } var isArray = Array.isArray; function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } function stubArray() { return []; } var objectProto$7 = Object.prototype; var propertyIsEnumerable = objectProto$7.propertyIsEnumerable; var nativeGetSymbols = Object.getOwnPropertySymbols; var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function (symbol) { return propertyIsEnumerable.call(object, symbol); }); }; function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } function isObjectLike(value) { return value != null && typeof value == 'object'; } var argsTag$1 = '[object Arguments]'; function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag$1; } var objectProto$9 = Object.prototype; var hasOwnProperty$7 = objectProto$9.hasOwnProperty; var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable; var isArguments = baseIsArguments((function () { return arguments; })()) ? baseIsArguments : function (value) { return isObjectLike(value) && hasOwnProperty$7.call(value, 'callee') && !propertyIsEnumerable$1.call(value, 'callee'); }; function stubFalse() { return false; } var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var Buffer = moduleExports ? root.Buffer : undefined; var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; var isBuffer = nativeIsBuffer || stubFalse; var MAX_SAFE_INTEGER = 9007199254740991; var reIsUint = /^(?:0|[1-9]\d*)$/; function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !(!length) && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } var MAX_SAFE_INTEGER$1 = 9007199254740991; function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1; } var argsTag$2 = '[object Arguments]'; var arrayTag$1 = '[object Array]'; var boolTag$1 = '[object Boolean]'; var dateTag$1 = '[object Date]'; var errorTag$1 = '[object Error]'; var funcTag$1 = '[object Function]'; var mapTag$1 = '[object Map]'; var numberTag$1 = '[object Number]'; var objectTag$1 = '[object Object]'; var regexpTag$1 = '[object RegExp]'; var setTag$1 = '[object Set]'; var stringTag$1 = '[object String]'; var weakMapTag = '[object WeakMap]'; var arrayBufferTag$1 = '[object ArrayBuffer]'; var dataViewTag$1 = '[object DataView]'; var float32Tag = '[object Float32Array]'; var float64Tag = '[object Float64Array]'; var int8Tag = '[object Int8Array]'; var int16Tag = '[object Int16Array]'; var int32Tag = '[object Int32Array]'; var uint8Tag = '[object Uint8Array]'; var uint8ClampedTag = '[object Uint8ClampedArray]'; var uint16Tag = '[object Uint16Array]'; var uint32Tag = '[object Uint32Array]'; var typedArrayTags = {}; typedArrayTags[float32Tag] = (typedArrayTags[float64Tag] = (typedArrayTags[int8Tag] = (typedArrayTags[int16Tag] = (typedArrayTags[int32Tag] = (typedArrayTags[uint8Tag] = (typedArrayTags[uint8ClampedTag] = (typedArrayTags[uint16Tag] = (typedArrayTags[uint32Tag] = true)))))))); typedArrayTags[argsTag$2] = (typedArrayTags[arrayTag$1] = (typedArrayTags[arrayBufferTag$1] = (typedArrayTags[boolTag$1] = (typedArrayTags[dataViewTag$1] = (typedArrayTags[dateTag$1] = (typedArrayTags[errorTag$1] = (typedArrayTags[funcTag$1] = (typedArrayTags[mapTag$1] = (typedArrayTags[numberTag$1] = (typedArrayTags[objectTag$1] = (typedArrayTags[regexpTag$1] = (typedArrayTags[setTag$1] = (typedArrayTags[stringTag$1] = (typedArrayTags[weakMapTag] = false)))))))))))))); function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !(!typedArrayTags[baseGetTag(value)]); } function baseUnary(func) { return function (value) { return func(value); }; } var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; var freeProcess = moduleExports$1 && freeGlobal.process; var nodeUtil = (function () { try { var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types; Iif (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} })(); var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; var objectProto$8 = Object.prototype; var hasOwnProperty$6 = objectProto$8.hasOwnProperty; function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || isIndex(key, length)))) { result.push(key); } } return result; } var objectProto$11 = Object.prototype; function isPrototype(value) { var Ctor = value && value.constructor, proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$11; return value === proto; } function overArg(func, transform) { return function (arg) { return func(transform(arg)); }; } var nativeKeys = overArg(Object.keys, Object); var objectProto$10 = Object.prototype; var hasOwnProperty$8 = objectProto$10.hasOwnProperty; function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty$8.call(object, key) && key != 'constructor') { result.push(key); } } return result; } function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } var COMPARE_PARTIAL_FLAG$4 = 1; var objectProto$6 = Object.prototype; var hasOwnProperty$5 = objectProto$6.hasOwnProperty; function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty$5.call(other, key))) { return false; } } var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } var DataView = getNative(root, 'DataView'); var Promise$1 = getNative(root, 'Promise'); var Set = getNative(root, 'Set'); var WeakMap = getNative(root, 'WeakMap'); var mapTag$2 = '[object Map]'; var objectTag$2 = '[object Object]'; var promiseTag = '[object Promise]'; var setTag$2 = '[object Set]'; var weakMapTag$1 = '[object WeakMap]'; var dataViewTag$2 = '[object DataView]'; var dataViewCtorString = toSource(DataView); var mapCtorString = toSource(Map); var promiseCtorString = toSource(Promise$1); var setCtorString = toSource(Set); var weakMapCtorString = toSource(WeakMap); var getTag = baseGetTag; Iif (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map && getTag(new Map()) != mapTag$2 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$2 || WeakMap && getTag(new WeakMap()) != weakMapTag$1) { getTag = function (value) { var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag$2; case mapCtorString: return mapTag$2; case promiseCtorString: return promiseTag; case setCtorString: return setTag$2; case weakMapCtorString: return weakMapTag$1; } } return result; }; } var getTag$1 = getTag; var COMPARE_PARTIAL_FLAG$1 = 1; var argsTag = '[object Arguments]'; var arrayTag = '[object Array]'; var objectTag = '[object Object]'; var objectProto$5 = Object.prototype; var hasOwnProperty$4 = objectProto$5.hasOwnProperty; function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack()); return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG$1)) { var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack()); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } var COMPARE_PARTIAL_FLAG = 1; var COMPARE_UNORDERED_FLAG = 2; function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack(); if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) { return false; } } } return true; } function isStrictComparable(value) { return value === value && !isObject(value); } function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key,value,isStrictComparable(value)]; } return result; } function matchesStrictComparable(key, srcValue) { return function (object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); }; } function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function (object) { return object === source || baseIsMatch(object, source, matchData); }; } var symbolTag$1 = '[object Symbol]'; function isSymbol(value) { return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag$1; } var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var reIsPlainProp = /^\w*$/; function isKey(value, object) { Iif (isArray(value)) { return false; } var type = typeof value; Iif (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); } var FUNC_ERROR_TEXT = 'Expected a function'; function memoize(func, resolver) { Iif (typeof func != 'function' || resolver != null && typeof resolver != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function () { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache)(); return memoized; } memoize.Cache = MapCache; var MAX_MEMOIZE_SIZE = 500; function memoizeCapped(func) { var result = memoize(func, function (key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var reEscapeChar = /\\(\\)?/g; var stringToPath = memoizeCapped(function (string) { var result = []; if (string.charCodeAt(0) === 46) { result.push(''); } string.replace(rePropName, function (match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match); }); return result; }); var INFINITY = 1 / 0; var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined; var symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined; function baseToString(value) { Eif (typeof value == 'string') { return value; } if (isArray(value)) { return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = value + ''; return result == '0' && 1 / value == -INFINITY ? '-0' : result; } function toString(value) { return value == null ? '' : baseToString(value); } function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } var INFINITY$1 = 1 / 0; function toKey(value) { Eif (typeof value == 'string' || isSymbol(value)) { return value; } var result = value + ''; return result == '0' && 1 / value == -INFINITY$1 ? '-0' : result; } function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return index && index == length ? object : undefined; } function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } function baseHasIn(object, key) { return object != null && key in Object(object); } function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !(!length) && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } var COMPARE_PARTIAL_FLAG$5 = 1; var COMPARE_UNORDERED_FLAG$3 = 2; function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function (object) { var objValue = get(object, path); return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3); }; } function identity(value) { return value; } function baseProperty(key) { return function (object) { return object == null ? undefined : object[key]; }; } function basePropertyDeep(path) { return function (object) { return baseGet(object, path); }; } function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } function baseIteratee(value) { if (typeof value == 'function') { return value; } Iif (value == null) { return identity; } Iif (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } function createBaseFor(fromRight) { return function (object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } var baseFor = createBaseFor(); function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } function createBaseEach(eachFunc, fromRight) { return function (collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while (fromRight ? index-- : ++index < length) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } var baseEach = createBaseEach(baseForOwn); function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function (value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; Iif (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } function basePropertyOf(object) { return function (key) { return object == null ? undefined : object[key]; }; } var deburredLetters = { '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', '\xdf': 'ss', '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', '\u0134': 'J', '\u0135': 'j', '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', '\u0163': 't', '\u0165': 't', '\u0167': 't', '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', '\u0174': 'W', '\u0175': 'w', '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', '\u0132': 'IJ', '\u0133': 'ij', '\u0152': 'Oe', '\u0153': 'oe', '\u0149': "'n", '\u017f': 's' }; var deburrLetter = basePropertyOf(deburredLetters); var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; var rsComboMarksRange = '\\u0300-\\u036f'; var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange = '\\u20d0-\\u20ff'; var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; var rsCombo = '[' + rsComboRange + ']'; var reComboMark = RegExp(rsCombo, 'g'); function deburr(string) { string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; function asciiWords(string) { return string.match(reAsciiWord) || []; } var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } var rsAstralRange = '\\ud800-\\udfff'; var rsComboMarksRange$1 = '\\u0300-\\u036f'; var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; var rsDingbatRange = '\\u2700-\\u27bf'; var rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff'; var rsMathOpRange = '\\xac\\xb1\\xd7\\xf7'; var rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf'; var rsPunctuationRange = '\\u2000-\\u206f'; var rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000'; var rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde'; var rsVarRange = '\\ufe0e\\ufe0f'; var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; var rsApos$1 = "['\u2019]"; var rsBreak = '[' + rsBreakRange + ']'; var rsCombo$1 = '[' + rsComboRange$1 + ']'; var rsDigits = '\\d+'; var rsDingbat = '[' + rsDingbatRange + ']'; var rsLower = '[' + rsLowerRange + ']'; var rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']'; var rsFitz = '\\ud83c[\\udffb-\\udfff]'; var rsModifier = '(?:' + rsCombo$1 + '|' + rsFitz + ')'; var rsNonAstral = '[^' + rsAstralRange + ']'; var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; var rsUpper = '[' + rsUpperRange + ']'; var rsZWJ = '\\u200d'; var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')'; var rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')'; var rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?'; var rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?'; var reOptMod = rsModifier + '?'; var rsOptVar = '[' + rsVarRange + ']?'; var rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional,rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; var rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])'; var rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])'; var rsSeq = rsOptVar + reOptMod + rsOptJoin; var rsEmoji = '(?:' + [rsDingbat, rsRegional,rsSurrPair].join('|') + ')' + rsSeq; var reUnicodeWord = RegExp([rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper,'$'].join('|') + ')',rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower,'$'].join('|') + ')',rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, rsUpper + '+' + rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join('|'), 'g'); function unicodeWords(string) { return string.match(reUnicodeWord) || []; } function words(string, pattern, guard) { string = toString(string); pattern = guard ? undefined : pattern; Eif (pattern === undefined) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } var rsApos = "['\u2019]"; var reApos = RegExp(rsApos, 'g'); function createCompounder(callback) { return function (string) { return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); }; } var kebabCase = createCompounder(function (result, word, index) { return result + (index ? '-' : '') + word.toLowerCase(); }); function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : length + start; } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : end - start >>> 0; start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return !start && end >= length ? array : baseSlice(array, start, end); } var rsAstralRange$1 = '\\ud800-\\udfff'; var rsComboMarksRange$2 = '\\u0300-\\u036f'; var reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange$2 = '\\u20d0-\\u20ff'; var rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2; var rsVarRange$1 = '\\ufe0e\\ufe0f'; var rsZWJ$1 = '\\u200d'; var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$2 + rsVarRange$1 + ']'); function hasUnicode(string) { return reHasUnicode.test(string); } function asciiToArray(string) { return string.split(''); } var rsAstralRange$2 = '\\ud800-\\udfff'; var rsComboMarksRange$3 = '\\u0300-\\u036f'; var reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange$3 = '\\u20d0-\\u20ff'; var rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3; var rsVarRange$2 = '\\ufe0e\\ufe0f'; var rsAstral = '[' + rsAstralRange$2 + ']'; var rsCombo$2 = '[' + rsComboRange$3 + ']'; var rsFitz$1 = '\\ud83c[\\udffb-\\udfff]'; var rsModifier$1 = '(?:' + rsCombo$2 + '|' + rsFitz$1 + ')'; var rsNonAstral$1 = '[^' + rsAstralRange$2 + ']'; var rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}'; var rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]'; var rsZWJ$2 = '\\u200d'; var reOptMod$1 = rsModifier$1 + '?'; var rsOptVar$1 = '[' + rsVarRange$2 + ']?'; var rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1,rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*'; var rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1; var rsSymbol = '(?:' + [rsNonAstral$1 + rsCombo$2 + '?', rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join('|') + ')'; var reUnicode = RegExp(rsFitz$1 + '(?=' + rsFitz$1 + ')|' + rsSymbol + rsSeq$1, 'g'); function unicodeToArray(string) { return string.match(reUnicode) || []; } function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } function createCaseFirst(methodName) { return function (string) { string = toString(string); var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); return chr[methodName]() + trailing; }; } var upperFirst = createCaseFirst('toUpperCase'); function capitalize(string) { return upperFirst(toString(string).toLowerCase()); } var camelCase = createCompounder(function (result, word, index) { word = word.toLowerCase(); return result + (index ? capitalize(word) : word); }); var objectCreate = Object.create; var baseCreate = (function () { function object() {} return function (proto) { Iif (!isObject(proto)) { return {}; } Eif (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object(); object.prototype = undefined; return result; }; })(); function baseLodash() {} function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !(!chainAll); this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : undefined; function isFlattenable(value) { return isArray(value) || isArguments(value) || !(!(spreadableSymbol && value && value[spreadableSymbol])); } function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; Iif (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else Eif (!isStrict) { result[result.length] = value; } } return result; } function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } var nativeMax = Math.max; function overRest(func, start, transform) { start = nativeMax(start === undefined ? func.length - 1 : start, 0); return function () { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } function constant(value) { return function () { return value; }; } var defineProperty = (function () { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} })(); var baseSetToString = !defineProperty ? identity : function (func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; var HOT_COUNT = 800; var HOT_SPAN = 16; var nativeNow = Date.now; function shortOut(func) { var count = 0, lastCalled = 0; return function () { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; Iif (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } var setToString = shortOut(baseSetToString); function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } var metaMap = WeakMap && new WeakMap(); function noop() {} var getData = !metaMap ? noop : function (func) { return metaMap.get(func); }; var realNames = {}; var objectProto$12 = Object.prototype; var hasOwnProperty$9 = objectProto$12.hasOwnProperty; function getFuncName(func) { var result = func.name + '', array = realNames[result], length = hasOwnProperty$9.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } var MAX_ARRAY_LENGTH = 4294967295; function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } var objectProto$13 = Object.prototype; var hasOwnProperty$10 = objectProto$13.hasOwnProperty; function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty$10.call(value, '__wrapped__')) { return wrapperClone(value); } } return new LodashWrapper(value); } lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !(!data) && func === data[0]; } var FUNC_ERROR_TEXT$1 = 'Expected a function'; var WRAP_CURRY_FLAG = 8; var WRAP_PARTIAL_FLAG = 32; var WRAP_ARY_FLAG = 128; var WRAP_REARG_FLAG = 256; function createFlow(fromRight) { return flatRest(function (funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; Eif (fromRight) { funcs.reverse(); } while (index--) { var func = funcs[index]; Iif (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT$1); } Iif (prereq && !wrapper && getFuncName(func) == 'wrapper') { var wrapper = new LodashWrapper([], true); } } index = wrapper ? index : length; while (++index < length) { func = funcs[index]; var funcName = getFuncName(func), data = funcName == 'wrapper' ? getData(func) : undefined; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); } else { wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); } } return function () { var this$1 = this; var args = arguments, value = args[0]; Iif (wrapper && args.length == 1 && isArray(value)) { return wrapper.plant(value).value(); } var index = 0, result = length ? funcs[index].apply(this, args) : value; while (++index < length) { result = funcs[index].call(this$1, result); } return result; }; }); } var flowRight = createFlow(true); var pascalCase = flowRight(upperFirst, camelCase); function toJSON(obj) { if (typeof obj === 'function') { var str = inspectf(2, obj); if (/^function /.test(str) === false) { str = 'function ' + str; } return str; } if (obj && typeof obj === 'object') { var arr = Object.keys(obj).map(function (key) { return ("\"" + key + "\": " + (toJSON(obj[key]))); }); return ("{" + (arr.join(',')) + "}"); } return JSON.stringify(obj); } var Module = require('module'); var gunzipSync = require('zlib').gunzipSync; var join = require('path').join; var readFileSync = require('fs').readFileSync; var filename = join(__dirname, '../assets/prepack.min.js.gz'); var content = gunzipSync(readFileSync(filename)).toString(); var code = "\n" + content + "\nmodule.exports = Prepack\n"; var mod = new Module(filename, module.parent); mod._compile(code, filename); var ref = mod.exports; var prepackSources = ref.prepackSources; function prepack(ref) { var content = ref.content; var prefix = ref.prefix; var suffix = ref.suffix; var globalName = ref.globalName; var sources = [{ filePath: '', sourceMapContents: '', fileContents: content }]; var ref$1 = prepackSources(sources); var code = ref$1.code; var str = '}).call(this);'; var start = code.lastIndexOf(str); var end = start + str.length; Iif (start === -1) { return [prefix,code,suffix].join('\n'); } return [prefix,code.slice(0, start),("}).call(" + globalName + ");"),code.slice(end, -1), suffix].join('\n'); } var doc2js = function (ref) { var name = ref.name; var script = ref.script; var style = ref.style; var componentName = kebabCase(name); var injectCSS = style && ("\nvar insert = function (css) {\n if (typeof window === 'undefined' || typeof document === 'undefined') return;\n var elem = document.createElement('style')\n elem.setAttribute('type', 'text/css')\n elem.innerHTML = css\n\n var head = document.getElementsByTagName('head')[0]\n head.appendChild(elem)\n return function () {\n head.removeChild(elem)\n }\n}\nexports.created = function () {\n var css = " + (JSON.stringify(style)) + "\n this.__clean = insert(css)\n}\nexports.destroyed = function () {\n this.__clean()\n}\n"); var varName = pascalCase(componentName); var raw = "\n" + varName + " = (function (module) {\n" + script + "\nvar exports = module.exports\nexports.name = \"" + componentName + "\"\n" + (injectCSS || '') + "\nexports.install = function (Vue) {\n Vue.component(exports.name, exports)\n}\nreturn module.exports;\n})({});\n"; return prepack({ content: raw, prefix: 'var __proxy = {};', suffix: ("var component = __proxy." + varName + ";\ntypeof exports === 'object' && typeof module !== 'undefined' && (module.exports = component);\ntypeof window !== void 0 && window.Vue && Vue.use(component);\n"), globalName: '__proxy' }); }; var doc2sfc = function (arg) { var html = arg.html; var style = arg.style; var script = arg.script; var components = arg.components; var docInfo = arg.docInfo; Iif ( docInfo === void 0 ) docInfo = {}; var stylePart = style ? ("\n<style>\n" + style + "\n</style>") : ''; var etended = prettify(("module.exports = " + (toJSON(docInfo)) + ";")); return ("<template>\n<article class=\"markdown-body\">\n" + html + "\n</article >\n</template>\n\n<script lang=\"buble\">\n" + script + "\n" + etended + "\nmodule.exports.components = {\n" + (indent(components, 2)) + "\n}\n</script>\n" + stylePart + "\n"); }; function prettify(code) { return prettier.format(code, { singleQuote: true, parser: 'babylon' }); } var reStyle = /<style(|\s*[^>]+)>([\s\S]+)<\/style>/; var reScript = /<script(|\s*[^>]+)>([\s\S]+)<\/script>/; var reTemplate = /<template(|\s*[^>]+)>([\s\S]+)<\/template>/; var extractSFC = function (code) { var styleMatch = reStyle.exec(code); var scriptMatch = reScript.exec(code); var templateMatch = reTemplate.exec(code); var style = styleMatch ? styleMatch[2] : ''; var styleAttrs = styleMatch ? styleMatch[1].trim() : ''; var script = scriptMatch ? scriptMatch[2].trim() : ''; var scriptAttrs = scriptMatch ? scriptMatch[1].trim() : ''; var template = templateMatch ? templateMatch[2].trim() : ''; var templateAttrs = templateMatch ? templateMatch[1].trim() : ''; if (template === '') { template = code.replace(reStyle, '').replace(reScript, ''); } Iif (script === '') { script = 'module.exports = {}'; } else { script = script.replace(/export\s+default/, 'module.exports ='); } return { style: style, styleAttrs: styleAttrs, script: script, scriptAttrs: scriptAttrs, template: template, templateAttrs: templateAttrs, demoOnly: templateAttrs.indexOf('demo-only') > -1 }; }; var Renderer = marked.Renderer; var getRenderer = function () { return new Renderer(); }; Renderer.prototype.heading = function (text, l) { return ("<h" + l + ">" + text + "</h" + l + ">"); }; Renderer.prototype.link = function (href, title, text) { var relative = !/^(https?:)?\/\//.test(href); var out = "<a href=\"" + href + "\""; if (relative === false) { out += " target=\"_blank\""; } Iif (title) { out += " title=\"" + title + "\""; } out += ">" + text + "</a>"; return out; }; var highlightJs = function (code, lang) { return hljs.highlight(lang, code).value; }; var prism = function (code, lang) { Iif ( lang === void 0 ) lang = 'autoit'; Iif (!Prism.languages[lang]) { try { require(("prismjs/components/prism-" + lang)); } catch (e) { lang = 'autoit'; require('prismjs/components/prism-autoit'); } } return Prism.highlight(code, Prism.languages[lang]); }; global.Prism = Prism; var highlightMap = { prism: prism, 'highlight.js': highlightJs }; var renderer = getRenderer(); var FIX_VUE = /<span class="hljs-tag"><\/</g; var FIXTURE = '<span class="hljs-tag"><span><</span>/<'; var fix = function (code) { return code.replace(FIX_VUE, FIXTURE); }; var transform = function (source, config) { var id = 0; var demos = []; renderer.code = code; var markup = marked(source, { renderer: renderer }); return { demos: demos, markup: markup }; function code(raw, language) { var highlight = config.highlight; var fn = null; Iif (typeof highlight === 'function') { fn = highlight; } else Eif (highlightMap[highlight]) { fn = highlightMap[highlight]; } else { throw new Error('Invalid highlight option!'); } var lang = language === 'vue' ? 'html' : language; var markup = fn(raw, lang); if (lang !== 'html') { return wrapHljsCode(fix(markup), lang); } var tag = "md2vuedemo" + ((id++).toString(36)); var ref = extractSFC(raw); var style = ref.style; var styleAttrs = ref.styleAttrs; var script = ref.script; var scriptAttrs = ref.scriptAttrs; var template = ref.template; var templateAttrs = ref.templateAttrs; var demoOnly = ref.demoOnly; templateAttrs = templateAttrs || 'lang="html"'; scriptAttrs = scriptAttrs || 'lang="buble"'; var vue = "<template " + templateAttrs + ">\n <div class=\"vue-demo\">\n" + (indent(template)) + "\n </div>\n</template>\n\n<script " + scriptAttrs + ">\n" + script + "\n</script>"; Eif (style !== '') { styleAttrs = styleAttrs ? (styleAttrs + " ") : ''; vue = "<style " + styleAttrs + "scoped>" + style + "</style>\n" + vue; } demos.push({ tag: tag, raw: raw, vue: vue }); var inject = config.inject; var injection = ''; var sourceCode = ''; if (!demoOnly) { Eif (typeof inject === 'function') { injection = inject(); } else if (typeof inject === 'string') { injection = inject; } sourceCode = wrapHljsCode(fix(markup), lang); } var demoApp = "<" + tag + "></" + tag + ">"; var klass = demoOnly ? 'vue-demo-block vue-demo-block-demo-only' : 'vue-demo-block'; return ("\n<div class=\"" + klass + "\">\n" + demoApp + "\n" + injection + "\n" + sourceCode + "\n</div>\n"); } }; function wrapHljsCode(code, lang) { return ("<pre v-pre class=\"lang-" + lang + "\"><code>" + code + "</code></pre>"); } var kEvent = 'style'; var StyleBundler = function StyleBundler() { this.CSSText = ''; this.onStyleReceived = this.onStyleReceived.bind(this); }; StyleBundler.prototype.onStyleReceived = function onStyleReceived (ref) { var style = ref.style; this.CSSText += '\n' + style; }; StyleBundler.prototype.reset = function reset () { this.CSSText = ''; if (this.source) { this.source.removeListener(kEvent, this.onStyleReceived); } }; StyleBundler.prototype.setSource = function setSource (source) { this.reset(); this.source = source; source.on(kEvent, this.onStyleReceived); return this; }; StyleBundler.prototype.readOnce = function readOnce (fn) { var CSSText = this.CSSText.trim(); Iif (typeof fn === 'function') { fn(CSSText); } this.reset(); return CSSText; }; StyleBundler.from = (function (source) { return new StyleBundler().setSource(source); }); vueify.compiler.applyConfig({ extractCSS: true, customCompilers: { buble: function buble(content, cb) { var ref = require('buble').transform(content); var code = ref.code; var ret = code.replace(/\n{2,}/g, '\n').replace(/^\s+/, ' ').replace(/\s+$/, ''); cb(null, ret); } } }); var queue = []; var currentTask = null; vueify.compiler.compilePromise = (function (content, filePath) { Iif ( content === void 0 ) content = ''; Iif ( filePath === void 0 ) filePath = ''; var deferred = defer(); var task = function () { var bundler = StyleBundler.from(vueify.compiler); currentTask = deferred.promise; vueify.compiler.compile(content, filePath, function (err, result) { Iif (err) { deferred.reject(err); } else { deferred.resolve({ script: result, style: bundler.readOnce() }); } process.nextTick(function () { currentTask = null; if (queue.length) { queue.shift()(); } }); }); }; if (currentTask) { queue.push(task); } else { task(); } return deferred.promise; }); function defer() { var deferred = {}; var promise = new Promise(function (resolve, reject) { deferred.resolve = resolve; deferred.reject = reject; }); deferred.promise = promise; return deferred; } nodent(); var defaults = { target: 'vue', highlight: 'highlight.js' }; var index = function (source, config) { Iif ( config === void 0 ) config = {}; return (function ($return, $error) { var name, target, extend, markup, demos, demoApps, content, script, style; config.name = config.name || config.componentName; config.extend = config.extend || config.documentInfo; config.inject = config.inject || config.customMarkups; Iif (config.componentName) { console.warn('`componentName` is deprecated, use `name` instead.'); } Iif (config.documentInfo) { console.warn('`documentInfo` is deprecated, use `extend` instead.'); } Iif (config.customMarkups) { console.warn('`customMarkups` is deprecated, use `inject` instead.'); } config = Object.assign({}, defaults, config); var assign; ((assign = config, name = assign.name, target = assign.target, extend = assign.extend)); var assign$1; ((assign$1 = transform(source, config), markup = assign$1.markup, demos = assign$1.demos)); demoApps = []; var $Loop_2_local; function $Loop_2_step() { var ref = $Loop_2_local(); var demo = ref[0]; var $iterator_demo_1 = ref[1]; return $Loop_2.bind(this, demo, $iterator_demo_1); } function $Loop_2(demo, $iterator_demo_1) { $Loop_2_local = function () { return [demo,$iterator_demo_1]; }; if (!($iterator_demo_1[1] = $iterator_demo_1[0].next()).done && ((demo = $iterator_demo_1[1].value) || true)) { var vue, tag, script, style; var assign; ((assign = demo, vue = assign.vue, tag = assign.tag)); return compileVue(vue, tag).then((function ($await_4) { var assign; ((assign = $await_4, script = assign.script, style = assign.style)); demoApps.push({ style: style, script: wrapVueCompiled({ tagName: tag, compiled: script }) }); return $Loop_2_step; }).$asyncbind(this, $error), $error); } else { return [1]; } } return Function.$asyncbind.trampoline(this, $Loop_2_exit, $Loop_2_step, $error, true)($Loop_2.bind(this, undefined, [demos[Symbol.iterator]()])); function $Loop_2_exit() { content = doc2sfc({ docInfo: extend, html: markup, style: map(demoApps, 'style').join('\n'), script: map(demoApps, 'script').join('\n'), components: map(demos, function (ref) { var tag = ref.tag; return ("'" + tag + "': " + tag); }).join(',\n') }); if (!target || target === 'vue') { return $return(content); } Iif (!name) { return $error(new Error('[Error] `name` must be specified!')); } return compileVue(content, name).then((function ($await_5) { var assign; ((assign = $await_5, script = assign.script, style = assign.style)); return $return(doc2js({ script: script, style: style, name: name })); }).$asyncbind(this, $error), $error); } }).$asyncbind(this, true); }; function compileVue(content, path) { return vueify.compiler.compilePromise(content, path); } function wrapVueCompiled(ref) { var tagName = ref.tagName; var compiled = ref.compiled; var code = tagName + " = (function (module) {\n" + compiled + "\nreturn module.exports\n})({});\n"; return prepack({ content: code, prefix: ("var " + tagName + " = {};"), suffix: (tagName + " = " + tagName + "." + tagName + ";\n"), globalName: tagName }); } module.exports = index; |