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 | 120x 120x 240x 240x 240x 240x 240x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 165x 120x 120x 120x 120x 120x 120x 120x 120x 3441x 3441x 3441x 3441x 3606x 120x 120x 120x 120x 120x 120x 120x 480x 480x 360x 360x 360x 480x 480x 480x 480x 480x 480x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 165x 165x 720x 165x 705x 705x 705x 4815x 705x 4815x 165x 165x 165x 165x 2931x 2601x 540x 540x 3441x 13023x 13023x 13023x 13023x 13023x 13023x 13023x 13023x 13023x 13023x 13023x 8877x 13023x 3606x 24330x 13023x 13023x 13023x 13023x 13023x 870x 540x 1410x 1410x 1410x 4515x 4515x 4515x 1410x 1410x 9630x 3441x 120x 120x 120x 120x 120x 120x 165x 705x 120x 165x 165x 165x 165x 165x 120x 120x 120x 165x 165x 165x 165x 690x 690x 525x 30x 30x 30x 30x 30x 30x 525x 525x 150x 525x 525x 525x 525x 525x 525x 1965x 1965x 1965x 1965x 1965x 1965x 1965x 1965x 120x 120x 120x 165x 90x 75x 15x 90x 90x 90x 90x 90x 90x 90x 90x 90x 90x 90x 90x 90x 90x 465x 315x 150x 465x 300x 300x 150x 150x 150x 150x 150x 150x 150x 60x 30x 30x 90x 90x 150x 150x 150x 150x 150x 300x 150x 150x 300x 150x 150x 300x 300x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 300x 150x 30x 30x 90x 765x 765x 150x 75x 75x 75x 120x 1965x 1965x 1965x 1965x 120x 165x 165x 165x 165x 165x 120x 1965x 1965x 1965x 120x 165x 165x 3291x 165x 165x 420x 390x 810x 810x 810x 810x 810x 1965x 1965x 120x 165x 615x 615x 615x 165x 1725x 165x 705x 705x 705x 705x 705x 705x 705x 1410x 705x 1410x 1410x 1410x 1410x 90x 150x 150x 675x 675x 675x 675x 675x 675x 150x 150x 120x 165x 165x 165x 165x 165x 165x 165x 165x 165x 165x 165x 165x 615x 615x 525x 525x 525x 525x 525x 1965x 1965x 1965x 1965x 120x 75x 165x 615x 1350x 615x 615x 1050x 375x 240x 165x 615x 1350x 525x 1350x 1350x 810x 1350x 540x 1350x 1965x 1965x 1965x 1965x 7860x 7860x 1350x 225x 285x 165x 675x 25425x 16575x 8850x 8850x 22950x 22950x 8850x 8850x 165x 165x 165x 165x 69015x 165x 11055x 7125x 3930x 3930x 120x 165x 225x 150x 150x 75x 75x 675x 675x 525x 150x 150x 2451x 2451x 2451x 120x 3291x 165x 3126x 165x 615x 615x 120x 120x 120x 120x 120x | module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ Iif(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ Eif(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ Eif(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 1); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = require("lodash/throttle"); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel.vue?vue&type=template&id=b31a94d8&lang=pug& var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _vm.$slots.default && _vm.$slots.default.length ? _c( "div", { key: _vm.$slots.default.length, staticClass: "ssr-carousel", attrs: { "data-ssrc-id": _vm.scopeId }, on: { keyup: function ($event) { if ( !$event.type.indexOf("key") && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab") ) { return null } return _vm.onTab.apply(null, arguments) }, }, }, [ _c("style", { tag: "component", domProps: { innerHTML: _vm._s(_vm.instanceStyles) }, }), _c( "div", { staticClass: "ssr-carousel-slides" }, [ _c("div", { ref: "peekValues", staticClass: "ssr-peek-values", style: _vm.peekStyles, }), _c( "div", _vm._g( { ref: "mask", staticClass: "ssr-carousel-mask", class: { pressing: _vm.pressing, disabled: _vm.disabled }, }, _vm.maskListeners ), [ _c( "ssr-carousel-track", _vm._b( { ref: "track", scopedSlots: _vm._u( [ { key: "default", fn: function () { return [_vm._t("default")] }, proxy: true, }, _vm.hasPeekClones ? { key: "clones", fn: function () { return [_vm._t("default")] }, proxy: true, } : null, ], null, true ), }, "ssr-carousel-track", { dragging: _vm.dragging, trackTranslateX: _vm.trackTranslateX, slideOrder: _vm.slideOrder, activeSlides: _vm.activeSlides, leftPeekingSlideIndex: _vm.leftPeekingSlideIndex, rightPeekingSlideIndex: _vm.rightPeekingSlideIndex, }, false ) ), ], 1 ), _vm.showArrows ? _c( "ssr-carousel-arrows", _vm._b( { on: { back: _vm.back, next: _vm.next }, scopedSlots: _vm._u( [ { key: "back", fn: function (props) { return [_vm._t("back-arrow", null, null, props)] }, }, { key: "next", fn: function (props) { return [_vm._t("next-arrow", null, null, props)] }, }, ], null, true ), }, "ssr-carousel-arrows", { index: _vm.index, pages: _vm.pages, loop: _vm.loop }, false ) ) : _vm._e(), ], 1 ), _vm.showDots ? _c( "ssr-carousel-dots", _vm._b( { on: { goto: _vm.gotoDot }, scopedSlots: _vm._u( [ { key: "dot", fn: function (props) { return [_vm._t("dot", null, null, props)] }, }, ], null, true ), }, "ssr-carousel-dots", { boundedIndex: _vm.boundedIndex, pages: _vm.pages }, false ) ) : _vm._e(), _c( "div", { staticClass: "ssr-carousel-visually-hidden", attrs: { "aria-live": "polite", "aria-atomic": "true" }, }, [_vm._v(_vm._s(_vm.currentSlideMessage))] ), ], 1 ) : _vm._e() } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./src/ssr-carousel.vue?vue&type=template&id=b31a94d8&lang=pug& // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-arrows.vue?vue&type=template&id=f7877eda&lang=pug& var ssr_carousel_arrowsvue_type_template_id_f7877eda_lang_pug_render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("div", { staticClass: "ssr-carousel-arrows" }, [ _c( "button", { staticClass: "ssr-carousel-back-button", attrs: { "aria-label": "Back", disabled: _vm.backDisabled }, on: { click: function ($event) { return _vm.$emit("back") }, }, }, [ _vm._t( "back", function () { return [_c("span", { staticClass: "ssr-carousel-back-icon" })] }, { disabled: _vm.backDisabled } ), ], 2 ), _c( "button", { staticClass: "ssr-carousel-next-button", attrs: { "aria-label": "Next", disabled: _vm.nextDisabled }, on: { click: function ($event) { return _vm.$emit("next") }, }, }, [ _vm._t( "next", function () { return [_c("span", { staticClass: "ssr-carousel-next-icon" })] }, { disabled: _vm.nextDisabled } ), ], 2 ), ]) } var ssr_carousel_arrowsvue_type_template_id_f7877eda_lang_pug_staticRenderFns = [] ssr_carousel_arrowsvue_type_template_id_f7877eda_lang_pug_render._withStripped = true // CONCATENATED MODULE: ./src/ssr-carousel-arrows.vue?vue&type=template&id=f7877eda&lang=pug& // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/coffee-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-arrows.vue?vue&type=script&lang=coffee& /* harmony default export */ var ssr_carousel_arrowsvue_type_script_lang_coffee_ = ({ props: { index: Number, pages: Number, loop: Boolean }, computed: { // Determine if button should be disabled because we're at the limits backDisabled: function () { if (!this.shouldLoop) { return this.index === 0; } }, nextDisabled: function () { if (!this.shouldLoop) { return this.index === this.pages - 1; } } } }); // CONCATENATED MODULE: ./src/ssr-carousel-arrows.vue?vue&type=script&lang=coffee& /* harmony default export */ var src_ssr_carousel_arrowsvue_type_script_lang_coffee_ = (ssr_carousel_arrowsvue_type_script_lang_coffee_); // CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src!./node_modules/stylus-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-arrows.vue?vue&type=style&index=0&lang=stylus& // extracted by mini-css-extract-plugin // CONCATENATED MODULE: ./src/ssr-carousel-arrows.vue?vue&type=style&index=0&lang=stylus& // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template Iif (functionalTemplate) { options.functional = true } // scopedId Iif (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook Iif (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else Iif (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } Iif (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } // CONCATENATED MODULE: ./src/ssr-carousel-arrows.vue /* normalize component */ var component = normalizeComponent( src_ssr_carousel_arrowsvue_type_script_lang_coffee_, ssr_carousel_arrowsvue_type_template_id_f7877eda_lang_pug_render, ssr_carousel_arrowsvue_type_template_id_f7877eda_lang_pug_staticRenderFns, false, null, null, null ) /* hot reload */ Iif (false) { var api; } component.options.__file = "src/ssr-carousel-arrows.vue" /* harmony default export */ var ssr_carousel_arrows = (component.exports); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-dots.vue?vue&type=template&id=6b089f93&lang=pug& var ssr_carousel_dotsvue_type_template_id_6b089f93_lang_pug_render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "ssr-carousel-dots" }, _vm._l(_vm.pages, function (i) { return _c( "button", { key: i, staticClass: "ssr-carousel-dot-button", attrs: { "aria-label": "Page " + i, disabled: _vm.isDisabled(i) }, on: { click: function ($event) { return _vm.$emit("goto", i - 1) }, }, }, [ _vm._t( "dot", function () { return [_c("span", { staticClass: "ssr-carousel-dot-icon" })] }, { index: i, disabled: _vm.isDisabled(i) } ), ], 2 ) }), 0 ) } var ssr_carousel_dotsvue_type_template_id_6b089f93_lang_pug_staticRenderFns = [] ssr_carousel_dotsvue_type_template_id_6b089f93_lang_pug_render._withStripped = true // CONCATENATED MODULE: ./src/ssr-carousel-dots.vue?vue&type=template&id=6b089f93&lang=pug& // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/coffee-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-dots.vue?vue&type=script&lang=coffee& /* harmony default export */ var ssr_carousel_dotsvue_type_script_lang_coffee_ = ({ props: { boundedIndex: Number, pages: Number }, methods: { // Check if dot index shuold be disabled isDisabled: function (index) { return this.boundedIndex === index - 1; } } }); // CONCATENATED MODULE: ./src/ssr-carousel-dots.vue?vue&type=script&lang=coffee& /* harmony default export */ var src_ssr_carousel_dotsvue_type_script_lang_coffee_ = (ssr_carousel_dotsvue_type_script_lang_coffee_); // CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src!./node_modules/stylus-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-dots.vue?vue&type=style&index=0&lang=stylus& // extracted by mini-css-extract-plugin // CONCATENATED MODULE: ./src/ssr-carousel-dots.vue?vue&type=style&index=0&lang=stylus& // CONCATENATED MODULE: ./src/ssr-carousel-dots.vue /* normalize component */ var ssr_carousel_dots_component = normalizeComponent( src_ssr_carousel_dotsvue_type_script_lang_coffee_, ssr_carousel_dotsvue_type_template_id_6b089f93_lang_pug_render, ssr_carousel_dotsvue_type_template_id_6b089f93_lang_pug_staticRenderFns, false, null, null, null ) /* hot reload */ Iif (false) { var ssr_carousel_dots_api; } ssr_carousel_dots_component.options.__file = "src/ssr-carousel-dots.vue" /* harmony default export */ var ssr_carousel_dots = (ssr_carousel_dots_component.exports); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/coffee-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-track.vue?vue&type=script&lang=coffee& var interactiveSelector, indexOf = [].indexOf; interactiveSelector = 'a, button, input, textarea, select'; /* harmony default export */ var ssr_carousel_trackvue_type_script_lang_coffee_ = ({ props: { dragging: Boolean, trackTranslateX: Number, slideOrder: Array, activeSlides: Array, leftPeekingSlideIndex: Number, rightPeekingSlideIndex: Number }, // Set tabindex of inactive slides on mount mounted: function () { this.denyTabindex(this.inactiveSlides); return this.denyTabindex(this.clonedSlides); }, computed: { // Get the count of non-cloned slides uniqueSlidesCount: function () { return this.slideOrder.length; }, // Get the total slides count, including clones allSlidesCount: function () { return this.getSlideComponents().length; }, // Check if there are cloned slides hasClonedSlides: function () { return this.allSlidesCount > this.uniqueSlidesCount; }, // Make an array of inactive slide indices inactiveSlides: function () { var ref; return function () { var results = []; for (var j = 0, ref = this.uniqueSlidesCount; 0 <= ref ? j < ref : j > ref; 0 <= ref ? j++ : j--) { results.push(j); } return results; }.apply(this).filter(index => { return indexOf.call(this.activeSlides, index) < 0; }); }, // An array of the cloned slides indices clonedSlides: function () { var ref, ref1; return function () { var results = []; for (var j = ref = this.uniqueSlidesCount, ref1 = this.allSlidesCount; ref <= ref1 ? j < ref1 : j > ref1; ref <= ref1 ? j++ : j--) { results.push(j); } return results; }.apply(this); }, // Styles that are used to position the track styles: function () { if (this.trackTranslateX) { return { transform: `translateX(${this.trackTranslateX}px)` }; } } }, // Update the tabindex of interactive elements when slides change watch: { activeSlides: function () { this.allowTabindex(this.activeSlides); return this.denyTabindex(this.inactiveSlides); } }, methods: { // Make the slides to render into the track makeSlides: function () { return this.getSlideComponents().map((vnode, index) => { var cssClass, isPeekingClone, peekingIndex, slideCount; vnode = this.makeReactiveVnode(vnode); // This is a peeking clone if it's index is greater than the slide count slideCount = this.uniqueSlidesCount; isPeekingClone = index >= slideCount; peekingIndex = index - slideCount; // Add the slide class using staticClass since it isn't reactive to data cssClass = 'ssr-carousel-slide'; Iif (vnode.data.staticClass) { vnode.data.staticClass += ` ${cssClass}`; } else { vnode.data.staticClass = cssClass; } // Order the slide, like for looping Eif (!isPeekingClone) { vnode.data.style.order = this.slideOrder[index] || 0; } else { // Or put at the beginning / end if peeking vnode.data.style.order = function () { switch (false) { case peekingIndex !== this.leftPeekingSlideIndex: return '-1'; case peekingIndex !== this.rightPeekingSlideIndex: return this.slideOrder.length; } }.call(this); } // Hide cloned slides that aren't involved in peeking Iif (isPeekingClone && peekingIndex !== this.leftPeekingSlideIndex && peekingIndex !== this.rightPeekingSlideIndex) { vnode.data.style.display = 'none'; } // Make peeking clones and slides not in viewport as aria-hidden if (isPeekingClone || indexOf.call(this.activeSlides, index) < 0) { vnode.data.attrs['aria-hidden'] = 'true'; } // Return modified vnode return vnode; }); }, // Get the list of non-text slides, including peeking clones. This doesn't // work as a computed function getSlideComponents: function () { return [...(this.$slots.default || []), ...(this.$slots.clones || [])].filter(function (vnode) { return !vnode.text; }); }, // Makes a clone of the vnode properties we'll be updating so the changes // get rendered. Based on: // https://github.com/vuejs/vue/issues/6052#issuecomment-313705168 makeReactiveVnode: function (vnode) { var newVnode; // Make the new vnode and data newVnode = { ...vnode }; newVnode.data = { ...vnode.data }; // Clone style property. String styles will be on staticStyle so we can // ignore them. newVnode.data.style = { ...vnode.data.style }; // Clone attrs property newVnode.data.attrs = { ...vnode.data.attrs }; // Return the clone return newVnode; }, // Prevent tabbing to interactive elements in slides with the passed in // index values denyTabindex: function (indices) { return this.setTabindex(indices, -1); }, // Allow tabindex on interactive elements in slides with the passed in // index values allowTabindex: function (indices) { return this.setTabindex(indices, 0); }, // Set tabindex value on interactive elements in slides setTabindex: function (slideIndices, tabindexValue) { var el, j, len, ref, results; ref = this.getSlideElementsByIndices(slideIndices); results = []; for (j = 0, len = ref.length; j < len; j++) { el = ref[j]; // Set tabindex value on the slide, like in the case that the slide is // an <a> Iif (el.matches(interactiveSelector)) { el.tabIndex = tabindexValue; } // Set tabindex values on all interactive children results.push(el.querySelectorAll(interactiveSelector).forEach(function (el) { return el.tabIndex = tabindexValue; })); } return results; }, // Get the slide elements that match the array of indices getSlideElementsByIndices: function (slideIndices) { return Array.from(this.$el.children).filter(function (el, i) { return indexOf.call(slideIndices, i) >= 0; }); } }, // Render the track and slotted slides render: function (create) { return create('div', { class: ['ssr-carousel-track', { dragging: this.dragging }], style: this.styles }, this.makeSlides()); } }); // CONCATENATED MODULE: ./src/ssr-carousel-track.vue?vue&type=script&lang=coffee& /* harmony default export */ var src_ssr_carousel_trackvue_type_script_lang_coffee_ = (ssr_carousel_trackvue_type_script_lang_coffee_); // CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src!./node_modules/stylus-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel-track.vue?vue&type=style&index=0&lang=stylus& // extracted by mini-css-extract-plugin // CONCATENATED MODULE: ./src/ssr-carousel-track.vue?vue&type=style&index=0&lang=stylus& // CONCATENATED MODULE: ./src/ssr-carousel-track.vue var ssr_carousel_track_render, ssr_carousel_track_staticRenderFns /* normalize component */ var ssr_carousel_track_component = normalizeComponent( src_ssr_carousel_trackvue_type_script_lang_coffee_, ssr_carousel_track_render, ssr_carousel_track_staticRenderFns, false, null, null, null ) /* hot reload */ Iif (false) { var ssr_carousel_track_api; } ssr_carousel_track_component.options.__file = "src/ssr-carousel-track.vue" /* harmony default export */ var ssr_carousel_track = (ssr_carousel_track_component.exports); // CONCATENATED MODULE: ./src/concerns/accessibility.coffee /* Code related to supporting keyboard interaction and screen readers */ /* harmony default export */ var accessibility_coffee = ({ // Store whether the user appears to be using keyboard to navigate data: function () { return { usingKeyboard: false }; }, computed: { // Make the current slide message // https://www.w3.org/WAI/tutorials/carousels/functionality/#announce-the-current-item currentSlideMessage: function () { return `Item ${this.boundedIndex + 1} of ${this.pages}`; } }, watch: { // When switching to keyboard navigation, I could never reproduce a scenario // where the focused elements wasn't the first slide, so I'm resetting the // active page to the first slide usingKeyboard: function () { if (this.usingKeyboard) { return this.goto(0); } } }, methods: { // Once a user uses tab on the carousel, mark them as using their keyboard. // This is cleared by the onPointerDown method. onTab: function () { return this.usingKeyboard = true; } } }); // CONCATENATED MODULE: ./src/concerns/autoplay.coffee /* Code related to auotplay features of the carousel */ /* harmony default export */ var autoplay_coffee = ({ props: { // A delay provided in seconds for the autoplay. 0 is disabled autoplayDelay: { type: Number, default: 0 }, // Should we pause on hover pauseOnFocus: { type: Boolean, default: true } }, // Start autolaying on mount mounted: function () { return this.autoplayStart(); }, beforeDestroy: function () { return this.autoplayStop(); }, computed: { // Conditions that result in pausing autoplay autoplayPaused: function () { switch (false) { // Always pause when using keyboard navigation case !this.usingKeyboard: return true; // Stop animation if window is hidden or if carousel is focused case !this.pauseOnFocus: return this.windowHidden || this.isFocused; } } }, watch: { // Respond to conditions that may automatically pause autoplaying autoplayPaused: function (paused) { if (paused) { return this.autoplayStop(); } else { return this.autoplayStart(); } } }, methods: { autoplayStart: function () { // Require a delay amount Eif (!this.autoplayDelay) { return; } // Don't loop if we only have one page if (!this.pages) { return; } // Start autoplaying return this.autoPlayInterval = setInterval(() => { if (!this.autoplayPaused) { return this.autoplayNext(); } }, this.autoplayDelay * 1000); }, autoplayStop: function () { return clearInterval(this.autoPlayInterval); }, // Advance to the next slide autoplayNext: function () { if (this.shouldLoop || this.index < this.pages - 1) { return this.next(); } else { return this.goto(0); // Reset because loop wasn't enabled } } } }); // EXTERNAL MODULE: external "lodash/throttle" var throttle_ = __webpack_require__(0); var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_); // CONCATENATED MODULE: ./src/concerns/dimensions.coffee /* Code related to measuring the size of the carousel after mounting */ /* harmony default export */ var dimensions_coffee = ({ data: function () { return { viewportWidth: null, // Width of the viewport, for media query calculation carouselWidth: null, // Width of a page of the carousel gutterWidth: 0 // Computed width of gutters, since they support css vars }; }, // Add resize listening mounted: function () { this.onResize(); this.onResizeThrottled = throttle_default()(this.onResize, 200); return window.addEventListener('resize', this.onResizeThrottled); }, // Cleanup listeners beforeDestroy: function () { return window.removeEventListener('resize', this.onResizeThrottled); }, computed: { // The width of a page of slides, which may be less than the carouselWidth // if there is peeking. This includes the affect of gutters. pageWidth: function () { return this.carouselWidth - this.combinedPeek; }, // Calculate the width of a slide based on client side measured pageWidth // rather than measuring it explicitly in the DOM. This value includes the // gutter. slideWidth: function () { return this.pageWidth / this.currentSlidesPerPage; }, // Calculate the width of the whole track from the slideWidth. trackWidth: function () { return this.slideWidth * this.slidesCount; }, // Figure out the width of the last page, which may not have enough slides // to fill it. lastPageWidth: function () { var slidesOnLastPage, slidesPerPage, width; // Determine how many slides are on the final page of pagination. If the // remainder was 0, that means the page is flush with slides, so swap // the 0 for the max amount. slidesPerPage = this.currentSlidesPerPage; slidesOnLastPage = this.slidesCount % slidesPerPage; Eif (slidesOnLastPage === 0) { slidesOnLastPage = slidesPerPage; } // Turn the slide count into a width value width = slidesOnLastPage * this.slideWidth; return width; }, // The ending x value, only used when not looping. The peeking values in // here result in the final page using the left peeking value and the // actualy peeking appearing to apply to the left. The +1 is to fix subpixel // rounding issues. endX: function () { Iif (this.disabled) { return 0; } else { return this.pageWidth - this.trackWidth - this.peekLeftPx + this.peekRightPx + 1; } }, // Check if the drag is currently out bounds isOutOfBounds: function () { return this.currentX > 0 || this.currentX < this.endX; } }, methods: { // Measure the component width for various calculations. Using // getBoundingClientRect so we can get fractional values. We also need // the width of the gutter since that's effectively part of the page. onResize: function () { var firstSlide, ref; Iif (((ref = this.$el) != null ? ref.nodeType : void 0) !== Node.ELEMENT_NODE) { return; } Iif (!(firstSlide = this.$refs.track.$el.firstElementChild)) { return; } this.gutterWidth = parseInt(getComputedStyle(firstSlide).marginRight); this.carouselWidth = this.$el.getBoundingClientRect().width + this.gutterWidth; this.viewportWidth = window.innerWidth; return this.capturePeekingMeasurements(); }, // Make the width style that gives a slide it's width given // slidesPerPage. Reduce this width by the gutter if present makeBreakpointSlideWidthStyle: function (breakpoint) { return `${this.scopeSelector} .ssr-carousel-slide { width: ${this.makeSlideWidthCalc(breakpoint)}; }`; }, // Build the calc string which makes a percentage width for a slide and // reduces it by combined peeking and gutter influence. The computed // style this produces should have an equal value to the `slideWidth` // computed property which is client side JS dependent. makeSlideWidthCalc: function (breakpoint) { var gutter, isDisabled, peekLeft, peekRight, slidesPerPage; isDisabled = this.isDisabledAtBreakpoint(breakpoint); slidesPerPage = this.getResponsiveValue('slidesPerPage', breakpoint); gutter = this.getResponsiveValue('gutter', breakpoint); // A common use case when not looping is to have a larger peek on just the // right. But when disabled, this looks strange. So this balances out // the peeking in the disbaled state. peekLeft = this.getResponsiveValue('peekLeft', breakpoint); Iif (this.matchPeekWhenDisabled && isDisabled) { peekRight = peekLeft; } else { peekRight = this.getResponsiveValue('peekRight', breakpoint); } // Render the styles return `calc( ${100 / slidesPerPage}% - (${this.autoUnit(peekLeft)} + ${this.autoUnit(peekRight)}) / ${slidesPerPage} - (${this.autoUnit(gutter)} * ${slidesPerPage - 1}) / ${slidesPerPage} )`; } } }); // CONCATENATED MODULE: ./src/concerns/dragging.coffee /* Code related to handling dragging of the track */ var notPassive, passive; passive = { passive: true }; notPassive = { passive: false }; /* harmony default export */ var dragging_coffee = ({ props: { // Boundary drag dampening modifier. Increase to allow greater travel outside // the boundaries. boundaryDampening: { type: Number, default: 0.6 }, // The percentage of a pageWidth that was dragged before we advance to // another page on slide dragAdvanceRatio: { type: Number, default: .33 }, // The ratio of X:Y mouse travel. Decrease this number to allow for greater // y dragging before the drag is cancelled. verticalDragTreshold: { type: Number, default: 1 } }, data: function () { return { pressing: false, // The user pressing pointer down dragging: false, // The user has translated while pointer was down isTouchDrag: false, // Is the browser firing touch events startPointer: null, // Where was the mouse when the drag started lastPointer: null, // Where was the mouse on the last move event dragVelocity: null, // The px/tick while dragging, negative is rightward dragDirectionRatio: null // The ratio of horizontal vs vertical dragging }; }, // Cleanup listeners beforeDestroy: function () { window.removeEventListener('mousemove', this.onPointerMove, passive); window.removeEventListener('mouseup', this.onPointerUp, passive); window.removeEventListener('touchmove', this.onPointerMove, passive); window.removeEventListener('touchend', this.onPointerUp, passive); return window.removeEventListener('touchmove', this.onWinMove, notPassive); }, computed: { // The current slide or page index. It rounds differently depending on the // direction of the velocity. So that it eases to a stop in the direction // the user was dragging. dragIndex: function () { switch (false) { // If there is very little velocity, go to the closet page case !(Math.abs(this.dragVelocity) <= 2): return Math.round(this.fractionalIndex); // User was moving forward case !(this.dragVelocity < 0): return Math.ceil(this.fractionalIndex); default: // User was moving backward return Math.floor(this.fractionalIndex); } }, // Determine the current index given the currentX as a fraction. For // instance, when dragging forward, it will be like 0.1 and when you've // dragged almost a full page, forward it would be 0.9. This got // complicated because the final page may not have a full compliment of // slides like if we have 2 per page and 3 slides. When you have tweened // to the 2nd page, the fractionalIndex should be 2 even though you // haven't traveled the same width as it took to get from 1 to 2. fractionalIndex: function () { var distanceIntoPage, isLastPage, pageIndex, pageProgressPercent, pageWidth, remainingSlides, setIndex, slidesPerPage, widthDivisor, x; Iif (!this.trackWidth) { return 0; } // Work in positive numbers x = this.currentX * -1; // Figure out what set we're in, like if, through looping, we've gone // through all the pages multiple times. setIndex = Math.floor(x / this.trackWidth); // Figure out the index of last page of the set that has been fully // scrolled into. Not using modulo for this because I got rounding errors. widthDivisor = this.paginateBySlide ? this.slideWidth : this.pageWidth; pageIndex = Math.floor((x - setIndex * this.trackWidth) / widthDivisor); // Figure out the progress into the current page distanceIntoPage = x - setIndex * this.trackWidth - pageIndex * widthDivisor; // Determine if we're on the last page. If we're not looping, an extra // "page" of slides is treated as part of the last page because of how we // end with the slides flush with the right edge. slidesPerPage = this.currentSlidesPerPage; remainingSlides = function () { switch (false) { case !this.shouldLoop: return this.slidesCount - pageIndex * slidesPerPage; default: return this.slidesCount - (pageIndex + 1) * slidesPerPage; } }.call(this); isLastPage = remainingSlides <= slidesPerPage; // Make a percentage of travel into the page pageWidth = isLastPage ? this.lastPageWidth : widthDivisor; pageProgressPercent = distanceIntoPage / pageWidth; // Return the final value by adding all the passed index values return pageProgressPercent + setIndex * this.pages + pageIndex; }, // Determine if the user is dragging vertically isVerticalDrag: function () { if (!this.dragDirectionRatio) { return; } return this.dragDirectionRatio < this.verticalDragTreshold; }, // If we're horiztonally swiping on a touch device, prevent vertical scroll preventVerticalScroll: function () { return this.pressing && this.isTouchDrag && !this.isVerticalDrag; } }, watch: { // Watch for mouse move changes when the user starts dragging pressing: function () { var moveEvent, upEvent; // Determine the type of event [moveEvent, upEvent] = this.isTouchDrag ? ['touchmove', 'touchend'] : ['mousemove', 'mouseup']; // Pointer is down, start watching for drags if (this.pressing) { window.addEventListener(moveEvent, this.onPointerMove, passive); window.addEventListener(upEvent, this.onPointerUp, passive); window.addEventListener('contextmenu', this.onPointerUp, passive); this.dragVelocity = 0; // Reset any previous velocity this.preventContentDrag(); this.stopTweening(); } else { // Tween so the track is in bounds if it was out // The pointer is up, so tween to final position if (this.isOutOfBounds && !this.shouldLoop) { if (this.currentX >= 0) { this.goto(0); } else { this.goto(this.pages - 1); } // If user was vertically dragging, reset the index } else Iif (this.isVerticalDrag) { this.goto(this.index); } else { // Handle normal swiping this.goto(this.dragIndex); } // Cleanup vars and listeners window.removeEventListener(moveEvent, this.onPointerMove, passive); window.removeEventListener(upEvent, this.onPointerUp, passive); window.removeEventListener('contextmenu', this.onPointerUp, passive); this.dragging = false; this.startPointer = this.lastPointer = this.dragDirectionRatio = null; } // Fire events if (this.pressing) { return this.$emit('press'); } else { return this.$emit('release'); } }, // Fire events related to dragging dragging: function () { if (this.dragging) { return this.$emit('drag:start'); } else { return this.$emit('drag:end'); } }, // If the user is dragging vertically, end the drag based on the assumption // that the user is attempting to scroll the page via touch rather than // pan the carousel. isVerticalDrag: function () { Eif (!(this.isVerticalDrag && this.isTouchDrag)) { return; } return this.pressing = false; }, // Stop vertical scrolling by listening for touchmove events on the body // and cancel them. Need to explicitly set pasive because some mobile // browsers set to true by default. preventVerticalScroll: function (shouldPrevent) { if (shouldPrevent) { return window.addEventListener('touchmove', this.stopEvent, notPassive); } else { return window.removeEventListener('touchmove', this.stopEvent, notPassive); } } }, methods: { // Cancel an Event stopEvent: function (e) { return e.preventDefault(); }, // Keep track of whether user is dragging onPointerDown: function (pointerEvent) { this.isTouchDrag = typeof TouchEvent !== "undefined" && TouchEvent !== null && pointerEvent instanceof TouchEvent; this.startPointer = this.lastPointer = this.getPointerCoords(pointerEvent); this.pressing = true; return this.usingKeyboard = false; }, // Keep track of release of press onPointerUp: function () { return this.pressing = false; }, // Keep x values up to date while dragging onPointerMove: function (pointerEvent) { var pointer; Eif (!this.dragging) { // Mark the carousel as dragging, which is used to disable clicks this.dragging = true; } // Calculated how much drag has happened since the list move pointer = this.getPointerCoords(pointerEvent); this.dragVelocity = pointer.x - this.lastPointer.x; this.targetX += this.dragVelocity; this.lastPointer = pointer; // Caculate the drag direction ratio this.dragDirectionRatio = Math.abs((pointer.x - this.startPointer.x) / (pointer.y - this.startPointer.y)); // Update the track position return this.currentX = this.applyBoundaryDampening(this.targetX); }, // Helper to get the x position of either a touch or mouse event getPointerCoords: function (pointerEvent) { var ref, ref1, ref2, ref3; return { x: ((ref = pointerEvent.touches) != null ? (ref1 = ref[0]) != null ? ref1.pageX : void 0 : void 0) || pointerEvent.pageX, y: ((ref2 = pointerEvent.touches) != null ? (ref3 = ref2[0]) != null ? ref3.pageY : void 0 : void 0) || pointerEvent.pageY }; }, // Prevent dragging from exceeding the min/max edges applyBoundaryDampening: function (x) { switch (false) { case !this.shouldLoop: return x; // Don't apply dampening case !(x > 0): return Math.pow(x, this.boundaryDampening); case !(x < this.endX): return this.endX - Math.pow(this.endX - x, this.boundaryDampening); default: return this.applyXBoundaries(x); } }, // Constraint the x value to the min and max values applyXBoundaries: function (x) { Iif (this.shouldLoop) { return x; // Don't apply boundaries } else { return Math.max(this.endX, Math.min(0, x)); } }, // Prevent the anchors and images from being draggable (like via their // ghost outlines). Using this approach because the draggable html attribute // didn't work in FF. This only needs to be run once. preventContentDrag: function () { if (this.contentDragPrevented) { return; } this.$refs.track.$el.querySelectorAll('a, img').forEach(function (el) { return el.addEventListener('dragstart', function (e) { return e.preventDefault(); }); }); return this.contentDragPrevented = true; } } }); // CONCATENATED MODULE: ./src/concerns/feathering.coffee /* Code related to implementing feathering effect. */ /* harmony default export */ var feathering_coffee = ({ props: { // Shorthand for enabling boolean and setting it's width feather: { type: Boolean | String | Number, default: false } }, methods: { // Add feathering styles via breakpoint makeBreakpointFeatheringStyle: function (breakpoint) { var cssValue, feather; // Disable feathering if not enough slides Iif (this.isDisabledAtBreakpoint(breakpoint)) { return; } // Get feathering amount feather = this.getResponsiveValue('feather', breakpoint); Eif (feather === false || feather === null) { return; } if (!(feather && typeof feather !== 'boolean')) { feather = 20; } feather = this.autoUnit(feather); // Make the rule value cssValue = `linear-gradient(to right, transparent, black ${feather}, black calc(100% - ${feather}), transparent)`; // Write the style, with browser prefixes return `${this.scopeSelector} .ssr-carousel-mask { -webkit-mask-image: ${cssValue}; mask-image: ${cssValue}; }`; } } }); // CONCATENATED MODULE: ./src/concerns/focus.coffee /* Code related to focus and hover state */ /* harmony default export */ var focus_coffee = ({ // Some simple data about our component and window its mounted on data: function () { return { hovered: false, windowVisible: true }; }, computed: { isFocused: function () { return this.windowVisible && this.hovered; }, windowHidden: function () { return !this.windowVisible; } }, methods: { onEnter: function () { return this.hovered = true; }, onLeave: function () { return this.hovered = false; }, // Updates @windowVisible based on our document updateVisibility: function () { return this.windowVisible = !document.hidden; } }, // Watch the visibility updates of our document mounted: function () { Eif (!this.watchesHover) { return; } return document.addEventListener('visibilitychange', this.updateVisibility); }, beforeDestroy: function () { return document.removeEventListener('visibilitychange', this.updateVisibility); } }); // CONCATENATED MODULE: ./src/concerns/gutters.coffee /* Code related to the gutters between slides */ /* harmony default export */ var gutters_coffee = ({ props: { // The gutters between slides gutter: { type: Number | String, default: 20 } }, methods: { // Apply gutters between slides via margins makeBreakpointSlideGutterStyle: function (breakpoint) { var gutter, notLastSlide; gutter = this.getResponsiveValue('gutter', breakpoint); // If carousel would be disabled for not having enough slides, then remove // gutter from last slide. notLastSlide = this.isDisabledAtBreakpoint(breakpoint) ? ':not(:last-child)' : ''; // Render styles return `${this.scopeSelector} .ssr-carousel-slide${notLastSlide} { margin-right: ${this.autoUnit(gutter)}; }`; } } }); // CONCATENATED MODULE: ./src/concerns/looping.coffee /* Code related to looping / infinite scroll */ /* harmony default export */ var looping_coffee = ({ props: { // Add prop to enable looping loop: Boolean, // Place the first slide in the center of the layout center: Boolean }, // Store the slide order indexes data: function () { return { slideOrder: [] }; }, computed: { // Disable looping when the user is using keyboard navigation shouldLoop: function () { return this.loop && !this.usingKeyboard; }, // This represents the current (as in while scrolling / animating) left most // slide index. This is used in looping calculation so that the reordering // of slides isn't affected by paginatePerSlide setting. currentSlideIndex: function () { return Math.floor(this.currentX / this.slideWidth * -1); }, // When looping, slides get re-ordered. This value is added to the // track transform so that the slides don't feel like they were re-ordered. trackLoopOffset: function () { var offsetSlideCount; Eif (!this.shouldLoop) { return 0; } offsetSlideCount = this.currentSlideIndex; if (this.hasLeftPeekClone) { offsetSlideCount -= 1; } return offsetSlideCount * this.slideWidth; }, // Get slideIndex of the right most and left most slides indexes leftMostSlideIndex: function () { return this.slideOrder.findIndex(index => { return index === 0; }); }, rightMostSlideIndex: function () { return this.slideOrder.findIndex(index => { return index === this.slideOrder.length - 1; }); } }, watch: { // This represents the current (as in while scrolling / animating) left most // slide index. This is used in looping calculation so that the reordering // of slides isn't affected by paginatePerSlide setting. currentSlideIndex: { immediate: true, handler: function () { return this.setSlideOrder(); } }, // Also update the slide order when the slides per page changes currentSlidesPerPage: function () { return this.setSlideOrder(); } }, methods: { // Calculating via watcher to prevent unnecesary recalculations (I noticed a // bunch of calls when this was done via a computed property) setSlideOrder: function () { var count, indices, split; // Make an array as long as the slides count with incrementing values indices = [...Array(this.slidesCount).keys()]; count = indices.length; // Shift the order to applying centering effect Iif (this.center) { split = Math.floor(this.currentSlidesPerPage / 2); indices = [...indices.slice(split), ...indices.slice(0, split)]; } // Re-order while looping Iif (this.shouldLoop) { split = (count - this.currentSlideIndex) % count; indices = [...indices.slice(split), ...indices.slice(0, split)]; } // Set the new index order return this.slideOrder = indices; }, // Reorder the initial slide state using CSS because the order is dependent // on the slides per page which isn't known via JS until hydrating makeBreakpointSlideOrderStyle: function (breakpoint) { var i, rules, slidesPerPage, split; Eif (!this.center) { return; } slidesPerPage = this.getResponsiveValue('slidesPerPage', breakpoint); split = Math.floor(slidesPerPage / 2); rules = function () { var j, ref, results; results = []; for (i = j = 0, ref = this.slidesCount; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) { results.push(`${this.scopeSelector} .ssr-carousel-slide:nth-child(${i + 1}) { order: ${(i + split) % this.slidesCount}; }`); } return results; }.call(this); return rules.join(''); } } }); // CONCATENATED MODULE: ./src/concerns/pagination.coffee /* Code related to dealing with advancing between pages */ /* harmony default export */ var pagination_coffee = ({ props: { // If true, advance whole pages when navigating paginateBySlide: Boolean }, data: function () { return { index: 0, // The current page; when looping may exceed slideCount currentX: 0, // The actual left offset of the slides container targetX: 0 // Where we may be tweening the slide to }; }, computed: { // The current number of pages pages: function () { switch (false) { // When looping and paginating per slide, make a dot per slide case !(this.paginateBySlide && this.shouldLoop): return this.slidesCount; // Else, restrict pages so you the last slide is flush with right edge case !this.paginateBySlide: return this.slidesCount - this.currentSlidesPerPage + 1; default: // When not paginating by slide, the amount of pages is related to the // current number of slides shown per page. return Math.ceil(this.slidesCount / this.currentSlidesPerPage); } }, // Disable carousel-ness when there aren't enough slides disabled: function () { return this.slidesCount <= this.currentSlidesPerPage; }, // Get just the slotted slides that are components, ignoring text nodes // which may exist as a result of whitespace slides: function () { return (this.$slots.default || []).filter(function (vnode) { return !vnode.text; }); }, // Get the total number of slides slidesCount: function () { return this.slides.length; }, // Apply boundaries to the index, which will exceed them when looping boundedIndex: function () { return Math.abs(this.index) % this.pages; }, // The current incomplete page offset currentIncompletePageOffset: function () { return this.makeIncompletePageOffset(this.index); }, // Get an array of slide offsets of the slides that are 100% in the // viewport. Aka, the count will be equal the currentSlidesPerPage per page. activeSlides: function () { var ref, start; // Get the offset of the leftmost slide in the current viewport start = this.paginateBySlide ? this.boundedIndex : this.boundedIndex * this.currentSlidesPerPage; // Adjust the start if not looping and on the last page of slides and there // aren't enough slides to make a full page Eif (!this.shouldLoop) { start -= this.boundedIndex % this.currentSlidesPerPage; } return function () { var results = []; for (var i = start, ref = start + this.currentSlidesPerPage; start <= ref ? i < ref : i > ref; start <= ref ? i++ : i--) { results.push(i); } return results; }.apply(this).reduce((slides, offset) => { // When looping, use modulo to loop back around Iif (this.shouldLoop) { slides.push(offset % this.slidesCount); // Else, cap the offset to the last slide } else Eif (offset < this.slidesCount) { slides.push(offset); } // Return updated slides return slides; }, []); } }, watch: { // Emit events on index change boundedIndex: function () { return this.$emit('change', { index: this.boundedIndex }); } }, methods: { // Advance methods next: function () { return this.goto(this.index + 1); }, back: function () { return this.goto(this.index - 1); }, // The dots are ignorant of looping, so convert their bounded index to the // true index so we don't animate through a ton of pages going to the // clicked dot. gotoDot: function (dotIndex) { return this.goto(dotIndex - this.boundedIndex + this.index); }, // Go to a specific index goto: function (index) { this.index = this.applyIndexBoundaries(index); return this.tweenToIndex(this.index); }, // Tween to a specific index tweenToIndex: function (index) { var x; // Figure out the new x position x = this.paginateBySlide ? index * this.slideWidth * -1 : index * this.pageWidth * -1; // Apply adjustments to x value and persist x += this.makeIncompletePageOffset(index); this.targetX = this.applyXBoundaries(x); // Start tweening return this.startTweening(); }, // Creates a px value to represent adjustments that should be made to // account for incommplete pages of slides when looping is enabled. Like // when there is 3 slotted slides and 2 slides per page and you have looped // over to the 2nd page index of 0. The track needs to be shifted to the // left by one slideWidth in this case. makeIncompletePageOffset: function (index) { var incompleteWidth; Eif (!(this.shouldLoop && !this.paginateBySlide)) { return 0; } incompleteWidth = this.pageWidth - this.lastPageWidth; return Math.floor(index / this.pages) * incompleteWidth; }, // Apply boundaries to the index applyIndexBoundaries: function (index) { Iif (this.shouldLoop) { return index; } else { return Math.max(0, Math.min(this.pages - 1, index)); } } } }); // CONCATENATED MODULE: ./src/concerns/peeking.coffee /* Code related to allowing edge slides to peek in from the side, including empty gutter space. */ /* harmony default export */ var peeking_coffee = ({ props: { // Use gutter's as the peeking value peekGutter: Boolean, // Set both peeking values at once peek: { type: Number | String, default: function () { // Prevent subpixel rounding issues from causing a sliver of offscreen // slide from peaking in. Eif (!this.peekGutter) { return 0; } else { return `calc(${this.gutter} - 1px)`; } } }, // Distinct left/right peeking values peekLeft: { type: Number | String, default: function () { return this.peek; } }, peekRight: { type: Number | String, default: function () { return this.peek; } }, // When true, the peekLeft is used for the peekRight if the carousel is // disabled. This behavior is expecting that there may be a different // peekRight (to hint at additional slides) but when there aren't more slide // to peek in, the peek value should functional like padding. matchPeekWhenDisabled: { type: Boolean, default: true } }, data: function () { return { // Store clones of the slides used for peeking clones: [], // Store computed peek values peekLeftPx: 0, peekRightPx: 0 }; }, computed: { // Determine if clones should be created hasPeekClones: function () { return this.hasLeftPeekClone || this.hasRightPeekClone; }, hasPeekPrerequisites: function () { return this.shouldLoop && this.slidesCount > 1; }, hasLeftPeekClone: function () { return this.hasPeekPrerequisites && this.peekLeft; }, hasRightPeekClone: function () { return this.hasPeekPrerequisites && this.peekRight; }, // Figure out which slide indexes to show in the left and right peek slots leftPeekingSlideIndex: function () { Iif (this.hasLeftPeekClone) { return this.rightMostSlideIndex; } }, rightPeekingSlideIndex: function () { Iif (this.hasRightPeekClone) { return this.leftMostSlideIndex; } }, // Combine the peeking values, which is needed commonly combinedPeek: function () { return this.peekLeftPx + this.peekRightPx; }, // Make the styles object for reading computed styles peekStyles: function () { var breakpoint; breakpoint = this.currentResponsiveBreakpoint; return { left: this.autoUnit(this.getResponsiveValue('peekLeft', breakpoint)), right: this.autoUnit(this.getResponsiveValue('peekRight', breakpoint)) }; } }, methods: { // Capture measurements of peeking values capturePeekingMeasurements: function () { Iif (!this.$refs.peekValues) { return; } return this.$nextTick(function () { // Wait for getResponsiveValue on @peekStyles var styles; styles = getComputedStyle(this.$refs.peekValues); this.peekLeftPx = parseInt(styles.left); return this.peekRightPx = parseInt(styles.right); }); }, // Calculate the offset that gets added to the current position to account // for prepended slides from peeking. This replicates the JS required to // make `trackLoopOffset` using CSS only so there is now reflow when JS // hydrates. This gets overridden by the track's inline translateX style. makeBreakpointTrackTransformStyle: function (breakpoint) { var gutter, peekLeft, rule; Iif (this.isDisabledAtBreakpoint(breakpoint)) { return; } peekLeft = this.getResponsiveValue('peekLeft', breakpoint); // If no peeking slide, just add the offset rule = !this.hasLeftPeekClone ? `transform: translateX(${// Otherwise, offset by one slide width (including it's gutter) this.autoUnit(peekLeft)});` : (gutter = this.getResponsiveValue('gutter', breakpoint), `transform: translateX(calc( ${this.autoUnit(peekLeft)} - (${this.makeSlideWidthCalc(breakpoint)} + ${this.autoUnit(gutter)}) ));`); // Wrap rule in selector return `${this.scopeSelector} .ssr-carousel-track { ${rule} }`; } } }); // CONCATENATED MODULE: ./src/concerns/responsive.coffee /* Code related to changing the slides per page at different viewport widths */ /* harmony default export */ var responsive_coffee = ({ props: { // How many slides are visible at once in the viewport if no responsive // rules apply slidesPerPage: { type: Number, default: 1 }, // Provide different slides per page at different viewport widths responsive: { type: Array, default: function () { return []; } } }, computed: { // Make the css scopeId from things that can influence the styles, like the // slides count and props. scopeId: function () { return this.hashString(this.slidesCount + '|' + JSON.stringify(this.$props)); }, // Massage media queries into the responsive prop responsiveRules: function () { return this.responsive.map(breakpoint => { return { ...breakpoint, mediaQuery: this.makeMediaQuery(breakpoint), active: this.isBreakpointActive(breakpoint) }; }); }, // Get current responsive values currentSlidesPerPage: function () { return this.getResponsiveValue('slidesPerPage', this.currentResponsiveBreakpoint); }, // Get the current responsive rule by looping backwards through the // responsiveRules to return the last matching rule. currentResponsiveBreakpoint: function () { var match; if (match = [...this.responsiveRules].reverse().find(function ({ active }) { return active; })) { return match; // Return the matching rule // Defaults } else { return { slidesPerPage: this.slidesPerPage, gutter: this.gutter, peekLeft: this.peekLeft, peekRight: this.peekRight, feather: this.feather }; } }, // Make the scoping selecotr scopeSelector: function () { return `[data-ssrc-id='${this.scopeId}']`; }, // Assemble all the dynamic instance styles instanceStyles: function () { return this.makeBreakpointStyles(this.$props) + this.responsiveRules.map(breakpoint => { return `@media ${breakpoint.mediaQuery} { ${this.makeBreakpointStyles(breakpoint)} }`; }).join(' '); } }, watch: { // Fix alignment of slides while resizing pageWidth: function () { return this.tweenToIndex(this.index); }, // If resizing the browser leads to disabling, reset the slide to the first // page. Like if a user had switched to the 2nd page on mobile and then // resized to desktop disabled: function () { if (this.disabled) { return this.goto(0); } } }, methods: { // Take an item form the responsive array and make a media query from it makeMediaQuery: function (breakpoint) { var rules; rules = []; if (breakpoint.maxWidth) { rules.push(`(max-width: ${breakpoint.maxWidth}px)`); } if (breakpoint.minWidth) { rules.push(`(min-width: ${breakpoint.minWidth}px)`); } return rules.join(' and '); }, // Make the block of styles for a breakpoint makeBreakpointStyles: function (breakpoint) { return [this.makeBreakpointDisablingRules(breakpoint), this.makeBreakpointFeatheringStyle(breakpoint), this.makeBreakpointTrackTransformStyle(breakpoint), this.makeBreakpointSlideWidthStyle(breakpoint), this.makeBreakpointSlideGutterStyle(breakpoint), this.makeBreakpointSlideOrderStyle(breakpoint)].join(' '); }, // Apply disabling styles via breakpoint when there are not enough slides // for the slidesPerPage makeBreakpointDisablingRules: function (breakpoint) { var slidesPerPage; slidesPerPage = this.getResponsiveValue('slidesPerPage', breakpoint); // Disabled, center slides and hide carousel UI Iif (this.slidesCount <= slidesPerPage) { return `${this.scopeSelector} .ssr-carousel-track { justify-content: center; } ${this.scopeSelector} .ssr-carousel-arrows, ${this.scopeSelector} .ssr-carousel-dots { display: none; }`; } else { // Enabled, restore default styles return `${this.scopeSelector} .ssr-carousel-track { justify-content: start; } ${this.scopeSelector} .ssr-carousel-arrows { display: block; } ${this.scopeSelector} .ssr-carousel-dots { display: flex; }`; } }, // Check if carousel disabled at the breakpoint isDisabledAtBreakpoint: function (breakpoint) { var slidesPerPage; slidesPerPage = this.getResponsiveValue('slidesPerPage', breakpoint); return this.slidesCount <= slidesPerPage; }, // Check if a breakpoint would apply currently. Not using window.matchQuery // so I can consume via a compued property isBreakpointActive: function (breakpoint) { var val; switch (false) { case !!this.viewportWidth: return false; case !((val = breakpoint.maxWidth) && this.viewportWidth > val): return false; case !((val = breakpoint.minWidth) && this.viewportWidth < val): return false; default: return true; } }, // Find the first breakpoint with a property set getResponsiveValue: function (property, breakpoint) { var ruleMatch, val; if ((val = breakpoint[property]) != null) { // If this breakpoint has a value, use it return val; } Iif (!this.responsiveRules.length) { // If no responsive rules, use default return this[property]; } // Check responsive rules to see if any of them contain a value for the // property ruleMatch = this.responsiveRules.find(function (rule) { // Rule must contain this property Eif (!rule[property]) { return; } if (breakpoint.maxWidth && rule.minWidth && rule.minWidth < breakpoint.maxWidth) { // Match if rule's min-width is less than the target max-width return true; } if (breakpoint.maxWidth && rule.maxWidth && rule.maxWidth < breakpoint.maxWidth) { // Match if rule's max-width is less than the target max-width return true; } if (breakpoint.minWidth && rule.minWidth && rule.minWidth > breakpoint.minWidth) { // Match if rule's min-width is greater than the target min-width return true; } if (breakpoint.minWidth && rule.maxWidth && rule.minWidth > breakpoint.minWidth) { // Match if rule's max-width is greater than the target min-width return true; } }); // Return matching property or fallback to the main component prop Iif (ruleMatch) { return ruleMatch[property]; } else { return this[property]; } }, // Make a hash from a string, adapted from: // https://stackoverflow.com/a/33647870/59160 hashString: function (str) { var hash, i, len; hash = 0; i = 0; len = str.length; while (i < len) { hash = (hash << 5) - hash + str.charCodeAt(i++) << 0; } return hash.toString(36); }, // Add px unit to a value if numeric autoUnit: function (val) { if (!val) { return '0px'; } Eif (String(val).match(/^[\d\-\.]+$/)) { return `${val}px`; } else { return val; } } } }); // CONCATENATED MODULE: ./src/concerns/tweening.coffee /* Code related to tweening the position of the track */ /* harmony default export */ var tweening_coffee = ({ props: { // How quickly the carousel slides to a stop. Increase to tween to as stop // quicker. tweenDampening: { type: Number, default: 0.12 } }, data: function () { return { currentX: 0, // The actual left offset of the slides container targetX: 0, // Where we may be tweening the slide to tweening: false // If there is a current RAF based tween running }; }, // Stop any animations that are in flight beforeDestroy: function () { return window.cancelAnimationFrame(this.rafId); }, watch: { // Start RAF based tweener tweening: function () { if (this.tweening) { this.$emit('tween:start', { index: this.index }); return this.tweenToTarget(); } else { window.cancelAnimationFrame(this.rafId); return this.$emit('tween:end', { index: this.index }); } } }, methods: { // Start tweening to target location if necessary and if not already // tweening startTweening: function () { Iif (this.tweening) { return; } if (this.currentX === this.targetX) { return; } return this.tweening = true; }, // The watcher on this will kill active tweens stopTweening: function () { return this.tweening = false; }, // Tween the currentX to the targetX tweenToTarget: function () { this.currentX = this.currentX + (this.targetX - this.currentX) * this.tweenDampening; Iif (Math.abs(this.targetX - this.currentX) < 1) { // Stops tweening this.currentX = this.targetX; return this.tweening = false; } else { return this.rafId = window.requestAnimationFrame(this.tweenToTarget); } } } }); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/coffee-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel.vue?vue&type=script&lang=coffee& // Child components /* harmony default export */ var ssr_carouselvue_type_script_lang_coffee_ = ({ // Component definition name: 'SsrCarousel', // Load concerns mixins: [accessibility_coffee, autoplay_coffee, dimensions_coffee, dragging_coffee, feathering_coffee, focus_coffee, gutters_coffee, looping_coffee, pagination_coffee, responsive_coffee, peeking_coffee, // After `responsive` so prop can access `gutter` prop tweening_coffee], components: { SsrCarouselArrows: ssr_carousel_arrows, SsrCarouselDots: ssr_carousel_dots, SsrCarouselTrack: ssr_carousel_track }, props: { // UI enabling controls showArrows: Boolean, showDots: Boolean }, computed: { // Combine the different factors that come together to determine the x // transfrom of the track. We don't return a value until the carousel // width is measured since the calculation depends on that. trackTranslateX: function () { if (!(this.carouselWidth && !this.disabled)) { return; } return this.currentX + this.trackLoopOffset + this.peekLeftPx; // The value from tweening or dragging // Offset from re-ordering slides for looping // Offset slides for the left peek }, // Determine whether to create hover event bindings watchesHover: function () { return this.autoplayDelay > 0; }, // Create event bindings maskListeners: function () { Iif (this.disabled) { return {}; } return { mousedown: this.onPointerDown, touchstart: this.onPointerDown, ...(!this.watchesHover ? {} : { mouseenter: this.onEnter, mouseleave: this.onLeave }) }; } } }); // CONCATENATED MODULE: ./src/ssr-carousel.vue?vue&type=script&lang=coffee& /* harmony default export */ var src_ssr_carouselvue_type_script_lang_coffee_ = (ssr_carouselvue_type_script_lang_coffee_); // CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src!./node_modules/stylus-loader!./node_modules/vue-loader/lib??vue-loader-options!./src/ssr-carousel.vue?vue&type=style&index=0&lang=stylus& // extracted by mini-css-extract-plugin // CONCATENATED MODULE: ./src/ssr-carousel.vue?vue&type=style&index=0&lang=stylus& // CONCATENATED MODULE: ./src/ssr-carousel.vue /* normalize component */ var ssr_carousel_component = normalizeComponent( src_ssr_carouselvue_type_script_lang_coffee_, render, staticRenderFns, false, null, null, null ) /* hot reload */ Iif (false) { var ssr_carousel_api; } ssr_carousel_component.options.__file = "src/ssr-carousel.vue" /* harmony default export */ var ssr_carousel = __webpack_exports__["default"] = (ssr_carousel_component.exports); /***/ }) /******/ ]); |