Sfoglia il codice sorgente

Merge branch 'master' of https://gogs.interscope.i234.me/mo0647/splas

# Conflicts:
#	assets/css/style.css
#	assets/css/style.css.map
#	assets/scss/style.scss
#	index.html
DESKTOP-T61HUSC\user 6 mesi fa
parent
commit
04c8c98568
100 ha cambiato i file con 32676 aggiunte e 24 eliminazioni
  1. 3 1
      assets/css/style.css
  2. 0 0
      assets/css/style.css.map
  3. BIN
      assets/img/bbl_01.png
  4. BIN
      assets/img/bbl_02.png
  5. BIN
      assets/img/bbl_03.png
  6. BIN
      assets/img/img_15.png
  7. BIN
      assets/img/wch_l.png
  8. BIN
      assets/img/wch_r.png
  9. 308 20
      assets/scss/style.scss
  10. 17 3
      index.html
  11. 1 0
      node_modules/.bin/sass
  12. 208 0
      node_modules/.package-lock.json
  13. 15 0
      node_modules/anymatch/LICENSE
  14. 87 0
      node_modules/anymatch/README.md
  15. 20 0
      node_modules/anymatch/index.d.ts
  16. 104 0
      node_modules/anymatch/index.js
  17. 48 0
      node_modules/anymatch/package.json
  18. 260 0
      node_modules/binary-extensions/binary-extensions.json
  19. 3 0
      node_modules/binary-extensions/binary-extensions.json.d.ts
  20. 14 0
      node_modules/binary-extensions/index.d.ts
  21. 1 0
      node_modules/binary-extensions/index.js
  22. 9 0
      node_modules/binary-extensions/license
  23. 38 0
      node_modules/binary-extensions/package.json
  24. 41 0
      node_modules/binary-extensions/readme.md
  25. 184 0
      node_modules/braces/CHANGELOG.md
  26. 21 0
      node_modules/braces/LICENSE
  27. 593 0
      node_modules/braces/README.md
  28. 170 0
      node_modules/braces/index.js
  29. 57 0
      node_modules/braces/lib/compile.js
  30. 57 0
      node_modules/braces/lib/constants.js
  31. 113 0
      node_modules/braces/lib/expand.js
  32. 333 0
      node_modules/braces/lib/parse.js
  33. 32 0
      node_modules/braces/lib/stringify.js
  34. 112 0
      node_modules/braces/lib/utils.js
  35. 77 0
      node_modules/braces/package.json
  36. 21 0
      node_modules/chokidar/LICENSE
  37. 308 0
      node_modules/chokidar/README.md
  38. 973 0
      node_modules/chokidar/index.js
  39. 65 0
      node_modules/chokidar/lib/constants.js
  40. 524 0
      node_modules/chokidar/lib/fsevents-handler.js
  41. 654 0
      node_modules/chokidar/lib/nodefs-handler.js
  42. 85 0
      node_modules/chokidar/package.json
  43. 188 0
      node_modules/chokidar/types/index.d.ts
  44. 21 0
      node_modules/fill-range/LICENSE
  45. 237 0
      node_modules/fill-range/README.md
  46. 249 0
      node_modules/fill-range/index.js
  47. 69 0
      node_modules/fill-range/package.json
  48. 22 0
      node_modules/fsevents/LICENSE
  49. 89 0
      node_modules/fsevents/README.md
  50. 46 0
      node_modules/fsevents/fsevents.d.ts
  51. 83 0
      node_modules/fsevents/fsevents.js
  52. BIN
      node_modules/fsevents/fsevents.node
  53. 62 0
      node_modules/fsevents/package.json
  54. 110 0
      node_modules/glob-parent/CHANGELOG.md
  55. 15 0
      node_modules/glob-parent/LICENSE
  56. 137 0
      node_modules/glob-parent/README.md
  57. 42 0
      node_modules/glob-parent/index.js
  58. 48 0
      node_modules/glob-parent/package.json
  59. 21 0
      node_modules/immutable/LICENSE
  60. 761 0
      node_modules/immutable/README.md
  61. 5908 0
      node_modules/immutable/dist/immutable.d.ts
  62. 5965 0
      node_modules/immutable/dist/immutable.es.js
  63. 6021 0
      node_modules/immutable/dist/immutable.js
  64. 2412 0
      node_modules/immutable/dist/immutable.js.flow
  65. 23 0
      node_modules/immutable/dist/immutable.min.js
  66. 39 0
      node_modules/immutable/package.json
  67. 17 0
      node_modules/is-binary-path/index.d.ts
  68. 7 0
      node_modules/is-binary-path/index.js
  69. 9 0
      node_modules/is-binary-path/license
  70. 40 0
      node_modules/is-binary-path/package.json
  71. 34 0
      node_modules/is-binary-path/readme.md
  72. 21 0
      node_modules/is-extglob/LICENSE
  73. 107 0
      node_modules/is-extglob/README.md
  74. 20 0
      node_modules/is-extglob/index.js
  75. 69 0
      node_modules/is-extglob/package.json
  76. 21 0
      node_modules/is-glob/LICENSE
  77. 206 0
      node_modules/is-glob/README.md
  78. 150 0
      node_modules/is-glob/index.js
  79. 81 0
      node_modules/is-glob/package.json
  80. 21 0
      node_modules/is-number/LICENSE
  81. 187 0
      node_modules/is-number/README.md
  82. 18 0
      node_modules/is-number/index.js
  83. 82 0
      node_modules/is-number/package.json
  84. 21 0
      node_modules/normalize-path/LICENSE
  85. 127 0
      node_modules/normalize-path/README.md
  86. 35 0
      node_modules/normalize-path/index.js
  87. 77 0
      node_modules/normalize-path/package.json
  88. 136 0
      node_modules/picomatch/CHANGELOG.md
  89. 21 0
      node_modules/picomatch/LICENSE
  90. 708 0
      node_modules/picomatch/README.md
  91. 3 0
      node_modules/picomatch/index.js
  92. 179 0
      node_modules/picomatch/lib/constants.js
  93. 1091 0
      node_modules/picomatch/lib/parse.js
  94. 342 0
      node_modules/picomatch/lib/picomatch.js
  95. 391 0
      node_modules/picomatch/lib/scan.js
  96. 64 0
      node_modules/picomatch/lib/utils.js
  97. 81 0
      node_modules/picomatch/package.json
  98. 21 0
      node_modules/readdirp/LICENSE
  99. 122 0
      node_modules/readdirp/README.md
  100. 43 0
      node_modules/readdirp/index.d.ts

File diff suppressed because it is too large
+ 3 - 1
assets/css/style.css


File diff suppressed because it is too large
+ 0 - 0
assets/css/style.css.map


BIN
assets/img/bbl_01.png


BIN
assets/img/bbl_02.png


BIN
assets/img/bbl_03.png


BIN
assets/img/img_15.png


BIN
assets/img/wch_l.png


BIN
assets/img/wch_r.png


+ 308 - 20
assets/scss/style.scss

@@ -59,14 +59,26 @@ img{
         max-width: 290px;
         width: 40%;
         margin-bottom: 80px;
+        opacity: 0;
+        transform: translateY(60px);
+        animation: fadeUpLogo 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
       }
       >h1{
         margin-bottom: 30px;
+        opacity: 0;
+        transform: translateX(-60px);
+        animation: fadeInRightH1 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
       }
       >h2{
+        opacity: 0;
+        transform: translateX(60px);
+        animation: fadeInLeftH2 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
         margin-bottom: 100px;
       }
       >h3{
+        opacity: 0;
+        transform: translateY(60px);
+        animation: fadeUpH3 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;        
         max-width: 716px;
         width: 80%;
       }
@@ -84,6 +96,10 @@ img{
         position: absolute;
         right: -200px;
         bottom: -60px;
+
+        
+
+        
       }
       .bg--wave--wrap{
         position: absolute;
@@ -96,12 +112,18 @@ img{
           .bg--wave1{
             position: absolute;
             z-index: -1;
+            opacity: 0;
+            transform: translateX(-100px);
+            animation: waveInRight 1.4s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
           }
           .bg--wave2{
             position: absolute;
             width: 316px;
             right: 60px;
             top: 103px;
+            opacity: 0;            
+            transform: translateX(-100px);
+            animation: waveInRight 1.5s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
           }
         }
       }
@@ -323,6 +345,7 @@ img{
     z-index: 10;
     max-width: 20%;
     top: 100px;
+    animation: cloudMoveLeftToRight 20s linear infinite;
   }
   .cloud--img2{
     position: absolute;
@@ -330,6 +353,7 @@ img{
     z-index: 10;
     max-width: 30%;
     top: 50px;
+    animation: cloudMoveLeftToRight 30s linear infinite;
   }
   .section--container{
     max-width: 1920px;
@@ -351,22 +375,26 @@ img{
       .bg1{
         position: absolute;
         left: 15%;
-        top: 30%
+        top: 30%;
+        animation: floating-diag-1 4s ease-in-out infinite alternate;
       }
       .bg2{
         position: absolute;
         right: 5%;
         top: 30%;
+        animation: floating-diag-2 5s ease-in-out infinite alternate;
       }
       .bg3{
         left: 7%;
         bottom: 25%;
         position: absolute;
+        animation: floating-diag-3 4.5s ease-in-out infinite alternate;
       }
       .bg4{
         position: absolute;
         bottom: 25%;
         right: 5%;
+        animation: floating-diag-4 6s ease-in-out infinite alternate;
       }
       .evt--box{
         margin-top: 50px;
@@ -795,6 +823,27 @@ img{
         margin-bottom: 90px;
         .img--wrap{
           position: relative;
+
+          .wch--l{
+            position: absolute;
+            top:0px;
+            left:0px;
+            width:139px;
+            height:122px;
+            background: url(../img/wch_l.png) no-repeat center;
+            animation: bellRing 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+            transform-origin: 50% 80%; // 종의 아래쪽을 기준으로 흔들림
+          }
+          .wch--r{
+            position: absolute;
+            top:0px;
+            right:0px;
+            width:159px;
+            height:121px;
+            background: url(../img/wch_r.png) no-repeat center;
+            animation: bellRing 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+            transform-origin: 50% 80%; // 종의 아래쪽을 기준으로 흔들림
+          }
           &::before{
             content: '';
             display: inline-block;
@@ -837,6 +886,7 @@ img{
         gap: 10px;
         margin-bottom: 140px;
         position: relative;
+<<<<<<< HEAD
         .number{
           position: relative;
           display: inline-block;
@@ -866,23 +916,144 @@ img{
           left: -300px;
           top: calc(50% - 500px);
           height: 1000px;
+=======
+
+
+        .bbl--eft01{
+>>>>>>> 68e94517d6f897c8fa42310a36d0bfaf2639941f
           position: absolute;
-          background-repeat: no-repeat;
-          background-position: center;
-          background-image: url(../img/img_bg_10.png);
+          top:50%;
+          transform: translateY(-50%);
+          left:-154px;
+          width:62px;
+          height:266px;
+          background: url(../img/bbl_01.png) no-repeat center;
+          animation: shakeX 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
         }
-        &::after{
-          content: '';
-          width: 210px;
-          right: -300px;
-          top: calc(50% - 500px);
-          height: 1000px;
+
+        .bbl--eft02{
           position: absolute;
-          background-repeat: no-repeat;
-          background-position: center;
-          transform: rotate(180deg);
-          background-image: url(../img/img_bg_10.png);
+          top:50%;
+          transform: translateY(-50%);
+          left:-226px;
+          width:106px;
+          height:427px;
+          background: url(../img/bbl_02.png) no-repeat center;
+          animation: shakeX 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+        }
+<<<<<<< HEAD
+=======
+
+        .bbl--eft03{
+          position: absolute;
+          top:50%;
+          transform: translateY(-50%);
+          left:-303px;
+          width:146px;
+          height:550px;
+          background: url(../img/bbl_03.png) no-repeat center;
+          animation: shakeX 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+        }
+
+
+        .bbl--eft04{
+          position: absolute;
+          top:50%;
+          transform: rotate(180deg) translateY(-50%);
+          transform-origin: top;
+          right:-154px;
+          width:62px;
+          height:266px;
+          background: url(../img/bbl_01.png) no-repeat center;
+          animation: shakeX2 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+        }
+
+        .bbl--eft05{
+          position: absolute;
+          top:50%;
+          transform:rotate(180deg) translateY(-50%);
+          transform-origin: top;
+          right:-226px;
+          width:106px;
+          height:427px;
+          background: url(../img/bbl_02.png) no-repeat center;
+          animation: shakeX2 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
         }
+
+        .bbl--eft06{
+          position: absolute;
+          top:50%;
+          transform:rotate(180deg) translateY(-50%);
+          transform-origin: top;
+          right:-303px;
+          width:146px;
+          height:550px;
+          background: url(../img/bbl_03.png) no-repeat center;
+          animation: shakeX2 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
+        }
+
+        // &::before{
+        //   content: '';
+        //   width: 210px;
+        //   left: -300px;
+        //   top: calc(50% - 500px);
+        //   height: 1000px;
+        //   position: absolute;
+        //   background-repeat: no-repeat;
+        //   background-position: center;
+        //   background-image: url(../img/img_bg_10.png);
+        // }
+        // &::after{
+        //   content: '';
+        //   width: 210px;
+        //   right: -300px;
+        //   top: calc(50% - 500px);
+        //   height: 1000px;
+        //   position: absolute;
+        //   background-repeat: no-repeat;
+        //   background-position: center;
+        //   transform: rotate(180deg);
+        //   background-image: url(../img/img_bg_10.png);
+        // }
+        div{
+          display: flex;
+          gap: 30px;
+          align-items: center;
+          span{
+            font-size: 120px;
+            color: #ffffff;
+            background-color: #7F1BF2;
+            width: 140px;
+            font-weight: 800;
+            height: 210px;
+            display: inline-block;
+            line-height: 2;
+            text-align: center;
+            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
+            border-radius: 30px;
+            position: relative;
+            z-index: 30;
+            perspective: 600px;
+            overflow: hidden;
+            &.flip{
+              animation: flipDown 0.5s ease-in-out;
+            }
+            &::before {
+              content: '';
+              width: 100%;
+              z-index: -1;
+              display: inline-block;
+              left: 0;
+              top: 0;
+              border-top-left-radius: 30px;
+              border-top-right-radius: 30px;
+              height: 50%;
+              background-color: #8b2ef4;
+              position: absolute;
+            }
+          }
+        }
+>>>>>>> 68e94517d6f897c8fa42310a36d0bfaf2639941f
       }
       .evt--btn{
         border-style: solid;
@@ -1290,20 +1461,20 @@ img{
     .section--container{
       .evt--1{
         .bg1{
-          top: 10%;
+          top: 10%;                   
         }
         .bg2{
           right: -320px;
-          top: 5%;
+          top: 5%;          
         }
         .bg3{
           bottom: auto;
-          top: 30%;
-        }
+          top: 30%;          
+        }        
         .bg4{
           bottom:  auto;
           right: -240px;
-          top: 35%;
+          top: 35%;          
         }
         .evt--circle{
           font-size: 18px;
@@ -1551,10 +1722,127 @@ img{
             span{
               font-size: 24px;
               padding: 15px 0;
+              
             }
           }
         }
-      }
+      }      
     }
   }
+}
+
+/*===============================================
+에니메이션
+===============================================*/
+.floating {
+  animation: floating 3s ease-in-out infinite;
+}
+@keyframes floating {
+  0%   { transform: translateY(0px); }
+  50%  { transform: translateY(-20px); }
+  100% { transform: translateY(0px); }
+}
+
+@keyframes fadeUpLogo {
+  to {
+    opacity: 1;
+    transform: translateY(0);
+  }
+}
+
+@keyframes fadeInRightH1 {
+  to {
+    opacity: 1;
+    transform: translateX(0);
+  }
+}
+
+@keyframes fadeInLeftH2 {
+  to {
+    opacity: 1;
+    transform: translateX(0);
+  }
+}
+@keyframes fadeUpH3 {
+  to {
+    opacity: 1;
+    transform: translateY(0);
+  }
+}
+
+@keyframes waveInRight {
+  0% {
+    opacity: 0;
+    transform: translateX(-100px);
+  }
+  60% {
+    opacity: 1;
+    transform: translateX(20px);
+  }
+  100% {
+    opacity: 1;
+    transform: translateX(0);
+  }
+}
+
+@keyframes cloudMoveLeftToRight {
+  0% {
+    transform: translateX(0px);
+  }
+  100% {
+    transform: translateX(100px);
+  }
+}
+
+@keyframes floating-diag-1 {
+  0%   { transform: translate(0, 0); }
+  20%  { transform: translate(-10px, 10px);}
+  40%  { transform: translate(10px, -10px);}
+  60%  { transform: translate(-10px, -10px);}
+  80%  { transform: translate(10px, 10px);}
+  100% { transform: translate(0, 0);}
+}
+@keyframes floating-diag-2 {
+  0%   { transform: translate(0, 0); }
+  25%  { transform: translate(12px, -8px);}
+  50%  { transform: translate(-12px, 8px);}
+  75%  { transform: translate(8px, 12px);}
+  100% { transform: translate(0, 0);}
+}
+@keyframes floating-diag-3 {
+  0%   { transform: translate(0, 0);}
+  30%  { transform: translate(-8px, 12px);}
+  60%  { transform: translate(8px, -12px);}
+  100% { transform: translate(0, 0);}
+}
+@keyframes floating-diag-4 {
+  0%   { transform: translate(0, 0);}
+  20%  { transform: translate(10px, 10px);}
+  40%  { transform: translate(-10px, -10px);}
+  60%  { transform: translate(10px, -10px);}
+  80%  { transform: translate(-10px, 10px);}
+  100% { transform: translate(0, 0);}
+}
+@keyframes shakeX {
+  0% { transform: translateY(-50%) translateX(0); }
+  10%, 30%, 50%, 70%, 90% { transform: translateY(-50%) translateX(-8px); }
+  20%, 40%, 60%, 80% { transform: translateY(-50%) translateX(8px); }
+  100% { transform: translateY(-50%) translateX(0); }
+}
+@keyframes shakeX2 {
+  0% { transform: rotate(180deg) translateY(-50%) translateX(0); }
+  10%, 30%, 50%, 70%, 90% { transform: rotate(180deg) translateY(-50%) translateX(-8px); }
+  20%, 40%, 60%, 80% { transform: rotate(180deg) translateY(-50%) translateX(8px); }
+  100% { transform: rotate(180deg) translateY(-50%) translateX(0); }
+}
+@keyframes bellRing {
+  0%   { transform: rotate(0deg); }
+  10%  { transform: rotate(-18deg); }
+  20%  { transform: rotate(16deg); }
+  30%  { transform: rotate(-12deg); }
+  40%  { transform: rotate(10deg); }
+  50%  { transform: rotate(-6deg); }
+  60%  { transform: rotate(4deg); }
+  70%  { transform: rotate(-2deg); }
+  80%, 100% { transform: rotate(0deg); }
 }

+ 17 - 3
index.html

@@ -29,9 +29,9 @@
             <img class="bg--wave2" src="/assets/img/bg_wave_2.png" alt="">
           </div>
         </div>
-        <div class="bg1"><img src="assets/img/img_bg_1.png" alt=""></div>
-        <div class="bg2"><img src="assets/img/img_bg_2.png" alt=""></div>
-        <div class="bg4"><img src="assets/img/img_bg_4.png" alt=""></div>
+        <div class="bg1 floating"><img src="assets/img/img_bg_1.png" alt=""></div>
+        <div class="bg2 floating"><img src="assets/img/img_bg_2.png" alt=""></div>
+        <div class="bg4 floating"><img src="assets/img/img_bg_4.png" alt=""></div>
         <div class="bubble--bg"></div>
       </div>
       <div class="video--wrap">
@@ -232,11 +232,14 @@
         <div class="count--txt">
           <p>6월 5일 (목)</p>
           <div class="img--wrap">
+            <div class="wch--l"></div>
             <img src="assets/img/img_15.png" alt="시계">
+            <div class="wch--r"></div>
           </div>
           <p>10시에 만나요 !</p>
         </div>
         <div class="count--num">
+<<<<<<< HEAD
           <span class="number" data-number="0">
             <span class="primary">
             </span>
@@ -279,6 +282,17 @@
             <span class="secondary">
             </span>
           </span>
+=======
+          <div class="bbl--eft03"></div>
+          <div class="bbl--eft02"></div>
+          <div class="bbl--eft01"></div>
+          <div class="hours"><span>0</span><span>1</span></div>
+          <div class="minutes"><span>0</span><span>0</span></div>
+          <div class="seconds"><span>0</span><span>0</span></div>
+          <div class="bbl--eft06"></div>
+          <div class="bbl--eft05"></div>
+          <div class="bbl--eft04"></div>
+>>>>>>> 68e94517d6f897c8fa42310a36d0bfaf2639941f
         </div>
         <a href="#" class="evt--btn">얼리버드 티켓 구매</a>
       </div>

+ 1 - 0
node_modules/.bin/sass

@@ -0,0 +1 @@
+../sass/sass.js

+ 208 - 0
node_modules/.package-lock.json

@@ -0,0 +1,208 @@
+{
+  "name": "test",
+  "version": "1.0.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "node_modules/anymatch": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+      "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+      "dependencies": {
+        "normalize-path": "^3.0.0",
+        "picomatch": "^2.0.4"
+      },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/binary-extensions": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+      "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/braces": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+      "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+      "dependencies": {
+        "fill-range": "^7.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/chokidar": {
+      "version": "3.5.3",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+      "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+      "funding": [
+        {
+          "type": "individual",
+          "url": "https://paulmillr.com/funding/"
+        }
+      ],
+      "dependencies": {
+        "anymatch": "~3.1.2",
+        "braces": "~3.0.2",
+        "glob-parent": "~5.1.2",
+        "is-binary-path": "~2.1.0",
+        "is-glob": "~4.0.1",
+        "normalize-path": "~3.0.0",
+        "readdirp": "~3.6.0"
+      },
+      "engines": {
+        "node": ">= 8.10.0"
+      },
+      "optionalDependencies": {
+        "fsevents": "~2.3.2"
+      }
+    },
+    "node_modules/fill-range": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+      "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+      "dependencies": {
+        "to-regex-range": "^5.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "hasInstallScript": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+      }
+    },
+    "node_modules/glob-parent": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+      "dependencies": {
+        "is-glob": "^4.0.1"
+      },
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/immutable": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz",
+      "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA=="
+    },
+    "node_modules/is-binary-path": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+      "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+      "dependencies": {
+        "binary-extensions": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-glob": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+      "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+      "dependencies": {
+        "is-extglob": "^2.1.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-number": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+      "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+      "engines": {
+        "node": ">=0.12.0"
+      }
+    },
+    "node_modules/normalize-path": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/picomatch": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+      "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
+    "node_modules/readdirp": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+      "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+      "dependencies": {
+        "picomatch": "^2.2.1"
+      },
+      "engines": {
+        "node": ">=8.10.0"
+      }
+    },
+    "node_modules/sass": {
+      "version": "1.69.7",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.7.tgz",
+      "integrity": "sha512-rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ==",
+      "dependencies": {
+        "chokidar": ">=3.0.0 <4.0.0",
+        "immutable": "^4.0.0",
+        "source-map-js": ">=0.6.2 <2.0.0"
+      },
+      "bin": {
+        "sass": "sass.js"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/to-regex-range": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+      "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+      "dependencies": {
+        "is-number": "^7.0.0"
+      },
+      "engines": {
+        "node": ">=8.0"
+      }
+    }
+  }
+}

+ 15 - 0
node_modules/anymatch/LICENSE

@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 87 - 0
node_modules/anymatch/README.md

@@ -0,0 +1,87 @@
+anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master)
+======
+Javascript module to match a string against a regular expression, glob, string,
+or function that takes the string as an argument and returns a truthy or falsy
+value. The matcher can also be an array of any or all of these. Useful for
+allowing a very flexible user-defined config to define things like file paths.
+
+__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__
+
+
+Usage
+-----
+```sh
+npm install anymatch
+```
+
+#### anymatch(matchers, testString, [returnIndex], [options])
+* __matchers__: (_Array|String|RegExp|Function_)
+String to be directly matched, string with glob patterns, regular expression
+test, function that takes the testString as an argument and returns a truthy
+value if it should be matched, or an array of any number and mix of these types.
+* __testString__: (_String|Array_) The string to test against the matchers. If
+passed as an array, the first element of the array will be used as the
+`testString` for non-function matchers, while the entire array will be applied
+as the arguments for function matchers.
+* __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options.
+    * __returnIndex__: (_Boolean [optional]_) If true, return the array index of
+the first matcher that that testString matched, or -1 if no match, instead of a
+boolean result.
+
+```js
+const anymatch = require('anymatch');
+
+const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ;
+
+anymatch(matchers, 'path/to/file.js'); // true
+anymatch(matchers, 'path/anyjs/baz.js'); // true
+anymatch(matchers, 'path/to/foo.js'); // true
+anymatch(matchers, 'path/to/bar.js'); // true
+anymatch(matchers, 'bar.js'); // false
+
+// returnIndex = true
+anymatch(matchers, 'foo.js', {returnIndex: true}); // 2
+anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1
+
+// any picomatc
+
+// using globs to match directories and their children
+anymatch('node_modules', 'node_modules'); // true
+anymatch('node_modules', 'node_modules/somelib/index.js'); // false
+anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true
+anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false
+anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true
+
+const matcher = anymatch(matchers);
+['foo.js', 'bar.js'].filter(matcher);  // [ 'foo.js' ]
+anymatch master* ❯
+
+```
+
+#### anymatch(matchers)
+You can also pass in only your matcher(s) to get a curried function that has
+already been bound to the provided matching criteria. This can be used as an
+`Array#filter` callback.
+
+```js
+var matcher = anymatch(matchers);
+
+matcher('path/to/file.js'); // true
+matcher('path/anyjs/baz.js', true); // 1
+
+['foo.js', 'bar.js'].filter(matcher); // ['foo.js']
+```
+
+Changelog
+----------
+[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases)
+
+- **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only.
+- **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information).
+- **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)
+for glob pattern matching. Issues with glob pattern matching should be
+reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).
+
+License
+-------
+[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE)

+ 20 - 0
node_modules/anymatch/index.d.ts

@@ -0,0 +1,20 @@
+type AnymatchFn = (testString: string) => boolean;
+type AnymatchPattern = string|RegExp|AnymatchFn;
+type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
+type AnymatchTester = {
+  (testString: string|any[], returnIndex: true): number;
+  (testString: string|any[]): boolean;
+}
+
+type PicomatchOptions = {dot: boolean};
+
+declare const anymatch: {
+  (matchers: AnymatchMatcher): AnymatchTester;
+  (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester;
+  (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
+  (matchers: AnymatchMatcher, testString: string|any[]): boolean;
+}
+
+export {AnymatchMatcher as Matcher}
+export {AnymatchTester as Tester}
+export default anymatch

+ 104 - 0
node_modules/anymatch/index.js

@@ -0,0 +1,104 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", { value: true });
+
+const picomatch = require('picomatch');
+const normalizePath = require('normalize-path');
+
+/**
+ * @typedef {(testString: string) => boolean} AnymatchFn
+ * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
+ * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
+ */
+const BANG = '!';
+const DEFAULT_OPTIONS = {returnIndex: false};
+const arrify = (item) => Array.isArray(item) ? item : [item];
+
+/**
+ * @param {AnymatchPattern} matcher
+ * @param {object} options
+ * @returns {AnymatchFn}
+ */
+const createPattern = (matcher, options) => {
+  if (typeof matcher === 'function') {
+    return matcher;
+  }
+  if (typeof matcher === 'string') {
+    const glob = picomatch(matcher, options);
+    return (string) => matcher === string || glob(string);
+  }
+  if (matcher instanceof RegExp) {
+    return (string) => matcher.test(string);
+  }
+  return (string) => false;
+};
+
+/**
+ * @param {Array<Function>} patterns
+ * @param {Array<Function>} negPatterns
+ * @param {String|Array} args
+ * @param {Boolean} returnIndex
+ * @returns {boolean|number}
+ */
+const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
+  const isList = Array.isArray(args);
+  const _path = isList ? args[0] : args;
+  if (!isList && typeof _path !== 'string') {
+    throw new TypeError('anymatch: second argument must be a string: got ' +
+      Object.prototype.toString.call(_path))
+  }
+  const path = normalizePath(_path, false);
+
+  for (let index = 0; index < negPatterns.length; index++) {
+    const nglob = negPatterns[index];
+    if (nglob(path)) {
+      return returnIndex ? -1 : false;
+    }
+  }
+
+  const applied = isList && [path].concat(args.slice(1));
+  for (let index = 0; index < patterns.length; index++) {
+    const pattern = patterns[index];
+    if (isList ? pattern(...applied) : pattern(path)) {
+      return returnIndex ? index : true;
+    }
+  }
+
+  return returnIndex ? -1 : false;
+};
+
+/**
+ * @param {AnymatchMatcher} matchers
+ * @param {Array|string} testString
+ * @param {object} options
+ * @returns {boolean|number|Function}
+ */
+const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
+  if (matchers == null) {
+    throw new TypeError('anymatch: specify first argument');
+  }
+  const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
+  const returnIndex = opts.returnIndex || false;
+
+  // Early cache for matchers.
+  const mtchers = arrify(matchers);
+  const negatedGlobs = mtchers
+    .filter(item => typeof item === 'string' && item.charAt(0) === BANG)
+    .map(item => item.slice(1))
+    .map(item => picomatch(item, opts));
+  const patterns = mtchers
+    .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))
+    .map(matcher => createPattern(matcher, opts));
+
+  if (testString == null) {
+    return (testString, ri = false) => {
+      const returnIndex = typeof ri === 'boolean' ? ri : false;
+      return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
+    }
+  }
+
+  return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
+};
+
+anymatch.default = anymatch;
+module.exports = anymatch;

+ 48 - 0
node_modules/anymatch/package.json

@@ -0,0 +1,48 @@
+{
+  "name": "anymatch",
+  "version": "3.1.3",
+  "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
+  "files": [
+    "index.js",
+    "index.d.ts"
+  ],
+  "dependencies": {
+    "normalize-path": "^3.0.0",
+    "picomatch": "^2.0.4"
+  },
+  "author": {
+    "name": "Elan Shanker",
+    "url": "https://github.com/es128"
+  },
+  "license": "ISC",
+  "homepage": "https://github.com/micromatch/anymatch",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/micromatch/anymatch"
+  },
+  "keywords": [
+    "match",
+    "any",
+    "string",
+    "file",
+    "fs",
+    "list",
+    "glob",
+    "regex",
+    "regexp",
+    "regular",
+    "expression",
+    "function"
+  ],
+  "scripts": {
+    "test": "nyc mocha",
+    "mocha": "mocha"
+  },
+  "devDependencies": {
+    "mocha": "^6.1.3",
+    "nyc": "^14.0.0"
+  },
+  "engines": {
+    "node": ">= 8"
+  }
+}

+ 260 - 0
node_modules/binary-extensions/binary-extensions.json

@@ -0,0 +1,260 @@
+[
+	"3dm",
+	"3ds",
+	"3g2",
+	"3gp",
+	"7z",
+	"a",
+	"aac",
+	"adp",
+	"ai",
+	"aif",
+	"aiff",
+	"alz",
+	"ape",
+	"apk",
+	"appimage",
+	"ar",
+	"arj",
+	"asf",
+	"au",
+	"avi",
+	"bak",
+	"baml",
+	"bh",
+	"bin",
+	"bk",
+	"bmp",
+	"btif",
+	"bz2",
+	"bzip2",
+	"cab",
+	"caf",
+	"cgm",
+	"class",
+	"cmx",
+	"cpio",
+	"cr2",
+	"cur",
+	"dat",
+	"dcm",
+	"deb",
+	"dex",
+	"djvu",
+	"dll",
+	"dmg",
+	"dng",
+	"doc",
+	"docm",
+	"docx",
+	"dot",
+	"dotm",
+	"dra",
+	"DS_Store",
+	"dsk",
+	"dts",
+	"dtshd",
+	"dvb",
+	"dwg",
+	"dxf",
+	"ecelp4800",
+	"ecelp7470",
+	"ecelp9600",
+	"egg",
+	"eol",
+	"eot",
+	"epub",
+	"exe",
+	"f4v",
+	"fbs",
+	"fh",
+	"fla",
+	"flac",
+	"flatpak",
+	"fli",
+	"flv",
+	"fpx",
+	"fst",
+	"fvt",
+	"g3",
+	"gh",
+	"gif",
+	"graffle",
+	"gz",
+	"gzip",
+	"h261",
+	"h263",
+	"h264",
+	"icns",
+	"ico",
+	"ief",
+	"img",
+	"ipa",
+	"iso",
+	"jar",
+	"jpeg",
+	"jpg",
+	"jpgv",
+	"jpm",
+	"jxr",
+	"key",
+	"ktx",
+	"lha",
+	"lib",
+	"lvp",
+	"lz",
+	"lzh",
+	"lzma",
+	"lzo",
+	"m3u",
+	"m4a",
+	"m4v",
+	"mar",
+	"mdi",
+	"mht",
+	"mid",
+	"midi",
+	"mj2",
+	"mka",
+	"mkv",
+	"mmr",
+	"mng",
+	"mobi",
+	"mov",
+	"movie",
+	"mp3",
+	"mp4",
+	"mp4a",
+	"mpeg",
+	"mpg",
+	"mpga",
+	"mxu",
+	"nef",
+	"npx",
+	"numbers",
+	"nupkg",
+	"o",
+	"odp",
+	"ods",
+	"odt",
+	"oga",
+	"ogg",
+	"ogv",
+	"otf",
+	"ott",
+	"pages",
+	"pbm",
+	"pcx",
+	"pdb",
+	"pdf",
+	"pea",
+	"pgm",
+	"pic",
+	"png",
+	"pnm",
+	"pot",
+	"potm",
+	"potx",
+	"ppa",
+	"ppam",
+	"ppm",
+	"pps",
+	"ppsm",
+	"ppsx",
+	"ppt",
+	"pptm",
+	"pptx",
+	"psd",
+	"pya",
+	"pyc",
+	"pyo",
+	"pyv",
+	"qt",
+	"rar",
+	"ras",
+	"raw",
+	"resources",
+	"rgb",
+	"rip",
+	"rlc",
+	"rmf",
+	"rmvb",
+	"rpm",
+	"rtf",
+	"rz",
+	"s3m",
+	"s7z",
+	"scpt",
+	"sgi",
+	"shar",
+	"snap",
+	"sil",
+	"sketch",
+	"slk",
+	"smv",
+	"snk",
+	"so",
+	"stl",
+	"suo",
+	"sub",
+	"swf",
+	"tar",
+	"tbz",
+	"tbz2",
+	"tga",
+	"tgz",
+	"thmx",
+	"tif",
+	"tiff",
+	"tlz",
+	"ttc",
+	"ttf",
+	"txz",
+	"udf",
+	"uvh",
+	"uvi",
+	"uvm",
+	"uvp",
+	"uvs",
+	"uvu",
+	"viv",
+	"vob",
+	"war",
+	"wav",
+	"wax",
+	"wbmp",
+	"wdp",
+	"weba",
+	"webm",
+	"webp",
+	"whl",
+	"wim",
+	"wm",
+	"wma",
+	"wmv",
+	"wmx",
+	"woff",
+	"woff2",
+	"wrm",
+	"wvx",
+	"xbm",
+	"xif",
+	"xla",
+	"xlam",
+	"xls",
+	"xlsb",
+	"xlsm",
+	"xlsx",
+	"xlt",
+	"xltm",
+	"xltx",
+	"xm",
+	"xmind",
+	"xpi",
+	"xpm",
+	"xwd",
+	"xz",
+	"z",
+	"zip",
+	"zipx"
+]

+ 3 - 0
node_modules/binary-extensions/binary-extensions.json.d.ts

@@ -0,0 +1,3 @@
+declare const binaryExtensionsJson: readonly string[];
+
+export = binaryExtensionsJson;

+ 14 - 0
node_modules/binary-extensions/index.d.ts

@@ -0,0 +1,14 @@
+/**
+List of binary file extensions.
+
+@example
+```
+import binaryExtensions = require('binary-extensions');
+
+console.log(binaryExtensions);
+//=> ['3ds', '3g2', …]
+```
+*/
+declare const binaryExtensions: readonly string[];
+
+export = binaryExtensions;

+ 1 - 0
node_modules/binary-extensions/index.js

@@ -0,0 +1 @@
+module.exports = require('./binary-extensions.json');

+ 9 - 0
node_modules/binary-extensions/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 38 - 0
node_modules/binary-extensions/package.json

@@ -0,0 +1,38 @@
+{
+	"name": "binary-extensions",
+	"version": "2.2.0",
+	"description": "List of binary file extensions",
+	"license": "MIT",
+	"repository": "sindresorhus/binary-extensions",
+	"author": {
+		"name": "Sindre Sorhus",
+		"email": "sindresorhus@gmail.com",
+		"url": "sindresorhus.com"
+	},
+	"engines": {
+		"node": ">=8"
+	},
+	"scripts": {
+		"test": "xo && ava && tsd"
+	},
+	"files": [
+		"index.js",
+		"index.d.ts",
+		"binary-extensions.json",
+		"binary-extensions.json.d.ts"
+	],
+	"keywords": [
+		"binary",
+		"extensions",
+		"extension",
+		"file",
+		"json",
+		"list",
+		"array"
+	],
+	"devDependencies": {
+		"ava": "^1.4.1",
+		"tsd": "^0.7.2",
+		"xo": "^0.24.0"
+	}
+}

+ 41 - 0
node_modules/binary-extensions/readme.md

@@ -0,0 +1,41 @@
+# binary-extensions
+
+> List of binary file extensions
+
+The list is just a [JSON file](binary-extensions.json) and can be used anywhere.
+
+
+## Install
+
+```
+$ npm install binary-extensions
+```
+
+
+## Usage
+
+```js
+const binaryExtensions = require('binary-extensions');
+
+console.log(binaryExtensions);
+//=> ['3ds', '3g2', …]
+```
+
+
+## Related
+
+- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file
+- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions
+
+
+---
+
+<div align="center">
+	<b>
+		<a href="https://tidelift.com/subscription/pkg/npm-binary-extensions?utm_source=npm-binary-extensions&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+	</b>
+	<br>
+	<sub>
+		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+	</sub>
+</div>

+ 184 - 0
node_modules/braces/CHANGELOG.md

@@ -0,0 +1,184 @@
+# Release history
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+<details>
+  <summary><strong>Guiding Principles</strong></summary>
+
+- Changelogs are for humans, not machines.
+- There should be an entry for every single version.
+- The same types of changes should be grouped.
+- Versions and sections should be linkable.
+- The latest version comes first.
+- The release date of each versions is displayed.
+- Mention whether you follow Semantic Versioning.
+
+</details>
+
+<details>
+  <summary><strong>Types of changes</strong></summary>
+
+Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
+
+- `Added` for new features.
+- `Changed` for changes in existing functionality.
+- `Deprecated` for soon-to-be removed features.
+- `Removed` for now removed features.
+- `Fixed` for any bug fixes.
+- `Security` in case of vulnerabilities.
+
+</details>
+
+## [3.0.0] - 2018-04-08
+
+v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. 
+
+**Breaking Changes**
+
+- The undocumented `.makeRe` method was removed
+
+**Non-breaking changes**
+
+- Caching was removed
+
+## [2.3.2] - 2018-04-08
+
+- start refactoring
+- cover sets
+- better range handling
+
+## [2.3.1] - 2018-02-17
+
+- Remove unnecessary escape in Regex. (#14)
+
+## [2.3.0] - 2017-10-19
+
+- minor code reorganization
+- optimize regex
+- expose `maxLength` option
+
+## [2.2.1] - 2017-05-30
+
+- don't condense when braces contain extglobs
+
+## [2.2.0] - 2017-05-28
+
+- ensure word boundaries are preserved
+- fixes edge case where extglob characters precede a brace pattern
+
+## [2.1.1] - 2017-04-27
+
+- use snapdragon-node
+- handle edge case
+- optimizations, lint
+
+## [2.0.4] - 2017-04-11
+
+- pass opts to compiler
+- minor optimization in create method
+- re-write parser handlers to remove negation regex
+
+## [2.0.3] - 2016-12-10
+
+- use split-string
+- clear queue at the end
+- adds sequences example
+- add unit tests
+
+## [2.0.2] - 2016-10-21
+
+- fix comma handling in nested extglobs
+
+## [2.0.1] - 2016-10-20
+
+- add comments
+- more tests, ensure quotes are stripped
+
+## [2.0.0] - 2016-10-19
+
+- don't expand braces inside character classes
+- add quantifier pattern
+
+## [1.8.5] - 2016-05-21
+
+- Refactor (#10)
+
+## [1.8.4] - 2016-04-20
+
+- fixes https://github.com/jonschlinkert/micromatch/issues/66
+
+## [1.8.0] - 2015-03-18
+
+- adds exponent examples, tests
+- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38
+
+## [1.6.0] - 2015-01-30
+
+- optimizations, `bash` mode:
+- improve path escaping
+
+## [1.5.0] - 2015-01-28
+
+- Merge pull request #5 from eush77/lib-files
+
+## [1.4.0] - 2015-01-24
+
+- add extglob tests
+- externalize exponent function
+- better whitespace handling
+
+## [1.3.0] - 2015-01-24
+
+- make regex patterns explicity
+
+## [1.1.0] - 2015-01-11
+
+- don't create a match group with `makeRe`
+
+## [1.0.0] - 2014-12-23
+
+- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e'
+- support empty brace syntax
+- better bash coverage
+- better support for regex strings
+
+## [0.1.4] - 2014-11-14
+
+- improve recognition of bad args, recognize mismatched argument types
+- support escaping
+- remove pathname-expansion
+- support whitespace in patterns
+
+## [0.1.0]
+
+- first commit
+
+[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2
+[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1
+[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0
+[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1
+[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0
+[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1
+[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0
+[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4
+[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3
+[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2
+[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1
+[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0
+[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5
+[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4
+[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0
+[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0
+[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0
+[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0
+[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0
+[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0
+[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0
+[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0
+[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4
+
+[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD
+[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog

+ 21 - 0
node_modules/braces/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2018, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 593 - 0
node_modules/braces/README.md

@@ -0,0 +1,593 @@
+# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces)
+
+> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save braces
+```
+
+## v3.0.0 Released!!
+
+See the [changelog](CHANGELOG.md) for details.
+
+## Why use braces?
+
+Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters.
+
+* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests)
+* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity.
+* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up.
+* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written).
+* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)).
+* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']`
+* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']`
+* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']`
+* [Supports escaping](#escaping) - To prevent evaluation of special characters.
+
+## Usage
+
+The main export is a function that takes one or more brace `patterns` and `options`.
+
+```js
+const braces = require('braces');
+// braces(patterns[, options]);
+
+console.log(braces(['{01..05}', '{a..e}']));
+//=> ['(0[1-5])', '([a-e])']
+
+console.log(braces(['{01..05}', '{a..e}'], { expand: true }));
+//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e']
+```
+
+### Brace Expansion vs. Compilation
+
+By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching.
+
+**Compiled**
+
+```js
+console.log(braces('a/{x,y,z}/b')); 
+//=> ['a/(x|y|z)/b']
+console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); 
+//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ]
+```
+
+**Expanded**
+
+Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)):
+
+```js
+console.log(braces('a/{x,y,z}/b', { expand: true }));
+//=> ['a/x/b', 'a/y/b', 'a/z/b']
+
+console.log(braces.expand('{01..10}'));
+//=> ['01','02','03','04','05','06','07','08','09','10']
+```
+
+### Lists
+
+Expand lists (like Bash "sets"):
+
+```js
+console.log(braces('a/{foo,bar,baz}/*.js'));
+//=> ['a/(foo|bar|baz)/*.js']
+
+console.log(braces.expand('a/{foo,bar,baz}/*.js'));
+//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js']
+```
+
+### Sequences
+
+Expand ranges of characters (like Bash "sequences"):
+
+```js
+console.log(braces.expand('{1..3}'));                // ['1', '2', '3']
+console.log(braces.expand('a/{1..3}/b'));            // ['a/1/b', 'a/2/b', 'a/3/b']
+console.log(braces('{a..c}', { expand: true }));     // ['a', 'b', 'c']
+console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c']
+
+// supports zero-padded ranges
+console.log(braces('a/{01..03}/b'));   //=> ['a/(0[1-3])/b']
+console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b']
+```
+
+See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options.
+
+### Steppped ranges
+
+Steps, or increments, may be used with ranges:
+
+```js
+console.log(braces.expand('{2..10..2}'));
+//=> ['2', '4', '6', '8', '10']
+
+console.log(braces('{2..10..2}'));
+//=> ['(2|4|6|8|10)']
+```
+
+When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion.
+
+### Nesting
+
+Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved.
+
+**"Expanded" braces**
+
+```js
+console.log(braces.expand('a{b,c,/{x,y}}/e'));
+//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e']
+
+console.log(braces.expand('a/{x,{1..5},y}/c'));
+//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c']
+```
+
+**"Optimized" braces**
+
+```js
+console.log(braces('a{b,c,/{x,y}}/e'));
+//=> ['a(b|c|/(x|y))/e']
+
+console.log(braces('a/{x,{1..5},y}/c'));
+//=> ['a/(x|([1-5])|y)/c']
+```
+
+### Escaping
+
+**Escaping braces**
+
+A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_:
+
+```js
+console.log(braces.expand('a\\{d,c,b}e'));
+//=> ['a{d,c,b}e']
+
+console.log(braces.expand('a{d,c,b\\}e'));
+//=> ['a{d,c,b}e']
+```
+
+**Escaping commas**
+
+Commas inside braces may also be escaped:
+
+```js
+console.log(braces.expand('a{b\\,c}d'));
+//=> ['a{b,c}d']
+
+console.log(braces.expand('a{d\\,c,b}e'));
+//=> ['ad,ce', 'abe']
+```
+
+**Single items**
+
+Following bash conventions, a brace pattern is also not expanded when it contains a single character:
+
+```js
+console.log(braces.expand('a{b}c'));
+//=> ['a{b}c']
+```
+
+## Options
+
+### options.maxLength
+
+**Type**: `Number`
+
+**Default**: `65,536`
+
+**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera.
+
+```js
+console.log(braces('a/{b,c}/d', { maxLength: 3 }));  //=> throws an error
+```
+
+### options.expand
+
+**Type**: `Boolean`
+
+**Default**: `undefined`
+
+**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing).
+
+```js
+console.log(braces('a/{b,c}/d', { expand: true }));
+//=> [ 'a/b/d', 'a/c/d' ]
+```
+
+### options.nodupes
+
+**Type**: `Boolean`
+
+**Default**: `undefined`
+
+**Description**: Remove duplicates from the returned array.
+
+### options.rangeLimit
+
+**Type**: `Number`
+
+**Default**: `1000`
+
+**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`.
+
+You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether.
+
+**Examples**
+
+```js
+// pattern exceeds the "rangeLimit", so it's optimized automatically
+console.log(braces.expand('{1..1000}'));
+//=> ['([1-9]|[1-9][0-9]{1,2}|1000)']
+
+// pattern does not exceed "rangeLimit", so it's NOT optimized
+console.log(braces.expand('{1..100}'));
+//=> ['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']
+```
+
+### options.transform
+
+**Type**: `Function`
+
+**Default**: `undefined`
+
+**Description**: Customize range expansion.
+
+**Example: Transforming non-numeric values**
+
+```js
+const alpha = braces.expand('x/{a..e}/y', {
+  transform(value, index) {
+    // When non-numeric values are passed, "value" is a character code.
+    return 'foo/' + String.fromCharCode(value) + '-' + index;
+  }
+});
+console.log(alpha);
+//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ]
+```
+
+**Example: Transforming numeric values**
+
+```js
+const numeric = braces.expand('{1..5}', {
+  transform(value) {
+    // when numeric values are passed, "value" is a number
+    return 'foo/' + value * 2;
+  }
+});
+console.log(numeric); 
+//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ]
+```
+
+### options.quantifiers
+
+**Type**: `Boolean`
+
+**Default**: `undefined`
+
+**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times.
+
+Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists)
+
+The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists.
+
+**Examples**
+
+```js
+const braces = require('braces');
+console.log(braces('a/b{1,3}/{x,y,z}'));
+//=> [ 'a/b(1|3)/(x|y|z)' ]
+console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true}));
+//=> [ 'a/b{1,3}/(x|y|z)' ]
+console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true}));
+//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ]
+```
+
+### options.unescape
+
+**Type**: `Boolean`
+
+**Default**: `undefined`
+
+**Description**: Strip backslashes that were used for escaping from the result.
+
+## What is "brace expansion"?
+
+Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs).
+
+In addition to "expansion", braces are also used for matching. In other words:
+
+* [brace expansion](#brace-expansion) is for generating new lists
+* [brace matching](#brace-matching) is for filtering existing lists
+
+<details>
+<summary><strong>More about brace expansion</strong> (click to expand)</summary>
+
+There are two main types of brace expansion:
+
+1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}`
+2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges".
+
+Here are some example brace patterns to illustrate how they work:
+
+**Sets**
+
+```
+{a,b,c}       => a b c
+{a,b,c}{1,2}  => a1 a2 b1 b2 c1 c2
+```
+
+**Sequences**
+
+```
+{1..9}        => 1 2 3 4 5 6 7 8 9
+{4..-4}       => 4 3 2 1 0 -1 -2 -3 -4
+{1..20..3}    => 1 4 7 10 13 16 19
+{a..j}        => a b c d e f g h i j
+{j..a}        => j i h g f e d c b a
+{a..z..3}     => a d g j m p s v y
+```
+
+**Combination**
+
+Sets and sequences can be mixed together or used along with any other strings.
+
+```
+{a,b,c}{1..3}   => a1 a2 a3 b1 b2 b3 c1 c2 c3
+foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar
+```
+
+The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases.
+
+## Brace matching
+
+In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching.
+
+For example, the pattern `foo/{1..3}/bar` would match any of following strings:
+
+```
+foo/1/bar
+foo/2/bar
+foo/3/bar
+```
+
+But not:
+
+```
+baz/1/qux
+baz/2/qux
+baz/3/qux
+```
+
+Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings:
+
+```
+foo/1/bar
+foo/2/bar
+foo/3/bar
+baz/1/qux
+baz/2/qux
+baz/3/qux
+```
+
+## Brace matching pitfalls
+
+Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of.
+
+### tldr
+
+**"brace bombs"**
+
+* brace expansion can eat up a huge amount of processing resources
+* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially
+* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!)
+
+For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section.
+
+### The solution
+
+Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries.
+
+### Geometric complexity
+
+At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`.
+
+For example, the following sets demonstrate quadratic (`O(n^2)`) complexity:
+
+```
+{1,2}{3,4}      => (2X2)    => 13 14 23 24
+{1,2}{3,4}{5,6} => (2X2X2)  => 135 136 145 146 235 236 245 246
+```
+
+But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity:
+
+```
+{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 
+                                    249 257 258 259 267 268 269 347 348 349 357 
+                                    358 359 367 368 369
+```
+
+Now, imagine how this complexity grows given that each element is a n-tuple:
+
+```
+{1..100}{1..100}         => (100X100)     => 10,000 elements (38.4 kB)
+{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB)
+```
+
+Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control.
+
+**More information**
+
+Interested in learning more about brace expansion?
+
+* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion)
+* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion)
+* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
+
+</details>
+
+## Performance
+
+Braces is not only screaming fast, it's also more accurate the other brace expansion libraries.
+
+### Better algorithms
+
+Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_.
+
+Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently.
+
+**The proof is in the numbers**
+
+Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively.
+
+| **Pattern**                 | **braces**         | **[minimatch][]**            |
+| ---                         | ---                | ---                          |
+| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)|  N/A (freezes)               |
+| `{1..1000000000000000}`     | `41 B` (1ms 15μs)  |  N/A (freezes)               |
+| `{1..100000000000000}`      | `40 B` (890μs)     |  N/A (freezes)               |
+| `{1..10000000000000}`       | `39 B` (2ms 49μs)  |  N/A (freezes)               |
+| `{1..1000000000000}`        | `38 B` (608μs)     |  N/A (freezes)               |
+| `{1..100000000000}`         | `37 B` (397μs)     |  N/A (freezes)               |
+| `{1..10000000000}`          | `35 B` (983μs)     |  N/A (freezes)               |
+| `{1..1000000000}`           | `34 B` (798μs)     |  N/A (freezes)               |
+| `{1..100000000}`            | `33 B` (733μs)     |  N/A (freezes)               |
+| `{1..10000000}`             | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) |
+| `{1..1000000}`              | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs)   |
+| `{1..100000}`               | `30 B` (950μs)     | `588.89 kB` (146ms 921μs)    |
+| `{1..10000}`                | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs)      |
+| `{1..1000}`                 | `28 B` (760μs)     | `3.89 kB` (1ms 453μs)        |
+| `{1..100}`                  | `22 B` (345μs)     | `291 B` (196μs)              |
+| `{1..10}`                   | `10 B` (533μs)     | `20 B` (37μs)                |
+| `{1..3}`                    | `7 B` (190μs)      | `5 B` (27μs)                 |
+
+### Faster algorithms
+
+When you need expansion, braces is still much faster.
+
+_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_
+
+| **Pattern**     | **braces**                  | **[minimatch][]**            |
+| ---             | ---                         | ---                          |
+| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) |
+| `{1..1000000}`  | `6.89 MB` (458ms 576μs)     | `6.89 MB` (1s 491ms 621μs)   |
+| `{1..100000}`   | `588.89 kB` (20ms 728μs)    | `588.89 kB` (156ms 919μs)    |
+| `{1..10000}`    | `48.89 kB` (2ms 202μs)      | `48.89 kB` (13ms 641μs)      |
+| `{1..1000}`     | `3.89 kB` (1ms 796μs)       | `3.89 kB` (1ms 958μs)        |
+| `{1..100}`      | `291 B` (424μs)             | `291 B` (211μs)              |
+| `{1..10}`       | `20 B` (487μs)              | `20 B` (72μs)                |
+| `{1..3}`        | `5 B` (166μs)               | `5 B` (27μs)                 |
+
+If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js).
+
+## Benchmarks
+
+### Running benchmarks
+
+Install dev dependencies:
+
+```bash
+npm i -d && npm benchmark
+```
+
+### Latest results
+
+Braces is more accurate, without sacrificing performance.
+
+```bash
+# range (expanded)
+  braces x 29,040 ops/sec ±3.69% (91 runs sampled))
+  minimatch x 4,735 ops/sec ±1.28% (90 runs sampled)
+
+# range (optimized for regex)
+  braces x 382,878 ops/sec ±0.56% (94 runs sampled)
+  minimatch x 1,040 ops/sec ±0.44% (93 runs sampled)
+
+# nested ranges (expanded)
+  braces x 19,744 ops/sec ±2.27% (92 runs sampled))
+  minimatch x 4,579 ops/sec ±0.50% (93 runs sampled)
+
+# nested ranges (optimized for regex)
+  braces x 246,019 ops/sec ±2.02% (93 runs sampled)
+  minimatch x 1,028 ops/sec ±0.39% (94 runs sampled)
+
+# set (expanded) 
+  braces x 138,641 ops/sec ±0.53% (95 runs sampled)
+  minimatch x 219,582 ops/sec ±0.98% (94 runs sampled)
+
+# set (optimized for regex)
+  braces x 388,408 ops/sec ±0.41% (95 runs sampled)
+  minimatch x 44,724 ops/sec ±0.91% (89 runs sampled)
+
+# nested sets (expanded)
+  braces x 84,966 ops/sec ±0.48% (94 runs sampled)
+  minimatch x 140,720 ops/sec ±0.37% (95 runs sampled)
+
+# nested sets (optimized for regex)
+  braces x 263,340 ops/sec ±2.06% (92 runs sampled)
+  minimatch x 28,714 ops/sec ±0.40% (90 runs sampled)
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Contributors
+
+| **Commits** | **Contributor** |  
+| --- | --- |  
+| 197 | [jonschlinkert](https://github.com/jonschlinkert) |  
+| 4   | [doowb](https://github.com/doowb) |  
+| 1   | [es128](https://github.com/es128) |  
+| 1   | [eush77](https://github.com/eush77) |  
+| 1   | [hemanth](https://github.com/hemanth) |  
+| 1   | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |  
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+### License
+
+Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._

+ 170 - 0
node_modules/braces/index.js

@@ -0,0 +1,170 @@
+'use strict';
+
+const stringify = require('./lib/stringify');
+const compile = require('./lib/compile');
+const expand = require('./lib/expand');
+const parse = require('./lib/parse');
+
+/**
+ * Expand the given pattern or create a regex-compatible string.
+ *
+ * ```js
+ * const braces = require('braces');
+ * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
+ * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
+ * ```
+ * @param {String} `str`
+ * @param {Object} `options`
+ * @return {String}
+ * @api public
+ */
+
+const braces = (input, options = {}) => {
+  let output = [];
+
+  if (Array.isArray(input)) {
+    for (let pattern of input) {
+      let result = braces.create(pattern, options);
+      if (Array.isArray(result)) {
+        output.push(...result);
+      } else {
+        output.push(result);
+      }
+    }
+  } else {
+    output = [].concat(braces.create(input, options));
+  }
+
+  if (options && options.expand === true && options.nodupes === true) {
+    output = [...new Set(output)];
+  }
+  return output;
+};
+
+/**
+ * Parse the given `str` with the given `options`.
+ *
+ * ```js
+ * // braces.parse(pattern, [, options]);
+ * const ast = braces.parse('a/{b,c}/d');
+ * console.log(ast);
+ * ```
+ * @param {String} pattern Brace pattern to parse
+ * @param {Object} options
+ * @return {Object} Returns an AST
+ * @api public
+ */
+
+braces.parse = (input, options = {}) => parse(input, options);
+
+/**
+ * Creates a braces string from an AST, or an AST node.
+ *
+ * ```js
+ * const braces = require('braces');
+ * let ast = braces.parse('foo/{a,b}/bar');
+ * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
+ * ```
+ * @param {String} `input` Brace pattern or AST.
+ * @param {Object} `options`
+ * @return {Array} Returns an array of expanded values.
+ * @api public
+ */
+
+braces.stringify = (input, options = {}) => {
+  if (typeof input === 'string') {
+    return stringify(braces.parse(input, options), options);
+  }
+  return stringify(input, options);
+};
+
+/**
+ * Compiles a brace pattern into a regex-compatible, optimized string.
+ * This method is called by the main [braces](#braces) function by default.
+ *
+ * ```js
+ * const braces = require('braces');
+ * console.log(braces.compile('a/{b,c}/d'));
+ * //=> ['a/(b|c)/d']
+ * ```
+ * @param {String} `input` Brace pattern or AST.
+ * @param {Object} `options`
+ * @return {Array} Returns an array of expanded values.
+ * @api public
+ */
+
+braces.compile = (input, options = {}) => {
+  if (typeof input === 'string') {
+    input = braces.parse(input, options);
+  }
+  return compile(input, options);
+};
+
+/**
+ * Expands a brace pattern into an array. This method is called by the
+ * main [braces](#braces) function when `options.expand` is true. Before
+ * using this method it's recommended that you read the [performance notes](#performance))
+ * and advantages of using [.compile](#compile) instead.
+ *
+ * ```js
+ * const braces = require('braces');
+ * console.log(braces.expand('a/{b,c}/d'));
+ * //=> ['a/b/d', 'a/c/d'];
+ * ```
+ * @param {String} `pattern` Brace pattern
+ * @param {Object} `options`
+ * @return {Array} Returns an array of expanded values.
+ * @api public
+ */
+
+braces.expand = (input, options = {}) => {
+  if (typeof input === 'string') {
+    input = braces.parse(input, options);
+  }
+
+  let result = expand(input, options);
+
+  // filter out empty strings if specified
+  if (options.noempty === true) {
+    result = result.filter(Boolean);
+  }
+
+  // filter out duplicates if specified
+  if (options.nodupes === true) {
+    result = [...new Set(result)];
+  }
+
+  return result;
+};
+
+/**
+ * Processes a brace pattern and returns either an expanded array
+ * (if `options.expand` is true), a highly optimized regex-compatible string.
+ * This method is called by the main [braces](#braces) function.
+ *
+ * ```js
+ * const braces = require('braces');
+ * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
+ * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
+ * ```
+ * @param {String} `pattern` Brace pattern
+ * @param {Object} `options`
+ * @return {Array} Returns an array of expanded values.
+ * @api public
+ */
+
+braces.create = (input, options = {}) => {
+  if (input === '' || input.length < 3) {
+    return [input];
+  }
+
+ return options.expand !== true
+    ? braces.compile(input, options)
+    : braces.expand(input, options);
+};
+
+/**
+ * Expose "braces"
+ */
+
+module.exports = braces;

+ 57 - 0
node_modules/braces/lib/compile.js

@@ -0,0 +1,57 @@
+'use strict';
+
+const fill = require('fill-range');
+const utils = require('./utils');
+
+const compile = (ast, options = {}) => {
+  let walk = (node, parent = {}) => {
+    let invalidBlock = utils.isInvalidBrace(parent);
+    let invalidNode = node.invalid === true && options.escapeInvalid === true;
+    let invalid = invalidBlock === true || invalidNode === true;
+    let prefix = options.escapeInvalid === true ? '\\' : '';
+    let output = '';
+
+    if (node.isOpen === true) {
+      return prefix + node.value;
+    }
+    if (node.isClose === true) {
+      return prefix + node.value;
+    }
+
+    if (node.type === 'open') {
+      return invalid ? (prefix + node.value) : '(';
+    }
+
+    if (node.type === 'close') {
+      return invalid ? (prefix + node.value) : ')';
+    }
+
+    if (node.type === 'comma') {
+      return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
+    }
+
+    if (node.value) {
+      return node.value;
+    }
+
+    if (node.nodes && node.ranges > 0) {
+      let args = utils.reduce(node.nodes);
+      let range = fill(...args, { ...options, wrap: false, toRegex: true });
+
+      if (range.length !== 0) {
+        return args.length > 1 && range.length > 1 ? `(${range})` : range;
+      }
+    }
+
+    if (node.nodes) {
+      for (let child of node.nodes) {
+        output += walk(child, node);
+      }
+    }
+    return output;
+  };
+
+  return walk(ast);
+};
+
+module.exports = compile;

+ 57 - 0
node_modules/braces/lib/constants.js

@@ -0,0 +1,57 @@
+'use strict';
+
+module.exports = {
+  MAX_LENGTH: 1024 * 64,
+
+  // Digits
+  CHAR_0: '0', /* 0 */
+  CHAR_9: '9', /* 9 */
+
+  // Alphabet chars.
+  CHAR_UPPERCASE_A: 'A', /* A */
+  CHAR_LOWERCASE_A: 'a', /* a */
+  CHAR_UPPERCASE_Z: 'Z', /* Z */
+  CHAR_LOWERCASE_Z: 'z', /* z */
+
+  CHAR_LEFT_PARENTHESES: '(', /* ( */
+  CHAR_RIGHT_PARENTHESES: ')', /* ) */
+
+  CHAR_ASTERISK: '*', /* * */
+
+  // Non-alphabetic chars.
+  CHAR_AMPERSAND: '&', /* & */
+  CHAR_AT: '@', /* @ */
+  CHAR_BACKSLASH: '\\', /* \ */
+  CHAR_BACKTICK: '`', /* ` */
+  CHAR_CARRIAGE_RETURN: '\r', /* \r */
+  CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
+  CHAR_COLON: ':', /* : */
+  CHAR_COMMA: ',', /* , */
+  CHAR_DOLLAR: '$', /* . */
+  CHAR_DOT: '.', /* . */
+  CHAR_DOUBLE_QUOTE: '"', /* " */
+  CHAR_EQUAL: '=', /* = */
+  CHAR_EXCLAMATION_MARK: '!', /* ! */
+  CHAR_FORM_FEED: '\f', /* \f */
+  CHAR_FORWARD_SLASH: '/', /* / */
+  CHAR_HASH: '#', /* # */
+  CHAR_HYPHEN_MINUS: '-', /* - */
+  CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
+  CHAR_LEFT_CURLY_BRACE: '{', /* { */
+  CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
+  CHAR_LINE_FEED: '\n', /* \n */
+  CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
+  CHAR_PERCENT: '%', /* % */
+  CHAR_PLUS: '+', /* + */
+  CHAR_QUESTION_MARK: '?', /* ? */
+  CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
+  CHAR_RIGHT_CURLY_BRACE: '}', /* } */
+  CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
+  CHAR_SEMICOLON: ';', /* ; */
+  CHAR_SINGLE_QUOTE: '\'', /* ' */
+  CHAR_SPACE: ' ', /*   */
+  CHAR_TAB: '\t', /* \t */
+  CHAR_UNDERSCORE: '_', /* _ */
+  CHAR_VERTICAL_LINE: '|', /* | */
+  CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
+};

+ 113 - 0
node_modules/braces/lib/expand.js

@@ -0,0 +1,113 @@
+'use strict';
+
+const fill = require('fill-range');
+const stringify = require('./stringify');
+const utils = require('./utils');
+
+const append = (queue = '', stash = '', enclose = false) => {
+  let result = [];
+
+  queue = [].concat(queue);
+  stash = [].concat(stash);
+
+  if (!stash.length) return queue;
+  if (!queue.length) {
+    return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
+  }
+
+  for (let item of queue) {
+    if (Array.isArray(item)) {
+      for (let value of item) {
+        result.push(append(value, stash, enclose));
+      }
+    } else {
+      for (let ele of stash) {
+        if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
+        result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
+      }
+    }
+  }
+  return utils.flatten(result);
+};
+
+const expand = (ast, options = {}) => {
+  let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
+
+  let walk = (node, parent = {}) => {
+    node.queue = [];
+
+    let p = parent;
+    let q = parent.queue;
+
+    while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
+      p = p.parent;
+      q = p.queue;
+    }
+
+    if (node.invalid || node.dollar) {
+      q.push(append(q.pop(), stringify(node, options)));
+      return;
+    }
+
+    if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
+      q.push(append(q.pop(), ['{}']));
+      return;
+    }
+
+    if (node.nodes && node.ranges > 0) {
+      let args = utils.reduce(node.nodes);
+
+      if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
+        throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
+      }
+
+      let range = fill(...args, options);
+      if (range.length === 0) {
+        range = stringify(node, options);
+      }
+
+      q.push(append(q.pop(), range));
+      node.nodes = [];
+      return;
+    }
+
+    let enclose = utils.encloseBrace(node);
+    let queue = node.queue;
+    let block = node;
+
+    while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
+      block = block.parent;
+      queue = block.queue;
+    }
+
+    for (let i = 0; i < node.nodes.length; i++) {
+      let child = node.nodes[i];
+
+      if (child.type === 'comma' && node.type === 'brace') {
+        if (i === 1) queue.push('');
+        queue.push('');
+        continue;
+      }
+
+      if (child.type === 'close') {
+        q.push(append(q.pop(), queue, enclose));
+        continue;
+      }
+
+      if (child.value && child.type !== 'open') {
+        queue.push(append(queue.pop(), child.value));
+        continue;
+      }
+
+      if (child.nodes) {
+        walk(child, node);
+      }
+    }
+
+    return queue;
+  };
+
+  return utils.flatten(walk(ast));
+};
+
+module.exports = expand;

+ 333 - 0
node_modules/braces/lib/parse.js

@@ -0,0 +1,333 @@
+'use strict';
+
+const stringify = require('./stringify');
+
+/**
+ * Constants
+ */
+
+const {
+  MAX_LENGTH,
+  CHAR_BACKSLASH, /* \ */
+  CHAR_BACKTICK, /* ` */
+  CHAR_COMMA, /* , */
+  CHAR_DOT, /* . */
+  CHAR_LEFT_PARENTHESES, /* ( */
+  CHAR_RIGHT_PARENTHESES, /* ) */
+  CHAR_LEFT_CURLY_BRACE, /* { */
+  CHAR_RIGHT_CURLY_BRACE, /* } */
+  CHAR_LEFT_SQUARE_BRACKET, /* [ */
+  CHAR_RIGHT_SQUARE_BRACKET, /* ] */
+  CHAR_DOUBLE_QUOTE, /* " */
+  CHAR_SINGLE_QUOTE, /* ' */
+  CHAR_NO_BREAK_SPACE,
+  CHAR_ZERO_WIDTH_NOBREAK_SPACE
+} = require('./constants');
+
+/**
+ * parse
+ */
+
+const parse = (input, options = {}) => {
+  if (typeof input !== 'string') {
+    throw new TypeError('Expected a string');
+  }
+
+  let opts = options || {};
+  let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+  if (input.length > max) {
+    throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
+  }
+
+  let ast = { type: 'root', input, nodes: [] };
+  let stack = [ast];
+  let block = ast;
+  let prev = ast;
+  let brackets = 0;
+  let length = input.length;
+  let index = 0;
+  let depth = 0;
+  let value;
+  let memo = {};
+
+  /**
+   * Helpers
+   */
+
+  const advance = () => input[index++];
+  const push = node => {
+    if (node.type === 'text' && prev.type === 'dot') {
+      prev.type = 'text';
+    }
+
+    if (prev && prev.type === 'text' && node.type === 'text') {
+      prev.value += node.value;
+      return;
+    }
+
+    block.nodes.push(node);
+    node.parent = block;
+    node.prev = prev;
+    prev = node;
+    return node;
+  };
+
+  push({ type: 'bos' });
+
+  while (index < length) {
+    block = stack[stack.length - 1];
+    value = advance();
+
+    /**
+     * Invalid chars
+     */
+
+    if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
+      continue;
+    }
+
+    /**
+     * Escaped chars
+     */
+
+    if (value === CHAR_BACKSLASH) {
+      push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
+      continue;
+    }
+
+    /**
+     * Right square bracket (literal): ']'
+     */
+
+    if (value === CHAR_RIGHT_SQUARE_BRACKET) {
+      push({ type: 'text', value: '\\' + value });
+      continue;
+    }
+
+    /**
+     * Left square bracket: '['
+     */
+
+    if (value === CHAR_LEFT_SQUARE_BRACKET) {
+      brackets++;
+
+      let closed = true;
+      let next;
+
+      while (index < length && (next = advance())) {
+        value += next;
+
+        if (next === CHAR_LEFT_SQUARE_BRACKET) {
+          brackets++;
+          continue;
+        }
+
+        if (next === CHAR_BACKSLASH) {
+          value += advance();
+          continue;
+        }
+
+        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+          brackets--;
+
+          if (brackets === 0) {
+            break;
+          }
+        }
+      }
+
+      push({ type: 'text', value });
+      continue;
+    }
+
+    /**
+     * Parentheses
+     */
+
+    if (value === CHAR_LEFT_PARENTHESES) {
+      block = push({ type: 'paren', nodes: [] });
+      stack.push(block);
+      push({ type: 'text', value });
+      continue;
+    }
+
+    if (value === CHAR_RIGHT_PARENTHESES) {
+      if (block.type !== 'paren') {
+        push({ type: 'text', value });
+        continue;
+      }
+      block = stack.pop();
+      push({ type: 'text', value });
+      block = stack[stack.length - 1];
+      continue;
+    }
+
+    /**
+     * Quotes: '|"|`
+     */
+
+    if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
+      let open = value;
+      let next;
+
+      if (options.keepQuotes !== true) {
+        value = '';
+      }
+
+      while (index < length && (next = advance())) {
+        if (next === CHAR_BACKSLASH) {
+          value += next + advance();
+          continue;
+        }
+
+        if (next === open) {
+          if (options.keepQuotes === true) value += next;
+          break;
+        }
+
+        value += next;
+      }
+
+      push({ type: 'text', value });
+      continue;
+    }
+
+    /**
+     * Left curly brace: '{'
+     */
+
+    if (value === CHAR_LEFT_CURLY_BRACE) {
+      depth++;
+
+      let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
+      let brace = {
+        type: 'brace',
+        open: true,
+        close: false,
+        dollar,
+        depth,
+        commas: 0,
+        ranges: 0,
+        nodes: []
+      };
+
+      block = push(brace);
+      stack.push(block);
+      push({ type: 'open', value });
+      continue;
+    }
+
+    /**
+     * Right curly brace: '}'
+     */
+
+    if (value === CHAR_RIGHT_CURLY_BRACE) {
+      if (block.type !== 'brace') {
+        push({ type: 'text', value });
+        continue;
+      }
+
+      let type = 'close';
+      block = stack.pop();
+      block.close = true;
+
+      push({ type, value });
+      depth--;
+
+      block = stack[stack.length - 1];
+      continue;
+    }
+
+    /**
+     * Comma: ','
+     */
+
+    if (value === CHAR_COMMA && depth > 0) {
+      if (block.ranges > 0) {
+        block.ranges = 0;
+        let open = block.nodes.shift();
+        block.nodes = [open, { type: 'text', value: stringify(block) }];
+      }
+
+      push({ type: 'comma', value });
+      block.commas++;
+      continue;
+    }
+
+    /**
+     * Dot: '.'
+     */
+
+    if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
+      let siblings = block.nodes;
+
+      if (depth === 0 || siblings.length === 0) {
+        push({ type: 'text', value });
+        continue;
+      }
+
+      if (prev.type === 'dot') {
+        block.range = [];
+        prev.value += value;
+        prev.type = 'range';
+
+        if (block.nodes.length !== 3 && block.nodes.length !== 5) {
+          block.invalid = true;
+          block.ranges = 0;
+          prev.type = 'text';
+          continue;
+        }
+
+        block.ranges++;
+        block.args = [];
+        continue;
+      }
+
+      if (prev.type === 'range') {
+        siblings.pop();
+
+        let before = siblings[siblings.length - 1];
+        before.value += prev.value + value;
+        prev = before;
+        block.ranges--;
+        continue;
+      }
+
+      push({ type: 'dot', value });
+      continue;
+    }
+
+    /**
+     * Text
+     */
+
+    push({ type: 'text', value });
+  }
+
+  // Mark imbalanced braces and brackets as invalid
+  do {
+    block = stack.pop();
+
+    if (block.type !== 'root') {
+      block.nodes.forEach(node => {
+        if (!node.nodes) {
+          if (node.type === 'open') node.isOpen = true;
+          if (node.type === 'close') node.isClose = true;
+          if (!node.nodes) node.type = 'text';
+          node.invalid = true;
+        }
+      });
+
+      // get the location of the block on parent.nodes (block's siblings)
+      let parent = stack[stack.length - 1];
+      let index = parent.nodes.indexOf(block);
+      // replace the (invalid) block with it's nodes
+      parent.nodes.splice(index, 1, ...block.nodes);
+    }
+  } while (stack.length > 0);
+
+  push({ type: 'eos' });
+  return ast;
+};
+
+module.exports = parse;

+ 32 - 0
node_modules/braces/lib/stringify.js

@@ -0,0 +1,32 @@
+'use strict';
+
+const utils = require('./utils');
+
+module.exports = (ast, options = {}) => {
+  let stringify = (node, parent = {}) => {
+    let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
+    let invalidNode = node.invalid === true && options.escapeInvalid === true;
+    let output = '';
+
+    if (node.value) {
+      if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
+        return '\\' + node.value;
+      }
+      return node.value;
+    }
+
+    if (node.value) {
+      return node.value;
+    }
+
+    if (node.nodes) {
+      for (let child of node.nodes) {
+        output += stringify(child);
+      }
+    }
+    return output;
+  };
+
+  return stringify(ast);
+};
+

+ 112 - 0
node_modules/braces/lib/utils.js

@@ -0,0 +1,112 @@
+'use strict';
+
+exports.isInteger = num => {
+  if (typeof num === 'number') {
+    return Number.isInteger(num);
+  }
+  if (typeof num === 'string' && num.trim() !== '') {
+    return Number.isInteger(Number(num));
+  }
+  return false;
+};
+
+/**
+ * Find a node of the given type
+ */
+
+exports.find = (node, type) => node.nodes.find(node => node.type === type);
+
+/**
+ * Find a node of the given type
+ */
+
+exports.exceedsLimit = (min, max, step = 1, limit) => {
+  if (limit === false) return false;
+  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
+  return ((Number(max) - Number(min)) / Number(step)) >= limit;
+};
+
+/**
+ * Escape the given node with '\\' before node.value
+ */
+
+exports.escapeNode = (block, n = 0, type) => {
+  let node = block.nodes[n];
+  if (!node) return;
+
+  if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
+    if (node.escaped !== true) {
+      node.value = '\\' + node.value;
+      node.escaped = true;
+    }
+  }
+};
+
+/**
+ * Returns true if the given brace node should be enclosed in literal braces
+ */
+
+exports.encloseBrace = node => {
+  if (node.type !== 'brace') return false;
+  if ((node.commas >> 0 + node.ranges >> 0) === 0) {
+    node.invalid = true;
+    return true;
+  }
+  return false;
+};
+
+/**
+ * Returns true if a brace node is invalid.
+ */
+
+exports.isInvalidBrace = block => {
+  if (block.type !== 'brace') return false;
+  if (block.invalid === true || block.dollar) return true;
+  if ((block.commas >> 0 + block.ranges >> 0) === 0) {
+    block.invalid = true;
+    return true;
+  }
+  if (block.open !== true || block.close !== true) {
+    block.invalid = true;
+    return true;
+  }
+  return false;
+};
+
+/**
+ * Returns true if a node is an open or close node
+ */
+
+exports.isOpenOrClose = node => {
+  if (node.type === 'open' || node.type === 'close') {
+    return true;
+  }
+  return node.open === true || node.close === true;
+};
+
+/**
+ * Reduce an array of text nodes.
+ */
+
+exports.reduce = nodes => nodes.reduce((acc, node) => {
+  if (node.type === 'text') acc.push(node.value);
+  if (node.type === 'range') node.type = 'text';
+  return acc;
+}, []);
+
+/**
+ * Flatten an array
+ */
+
+exports.flatten = (...args) => {
+  const result = [];
+  const flat = arr => {
+    for (let i = 0; i < arr.length; i++) {
+      let ele = arr[i];
+      Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
+    }
+    return result;
+  };
+  flat(args);
+  return result;
+};

+ 77 - 0
node_modules/braces/package.json

@@ -0,0 +1,77 @@
+{
+  "name": "braces",
+  "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
+  "version": "3.0.2",
+  "homepage": "https://github.com/micromatch/braces",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Brian Woodward (https://twitter.com/doowb)",
+    "Elan Shanker (https://github.com/es128)",
+    "Eugene Sharygin (https://github.com/eush77)",
+    "hemanth.hm (http://h3manth.com)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)"
+  ],
+  "repository": "micromatch/braces",
+  "bugs": {
+    "url": "https://github.com/micromatch/braces/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js",
+    "lib"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=8"
+  },
+  "scripts": {
+    "test": "mocha",
+    "benchmark": "node benchmark"
+  },
+  "dependencies": {
+    "fill-range": "^7.0.1"
+  },
+  "devDependencies": {
+    "ansi-colors": "^3.2.4",
+    "bash-path": "^2.0.1",
+    "gulp-format-md": "^2.0.0",
+    "mocha": "^6.1.1"
+  },
+  "keywords": [
+    "alpha",
+    "alphabetical",
+    "bash",
+    "brace",
+    "braces",
+    "expand",
+    "expansion",
+    "filepath",
+    "fill",
+    "fs",
+    "glob",
+    "globbing",
+    "letter",
+    "match",
+    "matches",
+    "matching",
+    "number",
+    "numerical",
+    "path",
+    "range",
+    "ranges",
+    "sh"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "lint": {
+      "reflinks": true
+    },
+    "plugins": [
+      "gulp-format-md"
+    ]
+  }
+}

+ 21 - 0
node_modules/chokidar/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the “Software”), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 308 - 0
node_modules/chokidar/README.md

@@ -0,0 +1,308 @@
+# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar)
+
+> Minimal and efficient cross-platform file watching library
+
+[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar)
+
+## Why?
+
+Node.js `fs.watch`:
+
+* Doesn't report filenames on MacOS.
+* Doesn't report events at all when using editors like Sublime on MacOS.
+* Often reports events twice.
+* Emits most changes as `rename`.
+* Does not provide an easy way to recursively watch file trees.
+* Does not support recursive watching on Linux.
+
+Node.js `fs.watchFile`:
+
+* Almost as bad at event handling.
+* Also does not provide any recursive watching.
+* Results in high CPU utilization.
+
+Chokidar resolves these problems.
+
+Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in
+[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode),
+[gulp](https://github.com/gulpjs/gulp/),
+[karma](https://karma-runner.github.io/),
+[PM2](https://github.com/Unitech/PM2),
+[browserify](http://browserify.org/),
+[webpack](https://webpack.github.io/),
+[BrowserSync](https://www.browsersync.io/),
+and [many others](https://www.npmjs.com/browse/depended/chokidar).
+It has proven itself in production environments.
+
+Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
+
+## How?
+
+Chokidar does still rely on the Node.js core `fs` module, but when using
+`fs.watch` and `fs.watchFile` for watching, it normalizes the events it
+receives, often checking for truth by getting file stats and/or dir contents.
+
+On MacOS, chokidar by default uses a native extension exposing the Darwin
+`FSEvents` API. This provides very efficient recursive watching compared with
+implementations like `kqueue` available on most \*nix platforms. Chokidar still
+does have to do some work to normalize the events received that way as well.
+
+On most other platforms, the `fs.watch`-based implementation is the default, which
+avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
+watchers recursively for everything within scope of the paths that have been
+specified, so be judicious about not wasting system resources by watching much
+more than needed.
+
+## Getting started
+
+Install with npm:
+
+```sh
+npm install chokidar
+```
+
+Then `require` and use it in your code:
+
+```javascript
+const chokidar = require('chokidar');
+
+// One-liner for current directory
+chokidar.watch('.').on('all', (event, path) => {
+  console.log(event, path);
+});
+```
+
+## API
+
+```javascript
+// Example of a more typical implementation structure
+
+// Initialize watcher.
+const watcher = chokidar.watch('file, dir, glob, or array', {
+  ignored: /(^|[\/\\])\../, // ignore dotfiles
+  persistent: true
+});
+
+// Something to use when events are received.
+const log = console.log.bind(console);
+// Add event listeners.
+watcher
+  .on('add', path => log(`File ${path} has been added`))
+  .on('change', path => log(`File ${path} has been changed`))
+  .on('unlink', path => log(`File ${path} has been removed`));
+
+// More possible events.
+watcher
+  .on('addDir', path => log(`Directory ${path} has been added`))
+  .on('unlinkDir', path => log(`Directory ${path} has been removed`))
+  .on('error', error => log(`Watcher error: ${error}`))
+  .on('ready', () => log('Initial scan complete. Ready for changes'))
+  .on('raw', (event, path, details) => { // internal
+    log('Raw event info:', event, path, details);
+  });
+
+// 'add', 'addDir' and 'change' events also receive stat() results as second
+// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats
+watcher.on('change', (path, stats) => {
+  if (stats) console.log(`File ${path} changed size to ${stats.size}`);
+});
+
+// Watch new files.
+watcher.add('new-file');
+watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
+
+// Get list of actual paths being watched on the filesystem
+var watchedPaths = watcher.getWatched();
+
+// Un-watch some files.
+await watcher.unwatch('new-file*');
+
+// Stop watching.
+// The method is async!
+watcher.close().then(() => console.log('closed'));
+
+// Full list of options. See below for descriptions.
+// Do not use this example!
+chokidar.watch('file', {
+  persistent: true,
+
+  ignored: '*.txt',
+  ignoreInitial: false,
+  followSymlinks: true,
+  cwd: '.',
+  disableGlobbing: false,
+
+  usePolling: false,
+  interval: 100,
+  binaryInterval: 300,
+  alwaysStat: false,
+  depth: 99,
+  awaitWriteFinish: {
+    stabilityThreshold: 2000,
+    pollInterval: 100
+  },
+
+  ignorePermissionErrors: false,
+  atomic: true // or a custom 'atomicity delay', in milliseconds (default 100)
+});
+
+```
+
+`chokidar.watch(paths, [options])`
+
+* `paths` (string or array of strings). Paths to files, dirs to be watched
+recursively, or glob patterns.
+    - Note: globs must not contain windows separators (`\`),
+    because that's how they work by the standard —
+    you'll need to replace them with forward slashes (`/`).
+    - Note 2: for additional glob documentation, check out low-level
+    library: [picomatch](https://github.com/micromatch/picomatch).
+* `options` (object) Options object as defined below:
+
+#### Persistence
+
+* `persistent` (default: `true`). Indicates whether the process
+should continue to run as long as files are being watched. If set to
+`false` when using `fsevents` to watch, no more events will be emitted
+after `ready`, even if the process continues to run.
+
+#### Path filtering
+
+* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition)
+Defines files/paths to be ignored. The whole relative or absolute path is
+tested, not just filename. If a function with two arguments is provided, it
+gets called twice per path - once with a single argument (the path), second
+time with two arguments (the path and the
+[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
+object of that path).
+* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while
+instantiating the watching as chokidar discovers these file paths (before the `ready` event).
+* `followSymlinks` (default: `true`). When `false`, only the
+symlinks themselves will be watched for changes instead of following
+the link references and bubbling events through the link's path.
+* `cwd` (no default). The base directory from which watch `paths` are to be
+derived. Paths emitted with events will be relative to this.
+* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as
+literal path names, even if they look like globs.
+
+#### Performance
+
+* `usePolling` (default: `false`).
+Whether to use fs.watchFile (backed by polling), or fs.watch. If polling
+leads to high CPU utilization, consider setting this to `false`. It is
+typically necessary to **set this to `true` to successfully watch files over
+a network**, and it may be necessary to successfully watch files in other
+non-standard situations. Setting to `true` explicitly on MacOS overrides the
+`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable
+to true (1) or false (0) in order to override this option.
+* _Polling-specific settings_ (effective when `usePolling: true`)
+  * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also
+    set the CHOKIDAR_INTERVAL env variable to override this option.
+  * `binaryInterval` (default: `300`). Interval of file system
+  polling for binary files.
+  ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
+* `useFsEvents` (default: `true` on MacOS). Whether to use the
+`fsevents` watching interface if available. When set to `true` explicitly
+and `fsevents` is available this supercedes the `usePolling` setting. When
+set to `false` on MacOS, `usePolling: true` becomes the default.
+* `alwaysStat` (default: `false`). If relying upon the
+[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
+object that may get passed with `add`, `addDir`, and `change` events, set
+this to `true` to ensure it is provided even in cases where it wasn't
+already available from the underlying watch events.
+* `depth` (default: `undefined`). If set, limits how many levels of
+subdirectories will be traversed.
+* `awaitWriteFinish` (default: `false`).
+By default, the `add` event will fire when a file first appears on disk, before
+the entire file has been written. Furthermore, in some cases some `change`
+events will be emitted while the file is being written. In some cases,
+especially when watching for large files there will be a need to wait for the
+write operation to finish before responding to a file creation or modification.
+Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size,
+holding its `add` and `change` events until the size does not change for a
+configurable amount of time. The appropriate duration setting is heavily
+dependent on the OS and hardware. For accurate detection this parameter should
+be relatively high, making file watching much less responsive.
+Use with caution.
+  * *`options.awaitWriteFinish` can be set to an object in order to adjust
+  timing params:*
+  * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in
+  milliseconds for a file size to remain constant before emitting its event.
+  * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds.
+
+#### Errors
+
+* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files
+that don't have read permissions if possible. If watching fails due to `EPERM`
+or `EACCES` with this set to `true`, the errors will be suppressed silently.
+* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`).
+Automatically filters out artifacts that occur when using editors that use
+"atomic writes" instead of writing directly to the source file. If a file is
+re-added within 100 ms of being deleted, Chokidar emits a `change` event
+rather than `unlink` then `add`. If the default of 100 ms does not work well
+for you, you can override it by setting `atomic` to a custom value, in
+milliseconds.
+
+### Methods & Events
+
+`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:
+
+* `.add(path / paths)`: Add files, directories, or glob patterns for tracking.
+Takes an array of strings or just one string.
+* `.on(event, callback)`: Listen for an FS event.
+Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
+`raw`, `error`.
+Additionally `all` is available which gets emitted with the underlying event
+name and path for every event other than `ready`, `raw`, and `error`.  `raw` is internal, use it carefully.
+* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
+Takes an array of strings or just one string.
+* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
+* `.getWatched()`: Returns an object representing all the paths on the file
+system being watched by this `FSWatcher` instance. The object's keys are all the
+directories (using absolute paths unless the `cwd` option was used), and the
+values are arrays of the names of the items contained in each directory.
+
+## CLI
+
+If you need a CLI interface for your file watching, check out
+[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
+execute a command on each change, or get a stdio stream of change events.
+
+## Install Troubleshooting
+
+* `npm WARN optional dep failed, continuing fsevents@n.n.n`
+  * This message is normal part of how `npm` handles optional dependencies and is
+    not indicative of a problem. Even if accompanied by other related error messages,
+    Chokidar should function properly.
+
+* `TypeError: fsevents is not a constructor`
+  * Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar.
+
+* Chokidar is producing `ENOSP` error on Linux, like this:
+  * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
+  `Error: watch /home/ ENOSPC`
+  * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal:
+  `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
+
+## Changelog
+
+For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
+- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
+- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
+- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
+- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
+- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
+- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher.
+- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes.
+- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
+- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
+
+## Also
+
+Why was chokidar named this way? What's the meaning behind it?
+
+>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four).
+
+## License
+
+MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.

+ 973 - 0
node_modules/chokidar/index.js

@@ -0,0 +1,973 @@
+'use strict';
+
+const { EventEmitter } = require('events');
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+const readdirp = require('readdirp');
+const anymatch = require('anymatch').default;
+const globParent = require('glob-parent');
+const isGlob = require('is-glob');
+const braces = require('braces');
+const normalizePath = require('normalize-path');
+
+const NodeFsHandler = require('./lib/nodefs-handler');
+const FsEventsHandler = require('./lib/fsevents-handler');
+const {
+  EV_ALL,
+  EV_READY,
+  EV_ADD,
+  EV_CHANGE,
+  EV_UNLINK,
+  EV_ADD_DIR,
+  EV_UNLINK_DIR,
+  EV_RAW,
+  EV_ERROR,
+
+  STR_CLOSE,
+  STR_END,
+
+  BACK_SLASH_RE,
+  DOUBLE_SLASH_RE,
+  SLASH_OR_BACK_SLASH_RE,
+  DOT_RE,
+  REPLACER_RE,
+
+  SLASH,
+  SLASH_SLASH,
+  BRACE_START,
+  BANG,
+  ONE_DOT,
+  TWO_DOTS,
+  GLOBSTAR,
+  SLASH_GLOBSTAR,
+  ANYMATCH_OPTS,
+  STRING_TYPE,
+  FUNCTION_TYPE,
+  EMPTY_STR,
+  EMPTY_FN,
+
+  isWindows,
+  isMacos,
+  isIBMi
+} = require('./lib/constants');
+
+const stat = promisify(fs.stat);
+const readdir = promisify(fs.readdir);
+
+/**
+ * @typedef {String} Path
+ * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName
+ * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType
+ */
+
+/**
+ *
+ * @typedef {Object} WatchHelpers
+ * @property {Boolean} followSymlinks
+ * @property {'stat'|'lstat'} statMethod
+ * @property {Path} path
+ * @property {Path} watchPath
+ * @property {Function} entryPath
+ * @property {Boolean} hasGlob
+ * @property {Object} globFilter
+ * @property {Function} filterPath
+ * @property {Function} filterDir
+ */
+
+const arrify = (value = []) => Array.isArray(value) ? value : [value];
+const flatten = (list, result = []) => {
+  list.forEach(item => {
+    if (Array.isArray(item)) {
+      flatten(item, result);
+    } else {
+      result.push(item);
+    }
+  });
+  return result;
+};
+
+const unifyPaths = (paths_) => {
+  /**
+   * @type {Array<String>}
+   */
+  const paths = flatten(arrify(paths_));
+  if (!paths.every(p => typeof p === STRING_TYPE)) {
+    throw new TypeError(`Non-string provided as watch path: ${paths}`);
+  }
+  return paths.map(normalizePathToUnix);
+};
+
+// If SLASH_SLASH occurs at the beginning of path, it is not replaced
+//     because "//StoragePC/DrivePool/Movies" is a valid network path
+const toUnix = (string) => {
+  let str = string.replace(BACK_SLASH_RE, SLASH);
+  let prepend = false;
+  if (str.startsWith(SLASH_SLASH)) {
+    prepend = true;
+  }
+  while (str.match(DOUBLE_SLASH_RE)) {
+    str = str.replace(DOUBLE_SLASH_RE, SLASH);
+  }
+  if (prepend) {
+    str = SLASH + str;
+  }
+  return str;
+};
+
+// Our version of upath.normalize
+// TODO: this is not equal to path-normalize module - investigate why
+const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
+
+const normalizeIgnored = (cwd = EMPTY_STR) => (path) => {
+  if (typeof path !== STRING_TYPE) return path;
+  return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
+};
+
+const getAbsolutePath = (path, cwd) => {
+  if (sysPath.isAbsolute(path)) {
+    return path;
+  }
+  if (path.startsWith(BANG)) {
+    return BANG + sysPath.join(cwd, path.slice(1));
+  }
+  return sysPath.join(cwd, path);
+};
+
+const undef = (opts, key) => opts[key] === undefined;
+
+/**
+ * Directory entry.
+ * @property {Path} path
+ * @property {Set<Path>} items
+ */
+class DirEntry {
+  /**
+   * @param {Path} dir
+   * @param {Function} removeWatcher
+   */
+  constructor(dir, removeWatcher) {
+    this.path = dir;
+    this._removeWatcher = removeWatcher;
+    /** @type {Set<Path>} */
+    this.items = new Set();
+  }
+
+  add(item) {
+    const {items} = this;
+    if (!items) return;
+    if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
+  }
+
+  async remove(item) {
+    const {items} = this;
+    if (!items) return;
+    items.delete(item);
+    if (items.size > 0) return;
+
+    const dir = this.path;
+    try {
+      await readdir(dir);
+    } catch (err) {
+      if (this._removeWatcher) {
+        this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
+      }
+    }
+  }
+
+  has(item) {
+    const {items} = this;
+    if (!items) return;
+    return items.has(item);
+  }
+
+  /**
+   * @returns {Array<String>}
+   */
+  getChildren() {
+    const {items} = this;
+    if (!items) return;
+    return [...items.values()];
+  }
+
+  dispose() {
+    this.items.clear();
+    delete this.path;
+    delete this._removeWatcher;
+    delete this.items;
+    Object.freeze(this);
+  }
+}
+
+const STAT_METHOD_F = 'stat';
+const STAT_METHOD_L = 'lstat';
+class WatchHelper {
+  constructor(path, watchPath, follow, fsw) {
+    this.fsw = fsw;
+    this.path = path = path.replace(REPLACER_RE, EMPTY_STR);
+    this.watchPath = watchPath;
+    this.fullWatchPath = sysPath.resolve(watchPath);
+    this.hasGlob = watchPath !== path;
+    /** @type {object|boolean} */
+    if (path === EMPTY_STR) this.hasGlob = false;
+    this.globSymlink = this.hasGlob && follow ? undefined : false;
+    this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;
+    this.dirParts = this.getDirParts(path);
+    this.dirParts.forEach((parts) => {
+      if (parts.length > 1) parts.pop();
+    });
+    this.followSymlinks = follow;
+    this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
+  }
+
+  checkGlobSymlink(entry) {
+    // only need to resolve once
+    // first entry should always have entry.parentDir === EMPTY_STR
+    if (this.globSymlink === undefined) {
+      this.globSymlink = entry.fullParentDir === this.fullWatchPath ?
+        false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};
+    }
+
+    if (this.globSymlink) {
+      return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);
+    }
+
+    return entry.fullPath;
+  }
+
+  entryPath(entry) {
+    return sysPath.join(this.watchPath,
+      sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
+    );
+  }
+
+  filterPath(entry) {
+    const {stats} = entry;
+    if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
+    const resolvedPath = this.entryPath(entry);
+    const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?
+      this.globFilter(resolvedPath) : true;
+    return matchesGlob &&
+      this.fsw._isntIgnored(resolvedPath, stats) &&
+      this.fsw._hasReadPermissions(stats);
+  }
+
+  getDirParts(path) {
+    if (!this.hasGlob) return [];
+    const parts = [];
+    const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];
+    expandedPath.forEach((path) => {
+      parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
+    });
+    return parts;
+  }
+
+  filterDir(entry) {
+    if (this.hasGlob) {
+      const entryParts = this.getDirParts(this.checkGlobSymlink(entry));
+      let globstar = false;
+      this.unmatchedGlob = !this.dirParts.some((parts) => {
+        return parts.every((part, i) => {
+          if (part === GLOBSTAR) globstar = true;
+          return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);
+        });
+      });
+    }
+    return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
+  }
+}
+
+/**
+ * Watches files & directories for changes. Emitted events:
+ * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
+ *
+ *     new FSWatcher()
+ *       .add(directories)
+ *       .on('add', path => log('File', path, 'was added'))
+ */
+class FSWatcher extends EventEmitter {
+// Not indenting methods for history sake; for now.
+constructor(_opts) {
+  super();
+
+  const opts = {};
+  if (_opts) Object.assign(opts, _opts); // for frozen objects
+
+  /** @type {Map<String, DirEntry>} */
+  this._watched = new Map();
+  /** @type {Map<String, Array>} */
+  this._closers = new Map();
+  /** @type {Set<String>} */
+  this._ignoredPaths = new Set();
+
+  /** @type {Map<ThrottleType, Map>} */
+  this._throttled = new Map();
+
+  /** @type {Map<Path, String|Boolean>} */
+  this._symlinkPaths = new Map();
+
+  this._streams = new Set();
+  this.closed = false;
+
+  // Set up default options.
+  if (undef(opts, 'persistent')) opts.persistent = true;
+  if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;
+  if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;
+  if (undef(opts, 'interval')) opts.interval = 100;
+  if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;
+  if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;
+  opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;
+
+  // Enable fsevents on OS X when polling isn't explicitly enabled.
+  if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
+
+  // If we can't use fsevents, ensure the options reflect it's disabled.
+  const canUseFsEvents = FsEventsHandler.canUse();
+  if (!canUseFsEvents) opts.useFsEvents = false;
+
+  // Use polling on Mac if not using fsevents.
+  // Other platforms use non-polling fs_watch.
+  if (undef(opts, 'usePolling') && !opts.useFsEvents) {
+    opts.usePolling = isMacos;
+  }
+
+  // Always default to polling on IBM i because fs.watch() is not available on IBM i.
+  if(isIBMi) {
+    opts.usePolling = true;
+  }
+
+  // Global override (useful for end-developers that need to force polling for all
+  // instances of chokidar, regardless of usage/dependency depth)
+  const envPoll = process.env.CHOKIDAR_USEPOLLING;
+  if (envPoll !== undefined) {
+    const envLower = envPoll.toLowerCase();
+
+    if (envLower === 'false' || envLower === '0') {
+      opts.usePolling = false;
+    } else if (envLower === 'true' || envLower === '1') {
+      opts.usePolling = true;
+    } else {
+      opts.usePolling = !!envLower;
+    }
+  }
+  const envInterval = process.env.CHOKIDAR_INTERVAL;
+  if (envInterval) {
+    opts.interval = Number.parseInt(envInterval, 10);
+  }
+
+  // Editor atomic write normalization enabled by default with fs.watch
+  if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;
+  if (opts.atomic) this._pendingUnlinks = new Map();
+
+  if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;
+
+  if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;
+  if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};
+  const awf = opts.awaitWriteFinish;
+  if (awf) {
+    if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;
+    if (!awf.pollInterval) awf.pollInterval = 100;
+    this._pendingWrites = new Map();
+  }
+  if (opts.ignored) opts.ignored = arrify(opts.ignored);
+
+  let readyCalls = 0;
+  this._emitReady = () => {
+    readyCalls++;
+    if (readyCalls >= this._readyCount) {
+      this._emitReady = EMPTY_FN;
+      this._readyEmitted = true;
+      // use process.nextTick to allow time for listener to be bound
+      process.nextTick(() => this.emit(EV_READY));
+    }
+  };
+  this._emitRaw = (...args) => this.emit(EV_RAW, ...args);
+  this._readyEmitted = false;
+  this.options = opts;
+
+  // Initialize with proper watcher.
+  if (opts.useFsEvents) {
+    this._fsEventsHandler = new FsEventsHandler(this);
+  } else {
+    this._nodeFsHandler = new NodeFsHandler(this);
+  }
+
+  // You’re frozen when your heart’s not open.
+  Object.freeze(opts);
+}
+
+// Public methods
+
+/**
+ * Adds paths to be watched on an existing FSWatcher instance
+ * @param {Path|Array<Path>} paths_
+ * @param {String=} _origAdd private; for handling non-existent paths to be watched
+ * @param {Boolean=} _internal private; indicates a non-user add
+ * @returns {FSWatcher} for chaining
+ */
+add(paths_, _origAdd, _internal) {
+  const {cwd, disableGlobbing} = this.options;
+  this.closed = false;
+  let paths = unifyPaths(paths_);
+  if (cwd) {
+    paths = paths.map((path) => {
+      const absPath = getAbsolutePath(path, cwd);
+
+      // Check `path` instead of `absPath` because the cwd portion can't be a glob
+      if (disableGlobbing || !isGlob(path)) {
+        return absPath;
+      }
+      return normalizePath(absPath);
+    });
+  }
+
+  // set aside negated glob strings
+  paths = paths.filter((path) => {
+    if (path.startsWith(BANG)) {
+      this._ignoredPaths.add(path.slice(1));
+      return false;
+    }
+
+    // if a path is being added that was previously ignored, stop ignoring it
+    this._ignoredPaths.delete(path);
+    this._ignoredPaths.delete(path + SLASH_GLOBSTAR);
+
+    // reset the cached userIgnored anymatch fn
+    // to make ignoredPaths changes effective
+    this._userIgnored = undefined;
+
+    return true;
+  });
+
+  if (this.options.useFsEvents && this._fsEventsHandler) {
+    if (!this._readyCount) this._readyCount = paths.length;
+    if (this.options.persistent) this._readyCount *= 2;
+    paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
+  } else {
+    if (!this._readyCount) this._readyCount = 0;
+    this._readyCount += paths.length;
+    Promise.all(
+      paths.map(async path => {
+        const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);
+        if (res) this._emitReady();
+        return res;
+      })
+    ).then(results => {
+      if (this.closed) return;
+      results.filter(item => item).forEach(item => {
+        this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
+      });
+    });
+  }
+
+  return this;
+}
+
+/**
+ * Close watchers or start ignoring events from specified paths.
+ * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs
+ * @returns {FSWatcher} for chaining
+*/
+unwatch(paths_) {
+  if (this.closed) return this;
+  const paths = unifyPaths(paths_);
+  const {cwd} = this.options;
+
+  paths.forEach((path) => {
+    // convert to absolute path unless relative path already matches
+    if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
+      if (cwd) path = sysPath.join(cwd, path);
+      path = sysPath.resolve(path);
+    }
+
+    this._closePath(path);
+
+    this._ignoredPaths.add(path);
+    if (this._watched.has(path)) {
+      this._ignoredPaths.add(path + SLASH_GLOBSTAR);
+    }
+
+    // reset the cached userIgnored anymatch fn
+    // to make ignoredPaths changes effective
+    this._userIgnored = undefined;
+  });
+
+  return this;
+}
+
+/**
+ * Close watchers and remove all listeners from watched paths.
+ * @returns {Promise<void>}.
+*/
+close() {
+  if (this.closed) return this._closePromise;
+  this.closed = true;
+
+  // Memory management.
+  this.removeAllListeners();
+  const closers = [];
+  this._closers.forEach(closerList => closerList.forEach(closer => {
+    const promise = closer();
+    if (promise instanceof Promise) closers.push(promise);
+  }));
+  this._streams.forEach(stream => stream.destroy());
+  this._userIgnored = undefined;
+  this._readyCount = 0;
+  this._readyEmitted = false;
+  this._watched.forEach(dirent => dirent.dispose());
+  ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {
+    this[`_${key}`].clear();
+  });
+
+  this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
+  return this._closePromise;
+}
+
+/**
+ * Expose list of watched paths
+ * @returns {Object} for chaining
+*/
+getWatched() {
+  const watchList = {};
+  this._watched.forEach((entry, dir) => {
+    const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
+    watchList[key || ONE_DOT] = entry.getChildren().sort();
+  });
+  return watchList;
+}
+
+emitWithAll(event, args) {
+  this.emit(...args);
+  if (event !== EV_ERROR) this.emit(EV_ALL, ...args);
+}
+
+// Common helpers
+// --------------
+
+/**
+ * Normalize and emit events.
+ * Calling _emit DOES NOT MEAN emit() would be called!
+ * @param {EventName} event Type of event
+ * @param {Path} path File or directory path
+ * @param {*=} val1 arguments to be passed with event
+ * @param {*=} val2
+ * @param {*=} val3
+ * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+ */
+async _emit(event, path, val1, val2, val3) {
+  if (this.closed) return;
+
+  const opts = this.options;
+  if (isWindows) path = sysPath.normalize(path);
+  if (opts.cwd) path = sysPath.relative(opts.cwd, path);
+  /** @type Array<any> */
+  const args = [event, path];
+  if (val3 !== undefined) args.push(val1, val2, val3);
+  else if (val2 !== undefined) args.push(val1, val2);
+  else if (val1 !== undefined) args.push(val1);
+
+  const awf = opts.awaitWriteFinish;
+  let pw;
+  if (awf && (pw = this._pendingWrites.get(path))) {
+    pw.lastChange = new Date();
+    return this;
+  }
+
+  if (opts.atomic) {
+    if (event === EV_UNLINK) {
+      this._pendingUnlinks.set(path, args);
+      setTimeout(() => {
+        this._pendingUnlinks.forEach((entry, path) => {
+          this.emit(...entry);
+          this.emit(EV_ALL, ...entry);
+          this._pendingUnlinks.delete(path);
+        });
+      }, typeof opts.atomic === 'number' ? opts.atomic : 100);
+      return this;
+    }
+    if (event === EV_ADD && this._pendingUnlinks.has(path)) {
+      event = args[0] = EV_CHANGE;
+      this._pendingUnlinks.delete(path);
+    }
+  }
+
+  if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
+    const awfEmit = (err, stats) => {
+      if (err) {
+        event = args[0] = EV_ERROR;
+        args[1] = err;
+        this.emitWithAll(event, args);
+      } else if (stats) {
+        // if stats doesn't exist the file must have been deleted
+        if (args.length > 2) {
+          args[2] = stats;
+        } else {
+          args.push(stats);
+        }
+        this.emitWithAll(event, args);
+      }
+    };
+
+    this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
+    return this;
+  }
+
+  if (event === EV_CHANGE) {
+    const isThrottled = !this._throttle(EV_CHANGE, path, 50);
+    if (isThrottled) return this;
+  }
+
+  if (opts.alwaysStat && val1 === undefined &&
+    (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)
+  ) {
+    const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
+    let stats;
+    try {
+      stats = await stat(fullPath);
+    } catch (err) {}
+    // Suppress event when fs_stat fails, to avoid sending undefined 'stat'
+    if (!stats || this.closed) return;
+    args.push(stats);
+  }
+  this.emitWithAll(event, args);
+
+  return this;
+}
+
+/**
+ * Common handler for errors
+ * @param {Error} error
+ * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+ */
+_handleError(error) {
+  const code = error && error.code;
+  if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&
+    (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))
+  ) {
+    this.emit(EV_ERROR, error);
+  }
+  return error || this.closed;
+}
+
+/**
+ * Helper utility for throttling
+ * @param {ThrottleType} actionType type being throttled
+ * @param {Path} path being acted upon
+ * @param {Number} timeout duration of time to suppress duplicate actions
+ * @returns {Object|false} tracking object or false if action should be suppressed
+ */
+_throttle(actionType, path, timeout) {
+  if (!this._throttled.has(actionType)) {
+    this._throttled.set(actionType, new Map());
+  }
+
+  /** @type {Map<Path, Object>} */
+  const action = this._throttled.get(actionType);
+  /** @type {Object} */
+  const actionPath = action.get(path);
+
+  if (actionPath) {
+    actionPath.count++;
+    return false;
+  }
+
+  let timeoutObject;
+  const clear = () => {
+    const item = action.get(path);
+    const count = item ? item.count : 0;
+    action.delete(path);
+    clearTimeout(timeoutObject);
+    if (item) clearTimeout(item.timeoutObject);
+    return count;
+  };
+  timeoutObject = setTimeout(clear, timeout);
+  const thr = {timeoutObject, clear, count: 0};
+  action.set(path, thr);
+  return thr;
+}
+
+_incrReadyCount() {
+  return this._readyCount++;
+}
+
+/**
+ * Awaits write operation to finish.
+ * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
+ * @param {Path} path being acted upon
+ * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
+ * @param {EventName} event
+ * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
+ */
+_awaitWriteFinish(path, threshold, event, awfEmit) {
+  let timeoutHandler;
+
+  let fullPath = path;
+  if (this.options.cwd && !sysPath.isAbsolute(path)) {
+    fullPath = sysPath.join(this.options.cwd, path);
+  }
+
+  const now = new Date();
+
+  const awaitWriteFinish = (prevStat) => {
+    fs.stat(fullPath, (err, curStat) => {
+      if (err || !this._pendingWrites.has(path)) {
+        if (err && err.code !== 'ENOENT') awfEmit(err);
+        return;
+      }
+
+      const now = Number(new Date());
+
+      if (prevStat && curStat.size !== prevStat.size) {
+        this._pendingWrites.get(path).lastChange = now;
+      }
+      const pw = this._pendingWrites.get(path);
+      const df = now - pw.lastChange;
+
+      if (df >= threshold) {
+        this._pendingWrites.delete(path);
+        awfEmit(undefined, curStat);
+      } else {
+        timeoutHandler = setTimeout(
+          awaitWriteFinish,
+          this.options.awaitWriteFinish.pollInterval,
+          curStat
+        );
+      }
+    });
+  };
+
+  if (!this._pendingWrites.has(path)) {
+    this._pendingWrites.set(path, {
+      lastChange: now,
+      cancelWait: () => {
+        this._pendingWrites.delete(path);
+        clearTimeout(timeoutHandler);
+        return event;
+      }
+    });
+    timeoutHandler = setTimeout(
+      awaitWriteFinish,
+      this.options.awaitWriteFinish.pollInterval
+    );
+  }
+}
+
+_getGlobIgnored() {
+  return [...this._ignoredPaths.values()];
+}
+
+/**
+ * Determines whether user has asked to ignore this path.
+ * @param {Path} path filepath or dir
+ * @param {fs.Stats=} stats result of fs.stat
+ * @returns {Boolean}
+ */
+_isIgnored(path, stats) {
+  if (this.options.atomic && DOT_RE.test(path)) return true;
+  if (!this._userIgnored) {
+    const {cwd} = this.options;
+    const ign = this.options.ignored;
+
+    const ignored = ign && ign.map(normalizeIgnored(cwd));
+    const paths = arrify(ignored)
+      .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
+      .map((path) => path + SLASH_GLOBSTAR);
+    const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
+    this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);
+  }
+
+  return this._userIgnored([path, stats]);
+}
+
+_isntIgnored(path, stat) {
+  return !this._isIgnored(path, stat);
+}
+
+/**
+ * Provides a set of common helpers and properties relating to symlink and glob handling.
+ * @param {Path} path file, directory, or glob pattern being watched
+ * @param {Number=} depth at any depth > 0, this isn't a glob
+ * @returns {WatchHelper} object containing helpers for this path
+ */
+_getWatchHelpers(path, depth) {
+  const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
+  const follow = this.options.followSymlinks;
+
+  return new WatchHelper(path, watchPath, follow, this);
+}
+
+// Directory helpers
+// -----------------
+
+/**
+ * Provides directory tracking objects
+ * @param {String} directory path of the directory
+ * @returns {DirEntry} the directory's tracking object
+ */
+_getWatchedDir(directory) {
+  if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
+  const dir = sysPath.resolve(directory);
+  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
+  return this._watched.get(dir);
+}
+
+// File helpers
+// ------------
+
+/**
+ * Check for read permissions.
+ * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
+ * @param {fs.Stats} stats - object, result of fs_stat
+ * @returns {Boolean} indicates whether the file can be read
+*/
+_hasReadPermissions(stats) {
+  if (this.options.ignorePermissionErrors) return true;
+
+  // stats.mode may be bigint
+  const md = stats && Number.parseInt(stats.mode, 10);
+  const st = md & 0o777;
+  const it = Number.parseInt(st.toString(8)[0], 10);
+  return Boolean(4 & it);
+}
+
+/**
+ * Handles emitting unlink events for
+ * files and directories, and via recursion, for
+ * files and directories within directories that are unlinked
+ * @param {String} directory within which the following item is located
+ * @param {String} item      base path of item/directory
+ * @returns {void}
+*/
+_remove(directory, item, isDirectory) {
+  // if what is being deleted is a directory, get that directory's paths
+  // for recursive deleting and cleaning of watched object
+  // if it is not a directory, nestedDirectoryChildren will be empty array
+  const path = sysPath.join(directory, item);
+  const fullPath = sysPath.resolve(path);
+  isDirectory = isDirectory != null
+    ? isDirectory
+    : this._watched.has(path) || this._watched.has(fullPath);
+
+  // prevent duplicate handling in case of arriving here nearly simultaneously
+  // via multiple paths (such as _handleFile and _handleDir)
+  if (!this._throttle('remove', path, 100)) return;
+
+  // if the only watched file is removed, watch for its return
+  if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
+    this.add(directory, item, true);
+  }
+
+  // This will create a new entry in the watched object in either case
+  // so we got to do the directory check beforehand
+  const wp = this._getWatchedDir(path);
+  const nestedDirectoryChildren = wp.getChildren();
+
+  // Recursively remove children directories / files.
+  nestedDirectoryChildren.forEach(nested => this._remove(path, nested));
+
+  // Check if item was on the watched list and remove it
+  const parent = this._getWatchedDir(directory);
+  const wasTracked = parent.has(item);
+  parent.remove(item);
+
+  // Fixes issue #1042 -> Relative paths were detected and added as symlinks
+  // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
+  // but never removed from the map in case the path was deleted.
+  // This leads to an incorrect state if the path was recreated:
+  // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
+  if (this._symlinkPaths.has(fullPath)) {
+    this._symlinkPaths.delete(fullPath);
+  }
+
+  // If we wait for this file to be fully written, cancel the wait.
+  let relPath = path;
+  if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
+  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
+    const event = this._pendingWrites.get(relPath).cancelWait();
+    if (event === EV_ADD) return;
+  }
+
+  // The Entry will either be a directory that just got removed
+  // or a bogus entry to a file, in either case we have to remove it
+  this._watched.delete(path);
+  this._watched.delete(fullPath);
+  const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
+  if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
+
+  // Avoid conflicts if we later create another file with the same name
+  if (!this.options.useFsEvents) {
+    this._closePath(path);
+  }
+}
+
+/**
+ * Closes all watchers for a path
+ * @param {Path} path
+ */
+_closePath(path) {
+  this._closeFile(path)
+  const dir = sysPath.dirname(path);
+  this._getWatchedDir(dir).remove(sysPath.basename(path));
+}
+
+/**
+ * Closes only file-specific watchers
+ * @param {Path} path
+ */
+_closeFile(path) {
+  const closers = this._closers.get(path);
+  if (!closers) return;
+  closers.forEach(closer => closer());
+  this._closers.delete(path);
+}
+
+/**
+ *
+ * @param {Path} path
+ * @param {Function} closer
+ */
+_addPathCloser(path, closer) {
+  if (!closer) return;
+  let list = this._closers.get(path);
+  if (!list) {
+    list = [];
+    this._closers.set(path, list);
+  }
+  list.push(closer);
+}
+
+_readdirp(root, opts) {
+  if (this.closed) return;
+  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
+  let stream = readdirp(root, options);
+  this._streams.add(stream);
+  stream.once(STR_CLOSE, () => {
+    stream = undefined;
+  });
+  stream.once(STR_END, () => {
+    if (stream) {
+      this._streams.delete(stream);
+      stream = undefined;
+    }
+  });
+  return stream;
+}
+
+}
+
+// Export FSWatcher class
+exports.FSWatcher = FSWatcher;
+
+/**
+ * Instantiates watcher with paths to be tracked.
+ * @param {String|Array<String>} paths file/directory paths and/or globs
+ * @param {Object=} options chokidar opts
+ * @returns an instance of FSWatcher for chaining.
+ */
+const watch = (paths, options) => {
+  const watcher = new FSWatcher(options);
+  watcher.add(paths);
+  return watcher;
+};
+
+exports.watch = watch;

+ 65 - 0
node_modules/chokidar/lib/constants.js

@@ -0,0 +1,65 @@
+'use strict';
+
+const {sep} = require('path');
+const {platform} = process;
+const os = require('os');
+
+exports.EV_ALL = 'all';
+exports.EV_READY = 'ready';
+exports.EV_ADD = 'add';
+exports.EV_CHANGE = 'change';
+exports.EV_ADD_DIR = 'addDir';
+exports.EV_UNLINK = 'unlink';
+exports.EV_UNLINK_DIR = 'unlinkDir';
+exports.EV_RAW = 'raw';
+exports.EV_ERROR = 'error';
+
+exports.STR_DATA = 'data';
+exports.STR_END = 'end';
+exports.STR_CLOSE = 'close';
+
+exports.FSEVENT_CREATED = 'created';
+exports.FSEVENT_MODIFIED = 'modified';
+exports.FSEVENT_DELETED = 'deleted';
+exports.FSEVENT_MOVED = 'moved';
+exports.FSEVENT_CLONED = 'cloned';
+exports.FSEVENT_UNKNOWN = 'unknown';
+exports.FSEVENT_TYPE_FILE = 'file';
+exports.FSEVENT_TYPE_DIRECTORY = 'directory';
+exports.FSEVENT_TYPE_SYMLINK = 'symlink';
+
+exports.KEY_LISTENERS = 'listeners';
+exports.KEY_ERR = 'errHandlers';
+exports.KEY_RAW = 'rawEmitters';
+exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
+
+exports.DOT_SLASH = `.${sep}`;
+
+exports.BACK_SLASH_RE = /\\/g;
+exports.DOUBLE_SLASH_RE = /\/\//;
+exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
+exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
+exports.REPLACER_RE = /^\.[/\\]/;
+
+exports.SLASH = '/';
+exports.SLASH_SLASH = '//';
+exports.BRACE_START = '{';
+exports.BANG = '!';
+exports.ONE_DOT = '.';
+exports.TWO_DOTS = '..';
+exports.STAR = '*';
+exports.GLOBSTAR = '**';
+exports.ROOT_GLOBSTAR = '/**/*';
+exports.SLASH_GLOBSTAR = '/**';
+exports.DIR_SUFFIX = 'Dir';
+exports.ANYMATCH_OPTS = {dot: true};
+exports.STRING_TYPE = 'string';
+exports.FUNCTION_TYPE = 'function';
+exports.EMPTY_STR = '';
+exports.EMPTY_FN = () => {};
+exports.IDENTITY_FN = val => val;
+
+exports.isWindows = platform === 'win32';
+exports.isMacos = platform === 'darwin';
+exports.isLinux = platform === 'linux';
+exports.isIBMi = os.type() === 'OS400';

+ 524 - 0
node_modules/chokidar/lib/fsevents-handler.js

@@ -0,0 +1,524 @@
+'use strict';
+
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+
+let fsevents;
+try {
+  fsevents = require('fsevents');
+} catch (error) {
+  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
+}
+
+if (fsevents) {
+  // TODO: real check
+  const mtch = process.version.match(/v(\d+)\.(\d+)/);
+  if (mtch && mtch[1] && mtch[2]) {
+    const maj = Number.parseInt(mtch[1], 10);
+    const min = Number.parseInt(mtch[2], 10);
+    if (maj === 8 && min < 16) {
+      fsevents = undefined;
+    }
+  }
+}
+
+const {
+  EV_ADD,
+  EV_CHANGE,
+  EV_ADD_DIR,
+  EV_UNLINK,
+  EV_ERROR,
+  STR_DATA,
+  STR_END,
+  FSEVENT_CREATED,
+  FSEVENT_MODIFIED,
+  FSEVENT_DELETED,
+  FSEVENT_MOVED,
+  // FSEVENT_CLONED,
+  FSEVENT_UNKNOWN,
+  FSEVENT_TYPE_FILE,
+  FSEVENT_TYPE_DIRECTORY,
+  FSEVENT_TYPE_SYMLINK,
+
+  ROOT_GLOBSTAR,
+  DIR_SUFFIX,
+  DOT_SLASH,
+  FUNCTION_TYPE,
+  EMPTY_FN,
+  IDENTITY_FN
+} = require('./constants');
+
+const Depth = (value) => isNaN(value) ? {} : {depth: value};
+
+const stat = promisify(fs.stat);
+const lstat = promisify(fs.lstat);
+const realpath = promisify(fs.realpath);
+
+const statMethods = { stat, lstat };
+
+/**
+ * @typedef {String} Path
+ */
+
+/**
+ * @typedef {Object} FsEventsWatchContainer
+ * @property {Set<Function>} listeners
+ * @property {Function} rawEmitter
+ * @property {{stop: Function}} watcher
+ */
+
+// fsevents instance helper functions
+/**
+ * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
+ * @type {Map<Path,FsEventsWatchContainer>}
+ */
+const FSEventsWatchers = new Map();
+
+// Threshold of duplicate path prefixes at which to start
+// consolidating going forward
+const consolidateThreshhold = 10;
+
+const wrongEventFlags = new Set([
+  69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
+]);
+
+/**
+ * Instantiates the fsevents interface
+ * @param {Path} path path to be watched
+ * @param {Function} callback called when fsevents is bound and ready
+ * @returns {{stop: Function}} new fsevents instance
+ */
+const createFSEventsInstance = (path, callback) => {
+  const stop = fsevents.watch(path, callback);
+  return {stop};
+};
+
+/**
+ * Instantiates the fsevents interface or binds listeners to an existing one covering
+ * the same file tree.
+ * @param {Path} path           - to be watched
+ * @param {Path} realPath       - real path for symlinks
+ * @param {Function} listener   - called when fsevents emits events
+ * @param {Function} rawEmitter - passes data to listeners of the 'raw' event
+ * @returns {Function} closer
+ */
+function setFSEventsListener(path, realPath, listener, rawEmitter) {
+  let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
+
+  const parentPath = sysPath.dirname(watchPath);
+  let cont = FSEventsWatchers.get(watchPath);
+
+  // If we've accumulated a substantial number of paths that
+  // could have been consolidated by watching one directory
+  // above the current one, create a watcher on the parent
+  // path instead, so that we do consolidate going forward.
+  if (couldConsolidate(parentPath)) {
+    watchPath = parentPath;
+  }
+
+  const resolvedPath = sysPath.resolve(path);
+  const hasSymlink = resolvedPath !== realPath;
+
+  const filteredListener = (fullPath, flags, info) => {
+    if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
+    if (
+      fullPath === resolvedPath ||
+      !fullPath.indexOf(resolvedPath + sysPath.sep)
+    ) listener(fullPath, flags, info);
+  };
+
+  // check if there is already a watcher on a parent path
+  // modifies `watchPath` to the parent path when it finds a match
+  let watchedParent = false;
+  for (const watchedPath of FSEventsWatchers.keys()) {
+    if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
+      watchPath = watchedPath;
+      cont = FSEventsWatchers.get(watchPath);
+      watchedParent = true;
+      break;
+    }
+  }
+
+  if (cont || watchedParent) {
+    cont.listeners.add(filteredListener);
+  } else {
+    cont = {
+      listeners: new Set([filteredListener]),
+      rawEmitter,
+      watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
+        if (!cont.listeners.size) return;
+        const info = fsevents.getInfo(fullPath, flags);
+        cont.listeners.forEach(list => {
+          list(fullPath, flags, info);
+        });
+
+        cont.rawEmitter(info.event, fullPath, info);
+      })
+    };
+    FSEventsWatchers.set(watchPath, cont);
+  }
+
+  // removes this instance's listeners and closes the underlying fsevents
+  // instance if there are no more listeners left
+  return () => {
+    const lst = cont.listeners;
+
+    lst.delete(filteredListener);
+    if (!lst.size) {
+      FSEventsWatchers.delete(watchPath);
+      if (cont.watcher) return cont.watcher.stop().then(() => {
+        cont.rawEmitter = cont.watcher = undefined;
+        Object.freeze(cont);
+      });
+    }
+  };
+}
+
+// Decide whether or not we should start a new higher-level
+// parent watcher
+const couldConsolidate = (path) => {
+  let count = 0;
+  for (const watchPath of FSEventsWatchers.keys()) {
+    if (watchPath.indexOf(path) === 0) {
+      count++;
+      if (count >= consolidateThreshhold) {
+        return true;
+      }
+    }
+  }
+
+  return false;
+};
+
+// returns boolean indicating whether fsevents can be used
+const canUse = () => fsevents && FSEventsWatchers.size < 128;
+
+// determines subdirectory traversal levels from root to path
+const calcDepth = (path, root) => {
+  let i = 0;
+  while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
+  return i;
+};
+
+// returns boolean indicating whether the fsevents' event info has the same type
+// as the one returned by fs.stat
+const sameTypes = (info, stats) => (
+  info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
+  info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
+  info.type === FSEVENT_TYPE_FILE && stats.isFile()
+)
+
+/**
+ * @mixin
+ */
+class FsEventsHandler {
+
+/**
+ * @param {import('../index').FSWatcher} fsw
+ */
+constructor(fsw) {
+  this.fsw = fsw;
+}
+checkIgnored(path, stats) {
+  const ipaths = this.fsw._ignoredPaths;
+  if (this.fsw._isIgnored(path, stats)) {
+    ipaths.add(path);
+    if (stats && stats.isDirectory()) {
+      ipaths.add(path + ROOT_GLOBSTAR);
+    }
+    return true;
+  }
+
+  ipaths.delete(path);
+  ipaths.delete(path + ROOT_GLOBSTAR);
+}
+
+addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+  const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
+  this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+}
+
+async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+  try {
+    const stats = await stat(path)
+    if (this.fsw.closed) return;
+    if (sameTypes(info, stats)) {
+      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+    } else {
+      this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+    }
+  } catch (error) {
+    if (error.code === 'EACCES') {
+      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+    } else {
+      this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+    }
+  }
+}
+
+handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+  if (this.fsw.closed || this.checkIgnored(path)) return;
+
+  if (event === EV_UNLINK) {
+    const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
+    // suppress unlink events on never before seen files
+    if (isDirectory || watchedDir.has(item)) {
+      this.fsw._remove(parent, item, isDirectory);
+    }
+  } else {
+    if (event === EV_ADD) {
+      // track new directories
+      if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
+
+      if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
+        // push symlinks back to the top of the stack to get handled
+        const curDepth = opts.depth === undefined ?
+          undefined : calcDepth(fullPath, realPath) + 1;
+        return this._addToFsEvents(path, false, true, curDepth);
+      }
+
+      // track new paths
+      // (other than symlinks being followed, which will be tracked soon)
+      this.fsw._getWatchedDir(parent).add(item);
+    }
+    /**
+     * @type {'add'|'addDir'|'unlink'|'unlinkDir'}
+     */
+    const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
+    this.fsw._emit(eventName, path);
+    if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
+  }
+}
+
+/**
+ * Handle symlinks encountered during directory scan
+ * @param {String} watchPath  - file/dir path to be watched with fsevents
+ * @param {String} realPath   - real path (in case of symlinks)
+ * @param {Function} transform  - path transformer
+ * @param {Function} globFilter - path filter in case a glob pattern was provided
+ * @returns {Function} closer for the watcher instance
+*/
+_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
+  if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
+  const opts = this.fsw.options;
+  const watchCallback = async (fullPath, flags, info) => {
+    if (this.fsw.closed) return;
+    if (
+      opts.depth !== undefined &&
+      calcDepth(fullPath, realPath) > opts.depth
+    ) return;
+    const path = transform(sysPath.join(
+      watchPath, sysPath.relative(watchPath, fullPath)
+    ));
+    if (globFilter && !globFilter(path)) return;
+    // ensure directories are tracked
+    const parent = sysPath.dirname(path);
+    const item = sysPath.basename(path);
+    const watchedDir = this.fsw._getWatchedDir(
+      info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
+    );
+
+    // correct for wrong events emitted
+    if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
+      if (typeof opts.ignored === FUNCTION_TYPE) {
+        let stats;
+        try {
+          stats = await stat(path);
+        } catch (error) {}
+        if (this.fsw.closed) return;
+        if (this.checkIgnored(path, stats)) return;
+        if (sameTypes(info, stats)) {
+          this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+        } else {
+          this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+        }
+      } else {
+        this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+      }
+    } else {
+      switch (info.event) {
+      case FSEVENT_CREATED:
+      case FSEVENT_MODIFIED:
+        return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+      case FSEVENT_DELETED:
+      case FSEVENT_MOVED:
+        return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+      }
+    }
+  };
+
+  const closer = setFSEventsListener(
+    watchPath,
+    realPath,
+    watchCallback,
+    this.fsw._emitRaw
+  );
+
+  this.fsw._emitReady();
+  return closer;
+}
+
+/**
+ * Handle symlinks encountered during directory scan
+ * @param {String} linkPath path to symlink
+ * @param {String} fullPath absolute path to the symlink
+ * @param {Function} transform pre-existing path transformer
+ * @param {Number} curDepth level of subdirectories traversed to where symlink is
+ * @returns {Promise<void>}
+ */
+async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
+  // don't follow the same symlink more than once
+  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
+
+  this.fsw._symlinkPaths.set(fullPath, true);
+  this.fsw._incrReadyCount();
+
+  try {
+    const linkTarget = await realpath(linkPath);
+    if (this.fsw.closed) return;
+    if (this.fsw._isIgnored(linkTarget)) {
+      return this.fsw._emitReady();
+    }
+
+    this.fsw._incrReadyCount();
+
+    // add the linkTarget for watching with a wrapper for transform
+    // that causes emitted paths to incorporate the link's path
+    this._addToFsEvents(linkTarget || linkPath, (path) => {
+      let aliasedPath = linkPath;
+      if (linkTarget && linkTarget !== DOT_SLASH) {
+        aliasedPath = path.replace(linkTarget, linkPath);
+      } else if (path !== DOT_SLASH) {
+        aliasedPath = sysPath.join(linkPath, path);
+      }
+      return transform(aliasedPath);
+    }, false, curDepth);
+  } catch(error) {
+    if (this.fsw._handleError(error)) {
+      return this.fsw._emitReady();
+    }
+  }
+}
+
+/**
+ *
+ * @param {Path} newPath
+ * @param {fs.Stats} stats
+ */
+emitAdd(newPath, stats, processPath, opts, forceAdd) {
+  const pp = processPath(newPath);
+  const isDir = stats.isDirectory();
+  const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
+  const base = sysPath.basename(pp);
+
+  // ensure empty dirs get tracked
+  if (isDir) this.fsw._getWatchedDir(pp);
+  if (dirObj.has(base)) return;
+  dirObj.add(base);
+
+  if (!opts.ignoreInitial || forceAdd === true) {
+    this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
+  }
+}
+
+initWatch(realPath, path, wh, processPath) {
+  if (this.fsw.closed) return;
+  const closer = this._watchWithFsEvents(
+    wh.watchPath,
+    sysPath.resolve(realPath || wh.watchPath),
+    processPath,
+    wh.globFilter
+  );
+  this.fsw._addPathCloser(path, closer);
+}
+
+/**
+ * Handle added path with fsevents
+ * @param {String} path file/dir path or glob pattern
+ * @param {Function|Boolean=} transform converts working path to what the user expects
+ * @param {Boolean=} forceAdd ensure add is emitted
+ * @param {Number=} priorDepth Level of subdirectories already traversed.
+ * @returns {Promise<void>}
+ */
+async _addToFsEvents(path, transform, forceAdd, priorDepth) {
+  if (this.fsw.closed) {
+    return;
+  }
+  const opts = this.fsw.options;
+  const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
+
+  const wh = this.fsw._getWatchHelpers(path);
+
+  // evaluate what is at the path we're being asked to watch
+  try {
+    const stats = await statMethods[wh.statMethod](wh.watchPath);
+    if (this.fsw.closed) return;
+    if (this.fsw._isIgnored(wh.watchPath, stats)) {
+      throw null;
+    }
+    if (stats.isDirectory()) {
+      // emit addDir unless this is a glob parent
+      if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
+
+      // don't recurse further if it would exceed depth setting
+      if (priorDepth && priorDepth > opts.depth) return;
+
+      // scan the contents of the dir
+      this.fsw._readdirp(wh.watchPath, {
+        fileFilter: entry => wh.filterPath(entry),
+        directoryFilter: entry => wh.filterDir(entry),
+        ...Depth(opts.depth - (priorDepth || 0))
+      }).on(STR_DATA, (entry) => {
+        // need to check filterPath on dirs b/c filterDir is less restrictive
+        if (this.fsw.closed) {
+          return;
+        }
+        if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
+
+        const joinedPath = sysPath.join(wh.watchPath, entry.path);
+        const {fullPath} = entry;
+
+        if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
+          // preserve the current depth here since it can't be derived from
+          // real paths past the symlink
+          const curDepth = opts.depth === undefined ?
+            undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
+
+          this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
+        } else {
+          this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
+        }
+      }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
+        this.fsw._emitReady();
+      });
+    } else {
+      this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
+      this.fsw._emitReady();
+    }
+  } catch (error) {
+    if (!error || this.fsw._handleError(error)) {
+      // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
+      this.fsw._emitReady();
+      this.fsw._emitReady();
+    }
+  }
+
+  if (opts.persistent && forceAdd !== true) {
+    if (typeof transform === FUNCTION_TYPE) {
+      // realpath has already been resolved
+      this.initWatch(undefined, path, wh, processPath);
+    } else {
+      let realPath;
+      try {
+        realPath = await realpath(wh.watchPath);
+      } catch (e) {}
+      this.initWatch(realPath, path, wh, processPath);
+    }
+  }
+}
+
+}
+
+module.exports = FsEventsHandler;
+module.exports.canUse = canUse;

+ 654 - 0
node_modules/chokidar/lib/nodefs-handler.js

@@ -0,0 +1,654 @@
+'use strict';
+
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+const isBinaryPath = require('is-binary-path');
+const {
+  isWindows,
+  isLinux,
+  EMPTY_FN,
+  EMPTY_STR,
+  KEY_LISTENERS,
+  KEY_ERR,
+  KEY_RAW,
+  HANDLER_KEYS,
+  EV_CHANGE,
+  EV_ADD,
+  EV_ADD_DIR,
+  EV_ERROR,
+  STR_DATA,
+  STR_END,
+  BRACE_START,
+  STAR
+} = require('./constants');
+
+const THROTTLE_MODE_WATCH = 'watch';
+
+const open = promisify(fs.open);
+const stat = promisify(fs.stat);
+const lstat = promisify(fs.lstat);
+const close = promisify(fs.close);
+const fsrealpath = promisify(fs.realpath);
+
+const statMethods = { lstat, stat };
+
+// TODO: emit errors properly. Example: EMFILE on Macos.
+const foreach = (val, fn) => {
+  if (val instanceof Set) {
+    val.forEach(fn);
+  } else {
+    fn(val);
+  }
+};
+
+const addAndConvert = (main, prop, item) => {
+  let container = main[prop];
+  if (!(container instanceof Set)) {
+    main[prop] = container = new Set([container]);
+  }
+  container.add(item);
+};
+
+const clearItem = cont => key => {
+  const set = cont[key];
+  if (set instanceof Set) {
+    set.clear();
+  } else {
+    delete cont[key];
+  }
+};
+
+const delFromSet = (main, prop, item) => {
+  const container = main[prop];
+  if (container instanceof Set) {
+    container.delete(item);
+  } else if (container === item) {
+    delete main[prop];
+  }
+};
+
+const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
+
+/**
+ * @typedef {String} Path
+ */
+
+// fs_watch helpers
+
+// object to hold per-process fs_watch instances
+// (may be shared across chokidar FSWatcher instances)
+
+/**
+ * @typedef {Object} FsWatchContainer
+ * @property {Set} listeners
+ * @property {Set} errHandlers
+ * @property {Set} rawEmitters
+ * @property {fs.FSWatcher=} watcher
+ * @property {Boolean=} watcherUnusable
+ */
+
+/**
+ * @type {Map<String,FsWatchContainer>}
+ */
+const FsWatchInstances = new Map();
+
+/**
+ * Instantiates the fs_watch interface
+ * @param {String} path to be watched
+ * @param {Object} options to be passed to fs_watch
+ * @param {Function} listener main event handler
+ * @param {Function} errHandler emits info about errors
+ * @param {Function} emitRaw emits raw event data
+ * @returns {fs.FSWatcher} new fsevents instance
+ */
+function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
+  const handleEvent = (rawEvent, evPath) => {
+    listener(path);
+    emitRaw(rawEvent, evPath, {watchedPath: path});
+
+    // emit based on events occurring for files from a directory's watcher in
+    // case the file's watcher misses it (and rely on throttling to de-dupe)
+    if (evPath && path !== evPath) {
+      fsWatchBroadcast(
+        sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)
+      );
+    }
+  };
+  try {
+    return fs.watch(path, options, handleEvent);
+  } catch (error) {
+    errHandler(error);
+  }
+}
+
+/**
+ * Helper for passing fs_watch event data to a collection of listeners
+ * @param {Path} fullPath absolute path bound to fs_watch instance
+ * @param {String} type listener type
+ * @param {*=} val1 arguments to be passed to listeners
+ * @param {*=} val2
+ * @param {*=} val3
+ */
+const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {
+  const cont = FsWatchInstances.get(fullPath);
+  if (!cont) return;
+  foreach(cont[type], (listener) => {
+    listener(val1, val2, val3);
+  });
+};
+
+/**
+ * Instantiates the fs_watch interface or binds listeners
+ * to an existing one covering the same file system entry
+ * @param {String} path
+ * @param {String} fullPath absolute path
+ * @param {Object} options to be passed to fs_watch
+ * @param {Object} handlers container for event listener functions
+ */
+const setFsWatchListener = (path, fullPath, options, handlers) => {
+  const {listener, errHandler, rawEmitter} = handlers;
+  let cont = FsWatchInstances.get(fullPath);
+
+  /** @type {fs.FSWatcher=} */
+  let watcher;
+  if (!options.persistent) {
+    watcher = createFsWatchInstance(
+      path, options, listener, errHandler, rawEmitter
+    );
+    return watcher.close.bind(watcher);
+  }
+  if (cont) {
+    addAndConvert(cont, KEY_LISTENERS, listener);
+    addAndConvert(cont, KEY_ERR, errHandler);
+    addAndConvert(cont, KEY_RAW, rawEmitter);
+  } else {
+    watcher = createFsWatchInstance(
+      path,
+      options,
+      fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
+      errHandler, // no need to use broadcast here
+      fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
+    );
+    if (!watcher) return;
+    watcher.on(EV_ERROR, async (error) => {
+      const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
+      cont.watcherUnusable = true; // documented since Node 10.4.1
+      // Workaround for https://github.com/joyent/node/issues/4337
+      if (isWindows && error.code === 'EPERM') {
+        try {
+          const fd = await open(path, 'r');
+          await close(fd);
+          broadcastErr(error);
+        } catch (err) {}
+      } else {
+        broadcastErr(error);
+      }
+    });
+    cont = {
+      listeners: listener,
+      errHandlers: errHandler,
+      rawEmitters: rawEmitter,
+      watcher
+    };
+    FsWatchInstances.set(fullPath, cont);
+  }
+  // const index = cont.listeners.indexOf(listener);
+
+  // removes this instance's listeners and closes the underlying fs_watch
+  // instance if there are no more listeners left
+  return () => {
+    delFromSet(cont, KEY_LISTENERS, listener);
+    delFromSet(cont, KEY_ERR, errHandler);
+    delFromSet(cont, KEY_RAW, rawEmitter);
+    if (isEmptySet(cont.listeners)) {
+      // Check to protect against issue gh-730.
+      // if (cont.watcherUnusable) {
+      cont.watcher.close();
+      // }
+      FsWatchInstances.delete(fullPath);
+      HANDLER_KEYS.forEach(clearItem(cont));
+      cont.watcher = undefined;
+      Object.freeze(cont);
+    }
+  };
+};
+
+// fs_watchFile helpers
+
+// object to hold per-process fs_watchFile instances
+// (may be shared across chokidar FSWatcher instances)
+const FsWatchFileInstances = new Map();
+
+/**
+ * Instantiates the fs_watchFile interface or binds listeners
+ * to an existing one covering the same file system entry
+ * @param {String} path to be watched
+ * @param {String} fullPath absolute path
+ * @param {Object} options options to be passed to fs_watchFile
+ * @param {Object} handlers container for event listener functions
+ * @returns {Function} closer
+ */
+const setFsWatchFileListener = (path, fullPath, options, handlers) => {
+  const {listener, rawEmitter} = handlers;
+  let cont = FsWatchFileInstances.get(fullPath);
+
+  /* eslint-disable no-unused-vars, prefer-destructuring */
+  let listeners = new Set();
+  let rawEmitters = new Set();
+
+  const copts = cont && cont.options;
+  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
+    // "Upgrade" the watcher to persistence or a quicker interval.
+    // This creates some unlikely edge case issues if the user mixes
+    // settings in a very weird way, but solving for those cases
+    // doesn't seem worthwhile for the added complexity.
+    listeners = cont.listeners;
+    rawEmitters = cont.rawEmitters;
+    fs.unwatchFile(fullPath);
+    cont = undefined;
+  }
+
+  /* eslint-enable no-unused-vars, prefer-destructuring */
+
+  if (cont) {
+    addAndConvert(cont, KEY_LISTENERS, listener);
+    addAndConvert(cont, KEY_RAW, rawEmitter);
+  } else {
+    // TODO
+    // listeners.add(listener);
+    // rawEmitters.add(rawEmitter);
+    cont = {
+      listeners: listener,
+      rawEmitters: rawEmitter,
+      options,
+      watcher: fs.watchFile(fullPath, options, (curr, prev) => {
+        foreach(cont.rawEmitters, (rawEmitter) => {
+          rawEmitter(EV_CHANGE, fullPath, {curr, prev});
+        });
+        const currmtime = curr.mtimeMs;
+        if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
+          foreach(cont.listeners, (listener) => listener(path, curr));
+        }
+      })
+    };
+    FsWatchFileInstances.set(fullPath, cont);
+  }
+  // const index = cont.listeners.indexOf(listener);
+
+  // Removes this instance's listeners and closes the underlying fs_watchFile
+  // instance if there are no more listeners left.
+  return () => {
+    delFromSet(cont, KEY_LISTENERS, listener);
+    delFromSet(cont, KEY_RAW, rawEmitter);
+    if (isEmptySet(cont.listeners)) {
+      FsWatchFileInstances.delete(fullPath);
+      fs.unwatchFile(fullPath);
+      cont.options = cont.watcher = undefined;
+      Object.freeze(cont);
+    }
+  };
+};
+
+/**
+ * @mixin
+ */
+class NodeFsHandler {
+
+/**
+ * @param {import("../index").FSWatcher} fsW
+ */
+constructor(fsW) {
+  this.fsw = fsW;
+  this._boundHandleError = (error) => fsW._handleError(error);
+}
+
+/**
+ * Watch file for changes with fs_watchFile or fs_watch.
+ * @param {String} path to file or dir
+ * @param {Function} listener on fs change
+ * @returns {Function} closer for the watcher instance
+ */
+_watchWithNodeFs(path, listener) {
+  const opts = this.fsw.options;
+  const directory = sysPath.dirname(path);
+  const basename = sysPath.basename(path);
+  const parent = this.fsw._getWatchedDir(directory);
+  parent.add(basename);
+  const absolutePath = sysPath.resolve(path);
+  const options = {persistent: opts.persistent};
+  if (!listener) listener = EMPTY_FN;
+
+  let closer;
+  if (opts.usePolling) {
+    options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
+      opts.binaryInterval : opts.interval;
+    closer = setFsWatchFileListener(path, absolutePath, options, {
+      listener,
+      rawEmitter: this.fsw._emitRaw
+    });
+  } else {
+    closer = setFsWatchListener(path, absolutePath, options, {
+      listener,
+      errHandler: this._boundHandleError,
+      rawEmitter: this.fsw._emitRaw
+    });
+  }
+  return closer;
+}
+
+/**
+ * Watch a file and emit add event if warranted.
+ * @param {Path} file Path
+ * @param {fs.Stats} stats result of fs_stat
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
+ * @returns {Function} closer for the watcher instance
+ */
+_handleFile(file, stats, initialAdd) {
+  if (this.fsw.closed) {
+    return;
+  }
+  const dirname = sysPath.dirname(file);
+  const basename = sysPath.basename(file);
+  const parent = this.fsw._getWatchedDir(dirname);
+  // stats is always present
+  let prevStats = stats;
+
+  // if the file is already being watched, do nothing
+  if (parent.has(basename)) return;
+
+  const listener = async (path, newStats) => {
+    if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
+    if (!newStats || newStats.mtimeMs === 0) {
+      try {
+        const newStats = await stat(file);
+        if (this.fsw.closed) return;
+        // Check that change event was not fired because of changed only accessTime.
+        const at = newStats.atimeMs;
+        const mt = newStats.mtimeMs;
+        if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+          this.fsw._emit(EV_CHANGE, file, newStats);
+        }
+        if (isLinux && prevStats.ino !== newStats.ino) {
+          this.fsw._closeFile(path)
+          prevStats = newStats;
+          this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
+        } else {
+          prevStats = newStats;
+        }
+      } catch (error) {
+        // Fix issues where mtime is null but file is still present
+        this.fsw._remove(dirname, basename);
+      }
+      // add is about to be emitted if file not already tracked in parent
+    } else if (parent.has(basename)) {
+      // Check that change event was not fired because of changed only accessTime.
+      const at = newStats.atimeMs;
+      const mt = newStats.mtimeMs;
+      if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+        this.fsw._emit(EV_CHANGE, file, newStats);
+      }
+      prevStats = newStats;
+    }
+  }
+  // kick off the watcher
+  const closer = this._watchWithNodeFs(file, listener);
+
+  // emit an add event if we're supposed to
+  if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
+    if (!this.fsw._throttle(EV_ADD, file, 0)) return;
+    this.fsw._emit(EV_ADD, file, stats);
+  }
+
+  return closer;
+}
+
+/**
+ * Handle symlinks encountered while reading a dir.
+ * @param {Object} entry returned by readdirp
+ * @param {String} directory path of dir being read
+ * @param {String} path of this item
+ * @param {String} item basename of this item
+ * @returns {Promise<Boolean>} true if no more processing is needed for this entry.
+ */
+async _handleSymlink(entry, directory, path, item) {
+  if (this.fsw.closed) {
+    return;
+  }
+  const full = entry.fullPath;
+  const dir = this.fsw._getWatchedDir(directory);
+
+  if (!this.fsw.options.followSymlinks) {
+    // watch symlink directly (don't follow) and detect changes
+    this.fsw._incrReadyCount();
+
+    let linkPath;
+    try {
+      linkPath = await fsrealpath(path);
+    } catch (e) {
+      this.fsw._emitReady();
+      return true;
+    }
+
+    if (this.fsw.closed) return;
+    if (dir.has(item)) {
+      if (this.fsw._symlinkPaths.get(full) !== linkPath) {
+        this.fsw._symlinkPaths.set(full, linkPath);
+        this.fsw._emit(EV_CHANGE, path, entry.stats);
+      }
+    } else {
+      dir.add(item);
+      this.fsw._symlinkPaths.set(full, linkPath);
+      this.fsw._emit(EV_ADD, path, entry.stats);
+    }
+    this.fsw._emitReady();
+    return true;
+  }
+
+  // don't follow the same symlink more than once
+  if (this.fsw._symlinkPaths.has(full)) {
+    return true;
+  }
+
+  this.fsw._symlinkPaths.set(full, true);
+}
+
+_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
+  // Normalize the directory name on Windows
+  directory = sysPath.join(directory, EMPTY_STR);
+
+  if (!wh.hasGlob) {
+    throttler = this.fsw._throttle('readdir', directory, 1000);
+    if (!throttler) return;
+  }
+
+  const previous = this.fsw._getWatchedDir(wh.path);
+  const current = new Set();
+
+  let stream = this.fsw._readdirp(directory, {
+    fileFilter: entry => wh.filterPath(entry),
+    directoryFilter: entry => wh.filterDir(entry),
+    depth: 0
+  }).on(STR_DATA, async (entry) => {
+    if (this.fsw.closed) {
+      stream = undefined;
+      return;
+    }
+    const item = entry.path;
+    let path = sysPath.join(directory, item);
+    current.add(item);
+
+    if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
+      return;
+    }
+
+    if (this.fsw.closed) {
+      stream = undefined;
+      return;
+    }
+    // Files that present in current directory snapshot
+    // but absent in previous are added to watch list and
+    // emit `add` event.
+    if (item === target || !target && !previous.has(item)) {
+      this.fsw._incrReadyCount();
+
+      // ensure relativeness of path is preserved in case of watcher reuse
+      path = sysPath.join(dir, sysPath.relative(dir, path));
+
+      this._addToNodeFs(path, initialAdd, wh, depth + 1);
+    }
+  }).on(EV_ERROR, this._boundHandleError);
+
+  return new Promise(resolve =>
+    stream.once(STR_END, () => {
+      if (this.fsw.closed) {
+        stream = undefined;
+        return;
+      }
+      const wasThrottled = throttler ? throttler.clear() : false;
+
+      resolve();
+
+      // Files that absent in current directory snapshot
+      // but present in previous emit `remove` event
+      // and are removed from @watched[directory].
+      previous.getChildren().filter((item) => {
+        return item !== directory &&
+          !current.has(item) &&
+          // in case of intersecting globs;
+          // a path may have been filtered out of this readdir, but
+          // shouldn't be removed because it matches a different glob
+          (!wh.hasGlob || wh.filterPath({
+            fullPath: sysPath.resolve(directory, item)
+          }));
+      }).forEach((item) => {
+        this.fsw._remove(directory, item);
+      });
+
+      stream = undefined;
+
+      // one more time for any missed in case changes came in extremely quickly
+      if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
+    })
+  );
+}
+
+/**
+ * Read directory to add / remove files from `@watched` list and re-read it on change.
+ * @param {String} dir fs path
+ * @param {fs.Stats} stats
+ * @param {Boolean} initialAdd
+ * @param {Number} depth relative to user-supplied path
+ * @param {String} target child path targeted for watch
+ * @param {Object} wh Common watch helpers for this path
+ * @param {String} realpath
+ * @returns {Promise<Function>} closer for the watcher instance.
+ */
+async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
+  const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
+  const tracked = parentDir.has(sysPath.basename(dir));
+  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
+    if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);
+  }
+
+  // ensure dir is tracked (harmless if redundant)
+  parentDir.add(sysPath.basename(dir));
+  this.fsw._getWatchedDir(dir);
+  let throttler;
+  let closer;
+
+  const oDepth = this.fsw.options.depth;
+  if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
+    if (!target) {
+      await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
+      if (this.fsw.closed) return;
+    }
+
+    closer = this._watchWithNodeFs(dir, (dirPath, stats) => {
+      // if current directory is removed, do nothing
+      if (stats && stats.mtimeMs === 0) return;
+
+      this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
+    });
+  }
+  return closer;
+}
+
+/**
+ * Handle added file, directory, or glob pattern.
+ * Delegates call to _handleFile / _handleDir after checks.
+ * @param {String} path to file or ir
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
+ * @param {Object} priorWh depth relative to user-supplied path
+ * @param {Number} depth Child path actually targeted for watch
+ * @param {String=} target Child path actually targeted for watch
+ * @returns {Promise}
+ */
+async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
+  const ready = this.fsw._emitReady;
+  if (this.fsw._isIgnored(path) || this.fsw.closed) {
+    ready();
+    return false;
+  }
+
+  const wh = this.fsw._getWatchHelpers(path, depth);
+  if (!wh.hasGlob && priorWh) {
+    wh.hasGlob = priorWh.hasGlob;
+    wh.globFilter = priorWh.globFilter;
+    wh.filterPath = entry => priorWh.filterPath(entry);
+    wh.filterDir = entry => priorWh.filterDir(entry);
+  }
+
+  // evaluate what is at the path we're being asked to watch
+  try {
+    const stats = await statMethods[wh.statMethod](wh.watchPath);
+    if (this.fsw.closed) return;
+    if (this.fsw._isIgnored(wh.watchPath, stats)) {
+      ready();
+      return false;
+    }
+
+    const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
+    let closer;
+    if (stats.isDirectory()) {
+      const absPath = sysPath.resolve(path);
+      const targetPath = follow ? await fsrealpath(path) : path;
+      if (this.fsw.closed) return;
+      closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
+      if (this.fsw.closed) return;
+      // preserve this symlink's target path
+      if (absPath !== targetPath && targetPath !== undefined) {
+        this.fsw._symlinkPaths.set(absPath, targetPath);
+      }
+    } else if (stats.isSymbolicLink()) {
+      const targetPath = follow ? await fsrealpath(path) : path;
+      if (this.fsw.closed) return;
+      const parent = sysPath.dirname(wh.watchPath);
+      this.fsw._getWatchedDir(parent).add(wh.watchPath);
+      this.fsw._emit(EV_ADD, wh.watchPath, stats);
+      closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
+      if (this.fsw.closed) return;
+
+      // preserve this symlink's target path
+      if (targetPath !== undefined) {
+        this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
+      }
+    } else {
+      closer = this._handleFile(wh.watchPath, stats, initialAdd);
+    }
+    ready();
+
+    this.fsw._addPathCloser(path, closer);
+    return false;
+
+  } catch (error) {
+    if (this.fsw._handleError(error)) {
+      ready();
+      return path;
+    }
+  }
+}
+
+}
+
+module.exports = NodeFsHandler;

+ 85 - 0
node_modules/chokidar/package.json

@@ -0,0 +1,85 @@
+{
+  "name": "chokidar",
+  "description": "Minimal and efficient cross-platform file watching library",
+  "version": "3.5.3",
+  "homepage": "https://github.com/paulmillr/chokidar",
+  "author": "Paul Miller (https://paulmillr.com)",
+  "contributors": [
+    "Paul Miller (https://paulmillr.com)",
+    "Elan Shanker"
+  ],
+  "engines": {
+    "node": ">= 8.10.0"
+  },
+  "main": "index.js",
+  "dependencies": {
+    "anymatch": "~3.1.2",
+    "braces": "~3.0.2",
+    "glob-parent": "~5.1.2",
+    "is-binary-path": "~2.1.0",
+    "is-glob": "~4.0.1",
+    "normalize-path": "~3.0.0",
+    "readdirp": "~3.6.0"
+  },
+  "optionalDependencies": {
+    "fsevents": "~2.3.2"
+  },
+  "devDependencies": {
+    "@types/node": "^14",
+    "chai": "^4.3",
+    "dtslint": "^3.3.0",
+    "eslint": "^7.0.0",
+    "mocha": "^7.0.0",
+    "nyc": "^15.0.0",
+    "rimraf": "^3.0.0",
+    "sinon": "^9.0.1",
+    "sinon-chai": "^3.3.0",
+    "typescript": "~4.4.3",
+    "upath": "^1.2.0"
+  },
+  "files": [
+    "index.js",
+    "lib/*.js",
+    "types/index.d.ts"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/paulmillr/chokidar.git"
+  },
+  "bugs": {
+    "url": "https://github.com/paulmillr/chokidar/issues"
+  },
+  "license": "MIT",
+  "scripts": {
+    "dtslint": "dtslint types",
+    "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
+    "mocha": "mocha --exit --timeout 90000",
+    "test": "npm run lint && npm run mocha"
+  },
+  "keywords": [
+    "fs",
+    "watch",
+    "watchFile",
+    "watcher",
+    "watching",
+    "file",
+    "fsevents"
+  ],
+  "types": "./types/index.d.ts",
+  "nyc": {
+    "include": [
+      "index.js",
+      "lib/*.js"
+    ],
+    "reporter": [
+      "html",
+      "text"
+    ]
+  },
+  "funding": [
+    {
+      "type": "individual",
+      "url": "https://paulmillr.com/funding/"
+    }
+  ]
+}

+ 188 - 0
node_modules/chokidar/types/index.d.ts

@@ -0,0 +1,188 @@
+// TypeScript Version: 3.0
+
+/// <reference types="node" />
+
+import * as fs from "fs";
+import { EventEmitter } from "events";
+import { Matcher } from 'anymatch';
+
+export class FSWatcher extends EventEmitter implements fs.FSWatcher {
+  options: WatchOptions;
+
+  /**
+   * Constructs a new FSWatcher instance with optional WatchOptions parameter.
+   */
+  constructor(options?: WatchOptions);
+
+  /**
+   * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
+   * string.
+   */
+  add(paths: string | ReadonlyArray<string>): this;
+
+  /**
+   * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
+   * string.
+   */
+  unwatch(paths: string | ReadonlyArray<string>): this;
+
+  /**
+   * Returns an object representing all the paths on the file system being watched by this
+   * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
+   * the `cwd` option was used), and the values are arrays of the names of the items contained in
+   * each directory.
+   */
+  getWatched(): {
+    [directory: string]: string[];
+  };
+
+  /**
+   * Removes all listeners from watched files.
+   */
+  close(): Promise<void>;
+
+  on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this;
+
+  on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this;
+
+  /**
+   * Error occurred
+   */
+  on(event: 'error', listener: (error: Error) => void): this;
+
+  /**
+   * Exposes the native Node `fs.FSWatcher events`
+   */
+  on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this;
+
+  /**
+   * Fires when the initial scan is complete
+   */
+  on(event: 'ready', listener: () => void): this;
+
+  on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this;
+
+  on(event: string, listener: (...args: any[]) => void): this;
+}
+
+export interface WatchOptions {
+  /**
+   * Indicates whether the process should continue to run as long as files are being watched. If
+   * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`,
+   * even if the process continues to run.
+   */
+  persistent?: boolean;
+
+  /**
+   * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to
+   * be ignored. The whole relative or absolute path is tested, not just filename. If a function
+   * with two arguments is provided, it gets called twice per path - once with a single argument
+   * (the path), second time with two arguments (the path and the
+   * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
+   */
+  ignored?: Matcher;
+
+  /**
+   * If set to `false` then `add`/`addDir` events are also emitted for matching paths while
+   * instantiating the watching as chokidar discovers these file paths (before the `ready` event).
+   */
+  ignoreInitial?: boolean;
+
+  /**
+   * When `false`, only the symlinks themselves will be watched for changes instead of following
+   * the link references and bubbling events through the link's path.
+   */
+  followSymlinks?: boolean;
+
+  /**
+   * The base directory from which watch `paths` are to be derived. Paths emitted with events will
+   * be relative to this.
+   */
+  cwd?: string;
+
+  /**
+   *  If set to true then the strings passed to .watch() and .add() are treated as literal path
+   *  names, even if they look like globs. Default: false.
+   */
+  disableGlobbing?: boolean;
+
+  /**
+   * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU
+   * utilization, consider setting this to `false`. It is typically necessary to **set this to
+   * `true` to successfully watch files over a network**, and it may be necessary to successfully
+   * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides
+   * the `useFsEvents` default.
+   */
+  usePolling?: boolean;
+
+  /**
+   * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
+   * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
+   * OS X, `usePolling: true` becomes the default.
+   */
+  useFsEvents?: boolean;
+
+  /**
+   * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that
+   * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is
+   * provided even in cases where it wasn't already available from the underlying watch events.
+   */
+  alwaysStat?: boolean;
+
+  /**
+   * If set, limits how many levels of subdirectories will be traversed.
+   */
+  depth?: number;
+
+  /**
+   * Interval of file system polling.
+   */
+  interval?: number;
+
+  /**
+   * Interval of file system polling for binary files. ([see list of binary extensions](https://gi
+   * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
+   */
+  binaryInterval?: number;
+
+  /**
+   *  Indicates whether to watch files that don't have read permissions if possible. If watching
+   *  fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed
+   *  silently.
+   */
+  ignorePermissionErrors?: boolean;
+
+  /**
+   * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts
+   * that occur when using editors that use "atomic writes" instead of writing directly to the
+   * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change`
+   * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you,
+   * you can override it by setting `atomic` to a custom value, in milliseconds.
+   */
+  atomic?: boolean | number;
+
+  /**
+   * can be set to an object in order to adjust timing params:
+   */
+  awaitWriteFinish?: AwaitWriteFinishOptions | boolean;
+}
+
+export interface AwaitWriteFinishOptions {
+  /**
+   * Amount of time in milliseconds for a file size to remain constant before emitting its event.
+   */
+  stabilityThreshold?: number;
+
+  /**
+   * File size polling interval.
+   */
+  pollInterval?: number;
+}
+
+/**
+ * produces an instance of `FSWatcher`.
+ */
+export function watch(
+  paths: string | ReadonlyArray<string>,
+  options?: WatchOptions
+): FSWatcher;

+ 21 - 0
node_modules/fill-range/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-present, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 237 - 0
node_modules/fill-range/README.md

@@ -0,0 +1,237 @@
+# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range)
+
+> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save fill-range
+```
+
+## Usage
+
+Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_.
+
+```js
+const fill = require('fill-range');
+// fill(from, to[, step, options]);
+
+console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
+console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10
+```
+
+**Params**
+
+* `from`: **{String|Number}** the number or letter to start with
+* `to`: **{String|Number}** the number or letter to end with
+* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use.
+* `options`: **{Object|Function}**: See all available [options](#options)
+
+## Examples
+
+By default, an array of values is returned.
+
+**Alphabetical ranges**
+
+```js
+console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e']
+console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ]
+```
+
+**Numerical ranges**
+
+Numbers can be defined as actual numbers or strings.
+
+```js
+console.log(fill(1, 5));     //=> [ 1, 2, 3, 4, 5 ]
+console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ]
+```
+
+**Negative ranges**
+
+Numbers can be defined as actual numbers or strings.
+
+```js
+console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ]
+console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ]
+```
+
+**Steps (increments)**
+
+```js
+// numerical ranges with increments
+console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ]
+console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ]
+console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ]
+
+// alphabetical ranges with increments
+console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ]
+console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]
+console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ]
+```
+
+## Options
+
+### options.step
+
+**Type**: `number` (formatted as a string or number)
+
+**Default**: `undefined`
+
+**Description**: The increment to use for the range. Can be used with letters or numbers.
+
+**Example(s)**
+
+```js
+// numbers
+console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ]
+console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ]
+console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ]
+
+// letters
+console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]
+console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ]
+console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ]
+```
+
+### options.strictRanges
+
+**Type**: `boolean`
+
+**Default**: `false`
+
+**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges.
+
+**Example(s)**
+
+The following are all invalid:
+
+```js
+fill('1.1', '2');   // decimals not supported in ranges
+fill('a', '2');     // incompatible range values
+fill(1, 10, 'foo'); // invalid "step" argument
+```
+
+### options.stringify
+
+**Type**: `boolean`
+
+**Default**: `undefined`
+
+**Description**: Cast all returned values to strings. By default, integers are returned as numbers.
+
+**Example(s)**
+
+```js
+console.log(fill(1, 5));                    //=> [ 1, 2, 3, 4, 5 ]
+console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ]
+```
+
+### options.toRegex
+
+**Type**: `boolean`
+
+**Default**: `undefined`
+
+**Description**: Create a regex-compatible source string, instead of expanding values to an array.
+
+**Example(s)**
+
+```js
+// alphabetical range
+console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]'
+// alphabetical with step
+console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y'
+// numerical range
+console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100'
+// numerical range with zero padding
+console.log(fill('000001', '100000', { toRegex: true }));
+//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000'
+```
+
+### options.transform
+
+**Type**: `function`
+
+**Default**: `undefined`
+
+**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_.
+
+**Example(s)**
+
+```js
+// add zero padding
+console.log(fill(1, 5, value => String(value).padStart(4, '0')));
+//=> ['0001', '0002', '0003', '0004', '0005']
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Contributors
+
+| **Commits** | **Contributor** |  
+| --- | --- |  
+| 116 | [jonschlinkert](https://github.com/jonschlinkert) |  
+| 4   | [paulmillr](https://github.com/paulmillr) |  
+| 2   | [realityking](https://github.com/realityking) |  
+| 2   | [bluelovers](https://github.com/bluelovers) |  
+| 1   | [edorivai](https://github.com/edorivai) |  
+| 1   | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |  
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)!
+
+<a href="https://www.patreon.com/jonschlinkert">
+<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
+</a>
+
+### License
+
+Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._

+ 249 - 0
node_modules/fill-range/index.js

@@ -0,0 +1,249 @@
+/*!
+ * fill-range <https://github.com/jonschlinkert/fill-range>
+ *
+ * Copyright (c) 2014-present, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+const util = require('util');
+const toRegexRange = require('to-regex-range');
+
+const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+
+const transform = toNumber => {
+  return value => toNumber === true ? Number(value) : String(value);
+};
+
+const isValidValue = value => {
+  return typeof value === 'number' || (typeof value === 'string' && value !== '');
+};
+
+const isNumber = num => Number.isInteger(+num);
+
+const zeros = input => {
+  let value = `${input}`;
+  let index = -1;
+  if (value[0] === '-') value = value.slice(1);
+  if (value === '0') return false;
+  while (value[++index] === '0');
+  return index > 0;
+};
+
+const stringify = (start, end, options) => {
+  if (typeof start === 'string' || typeof end === 'string') {
+    return true;
+  }
+  return options.stringify === true;
+};
+
+const pad = (input, maxLength, toNumber) => {
+  if (maxLength > 0) {
+    let dash = input[0] === '-' ? '-' : '';
+    if (dash) input = input.slice(1);
+    input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
+  }
+  if (toNumber === false) {
+    return String(input);
+  }
+  return input;
+};
+
+const toMaxLen = (input, maxLength) => {
+  let negative = input[0] === '-' ? '-' : '';
+  if (negative) {
+    input = input.slice(1);
+    maxLength--;
+  }
+  while (input.length < maxLength) input = '0' + input;
+  return negative ? ('-' + input) : input;
+};
+
+const toSequence = (parts, options) => {
+  parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+  parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+
+  let prefix = options.capture ? '' : '?:';
+  let positives = '';
+  let negatives = '';
+  let result;
+
+  if (parts.positives.length) {
+    positives = parts.positives.join('|');
+  }
+
+  if (parts.negatives.length) {
+    negatives = `-(${prefix}${parts.negatives.join('|')})`;
+  }
+
+  if (positives && negatives) {
+    result = `${positives}|${negatives}`;
+  } else {
+    result = positives || negatives;
+  }
+
+  if (options.wrap) {
+    return `(${prefix}${result})`;
+  }
+
+  return result;
+};
+
+const toRange = (a, b, isNumbers, options) => {
+  if (isNumbers) {
+    return toRegexRange(a, b, { wrap: false, ...options });
+  }
+
+  let start = String.fromCharCode(a);
+  if (a === b) return start;
+
+  let stop = String.fromCharCode(b);
+  return `[${start}-${stop}]`;
+};
+
+const toRegex = (start, end, options) => {
+  if (Array.isArray(start)) {
+    let wrap = options.wrap === true;
+    let prefix = options.capture ? '' : '?:';
+    return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
+  }
+  return toRegexRange(start, end, options);
+};
+
+const rangeError = (...args) => {
+  return new RangeError('Invalid range arguments: ' + util.inspect(...args));
+};
+
+const invalidRange = (start, end, options) => {
+  if (options.strictRanges === true) throw rangeError([start, end]);
+  return [];
+};
+
+const invalidStep = (step, options) => {
+  if (options.strictRanges === true) {
+    throw new TypeError(`Expected step "${step}" to be a number`);
+  }
+  return [];
+};
+
+const fillNumbers = (start, end, step = 1, options = {}) => {
+  let a = Number(start);
+  let b = Number(end);
+
+  if (!Number.isInteger(a) || !Number.isInteger(b)) {
+    if (options.strictRanges === true) throw rangeError([start, end]);
+    return [];
+  }
+
+  // fix negative zero
+  if (a === 0) a = 0;
+  if (b === 0) b = 0;
+
+  let descending = a > b;
+  let startString = String(start);
+  let endString = String(end);
+  let stepString = String(step);
+  step = Math.max(Math.abs(step), 1);
+
+  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
+  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
+  let toNumber = padded === false && stringify(start, end, options) === false;
+  let format = options.transform || transform(toNumber);
+
+  if (options.toRegex && step === 1) {
+    return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
+  }
+
+  let parts = { negatives: [], positives: [] };
+  let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
+  let range = [];
+  let index = 0;
+
+  while (descending ? a >= b : a <= b) {
+    if (options.toRegex === true && step > 1) {
+      push(a);
+    } else {
+      range.push(pad(format(a, index), maxLen, toNumber));
+    }
+    a = descending ? a - step : a + step;
+    index++;
+  }
+
+  if (options.toRegex === true) {
+    return step > 1
+      ? toSequence(parts, options)
+      : toRegex(range, null, { wrap: false, ...options });
+  }
+
+  return range;
+};
+
+const fillLetters = (start, end, step = 1, options = {}) => {
+  if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
+    return invalidRange(start, end, options);
+  }
+
+
+  let format = options.transform || (val => String.fromCharCode(val));
+  let a = `${start}`.charCodeAt(0);
+  let b = `${end}`.charCodeAt(0);
+
+  let descending = a > b;
+  let min = Math.min(a, b);
+  let max = Math.max(a, b);
+
+  if (options.toRegex && step === 1) {
+    return toRange(min, max, false, options);
+  }
+
+  let range = [];
+  let index = 0;
+
+  while (descending ? a >= b : a <= b) {
+    range.push(format(a, index));
+    a = descending ? a - step : a + step;
+    index++;
+  }
+
+  if (options.toRegex === true) {
+    return toRegex(range, null, { wrap: false, options });
+  }
+
+  return range;
+};
+
+const fill = (start, end, step, options = {}) => {
+  if (end == null && isValidValue(start)) {
+    return [start];
+  }
+
+  if (!isValidValue(start) || !isValidValue(end)) {
+    return invalidRange(start, end, options);
+  }
+
+  if (typeof step === 'function') {
+    return fill(start, end, 1, { transform: step });
+  }
+
+  if (isObject(step)) {
+    return fill(start, end, 0, step);
+  }
+
+  let opts = { ...options };
+  if (opts.capture === true) opts.wrap = true;
+  step = step || opts.step || 1;
+
+  if (!isNumber(step)) {
+    if (step != null && !isObject(step)) return invalidStep(step, opts);
+    return fill(start, end, 1, step);
+  }
+
+  if (isNumber(start) && isNumber(end)) {
+    return fillNumbers(start, end, step, opts);
+  }
+
+  return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
+};
+
+module.exports = fill;

+ 69 - 0
node_modules/fill-range/package.json

@@ -0,0 +1,69 @@
+{
+  "name": "fill-range",
+  "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`",
+  "version": "7.0.1",
+  "homepage": "https://github.com/jonschlinkert/fill-range",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Edo Rivai (edo.rivai.nl)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+    "Paul Miller (paulmillr.com)",
+    "Rouven Weßling (www.rouvenwessling.de)",
+    "(https://github.com/wtgtybhertgeghgtwtg)"
+  ],
+  "repository": "jonschlinkert/fill-range",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/fill-range/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=8"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "dependencies": {
+    "to-regex-range": "^5.0.1"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^2.0.0",
+    "mocha": "^6.1.1"
+  },
+  "keywords": [
+    "alpha",
+    "alphabetical",
+    "array",
+    "bash",
+    "brace",
+    "expand",
+    "expansion",
+    "fill",
+    "glob",
+    "match",
+    "matches",
+    "matching",
+    "number",
+    "numerical",
+    "range",
+    "ranges",
+    "regex",
+    "sh"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}

+ 22 - 0
node_modules/fsevents/LICENSE

@@ -0,0 +1,22 @@
+MIT License
+-----------
+
+Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 89 - 0
node_modules/fsevents/README.md

@@ -0,0 +1,89 @@
+# fsevents
+
+Native access to MacOS FSEvents in [Node.js](https://nodejs.org/)
+
+The FSEvents API in MacOS allows applications to register for notifications of
+changes to a given directory tree. It is a very fast and lightweight alternative
+to kqueue.
+
+This is a low-level library. For a cross-platform file watching module that
+uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar).
+
+## Usage
+
+```sh
+npm install fsevents
+```
+
+Supports only **Node.js v8.16 and higher**.
+
+```js
+const fsevents = require('fsevents');
+
+// To start observation
+const stop = fsevents.watch(__dirname, (path, flags, id) => {
+  const info = fsevents.getInfo(path, flags);
+});
+
+// To end observation
+stop();
+```
+
+> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be
+> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector
+> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore.
+
+The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a
+a change in the file system. It takes three arguments:
+
+###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise<undefined>`
+
+ * `path: string` - the item in the filesystem that have been changed
+ * `flags: number` - a numeric value describing what the change was
+ * `id: string` - an unique-id identifying this specific event
+
+ Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down.
+
+###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo`
+
+The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure
+that is easier to digest to determine what the change was.
+
+The `FsEventsInfo` has the following shape:
+
+```js
+/**
+ * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent
+ * @typedef {'file'|'directory'|'symlink'} FsEventsType
+ */
+{
+  "event": "created", // {FsEventsEvent}
+  "path": "file.txt",
+  "type": "file",    // {FsEventsType}
+  "changes": {
+    "inode": true,   // Had iNode Meta-Information changed
+    "finder": false, // Had Finder Meta-Data changed
+    "access": false, // Had access permissions changed
+    "xattrs": false  // Had xAttributes changed
+  },
+  "flags": 0x100000000
+}
+```
+
+## Changelog
+
+- v2.3 supports Apple Silicon ARM CPUs
+- v2 supports node 8.16+ and reduces package size massively
+- v1.2.8 supports node 6+
+- v1.2.7 supports node 4+
+
+## Troubleshooting
+
+- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error.
+- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default.
+
+## License
+
+The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file.
+
+Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents)

+ 46 - 0
node_modules/fsevents/fsevents.d.ts

@@ -0,0 +1,46 @@
+declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown";
+declare type Type = "file" | "directory" | "symlink";
+declare type FileChanges = {
+  inode: boolean;
+  finder: boolean;
+  access: boolean;
+  xattrs: boolean;
+};
+declare type Info = {
+  event: Event;
+  path: string;
+  type: Type;
+  changes: FileChanges;
+  flags: number;
+};
+declare type WatchHandler = (path: string, flags: number, id: string) => void;
+export declare function watch(path: string, handler: WatchHandler): () => Promise<void>;
+export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise<void>;
+export declare function getInfo(path: string, flags: number): Info;
+export declare const constants: {
+  None: 0x00000000;
+  MustScanSubDirs: 0x00000001;
+  UserDropped: 0x00000002;
+  KernelDropped: 0x00000004;
+  EventIdsWrapped: 0x00000008;
+  HistoryDone: 0x00000010;
+  RootChanged: 0x00000020;
+  Mount: 0x00000040;
+  Unmount: 0x00000080;
+  ItemCreated: 0x00000100;
+  ItemRemoved: 0x00000200;
+  ItemInodeMetaMod: 0x00000400;
+  ItemRenamed: 0x00000800;
+  ItemModified: 0x00001000;
+  ItemFinderInfoMod: 0x00002000;
+  ItemChangeOwner: 0x00004000;
+  ItemXattrMod: 0x00008000;
+  ItemIsFile: 0x00010000;
+  ItemIsDir: 0x00020000;
+  ItemIsSymlink: 0x00040000;
+  ItemIsHardlink: 0x00100000;
+  ItemIsLastHardlink: 0x00200000;
+  OwnEvent: 0x00080000;
+  ItemCloned: 0x00400000;
+};
+export {};

+ 83 - 0
node_modules/fsevents/fsevents.js

@@ -0,0 +1,83 @@
+/*
+ ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
+ ** Licensed under MIT License.
+ */
+
+/* jshint node:true */
+"use strict";
+
+if (process.platform !== "darwin") {
+  throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`);
+}
+
+const Native = require("./fsevents.node");
+const events = Native.constants;
+
+function watch(path, since, handler) {
+  if (typeof path !== "string") {
+    throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`);
+  }
+  if ("function" === typeof since && "undefined" === typeof handler) {
+    handler = since;
+    since = Native.flags.SinceNow;
+  }
+  if (typeof since !== "number") {
+    throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`);
+  }
+  if (typeof handler !== "function") {
+    throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`);
+  }
+
+  let instance = Native.start(Native.global, path, since, handler);
+  if (!instance) throw new Error(`could not watch: ${path}`);
+  return () => {
+    const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined);
+    instance = undefined;
+    return result;
+  };
+}
+
+function getInfo(path, flags) {
+  return {
+    path,
+    flags,
+    event: getEventType(flags),
+    type: getFileType(flags),
+    changes: getFileChanges(flags),
+  };
+}
+
+function getFileType(flags) {
+  if (events.ItemIsFile & flags) return "file";
+  if (events.ItemIsDir & flags) return "directory";
+  if (events.MustScanSubDirs & flags) return "directory"; 
+  if (events.ItemIsSymlink & flags) return "symlink";
+}
+function anyIsTrue(obj) {
+  for (let key in obj) {
+    if (obj[key]) return true;
+  }
+  return false;
+}
+function getEventType(flags) {
+  if (events.ItemRemoved & flags) return "deleted";
+  if (events.ItemRenamed & flags) return "moved";
+  if (events.ItemCreated & flags) return "created";
+  if (events.ItemModified & flags) return "modified";
+  if (events.RootChanged & flags) return "root-changed";
+  if (events.ItemCloned & flags) return "cloned";
+  if (anyIsTrue(flags)) return "modified";
+  return "unknown";
+}
+function getFileChanges(flags) {
+  return {
+    inode: !!(events.ItemInodeMetaMod & flags),
+    finder: !!(events.ItemFinderInfoMod & flags),
+    access: !!(events.ItemChangeOwner & flags),
+    xattrs: !!(events.ItemXattrMod & flags),
+  };
+}
+
+exports.watch = watch;
+exports.getInfo = getInfo;
+exports.constants = events;

BIN
node_modules/fsevents/fsevents.node


+ 62 - 0
node_modules/fsevents/package.json

@@ -0,0 +1,62 @@
+{
+  "name": "fsevents",
+  "version": "2.3.3",
+  "description": "Native Access to MacOS FSEvents",
+  "main": "fsevents.js",
+  "types": "fsevents.d.ts",
+  "os": [
+    "darwin"
+  ],
+  "files": [
+    "fsevents.d.ts",
+    "fsevents.js",
+    "fsevents.node"
+  ],
+  "engines": {
+    "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+  },
+  "scripts": {
+    "clean": "node-gyp clean && rm -f fsevents.node",
+    "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean",
+    "test": "/bin/bash ./test.sh 2>/dev/null",
+    "prepublishOnly": "npm run build"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/fsevents/fsevents.git"
+  },
+  "keywords": [
+    "fsevents",
+    "mac"
+  ],
+  "contributors": [
+    {
+      "name": "Philipp Dunkel",
+      "email": "pip@pipobscure.com"
+    },
+    {
+      "name": "Ben Noordhuis",
+      "email": "info@bnoordhuis.nl"
+    },
+    {
+      "name": "Elan Shankar",
+      "email": "elan.shanker@gmail.com"
+    },
+    {
+      "name": "Miroslav Bajtoš",
+      "email": "mbajtoss@gmail.com"
+    },
+    {
+      "name": "Paul Miller",
+      "url": "https://paulmillr.com"
+    }
+  ],
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/fsevents/fsevents/issues"
+  },
+  "homepage": "https://github.com/fsevents/fsevents",
+  "devDependencies": {
+    "node-gyp": "^9.4.0"
+  }
+}

+ 110 - 0
node_modules/glob-parent/CHANGELOG.md

@@ -0,0 +1,110 @@
+### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06)
+
+
+### Bug Fixes
+
+* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366))
+
+### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27)
+
+
+### Bug Fixes
+
+* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb))
+
+## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27)
+
+
+### Features
+
+* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3))
+
+## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27)
+
+
+### ⚠ BREAKING CHANGES
+
+* Drop support for node <6 & bump dependencies
+
+### Miscellaneous Chores
+
+* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a))
+
+## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27)
+
+
+### ⚠ BREAKING CHANGES
+
+* question marks are valid path characters on Windows so avoid flagging as a glob when alone
+* Update is-glob dependency
+
+### Features
+
+* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e))
+* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841))
+* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281))
+
+## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27)
+
+
+### Features
+
+* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b))
+* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd))
+* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be))
+* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388))
+* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76))
+
+
+### Bug Fixes
+
+* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf))
+
+### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27)
+
+
+### Features
+
+* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc))
+
+
+### Bug Fixes
+
+* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030))
+
+## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27)
+
+
+### ⚠ BREAKING CHANGES
+
+* update is-glob dependency
+
+### Features
+
+* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd))
+
+## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27)
+
+
+### Features
+
+* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2))
+
+## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27)
+
+## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27)
+
+
+### Reverts
+
+* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0))
+
+## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27)
+
+
+### Features
+
+* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233))
+
+## 1.0.0 (2021-01-27)
+

+ 15 - 0
node_modules/glob-parent/LICENSE

@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) 2015, 2019 Elan Shanker
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 137 - 0
node_modules/glob-parent/README.md

@@ -0,0 +1,137 @@
+<p align="center">
+  <a href="https://gulpjs.com">
+    <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+  </a>
+</p>
+
+# glob-parent
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Extract the non-magic parent path from a glob string.
+
+## Usage
+
+```js
+var globParent = require('glob-parent');
+
+globParent('path/to/*.js'); // 'path/to'
+globParent('/root/path/to/*.js'); // '/root/path/to'
+globParent('/*.js'); // '/'
+globParent('*.js'); // '.'
+globParent('**/*.js'); // '.'
+globParent('path/{to,from}'); // 'path'
+globParent('path/!(to|from)'); // 'path'
+globParent('path/?(to|from)'); // 'path'
+globParent('path/+(to|from)'); // 'path'
+globParent('path/*(to|from)'); // 'path'
+globParent('path/@(to|from)'); // 'path'
+globParent('path/**/*'); // 'path'
+
+// if provided a non-glob path, returns the nearest dir
+globParent('path/foo/bar.js'); // 'path/foo'
+globParent('path/foo/'); // 'path/foo'
+globParent('path/foo'); // 'path' (see issue #3 for details)
+```
+
+## API
+
+### `globParent(maybeGlobString, [options])`
+
+Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
+
+#### options
+
+```js
+{
+  // Disables the automatic conversion of slashes for Windows
+  flipBackslashes: true
+}
+```
+
+## Escaping
+
+The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
+
+- `?` (question mark) unless used as a path segment alone
+- `*` (asterisk)
+- `|` (pipe)
+- `(` (opening parenthesis)
+- `)` (closing parenthesis)
+- `{` (opening curly brace)
+- `}` (closing curly brace)
+- `[` (opening bracket)
+- `]` (closing bracket)
+
+**Example**
+
+```js
+globParent('foo/[bar]/') // 'foo'
+globParent('foo/\\[bar]/') // 'foo/[bar]'
+```
+
+## Limitations
+
+### Braces & Brackets
+This library attempts a quick and imperfect method of determining which path
+parts have glob magic without fully parsing/lexing the pattern. There are some
+advanced use cases that can trip it up, such as nested braces where the outer
+pair is escaped and the inner one contains a path separator. If you find
+yourself in the unlikely circumstance of being affected by this or need to
+ensure higher-fidelity glob handling in your library, it is recommended that you
+pre-process your input with [expand-braces] and/or [expand-brackets].
+
+### Windows
+Backslashes are not valid path separators for globs. If a path with backslashes
+is provided anyway, for simple cases, glob-parent will replace the path
+separator for you and return the non-glob parent path (now with
+forward-slashes, which are still valid as Windows path separators).
+
+This cannot be used in conjunction with escape characters.
+
+```js
+// BAD
+globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)'
+
+// GOOD
+globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)'
+```
+
+If you are using escape characters for a pattern without path parts (i.e.
+relative to `cwd`), prefix with `./` to avoid confusing glob-parent.
+
+```js
+// BAD
+globParent('foo \\[bar]') // 'foo '
+globParent('foo \\[bar]*') // 'foo '
+
+// GOOD
+globParent('./foo \\[bar]') // 'foo [bar]'
+globParent('./foo \\[bar]*') // '.'
+```
+
+## License
+
+ISC
+
+[expand-braces]: https://github.com/jonschlinkert/expand-braces
+[expand-brackets]: https://github.com/jonschlinkert/expand-brackets
+
+[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg
+[npm-url]: https://www.npmjs.com/package/glob-parent
+[npm-image]: https://img.shields.io/npm/v/glob-parent.svg
+
+[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master
+[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master
+
+[travis-url]: https://travis-ci.org/gulpjs/glob-parent
+[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent
+[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

+ 42 - 0
node_modules/glob-parent/index.js

@@ -0,0 +1,42 @@
+'use strict';
+
+var isGlob = require('is-glob');
+var pathPosixDirname = require('path').posix.dirname;
+var isWin32 = require('os').platform() === 'win32';
+
+var slash = '/';
+var backslash = /\\/g;
+var enclosure = /[\{\[].*[\}\]]$/;
+var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
+var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
+
+/**
+ * @param {string} str
+ * @param {Object} opts
+ * @param {boolean} [opts.flipBackslashes=true]
+ * @returns {string}
+ */
+module.exports = function globParent(str, opts) {
+  var options = Object.assign({ flipBackslashes: true }, opts);
+
+  // flip windows path separators
+  if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
+    str = str.replace(backslash, slash);
+  }
+
+  // special case for strings ending in enclosure containing path separator
+  if (enclosure.test(str)) {
+    str += slash;
+  }
+
+  // preserves full path in case of trailing path separator
+  str += 'a';
+
+  // remove path parts that are globby
+  do {
+    str = pathPosixDirname(str);
+  } while (isGlob(str) || globby.test(str));
+
+  // remove escape chars and return result
+  return str.replace(escaped, '$1');
+};

+ 48 - 0
node_modules/glob-parent/package.json

@@ -0,0 +1,48 @@
+{
+  "name": "glob-parent",
+  "version": "5.1.2",
+  "description": "Extract the non-magic parent path from a glob string.",
+  "author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
+  "contributors": [
+    "Elan Shanker (https://github.com/es128)",
+    "Blaine Bublitz <blaine.bublitz@gmail.com>"
+  ],
+  "repository": "gulpjs/glob-parent",
+  "license": "ISC",
+  "engines": {
+    "node": ">= 6"
+  },
+  "main": "index.js",
+  "files": [
+    "LICENSE",
+    "index.js"
+  ],
+  "scripts": {
+    "lint": "eslint .",
+    "pretest": "npm run lint",
+    "test": "nyc mocha --async-only",
+    "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
+    "coveralls": "nyc report --reporter=text-lcov | coveralls"
+  },
+  "dependencies": {
+    "is-glob": "^4.0.1"
+  },
+  "devDependencies": {
+    "coveralls": "^3.0.11",
+    "eslint": "^2.13.1",
+    "eslint-config-gulp": "^3.0.1",
+    "expect": "^1.20.2",
+    "mocha": "^6.0.2",
+    "nyc": "^13.3.0"
+  },
+  "keywords": [
+    "glob",
+    "parent",
+    "strip",
+    "path",
+    "dirname",
+    "directory",
+    "base",
+    "wildcard"
+  ]
+}

+ 21 - 0
node_modules/immutable/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2014-present, Lee Byron and other contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 761 - 0
node_modules/immutable/README.md

@@ -0,0 +1,761 @@
+# Immutable collections for JavaScript
+
+[![Build Status](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml?query=branch%3Amain) [Chat on slack](https://immutable-js.slack.com)
+
+[Read the docs](https://immutable-js.com) and eat your vegetables.
+
+Docs are automatically generated from [README.md][] and [immutable.d.ts][].
+Please contribute! Also, don't miss the [wiki][] which contains articles on
+additional specific topics. Can't find something? Open an [issue][].
+
+**Table of contents:**
+
+- [Introduction](#introduction)
+- [Getting started](#getting-started)
+- [The case for Immutability](#the-case-for-immutability)
+- [JavaScript-first API](#javascript-first-api)
+- [Nested Structures](#nested-structures)
+- [Equality treats Collections as Values](#equality-treats-collections-as-values)
+- [Batching Mutations](#batching-mutations)
+- [Lazy Seq](#lazy-seq)
+- [Additional Tools and Resources](#additional-tools-and-resources)
+- [Contributing](#contributing)
+
+## Introduction
+
+[Immutable][] data cannot be changed once created, leading to much simpler
+application development, no defensive copying, and enabling advanced memoization
+and change detection techniques with simple logic. [Persistent][] data presents
+a mutative API which does not update the data in-place, but instead always
+yields new updated data.
+
+Immutable.js provides many Persistent Immutable data structures including:
+`List`, `Stack`, `Map`, `OrderedMap`, `Set`, `OrderedSet` and `Record`.
+
+These data structures are highly efficient on modern JavaScript VMs by using
+structural sharing via [hash maps tries][] and [vector tries][] as popularized
+by Clojure and Scala, minimizing the need to copy or cache data.
+
+Immutable.js also provides a lazy `Seq`, allowing efficient
+chaining of collection methods like `map` and `filter` without creating
+intermediate representations. Create some `Seq` with `Range` and `Repeat`.
+
+Want to hear more? Watch the presentation about Immutable.js:
+
+[![Immutable Data and React](website/public/Immutable-Data-and-React-YouTube.png)](https://youtu.be/I7IdS-PbEgI)
+
+[README.md]: https://github.com/immutable-js/immutable-js/blob/main/README.md
+[immutable.d.ts]: https://github.com/immutable-js/immutable-js/blob/main/type-definitions/immutable.d.ts
+[wiki]: https://github.com/immutable-js/immutable-js/wiki
+[issue]: https://github.com/immutable-js/immutable-js/issues
+[Persistent]: https://en.wikipedia.org/wiki/Persistent_data_structure
+[Immutable]: https://en.wikipedia.org/wiki/Immutable_object
+[hash maps tries]: https://en.wikipedia.org/wiki/Hash_array_mapped_trie
+[vector tries]: https://hypirion.com/musings/understanding-persistent-vector-pt-1
+
+## Getting started
+
+Install `immutable` using npm.
+
+```shell
+# using npm
+npm install immutable
+
+# using Yarn
+yarn add immutable
+
+# using pnpm
+pnpm add immutable
+
+# using Bun
+bun add immutable
+```
+
+Then require it into any module.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = map1.set('b', 50);
+map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50
+```
+
+### Browser
+
+Immutable.js has no dependencies, which makes it predictable to include in a Browser.
+
+It's highly recommended to use a module bundler like [webpack](https://webpack.github.io/),
+[rollup](https://rollupjs.org/), or
+[browserify](https://browserify.org/). The `immutable` npm module works
+without any additional consideration. All examples throughout the documentation
+will assume use of this kind of tool.
+
+Alternatively, Immutable.js may be directly included as a script tag. Download
+or link to a CDN such as [CDNJS](https://cdnjs.com/libraries/immutable)
+or [jsDelivr](https://www.jsdelivr.com/package/npm/immutable).
+
+Use a script tag to directly add `Immutable` to the global scope:
+
+```html
+<script src="immutable.min.js"></script>
+<script>
+  var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
+  var map2 = map1.set('b', 50);
+  map1.get('b'); // 2
+  map2.get('b'); // 50
+</script>
+```
+
+Or use an AMD-style loader (such as [RequireJS](https://requirejs.org/)):
+
+```js
+require(['./immutable.min.js'], function (Immutable) {
+  var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
+  var map2 = map1.set('b', 50);
+  map1.get('b'); // 2
+  map2.get('b'); // 50
+});
+```
+
+### Flow & TypeScript
+
+Use these Immutable collections and sequences as you would use native
+collections in your [Flowtype](https://flowtype.org/) or [TypeScript](https://typescriptlang.org) programs while still taking
+advantage of type generics, error detection, and auto-complete in your IDE.
+
+Installing `immutable` via npm brings with it type definitions for Flow (v0.55.0 or higher)
+and TypeScript (v2.1.0 or higher), so you shouldn't need to do anything at all!
+
+#### Using TypeScript with Immutable.js v4
+
+Immutable.js type definitions embrace ES2015. While Immutable.js itself supports
+legacy browsers and environments, its type definitions require TypeScript's 2015
+lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your
+`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the
+`tsc` command.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = map1.set('b', 50);
+map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50
+```
+
+#### Using TypeScript with Immutable.js v3 and earlier:
+
+Previous versions of Immutable.js include a reference file which you can include
+via relative path to the type definitions at the top of your file.
+
+```js
+///<reference path='./node_modules/immutable/dist/immutable.d.ts'/>
+import Immutable from 'immutable';
+var map1: Immutable.Map<string, number>;
+map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
+var map2 = map1.set('b', 50);
+map1.get('b'); // 2
+map2.get('b'); // 50
+```
+
+## The case for Immutability
+
+Much of what makes application development difficult is tracking mutation and
+maintaining state. Developing with immutable data encourages you to think
+differently about how data flows through your application.
+
+Subscribing to data events throughout your application creates a huge overhead of
+book-keeping which can hurt performance, sometimes dramatically, and creates
+opportunities for areas of your application to get out of sync with each other
+due to easy to make programmer error. Since immutable data never changes,
+subscribing to changes throughout the model is a dead-end and new data can only
+ever be passed from above.
+
+This model of data flow aligns well with the architecture of [React][]
+and especially well with an application designed using the ideas of [Flux][].
+
+When data is passed from above rather than being subscribed to, and you're only
+interested in doing work when something has changed, you can use equality.
+
+Immutable collections should be treated as _values_ rather than _objects_. While
+objects represent some thing which could change over time, a value represents
+the state of that thing at a particular instance of time. This principle is most
+important to understanding the appropriate use of immutable data. In order to
+treat Immutable.js collections as values, it's important to use the
+`Immutable.is()` function or `.equals()` method to determine _value equality_
+instead of the `===` operator which determines object _reference identity_.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = Map({ a: 1, b: 2, c: 3 });
+map1.equals(map2); // true
+map1 === map2; // false
+```
+
+Note: As a performance optimization Immutable.js attempts to return the existing
+collection when an operation would result in an identical collection, allowing
+for using `===` reference equality to determine if something definitely has not
+changed. This can be extremely useful when used within a memoization function
+which would prefer to re-run the function if a deeper equality check could
+potentially be more costly. The `===` equality check is also used internally by
+`Immutable.is` and `.equals()` as a performance optimization.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = map1.set('b', 2); // Set to same value
+map1 === map2; // true
+```
+
+If an object is immutable, it can be "copied" simply by making another reference
+to it instead of copying the entire object. Because a reference is much smaller
+than the object itself, this results in memory savings and a potential boost in
+execution speed for programs which rely on copies (such as an undo-stack).
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const map = Map({ a: 1, b: 2, c: 3 });
+const mapCopy = map; // Look, "copies" are free!
+```
+
+[React]: https://reactjs.org/
+[Flux]: https://facebook.github.io/flux/docs/in-depth-overview/
+
+
+## JavaScript-first API
+
+While Immutable.js is inspired by Clojure, Scala, Haskell and other functional
+programming environments, it's designed to bring these powerful concepts to
+JavaScript, and therefore has an Object-Oriented API that closely mirrors that
+of [ES2015][] [Array][], [Map][], and [Set][].
+
+[es2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla
+[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
+[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
+[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
+
+The difference for the immutable collections is that methods which would mutate
+the collection, like `push`, `set`, `unshift` or `splice`, instead return a new
+immutable collection. Methods which return new arrays, like `slice` or `concat`,
+instead return new immutable collections.
+
+<!-- runkit:activate -->
+
+```js
+const { List } = require('immutable');
+const list1 = List([1, 2]);
+const list2 = list1.push(3, 4, 5);
+const list3 = list2.unshift(0);
+const list4 = list1.concat(list2, list3);
+assert.equal(list1.size, 2);
+assert.equal(list2.size, 5);
+assert.equal(list3.size, 6);
+assert.equal(list4.size, 13);
+assert.equal(list4.get(0), 1);
+```
+
+Almost all of the methods on [Array][] will be found in similar form on
+`Immutable.List`, those of [Map][] found on `Immutable.Map`, and those of [Set][]
+found on `Immutable.Set`, including collection operations like `forEach()`
+and `map()`.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const alpha = Map({ a: 1, b: 2, c: 3, d: 4 });
+alpha.map((v, k) => k.toUpperCase()).join();
+// 'A,B,C,D'
+```
+
+### Convert from raw JavaScript objects and arrays.
+
+Designed to inter-operate with your existing JavaScript, Immutable.js
+accepts plain JavaScript Arrays and Objects anywhere a method expects a
+`Collection`.
+
+<!-- runkit:activate -->
+
+```js
+const { Map, List } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3, d: 4 });
+const map2 = Map({ c: 10, a: 20, t: 30 });
+const obj = { d: 100, o: 200, g: 300 };
+const map3 = map1.merge(map2, obj);
+// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 }
+const list1 = List([1, 2, 3]);
+const list2 = List([4, 5, 6]);
+const array = [7, 8, 9];
+const list3 = list1.concat(list2, array);
+// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
+```
+
+This is possible because Immutable.js can treat any JavaScript Array or Object
+as a Collection. You can take advantage of this in order to get sophisticated
+collection methods on JavaScript Objects, which otherwise have a very sparse
+native API. Because Seq evaluates lazily and does not cache intermediate
+results, these operations can be extremely efficient.
+
+<!-- runkit:activate -->
+
+```js
+const { Seq } = require('immutable');
+const myObject = { a: 1, b: 2, c: 3 };
+Seq(myObject)
+  .map(x => x * x)
+  .toObject();
+// { a: 1, b: 4, c: 9 }
+```
+
+Keep in mind, when using JS objects to construct Immutable Maps, that
+JavaScript Object properties are always strings, even if written in a quote-less
+shorthand, while Immutable Maps accept keys of any type.
+
+<!-- runkit:activate -->
+
+```js
+const { fromJS } = require('immutable');
+
+const obj = { 1: 'one' };
+console.log(Object.keys(obj)); // [ "1" ]
+console.log(obj['1'], obj[1]); // "one", "one"
+
+const map = fromJS(obj);
+console.log(map.get('1'), map.get(1)); // "one", undefined
+```
+
+Property access for JavaScript Objects first converts the key to a string, but
+since Immutable Map keys can be of any type the argument to `get()` is
+not altered.
+
+### Converts back to raw JavaScript objects.
+
+All Immutable.js Collections can be converted to plain JavaScript Arrays and
+Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`.
+All Immutable Collections also implement `toJSON()` allowing them to be passed
+to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of
+nested objects.
+
+<!-- runkit:activate -->
+
+```js
+const { Map, List } = require('immutable');
+const deep = Map({ a: 1, b: 2, c: List([3, 4, 5]) });
+console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] }
+console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ]
+console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] }
+JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}'
+```
+
+### Embraces ES2015
+
+Immutable.js supports all JavaScript environments, including legacy
+browsers (even IE11). However it also takes advantage of features added to
+JavaScript in [ES2015][], the latest standard version of JavaScript, including
+[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired
+by the native [Map][] and [Set][] collections added to ES2015.
+
+All examples in the Documentation are presented in ES2015. To run in all
+browsers, they need to be translated to ES5.
+
+```js
+// ES2015
+const mapped = foo.map(x => x * x);
+// ES5
+var mapped = foo.map(function (x) {
+  return x * x;
+});
+```
+
+All Immutable.js collections are [Iterable][iterators], which allows them to be
+used anywhere an Iterable is expected, such as when spreading into an Array.
+
+<!-- runkit:activate -->
+
+```js
+const { List } = require('immutable');
+const aList = List([1, 2, 3]);
+const anArray = [0, ...aList, 4, 5]; // [ 0, 1, 2, 3, 4, 5 ]
+```
+
+Note: A Collection is always iterated in the same order, however that order may
+not always be well defined, as is the case for the `Map` and `Set`.
+
+[Iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol
+[Arrow Functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
+[Classes]: https://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes
+[Modules]: https://www.2ality.com/2014/09/es6-modules-final.html
+
+
+## Nested Structures
+
+The collections in Immutable.js are intended to be nested, allowing for deep
+trees of data, similar to JSON.
+
+<!-- runkit:activate -->
+
+```js
+const { fromJS } = require('immutable');
+const nested = fromJS({ a: { b: { c: [3, 4, 5] } } });
+// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } }
+```
+
+A few power-tools allow for reading and operating on nested data. The
+most useful are `mergeDeep`, `getIn`, `setIn`, and `updateIn`, found on `List`,
+`Map` and `OrderedMap`.
+
+<!-- runkit:activate -->
+
+```js
+const { fromJS } = require('immutable');
+const nested = fromJS({ a: { b: { c: [3, 4, 5] } } });
+
+const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } });
+// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } }
+
+console.log(nested2.getIn(['a', 'b', 'd'])); // 6
+
+const nested3 = nested2.updateIn(['a', 'b', 'd'], value => value + 1);
+console.log(nested3);
+// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } }
+
+const nested4 = nested3.updateIn(['a', 'b', 'c'], list => list.push(6));
+// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } }
+```
+
+## Equality treats Collections as Values
+
+Immutable.js collections are treated as pure data _values_. Two immutable
+collections are considered _value equal_ (via `.equals()` or `is()`) if they
+represent the same collection of values. This differs from JavaScript's typical
+_reference equal_ (via `===` or `==`) for Objects and Arrays which only
+determines if two variables represent references to the same object instance.
+
+Consider the example below where two identical `Map` instances are not
+_reference equal_ but are _value equal_.
+
+<!-- runkit:activate -->
+
+```js
+// First consider:
+const obj1 = { a: 1, b: 2, c: 3 };
+const obj2 = { a: 1, b: 2, c: 3 };
+obj1 !== obj2; // two different instances are always not equal with ===
+
+const { Map, is } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = Map({ a: 1, b: 2, c: 3 });
+map1 !== map2; // two different instances are not reference-equal
+map1.equals(map2); // but are value-equal if they have the same values
+is(map1, map2); // alternatively can use the is() function
+```
+
+Value equality allows Immutable.js collections to be used as keys in Maps or
+values in Sets, and retrieved with different but equivalent collections:
+
+<!-- runkit:activate -->
+
+```js
+const { Map, Set } = require('immutable');
+const map1 = Map({ a: 1, b: 2, c: 3 });
+const map2 = Map({ a: 1, b: 2, c: 3 });
+const set = Set().add(map1);
+set.has(map2); // true because these are value-equal
+```
+
+Note: `is()` uses the same measure of equality as [Object.is][] for scalar
+strings and numbers, but uses value equality for Immutable collections,
+determining if both are immutable and all keys and values are equal
+using the same measure of equality.
+
+[object.is]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+
+#### Performance tradeoffs
+
+While value equality is useful in many circumstances, it has different
+performance characteristics than reference equality. Understanding these
+tradeoffs may help you decide which to use in each case, especially when used
+to memoize some operation.
+
+When comparing two collections, value equality may require considering every
+item in each collection, on an `O(N)` time complexity. For large collections of
+values, this could become a costly operation. Though if the two are not equal
+and hardly similar, the inequality is determined very quickly. In contrast, when
+comparing two collections with reference equality, only the initial references
+to memory need to be compared which is not based on the size of the collections,
+which has an `O(1)` time complexity. Checking reference equality is always very
+fast, however just because two collections are not reference-equal does not rule
+out the possibility that they may be value-equal.
+
+#### Return self on no-op optimization
+
+When possible, Immutable.js avoids creating new objects for updates where no
+change in _value_ occurred, to allow for efficient _reference equality_ checking
+to quickly determine if no change occurred.
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const originalMap = Map({ a: 1, b: 2, c: 3 });
+const updatedMap = originalMap.set('b', 2);
+updatedMap === originalMap; // No-op .set() returned the original reference.
+```
+
+However updates which do result in a change will return a new reference. Each
+of these operations occur independently, so two similar updates will not return
+the same reference:
+
+<!-- runkit:activate -->
+
+```js
+const { Map } = require('immutable');
+const originalMap = Map({ a: 1, b: 2, c: 3 });
+const updatedMap = originalMap.set('b', 1000);
+// New instance, leaving the original immutable.
+updatedMap !== originalMap;
+const anotherUpdatedMap = originalMap.set('b', 1000);
+// Despite both the results of the same operation, each created a new reference.
+anotherUpdatedMap !== updatedMap;
+// However the two are value equal.
+anotherUpdatedMap.equals(updatedMap);
+```
+
+## Batching Mutations
+
+> If a tree falls in the woods, does it make a sound?
+>
+> If a pure function mutates some local data in order to produce an immutable
+> return value, is that ok?
+>
+> — Rich Hickey, Clojure
+
+Applying a mutation to create a new immutable object results in some overhead,
+which can add up to a minor performance penalty. If you need to apply a series
+of mutations locally before returning, Immutable.js gives you the ability to
+create a temporary mutable (transient) copy of a collection and apply a batch of
+mutations in a performant manner by using `withMutations`. In fact, this is
+exactly how Immutable.js applies complex mutations itself.
+
+As an example, building `list2` results in the creation of 1, not 3, new
+immutable Lists.
+
+<!-- runkit:activate -->
+
+```js
+const { List } = require('immutable');
+const list1 = List([1, 2, 3]);
+const list2 = list1.withMutations(function (list) {
+  list.push(4).push(5).push(6);
+});
+assert.equal(list1.size, 3);
+assert.equal(list2.size, 6);
+```
+
+Note: Immutable.js also provides `asMutable` and `asImmutable`, but only
+encourages their use when `withMutations` will not suffice. Use caution to not
+return a mutable copy, which could result in undesired behavior.
+
+_Important!_: Only a select few methods can be used in `withMutations` including
+`set`, `push` and `pop`. These methods can be applied directly against a
+persistent data-structure where other methods like `map`, `filter`, `sort`,
+and `splice` will always return new immutable data-structures and never mutate
+a mutable collection.
+
+## Lazy Seq
+
+`Seq` describes a lazy operation, allowing them to efficiently chain
+use of all the higher-order collection methods (such as `map` and `filter`)
+by not creating intermediate collections.
+
+**Seq is immutable** — Once a Seq is created, it cannot be
+changed, appended to, rearranged or otherwise modified. Instead, any mutative
+method called on a `Seq` will return a new `Seq`.
+
+**Seq is lazy** — `Seq` does as little work as necessary to respond to any
+method call. Values are often created during iteration, including implicit
+iteration when reducing or converting to a concrete data structure such as
+a `List` or JavaScript `Array`.
+
+For example, the following performs no work, because the resulting
+`Seq`'s values are never iterated:
+
+```js
+const { Seq } = require('immutable');
+const oddSquares = Seq([1, 2, 3, 4, 5, 6, 7, 8])
+  .filter(x => x % 2 !== 0)
+  .map(x => x * x);
+```
+
+Once the `Seq` is used, it performs only the work necessary. In this
+example, no intermediate arrays are ever created, filter is called three
+times, and map is only called once:
+
+```js
+oddSquares.get(1); // 9
+```
+
+Any collection can be converted to a lazy Seq with `Seq()`.
+
+<!-- runkit:activate -->
+
+```js
+const { Map, Seq } = require('immutable');
+const map = Map({ a: 1, b: 2, c: 3 });
+const lazySeq = Seq(map);
+```
+
+`Seq` allows for the efficient chaining of operations, allowing for the
+expression of logic that can otherwise be very tedious:
+
+```js
+lazySeq
+  .flip()
+  .map(key => key.toUpperCase())
+  .flip();
+// Seq { A: 1, B: 2, C: 3 }
+```
+
+As well as expressing logic that would otherwise seem memory or time
+limited, for example `Range` is a special kind of Lazy sequence.
+
+<!-- runkit:activate -->
+
+```js
+const { Range } = require('immutable');
+Range(1, Infinity)
+  .skip(1000)
+  .map(n => -n)
+  .filter(n => n % 2 === 0)
+  .take(2)
+  .reduce((r, n) => r * n, 1);
+// 1006008
+```
+
+## Comparison of filter(), groupBy(), and partition()
+
+The `filter()`, `groupBy()`, and `partition()` methods are similar in that they
+all divide a collection into parts based on applying a function to each element.
+All three call the predicate or grouping function once for each item in the
+input collection.  All three return zero or more collections of the same type as
+their input.  The returned collections are always distinct from the input
+(according to `===`), even if the contents are identical.
+
+Of these methods, `filter()` is the only one that is lazy and the only one which
+discards items from the input collection. It is the simplest to use, and the
+fact that it returns exactly one collection makes it easy to combine with other
+methods to form a pipeline of operations.
+
+The `partition()` method is similar to an eager version of `filter()`, but it
+returns two collections; the first contains the items that would have been
+discarded by `filter()`, and the second contains the items that would have been
+kept.  It always returns an array of exactly two collections, which can make it
+easier to use than `groupBy()`.  Compared to making two separate calls to
+`filter()`, `partition()` makes half as many calls it the predicate passed to
+it.
+
+The `groupBy()` method is a more generalized version of `partition()` that can
+group by an arbitrary function rather than just a predicate.  It returns a map
+with zero or more entries, where the keys are the values returned by the
+grouping function, and the values are nonempty collections of the corresponding
+arguments.  Although `groupBy()` is more powerful than `partition()`, it can be
+harder to use because it is not always possible predict in advance how many
+entries the returned map will have and what their keys will be.
+
+| Summary                       | `filter` | `partition` | `groupBy`      |
+|:------------------------------|:---------|:------------|:---------------|
+| ease of use                   | easiest  | moderate    | hardest        |
+| generality                    | least    | moderate    | most           |
+| laziness                      | lazy     | eager       | eager          |
+| # of returned sub-collections | 1        | 2           | 0 or more      |
+| sub-collections may be empty  | yes      | yes         | no             |
+| can discard items             | yes      | no          | no             |
+| wrapping container            | none     | array       | Map/OrderedMap |
+
+## Additional Tools and Resources
+
+- [Atom-store](https://github.com/jameshopkins/atom-store/)
+  - A Clojure-inspired atom implementation in Javascript with configurability
+    for external persistance.
+
+- [Chai Immutable](https://github.com/astorije/chai-immutable)
+  - If you are using the [Chai Assertion Library](https://chaijs.com/), this
+    provides a set of assertions to use against Immutable.js collections.
+
+- [Fantasy-land](https://github.com/fantasyland/fantasy-land)
+  - Specification for interoperability of common algebraic structures in JavaScript.
+
+- [Immutagen](https://github.com/pelotom/immutagen)
+  - A library for simulating immutable generators in JavaScript.
+
+- [Immutable-cursor](https://github.com/redbadger/immutable-cursor)
+  - Immutable cursors incorporating the Immutable.js interface over
+  Clojure-inspired atom.
+
+- [Immutable-ext](https://github.com/DrBoolean/immutable-ext)
+  - Fantasyland extensions for immutablejs
+
+- [Immutable-js-tools](https://github.com/madeinfree/immutable-js-tools)
+  - Util tools for immutable.js
+
+- [Immutable-Redux](https://github.com/gajus/redux-immutable)
+  - redux-immutable is used to create an equivalent function of Redux
+  combineReducers that works with Immutable.js state.
+
+- [Immutable-Treeutils](https://github.com/lukasbuenger/immutable-treeutils)
+  - Functional tree traversal helpers for ImmutableJS data structures.
+
+- [Irecord](https://github.com/ericelliott/irecord)
+  - An immutable store that exposes an RxJS observable. Great for React.
+
+- [Mudash](https://github.com/brianneisler/mudash)
+  - Lodash wrapper providing Immutable.JS support.
+
+- [React-Immutable-PropTypes](https://github.com/HurricaneJames/react-immutable-proptypes)
+  - PropType validators that work with Immutable.js.
+
+- [Redux-Immutablejs](https://github.com/indexiatech/redux-immutablejs)
+  - Redux Immutable facilities.
+
+- [Rxstate](https://github.com/yamalight/rxstate)
+  - Simple opinionated state management library based on RxJS and Immutable.js.
+
+- [Transit-Immutable-js](https://github.com/glenjamin/transit-immutable-js)
+  - Transit serialisation for Immutable.js.
+  - See also: [Transit-js](https://github.com/cognitect/transit-js)
+
+Have an additional tool designed to work with Immutable.js?
+Submit a PR to add it to this list in alphabetical order.
+
+## Contributing
+
+Use [Github issues](https://github.com/immutable-js/immutable-js/issues) for requests.
+
+We actively welcome pull requests, learn how to [contribute](https://github.com/immutable-js/immutable-js/blob/main/.github/CONTRIBUTING.md).
+
+Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/).
+
+### Changelog
+
+Changes are tracked as [Github releases](https://github.com/immutable-js/immutable-js/releases).
+
+### License
+
+Immutable.js is [MIT-licensed](./LICENSE).
+
+### Thanks
+
+[Phil Bagwell](https://www.youtube.com/watch?v=K2NYwP90bNs), for his inspiration
+and research in persistent data structures.
+
+[Hugh Jackson](https://github.com/hughfdjackson/), for providing the npm package
+name. If you're looking for his unsupported package, see [this repository](https://github.com/hughfdjackson/immutable).

+ 5908 - 0
node_modules/immutable/dist/immutable.d.ts

@@ -0,0 +1,5908 @@
+/**
+ * Immutable data encourages pure functions (data-in, data-out) and lends itself
+ * to much simpler application development and enabling techniques from
+ * functional programming such as lazy evaluation.
+ *
+ * While designed to bring these powerful functional concepts to JavaScript, it
+ * presents an Object-Oriented API familiar to Javascript engineers and closely
+ * mirroring that of Array, Map, and Set. It is easy and efficient to convert to
+ * and from plain Javascript types.
+ *
+ * ## How to read these docs
+ *
+ * In order to better explain what kinds of values the Immutable.js API expects
+ * and produces, this documentation is presented in a statically typed dialect of
+ * JavaScript (like [Flow][] or [TypeScript][]). You *don't need* to use these
+ * type checking tools in order to use Immutable.js, however becoming familiar
+ * with their syntax will help you get a deeper understanding of this API.
+ *
+ * **A few examples and how to read them.**
+ *
+ * All methods describe the kinds of data they accept and the kinds of data
+ * they return. For example a function which accepts two numbers and returns
+ * a number would look like this:
+ *
+ * ```js
+ * sum(first: number, second: number): number
+ * ```
+ *
+ * Sometimes, methods can accept different kinds of data or return different
+ * kinds of data, and this is described with a *type variable*, which is
+ * typically in all-caps. For example, a function which always returns the same
+ * kind of data it was provided would look like this:
+ *
+ * ```js
+ * identity<T>(value: T): T
+ * ```
+ *
+ * Type variables are defined with classes and referred to in methods. For
+ * example, a class that holds onto a value for you might look like this:
+ *
+ * ```js
+ * class Box<T> {
+ *   constructor(value: T)
+ *   getValue(): T
+ * }
+ * ```
+ *
+ * In order to manipulate Immutable data, methods that we're used to affecting
+ * a Collection instead return a new Collection of the same type. The type
+ * `this` refers to the same kind of class. For example, a List which returns
+ * new Lists when you `push` a value onto it might look like:
+ *
+ * ```js
+ * class List<T> {
+ *   push(value: T): this
+ * }
+ * ```
+ *
+ * Many methods in Immutable.js accept values which implement the JavaScript
+ * [Iterable][] protocol, and might appear like `Iterable<string>` for something
+ * which represents sequence of strings. Typically in JavaScript we use plain
+ * Arrays (`[]`) when an Iterable is expected, but also all of the Immutable.js
+ * collections are iterable themselves!
+ *
+ * For example, to get a value deep within a structure of data, we might use
+ * `getIn` which expects an `Iterable` path:
+ *
+ * ```
+ * getIn(path: Iterable<string | number>): unknown
+ * ```
+ *
+ * To use this method, we could pass an array: `data.getIn([ "key", 2 ])`.
+ *
+ *
+ * Note: All examples are presented in the modern [ES2015][] version of
+ * JavaScript. Use tools like Babel to support older browsers.
+ *
+ * For example:
+ *
+ * ```js
+ * // ES2015
+ * const mappedFoo = foo.map(x => x * x);
+ * // ES5
+ * var mappedFoo = foo.map(function (x) { return x * x; });
+ * ```
+ *
+ * [ES2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla
+ * [TypeScript]: https://www.typescriptlang.org/
+ * [Flow]: https://flowtype.org/
+ * [Iterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
+ */
+
+declare namespace Immutable {
+  /** @ignore */
+  type OnlyObject<T> = Extract<T, object>;
+
+  /** @ignore */
+  type ContainObject<T> = OnlyObject<T> extends object
+    ? OnlyObject<T> extends never
+      ? false
+      : true
+    : false;
+
+  /**
+   * @ignore
+   *
+   * Used to convert deeply all immutable types to a plain TS type.
+   * Using `unknown` on object instead of recursive call as we have a circular reference issue
+   */
+  export type DeepCopy<T> = T extends Record<infer R>
+    ? // convert Record to DeepCopy plain JS object
+      {
+        [key in keyof R]: ContainObject<R[key]> extends true ? unknown : R[key];
+      }
+    : T extends Collection.Keyed<infer KeyedKey, infer V>
+    ? // convert KeyedCollection to DeepCopy plain JS object
+      {
+        [key in KeyedKey extends string | number | symbol
+          ? KeyedKey
+          : string]: V extends object ? unknown : V;
+      }
+    : // convert IndexedCollection or Immutable.Set to DeepCopy plain JS array
+    T extends Collection<infer _, infer V>
+    ? Array<DeepCopy<V>>
+    : T extends string | number // Iterable scalar types : should be kept as is
+    ? T
+    : T extends Iterable<infer V> // Iterable are converted to plain JS array
+    ? Array<DeepCopy<V>>
+    : T extends object // plain JS object are converted deeply
+    ? {
+        [ObjectKey in keyof T]: ContainObject<T[ObjectKey]> extends true
+          ? unknown
+          : T[ObjectKey];
+      }
+    : // other case : should be kept as is
+      T;
+
+  /**
+   * Describes which item in a pair should be placed first when sorting
+   *
+   * @ignore
+   */
+  export enum PairSorting {
+    LeftThenRight = -1,
+    RightThenLeft = +1,
+  }
+
+  /**
+   * Function comparing two items of the same type. It can return:
+   *
+   * * a PairSorting value, to indicate whether the left-hand item or the right-hand item should be placed before the other
+   *
+   * * the traditional numeric return value - especially -1, 0, or 1
+   *
+   * @ignore
+   */
+  export type Comparator<T> = (left: T, right: T) => PairSorting | number;
+
+  /**
+   * Lists are ordered indexed dense collections, much like a JavaScript
+   * Array.
+   *
+   * Lists are immutable and fully persistent with O(log32 N) gets and sets,
+   * and O(1) push and pop.
+   *
+   * Lists implement Deque, with efficient addition and removal from both the
+   * end (`push`, `pop`) and beginning (`unshift`, `shift`).
+   *
+   * Unlike a JavaScript Array, there is no distinction between an
+   * "unset" index and an index set to `undefined`. `List#forEach` visits all
+   * indices from 0 to size, regardless of whether they were explicitly defined.
+   */
+  namespace List {
+    /**
+     * True if the provided value is a List
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable');
+     * List.isList([]); // false
+     * List.isList(List()); // true
+     * ```
+     */
+    function isList(maybeList: unknown): maybeList is List<unknown>;
+
+    /**
+     * Creates a new List containing `values`.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable');
+     * List.of(1, 2, 3, 4)
+     * // List [ 1, 2, 3, 4 ]
+     * ```
+     *
+     * Note: Values are not altered or converted in any way.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable');
+     * List.of({x:1}, 2, [3], 4)
+     * // List [ { x: 1 }, 2, [ 3 ], 4 ]
+     * ```
+     */
+    function of<T>(...values: Array<T>): List<T>;
+  }
+
+  /**
+   * Create a new immutable List containing the values of the provided
+   * collection-like.
+   *
+   * Note: `List` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { List, Set } = require('immutable')
+   *
+   * const emptyList = List()
+   * // List []
+   *
+   * const plainArray = [ 1, 2, 3, 4 ]
+   * const listFromPlainArray = List(plainArray)
+   * // List [ 1, 2, 3, 4 ]
+   *
+   * const plainSet = Set([ 1, 2, 3, 4 ])
+   * const listFromPlainSet = List(plainSet)
+   * // List [ 1, 2, 3, 4 ]
+   *
+   * const arrayIterator = plainArray[Symbol.iterator]()
+   * const listFromCollectionArray = List(arrayIterator)
+   * // List [ 1, 2, 3, 4 ]
+   *
+   * listFromPlainArray.equals(listFromCollectionArray) // true
+   * listFromPlainSet.equals(listFromCollectionArray) // true
+   * listFromPlainSet.equals(listFromPlainArray) // true
+   * ```
+   */
+  function List<T>(collection?: Iterable<T> | ArrayLike<T>): List<T>;
+
+  interface List<T> extends Collection.Indexed<T> {
+    /**
+     * The number of items in this List.
+     */
+    readonly size: number;
+
+    // Persistent changes
+
+    /**
+     * Returns a new List which includes `value` at `index`. If `index` already
+     * exists in this List, it will be replaced.
+     *
+     * `index` may be a negative number, which indexes back from the end of the
+     * List. `v.set(-1, "value")` sets the last item in the List.
+     *
+     * If `index` larger than `size`, the returned List's `size` will be large
+     * enough to include the `index`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * const originalList = List([ 0 ]);
+     * // List [ 0 ]
+     * originalList.set(1, 1);
+     * // List [ 0, 1 ]
+     * originalList.set(0, 'overwritten');
+     * // List [ "overwritten" ]
+     * originalList.set(2, 2);
+     * // List [ 0, undefined, 2 ]
+     *
+     * List().set(50000, 'value').size;
+     * // 50001
+     * ```
+     *
+     * Note: `set` can be used in `withMutations`.
+     */
+    set(index: number, value: T): List<T>;
+
+    /**
+     * Returns a new List which excludes this `index` and with a size 1 less
+     * than this List. Values at indices above `index` are shifted down by 1 to
+     * fill the position.
+     *
+     * This is synonymous with `list.splice(index, 1)`.
+     *
+     * `index` may be a negative number, which indexes back from the end of the
+     * List. `v.delete(-1)` deletes the last item in the List.
+     *
+     * Note: `delete` cannot be safely used in IE8
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 0, 1, 2, 3, 4 ]).delete(0);
+     * // List [ 1, 2, 3, 4 ]
+     * ```
+     *
+     * Since `delete()` re-indexes values, it produces a complete copy, which
+     * has `O(N)` complexity.
+     *
+     * Note: `delete` *cannot* be used in `withMutations`.
+     *
+     * @alias remove
+     */
+    delete(index: number): List<T>;
+    remove(index: number): List<T>;
+
+    /**
+     * Returns a new List with `value` at `index` with a size 1 more than this
+     * List. Values at indices above `index` are shifted over by 1.
+     *
+     * This is synonymous with `list.splice(index, 0, value)`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 0, 1, 2, 3, 4 ]).insert(6, 5)
+     * // List [ 0, 1, 2, 3, 4, 5 ]
+     * ```
+     *
+     * Since `insert()` re-indexes values, it produces a complete copy, which
+     * has `O(N)` complexity.
+     *
+     * Note: `insert` *cannot* be used in `withMutations`.
+     */
+    insert(index: number, value: T): List<T>;
+
+    /**
+     * Returns a new List with 0 size and no values in constant time.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 1, 2, 3, 4 ]).clear()
+     * // List []
+     * ```
+     *
+     * Note: `clear` can be used in `withMutations`.
+     */
+    clear(): List<T>;
+
+    /**
+     * Returns a new List with the provided `values` appended, starting at this
+     * List's `size`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 1, 2, 3, 4 ]).push(5)
+     * // List [ 1, 2, 3, 4, 5 ]
+     * ```
+     *
+     * Note: `push` can be used in `withMutations`.
+     */
+    push(...values: Array<T>): List<T>;
+
+    /**
+     * Returns a new List with a size ones less than this List, excluding
+     * the last index in this List.
+     *
+     * Note: this differs from `Array#pop` because it returns a new
+     * List rather than the removed value. Use `last()` to get the last value
+     * in this List.
+     *
+     * ```js
+     * List([ 1, 2, 3, 4 ]).pop()
+     * // List[ 1, 2, 3 ]
+     * ```
+     *
+     * Note: `pop` can be used in `withMutations`.
+     */
+    pop(): List<T>;
+
+    /**
+     * Returns a new List with the provided `values` prepended, shifting other
+     * values ahead to higher indices.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 2, 3, 4]).unshift(1);
+     * // List [ 1, 2, 3, 4 ]
+     * ```
+     *
+     * Note: `unshift` can be used in `withMutations`.
+     */
+    unshift(...values: Array<T>): List<T>;
+
+    /**
+     * Returns a new List with a size ones less than this List, excluding
+     * the first index in this List, shifting all other values to a lower index.
+     *
+     * Note: this differs from `Array#shift` because it returns a new
+     * List rather than the removed value. Use `first()` to get the first
+     * value in this List.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 0, 1, 2, 3, 4 ]).shift();
+     * // List [ 1, 2, 3, 4 ]
+     * ```
+     *
+     * Note: `shift` can be used in `withMutations`.
+     */
+    shift(): List<T>;
+
+    /**
+     * Returns a new List with an updated value at `index` with the return
+     * value of calling `updater` with the existing value, or `notSetValue` if
+     * `index` was not set. If called with a single argument, `updater` is
+     * called with the List itself.
+     *
+     * `index` may be a negative number, which indexes back from the end of the
+     * List. `v.update(-1)` updates the last item in the List.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * const list = List([ 'a', 'b', 'c' ])
+     * const result = list.update(2, val => val.toUpperCase())
+     * // List [ "a", "b", "C" ]
+     * ```
+     *
+     * This can be very useful as a way to "chain" a normal function into a
+     * sequence of methods. RxJS calls this "let" and lodash calls it "thru".
+     *
+     * For example, to sum a List after mapping and filtering:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * function sum(collection) {
+     *   return collection.reduce((sum, x) => sum + x, 0)
+     * }
+     *
+     * List([ 1, 2, 3 ])
+     *   .map(x => x + 1)
+     *   .filter(x => x % 2 === 0)
+     *   .update(sum)
+     * // 6
+     * ```
+     *
+     * Note: `update(index)` can be used in `withMutations`.
+     *
+     * @see `Map#update`
+     */
+    update(index: number, notSetValue: T, updater: (value: T) => T): this;
+    update(
+      index: number,
+      updater: (value: T | undefined) => T | undefined
+    ): this;
+    update<R>(updater: (value: this) => R): R;
+
+    /**
+     * Returns a new List with size `size`. If `size` is less than this
+     * List's size, the new List will exclude values at the higher indices.
+     * If `size` is greater than this List's size, the new List will have
+     * undefined values for the newly available indices.
+     *
+     * When building a new List and the final size is known up front, `setSize`
+     * used in conjunction with `withMutations` may result in the more
+     * performant construction.
+     */
+    setSize(size: number): List<T>;
+
+    // Deep persistent changes
+
+    /**
+     * Returns a new List having set `value` at this `keyPath`. If any keys in
+     * `keyPath` do not exist, a new immutable Map will be created at that key.
+     *
+     * Index numbers are used as keys to determine the path to follow in
+     * the List.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * const list = List([ 0, 1, 2, List([ 3, 4 ])])
+     * list.setIn([3, 0], 999);
+     * // List [ 0, 1, 2, List [ 999, 4 ] ]
+     * ```
+     *
+     * Plain JavaScript Object or Arrays may be nested within an Immutable.js
+     * Collection, and setIn() can update those values as well, treating them
+     * immutably by creating new copies of those values with the changes applied.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * const list = List([ 0, 1, 2, { plain: 'object' }])
+     * list.setIn([3, 'plain'], 'value');
+     * // List([ 0, 1, 2, { plain: 'value' }])
+     * ```
+     *
+     * Note: `setIn` can be used in `withMutations`.
+     */
+    setIn(keyPath: Iterable<unknown>, value: unknown): this;
+
+    /**
+     * Returns a new List having removed the value at this `keyPath`. If any
+     * keys in `keyPath` do not exist, no change will occur.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * const list = List([ 0, 1, 2, List([ 3, 4 ])])
+     * list.deleteIn([3, 0]);
+     * // List [ 0, 1, 2, List [ 4 ] ]
+     * ```
+     *
+     * Plain JavaScript Object or Arrays may be nested within an Immutable.js
+     * Collection, and removeIn() can update those values as well, treating them
+     * immutably by creating new copies of those values with the changes applied.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * const list = List([ 0, 1, 2, { plain: 'object' }])
+     * list.removeIn([3, 'plain']);
+     * // List([ 0, 1, 2, {}])
+     * ```
+     *
+     * Note: `deleteIn` *cannot* be safely used in `withMutations`.
+     *
+     * @alias removeIn
+     */
+    deleteIn(keyPath: Iterable<unknown>): this;
+    removeIn(keyPath: Iterable<unknown>): this;
+
+    /**
+     * Note: `updateIn` can be used in `withMutations`.
+     *
+     * @see `Map#updateIn`
+     */
+    updateIn(
+      keyPath: Iterable<unknown>,
+      notSetValue: unknown,
+      updater: (value: unknown) => unknown
+    ): this;
+    updateIn(
+      keyPath: Iterable<unknown>,
+      updater: (value: unknown) => unknown
+    ): this;
+
+    /**
+     * Note: `mergeIn` can be used in `withMutations`.
+     *
+     * @see `Map#mergeIn`
+     */
+    mergeIn(keyPath: Iterable<unknown>, ...collections: Array<unknown>): this;
+
+    /**
+     * Note: `mergeDeepIn` can be used in `withMutations`.
+     *
+     * @see `Map#mergeDeepIn`
+     */
+    mergeDeepIn(
+      keyPath: Iterable<unknown>,
+      ...collections: Array<unknown>
+    ): this;
+
+    // Transient changes
+
+    /**
+     * Note: Not all methods can be safely used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * allows being used in `withMutations`.
+     *
+     * @see `Map#withMutations`
+     */
+    withMutations(mutator: (mutable: this) => unknown): this;
+
+    /**
+     * An alternative API for withMutations()
+     *
+     * Note: Not all methods can be safely used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * allows being used in `withMutations`.
+     *
+     * @see `Map#asMutable`
+     */
+    asMutable(): this;
+
+    /**
+     * @see `Map#wasAltered`
+     */
+    wasAltered(): boolean;
+
+    /**
+     * @see `Map#asImmutable`
+     */
+    asImmutable(): this;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new List with other values or collections concatenated to this one.
+     *
+     * Note: `concat` can be used in `withMutations`.
+     *
+     * @alias merge
+     */
+    concat<C>(...valuesOrCollections: Array<Iterable<C> | C>): List<T | C>;
+    merge<C>(...collections: Array<Iterable<C>>): List<T | C>;
+
+    /**
+     * Returns a new List with values passed through a
+     * `mapper` function.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * List([ 1, 2 ]).map(x => 10 * x)
+     * // List [ 10, 20 ]
+     * ```
+     */
+    map<M>(
+      mapper: (value: T, key: number, iter: this) => M,
+      context?: unknown
+    ): List<M>;
+
+    /**
+     * Flat-maps the List, returning a new List.
+     *
+     * Similar to `list.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: T, key: number, iter: this) => Iterable<M>,
+      context?: unknown
+    ): List<M>;
+
+    /**
+     * Returns a new List with only the values for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends T>(
+      predicate: (value: T, index: number, iter: this) => value is F,
+      context?: unknown
+    ): List<F>;
+    filter(
+      predicate: (value: T, index: number, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new List with the values for which the `predicate`
+     * function returns false and another for which is returns true.
+     */
+    partition<F extends T, C>(
+      predicate: (this: C, value: T, index: number, iter: this) => value is F,
+      context?: C
+    ): [List<T>, List<F>];
+    partition<C>(
+      predicate: (this: C, value: T, index: number, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+
+    /**
+     * Returns a List "zipped" with the provided collection.
+     *
+     * Like `zipWith`, but using the default `zipper`: creating an `Array`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * const a = List([ 1, 2, 3 ]);
+     * const b = List([ 4, 5, 6 ]);
+     * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
+     * ```
+     */
+    zip<U>(other: Collection<unknown, U>): List<[T, U]>;
+    zip<U, V>(
+      other: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): List<[T, U, V]>;
+    zip(...collections: Array<Collection<unknown, unknown>>): List<unknown>;
+
+    /**
+     * Returns a List "zipped" with the provided collections.
+     *
+     * Unlike `zip`, `zipAll` continues zipping until the longest collection is
+     * exhausted. Missing values from shorter collections are filled with `undefined`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * const a = List([ 1, 2 ]);
+     * const b = List([ 3, 4, 5 ]);
+     * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ]
+     * ```
+     *
+     * Note: Since zipAll will return a collection as large as the largest
+     * input, some results may contain undefined values. TypeScript cannot
+     * account for these without cases (as of v2.5).
+     */
+    zipAll<U>(other: Collection<unknown, U>): List<[T, U]>;
+    zipAll<U, V>(
+      other: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): List<[T, U, V]>;
+    zipAll(...collections: Array<Collection<unknown, unknown>>): List<unknown>;
+
+    /**
+     * Returns a List "zipped" with the provided collections by using a
+     * custom `zipper` function.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { List } = require('immutable');" }
+     * -->
+     * ```js
+     * const a = List([ 1, 2, 3 ]);
+     * const b = List([ 4, 5, 6 ]);
+     * const c = a.zipWith((a, b) => a + b, b);
+     * // List [ 5, 7, 9 ]
+     * ```
+     */
+    zipWith<U, Z>(
+      zipper: (value: T, otherValue: U) => Z,
+      otherCollection: Collection<unknown, U>
+    ): List<Z>;
+    zipWith<U, V, Z>(
+      zipper: (value: T, otherValue: U, thirdValue: V) => Z,
+      otherCollection: Collection<unknown, U>,
+      thirdCollection: Collection<unknown, V>
+    ): List<Z>;
+    zipWith<Z>(
+      zipper: (...values: Array<unknown>) => Z,
+      ...collections: Array<Collection<unknown, unknown>>
+    ): List<Z>;
+  }
+
+  /**
+   * Immutable Map is an unordered Collection.Keyed of (key, value) pairs with
+   * `O(log32 N)` gets and `O(log32 N)` persistent sets.
+   *
+   * Iteration order of a Map is undefined, however is stable. Multiple
+   * iterations of the same Map will iterate in the same order.
+   *
+   * Map's keys can be of any type, and use `Immutable.is` to determine key
+   * equality. This allows the use of any value (including NaN) as a key.
+   *
+   * Because `Immutable.is` returns equality based on value semantics, and
+   * Immutable collections are treated as values, any Immutable collection may
+   * be used as a key.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Map, List } = require('immutable');
+   * Map().set(List([ 1 ]), 'listofone').get(List([ 1 ]));
+   * // 'listofone'
+   * ```
+   *
+   * Any JavaScript object may be used as a key, however strict identity is used
+   * to evaluate key equality. Two similar looking objects will represent two
+   * different keys.
+   *
+   * Implemented by a hash-array mapped trie.
+   */
+  namespace Map {
+    /**
+     * True if the provided value is a Map
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map.isMap({}) // false
+     * Map.isMap(Map()) // true
+     * ```
+     */
+    function isMap(maybeMap: unknown): maybeMap is Map<unknown, unknown>;
+
+    /**
+     * Creates a new Map from alternating keys and values
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map.of(
+     *   'key', 'value',
+     *   'numerical value', 3,
+     *    0, 'numerical key'
+     * )
+     * // Map { 0: "numerical key", "key": "value", "numerical value": 3 }
+     * ```
+     *
+     * @deprecated Use Map([ [ 'k', 'v' ] ]) or Map({ k: 'v' })
+     */
+    function of(...keyValues: Array<unknown>): Map<unknown, unknown>;
+  }
+
+  /**
+   * Creates a new Immutable Map.
+   *
+   * Created with the same key value pairs as the provided Collection.Keyed or
+   * JavaScript Object or expects a Collection of [K, V] tuple entries.
+   *
+   * Note: `Map` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Map } = require('immutable')
+   * Map({ key: "value" })
+   * Map([ [ "key", "value" ] ])
+   * ```
+   *
+   * Keep in mind, when using JS objects to construct Immutable Maps, that
+   * JavaScript Object properties are always strings, even if written in a
+   * quote-less shorthand, while Immutable Maps accept keys of any type.
+   *
+   * <!-- runkit:activate
+   *      { "preamble": "const { Map } = require('immutable');" }
+   * -->
+   * ```js
+   * let obj = { 1: "one" }
+   * Object.keys(obj) // [ "1" ]
+   * assert.equal(obj["1"], obj[1]) // "one" === "one"
+   *
+   * let map = Map(obj)
+   * assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined
+   * ```
+   *
+   * Property access for JavaScript Objects first converts the key to a string,
+   * but since Immutable Map keys can be of any type the argument to `get()` is
+   * not altered.
+   */
+  function Map<K, V>(collection?: Iterable<[K, V]>): Map<K, V>;
+  function Map<V>(obj: { [key: string]: V }): Map<string, V>;
+  function Map<K extends string | symbol, V>(obj: { [P in K]?: V }): Map<K, V>;
+
+  interface Map<K, V> extends Collection.Keyed<K, V> {
+    /**
+     * The number of entries in this Map.
+     */
+    readonly size: number;
+
+    // Persistent changes
+
+    /**
+     * Returns a new Map also containing the new key, value pair. If an equivalent
+     * key already exists in this Map, it will be replaced.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const originalMap = Map()
+     * const newerMap = originalMap.set('key', 'value')
+     * const newestMap = newerMap.set('key', 'newer value')
+     *
+     * originalMap
+     * // Map {}
+     * newerMap
+     * // Map { "key": "value" }
+     * newestMap
+     * // Map { "key": "newer value" }
+     * ```
+     *
+     * Note: `set` can be used in `withMutations`.
+     */
+    set(key: K, value: V): this;
+
+    /**
+     * Returns a new Map which excludes this `key`.
+     *
+     * Note: `delete` cannot be safely used in IE8, but is provided to mirror
+     * the ES6 collection API.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const originalMap = Map({
+     *   key: 'value',
+     *   otherKey: 'other value'
+     * })
+     * // Map { "key": "value", "otherKey": "other value" }
+     * originalMap.delete('otherKey')
+     * // Map { "key": "value" }
+     * ```
+     *
+     * Note: `delete` can be used in `withMutations`.
+     *
+     * @alias remove
+     */
+    delete(key: K): this;
+    remove(key: K): this;
+
+    /**
+     * Returns a new Map which excludes the provided `keys`.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const names = Map({ a: "Aaron", b: "Barry", c: "Connor" })
+     * names.deleteAll([ 'a', 'c' ])
+     * // Map { "b": "Barry" }
+     * ```
+     *
+     * Note: `deleteAll` can be used in `withMutations`.
+     *
+     * @alias removeAll
+     */
+    deleteAll(keys: Iterable<K>): this;
+    removeAll(keys: Iterable<K>): this;
+
+    /**
+     * Returns a new Map containing no keys or values.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map({ key: 'value' }).clear()
+     * // Map {}
+     * ```
+     *
+     * Note: `clear` can be used in `withMutations`.
+     */
+    clear(): this;
+
+    /**
+     * Returns a new Map having updated the value at this `key` with the return
+     * value of calling `updater` with the existing value.
+     *
+     * Similar to: `map.set(key, updater(map.get(key)))`.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const aMap = Map({ key: 'value' })
+     * const newMap = aMap.update('key', value => value + value)
+     * // Map { "key": "valuevalue" }
+     * ```
+     *
+     * This is most commonly used to call methods on collections within a
+     * structure of data. For example, in order to `.push()` onto a nested `List`,
+     * `update` and `push` can be used together:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map, List } = require('immutable');" }
+     * -->
+     * ```js
+     * const aMap = Map({ nestedList: List([ 1, 2, 3 ]) })
+     * const newMap = aMap.update('nestedList', list => list.push(4))
+     * // Map { "nestedList": List [ 1, 2, 3, 4 ] }
+     * ```
+     *
+     * When a `notSetValue` is provided, it is provided to the `updater`
+     * function when the value at the key does not exist in the Map.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable');" }
+     * -->
+     * ```js
+     * const aMap = Map({ key: 'value' })
+     * const newMap = aMap.update('noKey', 'no value', value => value + value)
+     * // Map { "key": "value", "noKey": "no valueno value" }
+     * ```
+     *
+     * However, if the `updater` function returns the same value it was called
+     * with, then no change will occur. This is still true if `notSetValue`
+     * is provided.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable');" }
+     * -->
+     * ```js
+     * const aMap = Map({ apples: 10 })
+     * const newMap = aMap.update('oranges', 0, val => val)
+     * // Map { "apples": 10 }
+     * assert.strictEqual(newMap, map);
+     * ```
+     *
+     * For code using ES2015 or later, using `notSetValue` is discourged in
+     * favor of function parameter default values. This helps to avoid any
+     * potential confusion with identify functions as described above.
+     *
+     * The previous example behaves differently when written with default values:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable');" }
+     * -->
+     * ```js
+     * const aMap = Map({ apples: 10 })
+     * const newMap = aMap.update('oranges', (val = 0) => val)
+     * // Map { "apples": 10, "oranges": 0 }
+     * ```
+     *
+     * If no key is provided, then the `updater` function return value is
+     * returned as well.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable');" }
+     * -->
+     * ```js
+     * const aMap = Map({ key: 'value' })
+     * const result = aMap.update(aMap => aMap.get('key'))
+     * // "value"
+     * ```
+     *
+     * This can be very useful as a way to "chain" a normal function into a
+     * sequence of methods. RxJS calls this "let" and lodash calls it "thru".
+     *
+     * For example, to sum the values in a Map
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable');" }
+     * -->
+     * ```js
+     * function sum(collection) {
+     *   return collection.reduce((sum, x) => sum + x, 0)
+     * }
+     *
+     * Map({ x: 1, y: 2, z: 3 })
+     *   .map(x => x + 1)
+     *   .filter(x => x % 2 === 0)
+     *   .update(sum)
+     * // 6
+     * ```
+     *
+     * Note: `update(key)` can be used in `withMutations`.
+     */
+    update(key: K, notSetValue: V, updater: (value: V) => V): this;
+    update(key: K, updater: (value: V | undefined) => V | undefined): this;
+    update<R>(updater: (value: this) => R): R;
+
+    /**
+     * Returns a new Map resulting from merging the provided Collections
+     * (or JS objects) into this Map. In other words, this takes each entry of
+     * each collection and sets it on this Map.
+     *
+     * Note: Values provided to `merge` are shallowly converted before being
+     * merged. No nested values are altered.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const one = Map({ a: 10, b: 20, c: 30 })
+     * const two = Map({ b: 40, a: 50, d: 60 })
+     * one.merge(two) // Map { "a": 50, "b": 40, "c": 30, "d": 60 }
+     * two.merge(one) // Map { "b": 20, "a": 10, "d": 60, "c": 30 }
+     * ```
+     *
+     * Note: `merge` can be used in `withMutations`.
+     *
+     * @alias concat
+     */
+    merge<KC, VC>(
+      ...collections: Array<Iterable<[KC, VC]>>
+    ): Map<K | KC, V | VC>;
+    merge<C>(
+      ...collections: Array<{ [key: string]: C }>
+    ): Map<K | string, V | C>;
+    concat<KC, VC>(
+      ...collections: Array<Iterable<[KC, VC]>>
+    ): Map<K | KC, V | VC>;
+    concat<C>(
+      ...collections: Array<{ [key: string]: C }>
+    ): Map<K | string, V | C>;
+
+    /**
+     * Like `merge()`, `mergeWith()` returns a new Map resulting from merging
+     * the provided Collections (or JS objects) into this Map, but uses the
+     * `merger` function for dealing with conflicts.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const one = Map({ a: 10, b: 20, c: 30 })
+     * const two = Map({ b: 40, a: 50, d: 60 })
+     * one.mergeWith((oldVal, newVal) => oldVal / newVal, two)
+     * // { "a": 0.2, "b": 0.5, "c": 30, "d": 60 }
+     * two.mergeWith((oldVal, newVal) => oldVal / newVal, one)
+     * // { "b": 2, "a": 5, "d": 60, "c": 30 }
+     * ```
+     *
+     * Note: `mergeWith` can be used in `withMutations`.
+     */
+    mergeWith(
+      merger: (oldVal: V, newVal: V, key: K) => V,
+      ...collections: Array<Iterable<[K, V]> | { [key: string]: V }>
+    ): this;
+
+    /**
+     * Like `merge()`, but when two compatible collections are encountered with
+     * the same key, it merges them as well, recursing deeply through the nested
+     * data. Two collections are considered to be compatible (and thus will be
+     * merged together) if they both fall into one of three categories: keyed
+     * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and
+     * arrays), or set-like (e.g., `Set`s). If they fall into separate
+     * categories, `mergeDeep` will replace the existing collection with the
+     * collection being merged in. This behavior can be customized by using
+     * `mergeDeepWith()`.
+     *
+     * Note: Indexed and set-like collections are merged using
+     * `concat()`/`union()` and therefore do not recurse.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) })
+     * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) })
+     * one.mergeDeep(two)
+     * // Map {
+     * //   "a": Map { "x": 2, "y": 10 },
+     * //   "b": Map { "x": 20, "y": 5 },
+     * //   "c": Map { "z": 3 }
+     * // }
+     * ```
+     *
+     * Note: `mergeDeep` can be used in `withMutations`.
+     */
+    mergeDeep(
+      ...collections: Array<Iterable<[K, V]> | { [key: string]: V }>
+    ): this;
+
+    /**
+     * Like `mergeDeep()`, but when two non-collections or incompatible
+     * collections are encountered at the same key, it uses the `merger`
+     * function to determine the resulting value. Collections are considered
+     * incompatible if they fall into separate categories between keyed,
+     * indexed, and set-like.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) })
+     * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) })
+     * one.mergeDeepWith((oldVal, newVal) => oldVal / newVal, two)
+     * // Map {
+     * //   "a": Map { "x": 5, "y": 10 },
+     * //   "b": Map { "x": 20, "y": 10 },
+     * //   "c": Map { "z": 3 }
+     * // }
+     * ```
+     *
+     * Note: `mergeDeepWith` can be used in `withMutations`.
+     */
+    mergeDeepWith(
+      merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown,
+      ...collections: Array<Iterable<[K, V]> | { [key: string]: V }>
+    ): this;
+
+    // Deep persistent changes
+
+    /**
+     * Returns a new Map having set `value` at this `keyPath`. If any keys in
+     * `keyPath` do not exist, a new immutable Map will be created at that key.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const originalMap = Map({
+     *   subObject: Map({
+     *     subKey: 'subvalue',
+     *     subSubObject: Map({
+     *       subSubKey: 'subSubValue'
+     *     })
+     *   })
+     * })
+     *
+     * const newMap = originalMap.setIn(['subObject', 'subKey'], 'ha ha!')
+     * // Map {
+     * //   "subObject": Map {
+     * //     "subKey": "ha ha!",
+     * //     "subSubObject": Map { "subSubKey": "subSubValue" }
+     * //   }
+     * // }
+     *
+     * const newerMap = originalMap.setIn(
+     *   ['subObject', 'subSubObject', 'subSubKey'],
+     *   'ha ha ha!'
+     * )
+     * // Map {
+     * //   "subObject": Map {
+     * //     "subKey": "subvalue",
+     * //     "subSubObject": Map { "subSubKey": "ha ha ha!" }
+     * //   }
+     * // }
+     * ```
+     *
+     * Plain JavaScript Object or Arrays may be nested within an Immutable.js
+     * Collection, and setIn() can update those values as well, treating them
+     * immutably by creating new copies of those values with the changes applied.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const originalMap = Map({
+     *   subObject: {
+     *     subKey: 'subvalue',
+     *     subSubObject: {
+     *       subSubKey: 'subSubValue'
+     *     }
+     *   }
+     * })
+     *
+     * originalMap.setIn(['subObject', 'subKey'], 'ha ha!')
+     * // Map {
+     * //   "subObject": {
+     * //     subKey: "ha ha!",
+     * //     subSubObject: { subSubKey: "subSubValue" }
+     * //   }
+     * // }
+     * ```
+     *
+     * If any key in the path exists but cannot be updated (such as a primitive
+     * like number or a custom Object like Date), an error will be thrown.
+     *
+     * Note: `setIn` can be used in `withMutations`.
+     */
+    setIn(keyPath: Iterable<unknown>, value: unknown): this;
+
+    /**
+     * Returns a new Map having removed the value at this `keyPath`. If any keys
+     * in `keyPath` do not exist, no change will occur.
+     *
+     * Note: `deleteIn` can be used in `withMutations`.
+     *
+     * @alias removeIn
+     */
+    deleteIn(keyPath: Iterable<unknown>): this;
+    removeIn(keyPath: Iterable<unknown>): this;
+
+    /**
+     * Returns a new Map having applied the `updater` to the entry found at the
+     * keyPath.
+     *
+     * This is most commonly used to call methods on collections nested within a
+     * structure of data. For example, in order to `.push()` onto a nested `List`,
+     * `updateIn` and `push` can be used together:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map, List } = require('immutable')
+     * const map = Map({ inMap: Map({ inList: List([ 1, 2, 3 ]) }) })
+     * const newMap = map.updateIn(['inMap', 'inList'], list => list.push(4))
+     * // Map { "inMap": Map { "inList": List [ 1, 2, 3, 4 ] } }
+     * ```
+     *
+     * If any keys in `keyPath` do not exist, new Immutable `Map`s will
+     * be created at those keys. If the `keyPath` does not already contain a
+     * value, the `updater` function will be called with `notSetValue`, if
+     * provided, otherwise `undefined`.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable')" }
+     * -->
+     * ```js
+     * const map = Map({ a: Map({ b: Map({ c: 10 }) }) })
+     * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2)
+     * // Map { "a": Map { "b": Map { "c": 20 } } }
+     * ```
+     *
+     * If the `updater` function returns the same value it was called with, then
+     * no change will occur. This is still true if `notSetValue` is provided.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable')" }
+     * -->
+     * ```js
+     * const map = Map({ a: Map({ b: Map({ c: 10 }) }) })
+     * const newMap = map.updateIn(['a', 'b', 'x'], 100, val => val)
+     * // Map { "a": Map { "b": Map { "c": 10 } } }
+     * assert.strictEqual(newMap, aMap)
+     * ```
+     *
+     * For code using ES2015 or later, using `notSetValue` is discourged in
+     * favor of function parameter default values. This helps to avoid any
+     * potential confusion with identify functions as described above.
+     *
+     * The previous example behaves differently when written with default values:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable')" }
+     * -->
+     * ```js
+     * const map = Map({ a: Map({ b: Map({ c: 10 }) }) })
+     * const newMap = map.updateIn(['a', 'b', 'x'], (val = 100) => val)
+     * // Map { "a": Map { "b": Map { "c": 10, "x": 100 } } }
+     * ```
+     *
+     * Plain JavaScript Object or Arrays may be nested within an Immutable.js
+     * Collection, and updateIn() can update those values as well, treating them
+     * immutably by creating new copies of those values with the changes applied.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Map } = require('immutable')" }
+     * -->
+     * ```js
+     * const map = Map({ a: { b: { c: 10 } } })
+     * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2)
+     * // Map { "a": { b: { c: 20 } } }
+     * ```
+     *
+     * If any key in the path exists but cannot be updated (such as a primitive
+     * like number or a custom Object like Date), an error will be thrown.
+     *
+     * Note: `updateIn` can be used in `withMutations`.
+     */
+    updateIn(
+      keyPath: Iterable<unknown>,
+      notSetValue: unknown,
+      updater: (value: unknown) => unknown
+    ): this;
+    updateIn(
+      keyPath: Iterable<unknown>,
+      updater: (value: unknown) => unknown
+    ): this;
+
+    /**
+     * A combination of `updateIn` and `merge`, returning a new Map, but
+     * performing the merge at a point arrived at by following the keyPath.
+     * In other words, these two lines are equivalent:
+     *
+     * ```js
+     * map.updateIn(['a', 'b', 'c'], abc => abc.merge(y))
+     * map.mergeIn(['a', 'b', 'c'], y)
+     * ```
+     *
+     * Note: `mergeIn` can be used in `withMutations`.
+     */
+    mergeIn(keyPath: Iterable<unknown>, ...collections: Array<unknown>): this;
+
+    /**
+     * A combination of `updateIn` and `mergeDeep`, returning a new Map, but
+     * performing the deep merge at a point arrived at by following the keyPath.
+     * In other words, these two lines are equivalent:
+     *
+     * ```js
+     * map.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y))
+     * map.mergeDeepIn(['a', 'b', 'c'], y)
+     * ```
+     *
+     * Note: `mergeDeepIn` can be used in `withMutations`.
+     */
+    mergeDeepIn(
+      keyPath: Iterable<unknown>,
+      ...collections: Array<unknown>
+    ): this;
+
+    // Transient changes
+
+    /**
+     * Every time you call one of the above functions, a new immutable Map is
+     * created. If a pure function calls a number of these to produce a final
+     * return value, then a penalty on performance and memory has been paid by
+     * creating all of the intermediate immutable Maps.
+     *
+     * If you need to apply a series of mutations to produce a new immutable
+     * Map, `withMutations()` creates a temporary mutable copy of the Map which
+     * can apply mutations in a highly performant manner. In fact, this is
+     * exactly how complex mutations like `merge` are done.
+     *
+     * As an example, this results in the creation of 2, not 4, new Maps:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const map1 = Map()
+     * const map2 = map1.withMutations(map => {
+     *   map.set('a', 1).set('b', 2).set('c', 3)
+     * })
+     * assert.equal(map1.size, 0)
+     * assert.equal(map2.size, 3)
+     * ```
+     *
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Read the documentation for each method to see if it
+     * is safe to use in `withMutations`.
+     */
+    withMutations(mutator: (mutable: this) => unknown): this;
+
+    /**
+     * Another way to avoid creation of intermediate Immutable maps is to create
+     * a mutable copy of this collection. Mutable copies *always* return `this`,
+     * and thus shouldn't be used for equality. Your function should never return
+     * a mutable copy of a collection, only use it internally to create a new
+     * collection.
+     *
+     * If possible, use `withMutations` to work with temporary mutable copies as
+     * it provides an easier to use API and considers many common optimizations.
+     *
+     * Note: if the collection is already mutable, `asMutable` returns itself.
+     *
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Read the documentation for each method to see if it
+     * is safe to use in `withMutations`.
+     *
+     * @see `Map#asImmutable`
+     */
+    asMutable(): this;
+
+    /**
+     * Returns true if this is a mutable copy (see `asMutable()`) and mutative
+     * alterations have been applied.
+     *
+     * @see `Map#asMutable`
+     */
+    wasAltered(): boolean;
+
+    /**
+     * The yin to `asMutable`'s yang. Because it applies to mutable collections,
+     * this operation is *mutable* and may return itself (though may not
+     * return itself, i.e. if the result is an empty collection). Once
+     * performed, the original mutable copy must no longer be mutated since it
+     * may be the immutable result.
+     *
+     * If possible, use `withMutations` to work with temporary mutable copies as
+     * it provides an easier to use API and considers many common optimizations.
+     *
+     * @see `Map#asMutable`
+     */
+    asImmutable(): this;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Map with values passed through a
+     * `mapper` function.
+     *
+     *     Map({ a: 1, b: 2 }).map(x => 10 * x)
+     *     // Map { a: 10, b: 20 }
+     */
+    map<M>(
+      mapper: (value: V, key: K, iter: this) => M,
+      context?: unknown
+    ): Map<K, M>;
+
+    /**
+     * @see Collection.Keyed.mapKeys
+     */
+    mapKeys<M>(
+      mapper: (key: K, value: V, iter: this) => M,
+      context?: unknown
+    ): Map<M, V>;
+
+    /**
+     * @see Collection.Keyed.mapEntries
+     */
+    mapEntries<KM, VM>(
+      mapper: (
+        entry: [K, V],
+        index: number,
+        iter: this
+      ) => [KM, VM] | undefined,
+      context?: unknown
+    ): Map<KM, VM>;
+
+    /**
+     * Flat-maps the Map, returning a new Map.
+     *
+     * Similar to `data.map(...).flatten(true)`.
+     */
+    flatMap<KM, VM>(
+      mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+      context?: unknown
+    ): Map<KM, VM>;
+
+    /**
+     * Returns a new Map with only the entries for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends V>(
+      predicate: (value: V, key: K, iter: this) => value is F,
+      context?: unknown
+    ): Map<K, F>;
+    filter(
+      predicate: (value: V, key: K, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Map with the values for which the `predicate`
+     * function returns false and another for which is returns true.
+     */
+    partition<F extends V, C>(
+      predicate: (this: C, value: V, key: K, iter: this) => value is F,
+      context?: C
+    ): [Map<K, V>, Map<K, F>];
+    partition<C>(
+      predicate: (this: C, value: V, key: K, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+
+    /**
+     * @see Collection.Keyed.flip
+     */
+    flip(): Map<V, K>;
+  }
+
+  /**
+   * A type of Map that has the additional guarantee that the iteration order of
+   * entries will be the order in which they were set().
+   *
+   * The iteration behavior of OrderedMap is the same as native ES6 Map and
+   * JavaScript Object.
+   *
+   * Note that `OrderedMap` are more expensive than non-ordered `Map` and may
+   * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not
+   * stable.
+   */
+  namespace OrderedMap {
+    /**
+     * True if the provided value is an OrderedMap.
+     */
+    function isOrderedMap(
+      maybeOrderedMap: unknown
+    ): maybeOrderedMap is OrderedMap<unknown, unknown>;
+  }
+
+  /**
+   * Creates a new Immutable OrderedMap.
+   *
+   * Created with the same key value pairs as the provided Collection.Keyed or
+   * JavaScript Object or expects a Collection of [K, V] tuple entries.
+   *
+   * The iteration order of key-value pairs provided to this constructor will
+   * be preserved in the OrderedMap.
+   *
+   *     let newOrderedMap = OrderedMap({key: "value"})
+   *     let newOrderedMap = OrderedMap([["key", "value"]])
+   *
+   * Note: `OrderedMap` is a factory function and not a class, and does not use
+   * the `new` keyword during construction.
+   */
+  function OrderedMap<K, V>(collection?: Iterable<[K, V]>): OrderedMap<K, V>;
+  function OrderedMap<V>(obj: { [key: string]: V }): OrderedMap<string, V>;
+
+  interface OrderedMap<K, V> extends Map<K, V> {
+    /**
+     * The number of entries in this OrderedMap.
+     */
+    readonly size: number;
+
+    /**
+     * Returns a new OrderedMap also containing the new key, value pair. If an
+     * equivalent key already exists in this OrderedMap, it will be replaced
+     * while maintaining the existing order.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { OrderedMap } = require('immutable')
+     * const originalMap = OrderedMap({a:1, b:1, c:1})
+     * const updatedMap = originalMap.set('b', 2)
+     *
+     * originalMap
+     * // OrderedMap {a: 1, b: 1, c: 1}
+     * updatedMap
+     * // OrderedMap {a: 1, b: 2, c: 1}
+     * ```
+     *
+     * Note: `set` can be used in `withMutations`.
+     */
+    set(key: K, value: V): this;
+
+    /**
+     * Returns a new OrderedMap resulting from merging the provided Collections
+     * (or JS objects) into this OrderedMap. In other words, this takes each
+     * entry of each collection and sets it on this OrderedMap.
+     *
+     * Note: Values provided to `merge` are shallowly converted before being
+     * merged. No nested values are altered.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { OrderedMap } = require('immutable')
+     * const one = OrderedMap({ a: 10, b: 20, c: 30 })
+     * const two = OrderedMap({ b: 40, a: 50, d: 60 })
+     * one.merge(two) // OrderedMap { "a": 50, "b": 40, "c": 30, "d": 60 }
+     * two.merge(one) // OrderedMap { "b": 20, "a": 10, "d": 60, "c": 30 }
+     * ```
+     *
+     * Note: `merge` can be used in `withMutations`.
+     *
+     * @alias concat
+     */
+    merge<KC, VC>(
+      ...collections: Array<Iterable<[KC, VC]>>
+    ): OrderedMap<K | KC, V | VC>;
+    merge<C>(
+      ...collections: Array<{ [key: string]: C }>
+    ): OrderedMap<K | string, V | C>;
+    concat<KC, VC>(
+      ...collections: Array<Iterable<[KC, VC]>>
+    ): OrderedMap<K | KC, V | VC>;
+    concat<C>(
+      ...collections: Array<{ [key: string]: C }>
+    ): OrderedMap<K | string, V | C>;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new OrderedMap with values passed through a
+     * `mapper` function.
+     *
+     *     OrderedMap({ a: 1, b: 2 }).map(x => 10 * x)
+     *     // OrderedMap { "a": 10, "b": 20 }
+     *
+     * Note: `map()` always returns a new instance, even if it produced the same
+     * value at every step.
+     */
+    map<M>(
+      mapper: (value: V, key: K, iter: this) => M,
+      context?: unknown
+    ): OrderedMap<K, M>;
+
+    /**
+     * @see Collection.Keyed.mapKeys
+     */
+    mapKeys<M>(
+      mapper: (key: K, value: V, iter: this) => M,
+      context?: unknown
+    ): OrderedMap<M, V>;
+
+    /**
+     * @see Collection.Keyed.mapEntries
+     */
+    mapEntries<KM, VM>(
+      mapper: (
+        entry: [K, V],
+        index: number,
+        iter: this
+      ) => [KM, VM] | undefined,
+      context?: unknown
+    ): OrderedMap<KM, VM>;
+
+    /**
+     * Flat-maps the OrderedMap, returning a new OrderedMap.
+     *
+     * Similar to `data.map(...).flatten(true)`.
+     */
+    flatMap<KM, VM>(
+      mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+      context?: unknown
+    ): OrderedMap<KM, VM>;
+
+    /**
+     * Returns a new OrderedMap with only the entries for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends V>(
+      predicate: (value: V, key: K, iter: this) => value is F,
+      context?: unknown
+    ): OrderedMap<K, F>;
+    filter(
+      predicate: (value: V, key: K, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new OrderedMap with the values for which the `predicate`
+     * function returns false and another for which is returns true.
+     */
+    partition<F extends V, C>(
+      predicate: (this: C, value: V, key: K, iter: this) => value is F,
+      context?: C
+    ): [OrderedMap<K, V>, OrderedMap<K, F>];
+    partition<C>(
+      predicate: (this: C, value: V, key: K, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+
+    /**
+     * @see Collection.Keyed.flip
+     */
+    flip(): OrderedMap<V, K>;
+  }
+
+  /**
+   * A Collection of unique values with `O(log32 N)` adds and has.
+   *
+   * When iterating a Set, the entries will be (value, value) pairs. Iteration
+   * order of a Set is undefined, however is stable. Multiple iterations of the
+   * same Set will iterate in the same order.
+   *
+   * Set values, like Map keys, may be of any type. Equality is determined using
+   * `Immutable.is`, enabling Sets to uniquely include other Immutable
+   * collections, custom value types, and NaN.
+   */
+  namespace Set {
+    /**
+     * True if the provided value is a Set
+     */
+    function isSet(maybeSet: unknown): maybeSet is Set<unknown>;
+
+    /**
+     * Creates a new Set containing `values`.
+     */
+    function of<T>(...values: Array<T>): Set<T>;
+
+    /**
+     * `Set.fromKeys()` creates a new immutable Set containing the keys from
+     * this Collection or JavaScript Object.
+     */
+    function fromKeys<T>(iter: Collection<T, unknown>): Set<T>;
+    function fromKeys(obj: { [key: string]: unknown }): Set<string>;
+
+    /**
+     * `Set.intersect()` creates a new immutable Set that is the intersection of
+     * a collection of other sets.
+     *
+     * ```js
+     * const { Set } = require('immutable')
+     * const intersected = Set.intersect([
+     *   Set([ 'a', 'b', 'c' ])
+     *   Set([ 'c', 'a', 't' ])
+     * ])
+     * // Set [ "a", "c" ]
+     * ```
+     */
+    function intersect<T>(sets: Iterable<Iterable<T>>): Set<T>;
+
+    /**
+     * `Set.union()` creates a new immutable Set that is the union of a
+     * collection of other sets.
+     *
+     * ```js
+     * const { Set } = require('immutable')
+     * const unioned = Set.union([
+     *   Set([ 'a', 'b', 'c' ])
+     *   Set([ 'c', 'a', 't' ])
+     * ])
+     * // Set [ "a", "b", "c", "t" ]
+     * ```
+     */
+    function union<T>(sets: Iterable<Iterable<T>>): Set<T>;
+  }
+
+  /**
+   * Create a new immutable Set containing the values of the provided
+   * collection-like.
+   *
+   * Note: `Set` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   */
+  function Set<T>(collection?: Iterable<T> | ArrayLike<T>): Set<T>;
+
+  interface Set<T> extends Collection.Set<T> {
+    /**
+     * The number of items in this Set.
+     */
+    readonly size: number;
+
+    // Persistent changes
+
+    /**
+     * Returns a new Set which also includes this value.
+     *
+     * Note: `add` can be used in `withMutations`.
+     */
+    add(value: T): this;
+
+    /**
+     * Returns a new Set which excludes this value.
+     *
+     * Note: `delete` can be used in `withMutations`.
+     *
+     * Note: `delete` **cannot** be safely used in IE8, use `remove` if
+     * supporting old browsers.
+     *
+     * @alias remove
+     */
+    delete(value: T): this;
+    remove(value: T): this;
+
+    /**
+     * Returns a new Set containing no values.
+     *
+     * Note: `clear` can be used in `withMutations`.
+     */
+    clear(): this;
+
+    /**
+     * Returns a Set including any value from `collections` that does not already
+     * exist in this Set.
+     *
+     * Note: `union` can be used in `withMutations`.
+     * @alias merge
+     * @alias concat
+     */
+    union<C>(...collections: Array<Iterable<C>>): Set<T | C>;
+    merge<C>(...collections: Array<Iterable<C>>): Set<T | C>;
+    concat<C>(...collections: Array<Iterable<C>>): Set<T | C>;
+
+    /**
+     * Returns a Set which has removed any values not also contained
+     * within `collections`.
+     *
+     * Note: `intersect` can be used in `withMutations`.
+     */
+    intersect(...collections: Array<Iterable<T>>): this;
+
+    /**
+     * Returns a Set excluding any values contained within `collections`.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { OrderedSet } = require('immutable')
+     * OrderedSet([ 1, 2, 3 ]).subtract([1, 3])
+     * // OrderedSet [2]
+     * ```
+     *
+     * Note: `subtract` can be used in `withMutations`.
+     */
+    subtract(...collections: Array<Iterable<T>>): this;
+
+    // Transient changes
+
+    /**
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * mentions being safe to use in `withMutations`.
+     *
+     * @see `Map#withMutations`
+     */
+    withMutations(mutator: (mutable: this) => unknown): this;
+
+    /**
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * mentions being safe to use in `withMutations`.
+     *
+     * @see `Map#asMutable`
+     */
+    asMutable(): this;
+
+    /**
+     * @see `Map#wasAltered`
+     */
+    wasAltered(): boolean;
+
+    /**
+     * @see `Map#asImmutable`
+     */
+    asImmutable(): this;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Set with values passed through a
+     * `mapper` function.
+     *
+     *     Set([1,2]).map(x => 10 * x)
+     *     // Set [10,20]
+     */
+    map<M>(
+      mapper: (value: T, key: T, iter: this) => M,
+      context?: unknown
+    ): Set<M>;
+
+    /**
+     * Flat-maps the Set, returning a new Set.
+     *
+     * Similar to `set.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: T, key: T, iter: this) => Iterable<M>,
+      context?: unknown
+    ): Set<M>;
+
+    /**
+     * Returns a new Set with only the values for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends T>(
+      predicate: (value: T, key: T, iter: this) => value is F,
+      context?: unknown
+    ): Set<F>;
+    filter(
+      predicate: (value: T, key: T, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Set with the values for which the `predicate` function
+     * returns false and another for which is returns true.
+     */
+    partition<F extends T, C>(
+      predicate: (this: C, value: T, key: T, iter: this) => value is F,
+      context?: C
+    ): [Set<T>, Set<F>];
+    partition<C>(
+      predicate: (this: C, value: T, key: T, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+  }
+
+  /**
+   * A type of Set that has the additional guarantee that the iteration order of
+   * values will be the order in which they were `add`ed.
+   *
+   * The iteration behavior of OrderedSet is the same as native ES6 Set.
+   *
+   * Note that `OrderedSet` are more expensive than non-ordered `Set` and may
+   * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not
+   * stable.
+   */
+  namespace OrderedSet {
+    /**
+     * True if the provided value is an OrderedSet.
+     */
+    function isOrderedSet(
+      maybeOrderedSet: unknown
+    ): maybeOrderedSet is OrderedSet<unknown>;
+
+    /**
+     * Creates a new OrderedSet containing `values`.
+     */
+    function of<T>(...values: Array<T>): OrderedSet<T>;
+
+    /**
+     * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing
+     * the keys from this Collection or JavaScript Object.
+     */
+    function fromKeys<T>(iter: Collection<T, unknown>): OrderedSet<T>;
+    function fromKeys(obj: { [key: string]: unknown }): OrderedSet<string>;
+  }
+
+  /**
+   * Create a new immutable OrderedSet containing the values of the provided
+   * collection-like.
+   *
+   * Note: `OrderedSet` is a factory function and not a class, and does not use
+   * the `new` keyword during construction.
+   */
+  function OrderedSet<T>(
+    collection?: Iterable<T> | ArrayLike<T>
+  ): OrderedSet<T>;
+
+  interface OrderedSet<T> extends Set<T> {
+    /**
+     * The number of items in this OrderedSet.
+     */
+    readonly size: number;
+
+    /**
+     * Returns an OrderedSet including any value from `collections` that does
+     * not already exist in this OrderedSet.
+     *
+     * Note: `union` can be used in `withMutations`.
+     * @alias merge
+     * @alias concat
+     */
+    union<C>(...collections: Array<Iterable<C>>): OrderedSet<T | C>;
+    merge<C>(...collections: Array<Iterable<C>>): OrderedSet<T | C>;
+    concat<C>(...collections: Array<Iterable<C>>): OrderedSet<T | C>;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Set with values passed through a
+     * `mapper` function.
+     *
+     *     OrderedSet([ 1, 2 ]).map(x => 10 * x)
+     *     // OrderedSet [10, 20]
+     */
+    map<M>(
+      mapper: (value: T, key: T, iter: this) => M,
+      context?: unknown
+    ): OrderedSet<M>;
+
+    /**
+     * Flat-maps the OrderedSet, returning a new OrderedSet.
+     *
+     * Similar to `set.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: T, key: T, iter: this) => Iterable<M>,
+      context?: unknown
+    ): OrderedSet<M>;
+
+    /**
+     * Returns a new OrderedSet with only the values for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends T>(
+      predicate: (value: T, key: T, iter: this) => value is F,
+      context?: unknown
+    ): OrderedSet<F>;
+    filter(
+      predicate: (value: T, key: T, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new OrderedSet with the values for which the `predicate`
+     * function returns false and another for which is returns true.
+     */
+    partition<F extends T, C>(
+      predicate: (this: C, value: T, key: T, iter: this) => value is F,
+      context?: C
+    ): [OrderedSet<T>, OrderedSet<F>];
+    partition<C>(
+      predicate: (this: C, value: T, key: T, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+
+    /**
+     * Returns an OrderedSet of the same type "zipped" with the provided
+     * collections.
+     *
+     * Like `zipWith`, but using the default `zipper`: creating an `Array`.
+     *
+     * ```js
+     * const a = OrderedSet([ 1, 2, 3 ])
+     * const b = OrderedSet([ 4, 5, 6 ])
+     * const c = a.zip(b)
+     * // OrderedSet [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
+     * ```
+     */
+    zip<U>(other: Collection<unknown, U>): OrderedSet<[T, U]>;
+    zip<U, V>(
+      other1: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): OrderedSet<[T, U, V]>;
+    zip(
+      ...collections: Array<Collection<unknown, unknown>>
+    ): OrderedSet<unknown>;
+
+    /**
+     * Returns a OrderedSet of the same type "zipped" with the provided
+     * collections.
+     *
+     * Unlike `zip`, `zipAll` continues zipping until the longest collection is
+     * exhausted. Missing values from shorter collections are filled with `undefined`.
+     *
+     * ```js
+     * const a = OrderedSet([ 1, 2 ]);
+     * const b = OrderedSet([ 3, 4, 5 ]);
+     * const c = a.zipAll(b); // OrderedSet [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ]
+     * ```
+     *
+     * Note: Since zipAll will return a collection as large as the largest
+     * input, some results may contain undefined values. TypeScript cannot
+     * account for these without cases (as of v2.5).
+     */
+    zipAll<U>(other: Collection<unknown, U>): OrderedSet<[T, U]>;
+    zipAll<U, V>(
+      other1: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): OrderedSet<[T, U, V]>;
+    zipAll(
+      ...collections: Array<Collection<unknown, unknown>>
+    ): OrderedSet<unknown>;
+
+    /**
+     * Returns an OrderedSet of the same type "zipped" with the provided
+     * collections by using a custom `zipper` function.
+     *
+     * @see Seq.Indexed.zipWith
+     */
+    zipWith<U, Z>(
+      zipper: (value: T, otherValue: U) => Z,
+      otherCollection: Collection<unknown, U>
+    ): OrderedSet<Z>;
+    zipWith<U, V, Z>(
+      zipper: (value: T, otherValue: U, thirdValue: V) => Z,
+      otherCollection: Collection<unknown, U>,
+      thirdCollection: Collection<unknown, V>
+    ): OrderedSet<Z>;
+    zipWith<Z>(
+      zipper: (...values: Array<unknown>) => Z,
+      ...collections: Array<Collection<unknown, unknown>>
+    ): OrderedSet<Z>;
+  }
+
+  /**
+   * Stacks are indexed collections which support very efficient O(1) addition
+   * and removal from the front using `unshift(v)` and `shift()`.
+   *
+   * For familiarity, Stack also provides `push(v)`, `pop()`, and `peek()`, but
+   * be aware that they also operate on the front of the list, unlike List or
+   * a JavaScript Array.
+   *
+   * Note: `reverse()` or any inherent reverse traversal (`reduceRight`,
+   * `lastIndexOf`, etc.) is not efficient with a Stack.
+   *
+   * Stack is implemented with a Single-Linked List.
+   */
+  namespace Stack {
+    /**
+     * True if the provided value is a Stack
+     */
+    function isStack(maybeStack: unknown): maybeStack is Stack<unknown>;
+
+    /**
+     * Creates a new Stack containing `values`.
+     */
+    function of<T>(...values: Array<T>): Stack<T>;
+  }
+
+  /**
+   * Create a new immutable Stack containing the values of the provided
+   * collection-like.
+   *
+   * The iteration order of the provided collection is preserved in the
+   * resulting `Stack`.
+   *
+   * Note: `Stack` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   */
+  function Stack<T>(collection?: Iterable<T> | ArrayLike<T>): Stack<T>;
+
+  interface Stack<T> extends Collection.Indexed<T> {
+    /**
+     * The number of items in this Stack.
+     */
+    readonly size: number;
+
+    // Reading values
+
+    /**
+     * Alias for `Stack.first()`.
+     */
+    peek(): T | undefined;
+
+    // Persistent changes
+
+    /**
+     * Returns a new Stack with 0 size and no values.
+     *
+     * Note: `clear` can be used in `withMutations`.
+     */
+    clear(): Stack<T>;
+
+    /**
+     * Returns a new Stack with the provided `values` prepended, shifting other
+     * values ahead to higher indices.
+     *
+     * This is very efficient for Stack.
+     *
+     * Note: `unshift` can be used in `withMutations`.
+     */
+    unshift(...values: Array<T>): Stack<T>;
+
+    /**
+     * Like `Stack#unshift`, but accepts a collection rather than varargs.
+     *
+     * Note: `unshiftAll` can be used in `withMutations`.
+     */
+    unshiftAll(iter: Iterable<T>): Stack<T>;
+
+    /**
+     * Returns a new Stack with a size ones less than this Stack, excluding
+     * the first item in this Stack, shifting all other values to a lower index.
+     *
+     * Note: this differs from `Array#shift` because it returns a new
+     * Stack rather than the removed value. Use `first()` or `peek()` to get the
+     * first value in this Stack.
+     *
+     * Note: `shift` can be used in `withMutations`.
+     */
+    shift(): Stack<T>;
+
+    /**
+     * Alias for `Stack#unshift` and is not equivalent to `List#push`.
+     */
+    push(...values: Array<T>): Stack<T>;
+
+    /**
+     * Alias for `Stack#unshiftAll`.
+     */
+    pushAll(iter: Iterable<T>): Stack<T>;
+
+    /**
+     * Alias for `Stack#shift` and is not equivalent to `List#pop`.
+     */
+    pop(): Stack<T>;
+
+    // Transient changes
+
+    /**
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * mentions being safe to use in `withMutations`.
+     *
+     * @see `Map#withMutations`
+     */
+    withMutations(mutator: (mutable: this) => unknown): this;
+
+    /**
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Check the documentation for each method to see if it
+     * mentions being safe to use in `withMutations`.
+     *
+     * @see `Map#asMutable`
+     */
+    asMutable(): this;
+
+    /**
+     * @see `Map#wasAltered`
+     */
+    wasAltered(): boolean;
+
+    /**
+     * @see `Map#asImmutable`
+     */
+    asImmutable(): this;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Stack with other collections concatenated to this one.
+     */
+    concat<C>(...valuesOrCollections: Array<Iterable<C> | C>): Stack<T | C>;
+
+    /**
+     * Returns a new Stack with values passed through a
+     * `mapper` function.
+     *
+     *     Stack([ 1, 2 ]).map(x => 10 * x)
+     *     // Stack [ 10, 20 ]
+     *
+     * Note: `map()` always returns a new instance, even if it produced the same
+     * value at every step.
+     */
+    map<M>(
+      mapper: (value: T, key: number, iter: this) => M,
+      context?: unknown
+    ): Stack<M>;
+
+    /**
+     * Flat-maps the Stack, returning a new Stack.
+     *
+     * Similar to `stack.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: T, key: number, iter: this) => Iterable<M>,
+      context?: unknown
+    ): Stack<M>;
+
+    /**
+     * Returns a new Set with only the values for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends T>(
+      predicate: (value: T, index: number, iter: this) => value is F,
+      context?: unknown
+    ): Set<F>;
+    filter(
+      predicate: (value: T, index: number, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a Stack "zipped" with the provided collections.
+     *
+     * Like `zipWith`, but using the default `zipper`: creating an `Array`.
+     *
+     * ```js
+     * const a = Stack([ 1, 2, 3 ]);
+     * const b = Stack([ 4, 5, 6 ]);
+     * const c = a.zip(b); // Stack [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
+     * ```
+     */
+    zip<U>(other: Collection<unknown, U>): Stack<[T, U]>;
+    zip<U, V>(
+      other: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): Stack<[T, U, V]>;
+    zip(...collections: Array<Collection<unknown, unknown>>): Stack<unknown>;
+
+    /**
+     * Returns a Stack "zipped" with the provided collections.
+     *
+     * Unlike `zip`, `zipAll` continues zipping until the longest collection is
+     * exhausted. Missing values from shorter collections are filled with `undefined`.
+     *
+     * ```js
+     * const a = Stack([ 1, 2 ]);
+     * const b = Stack([ 3, 4, 5 ]);
+     * const c = a.zipAll(b); // Stack [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ]
+     * ```
+     *
+     * Note: Since zipAll will return a collection as large as the largest
+     * input, some results may contain undefined values. TypeScript cannot
+     * account for these without cases (as of v2.5).
+     */
+    zipAll<U>(other: Collection<unknown, U>): Stack<[T, U]>;
+    zipAll<U, V>(
+      other: Collection<unknown, U>,
+      other2: Collection<unknown, V>
+    ): Stack<[T, U, V]>;
+    zipAll(...collections: Array<Collection<unknown, unknown>>): Stack<unknown>;
+
+    /**
+     * Returns a Stack "zipped" with the provided collections by using a
+     * custom `zipper` function.
+     *
+     * ```js
+     * const a = Stack([ 1, 2, 3 ]);
+     * const b = Stack([ 4, 5, 6 ]);
+     * const c = a.zipWith((a, b) => a + b, b);
+     * // Stack [ 5, 7, 9 ]
+     * ```
+     */
+    zipWith<U, Z>(
+      zipper: (value: T, otherValue: U) => Z,
+      otherCollection: Collection<unknown, U>
+    ): Stack<Z>;
+    zipWith<U, V, Z>(
+      zipper: (value: T, otherValue: U, thirdValue: V) => Z,
+      otherCollection: Collection<unknown, U>,
+      thirdCollection: Collection<unknown, V>
+    ): Stack<Z>;
+    zipWith<Z>(
+      zipper: (...values: Array<unknown>) => Z,
+      ...collections: Array<Collection<unknown, unknown>>
+    ): Stack<Z>;
+  }
+
+  /**
+   * Returns a Seq.Indexed of numbers from `start` (inclusive) to `end`
+   * (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to
+   * infinity. When `start` is equal to `end`, returns empty range.
+   *
+   * Note: `Range` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   *
+   * ```js
+   * const { Range } = require('immutable')
+   * Range() // [ 0, 1, 2, 3, ... ]
+   * Range(10) // [ 10, 11, 12, 13, ... ]
+   * Range(10, 15) // [ 10, 11, 12, 13, 14 ]
+   * Range(10, 30, 5) // [ 10, 15, 20, 25 ]
+   * Range(30, 10, 5) // [ 30, 25, 20, 15 ]
+   * Range(30, 30, 5) // []
+   * ```
+   */
+  function Range(
+    start?: number,
+    end?: number,
+    step?: number
+  ): Seq.Indexed<number>;
+
+  /**
+   * Returns a Seq.Indexed of `value` repeated `times` times. When `times` is
+   * not defined, returns an infinite `Seq` of `value`.
+   *
+   * Note: `Repeat` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   *
+   * ```js
+   * const { Repeat } = require('immutable')
+   * Repeat('foo') // [ 'foo', 'foo', 'foo', ... ]
+   * Repeat('bar', 4) // [ 'bar', 'bar', 'bar', 'bar' ]
+   * ```
+   */
+  function Repeat<T>(value: T, times?: number): Seq.Indexed<T>;
+
+  /**
+   * A record is similar to a JS object, but enforces a specific set of allowed
+   * string keys, and has default values.
+   *
+   * The `Record()` function produces new Record Factories, which when called
+   * create Record instances.
+   *
+   * ```js
+   * const { Record } = require('immutable')
+   * const ABRecord = Record({ a: 1, b: 2 })
+   * const myRecord = ABRecord({ b: 3 })
+   * ```
+   *
+   * Records always have a value for the keys they define. `remove`ing a key
+   * from a record simply resets it to the default value for that key.
+   *
+   * ```js
+   * myRecord.get('a') // 1
+   * myRecord.get('b') // 3
+   * const myRecordWithoutB = myRecord.remove('b')
+   * myRecordWithoutB.get('b') // 2
+   * ```
+   *
+   * Values provided to the constructor not found in the Record type will
+   * be ignored. For example, in this case, ABRecord is provided a key "x" even
+   * though only "a" and "b" have been defined. The value for "x" will be
+   * ignored for this record.
+   *
+   * ```js
+   * const myRecord = ABRecord({ b: 3, x: 10 })
+   * myRecord.get('x') // undefined
+   * ```
+   *
+   * Because Records have a known set of string keys, property get access works
+   * as expected, however property sets will throw an Error.
+   *
+   * Note: IE8 does not support property access. Only use `get()` when
+   * supporting IE8.
+   *
+   * ```js
+   * myRecord.b // 3
+   * myRecord.b = 5 // throws Error
+   * ```
+   *
+   * Record Types can be extended as well, allowing for custom methods on your
+   * Record. This is not a common pattern in functional environments, but is in
+   * many JS programs.
+   *
+   * However Record Types are more restricted than typical JavaScript classes.
+   * They do not use a class constructor, which also means they cannot use
+   * class properties (since those are technically part of a constructor).
+   *
+   * While Record Types can be syntactically created with the JavaScript `class`
+   * form, the resulting Record function is actually a factory function, not a
+   * class constructor. Even though Record Types are not classes, JavaScript
+   * currently requires the use of `new` when creating new Record instances if
+   * they are defined as a `class`.
+   *
+   * ```
+   * class ABRecord extends Record({ a: 1, b: 2 }) {
+   *   getAB() {
+   *     return this.a + this.b;
+   *   }
+   * }
+   *
+   * var myRecord = new ABRecord({b: 3})
+   * myRecord.getAB() // 4
+   * ```
+   *
+   *
+   * **Flow Typing Records:**
+   *
+   * Immutable.js exports two Flow types designed to make it easier to use
+   * Records with flow typed code, `RecordOf<TProps>` and `RecordFactory<TProps>`.
+   *
+   * When defining a new kind of Record factory function, use a flow type that
+   * describes the values the record contains along with `RecordFactory<TProps>`.
+   * To type instances of the Record (which the factory function returns),
+   * use `RecordOf<TProps>`.
+   *
+   * Typically, new Record definitions will export both the Record factory
+   * function as well as the Record instance type for use in other code.
+   *
+   * ```js
+   * import type { RecordFactory, RecordOf } from 'immutable';
+   *
+   * // Use RecordFactory<TProps> for defining new Record factory functions.
+   * type Point3DProps = { x: number, y: number, z: number };
+   * const defaultValues: Point3DProps = { x: 0, y: 0, z: 0 };
+   * const makePoint3D: RecordFactory<Point3DProps> = Record(defaultValues);
+   * export makePoint3D;
+   *
+   * // Use RecordOf<T> for defining new instances of that Record.
+   * export type Point3D = RecordOf<Point3DProps>;
+   * const some3DPoint: Point3D = makePoint3D({ x: 10, y: 20, z: 30 });
+   * ```
+   *
+   * **Flow Typing Record Subclasses:**
+   *
+   * Records can be subclassed as a means to add additional methods to Record
+   * instances. This is generally discouraged in favor of a more functional API,
+   * since Subclasses have some minor overhead. However the ability to create
+   * a rich API on Record types can be quite valuable.
+   *
+   * When using Flow to type Subclasses, do not use `RecordFactory<TProps>`,
+   * instead apply the props type when subclassing:
+   *
+   * ```js
+   * type PersonProps = {name: string, age: number};
+   * const defaultValues: PersonProps = {name: 'Aristotle', age: 2400};
+   * const PersonRecord = Record(defaultValues);
+   * class Person extends PersonRecord<PersonProps> {
+   *   getName(): string {
+   *     return this.get('name')
+   *   }
+   *
+   *   setName(name: string): this {
+   *     return this.set('name', name);
+   *   }
+   * }
+   * ```
+   *
+   * **Choosing Records vs plain JavaScript objects**
+   *
+   * Records offer a persistently immutable alternative to plain JavaScript
+   * objects, however they're not required to be used within Immutable.js
+   * collections. In fact, the deep-access and deep-updating functions
+   * like `getIn()` and `setIn()` work with plain JavaScript Objects as well.
+   *
+   * Deciding to use Records or Objects in your application should be informed
+   * by the tradeoffs and relative benefits of each:
+   *
+   * - *Runtime immutability*: plain JS objects may be carefully treated as
+   *   immutable, however Record instances will *throw* if attempted to be
+   *   mutated directly. Records provide this additional guarantee, however at
+   *   some marginal runtime cost. While JS objects are mutable by nature, the
+   *   use of type-checking tools like [Flow](https://medium.com/@gcanti/immutability-with-flow-faa050a1aef4)
+   *   can help gain confidence in code written to favor immutability.
+   *
+   * - *Value equality*: Records use value equality when compared with `is()`
+   *   or `record.equals()`. That is, two Records with the same keys and values
+   *   are equal. Plain objects use *reference equality*. Two objects with the
+   *   same keys and values are not equal since they are different objects.
+   *   This is important to consider when using objects as keys in a `Map` or
+   *   values in a `Set`, which use equality when retrieving values.
+   *
+   * - *API methods*: Records have a full featured API, with methods like
+   *   `.getIn()`, and `.equals()`. These can make working with these values
+   *   easier, but comes at the cost of not allowing keys with those names.
+   *
+   * - *Default values*: Records provide default values for every key, which
+   *   can be useful when constructing Records with often unchanging values.
+   *   However default values can make using Flow and TypeScript more laborious.
+   *
+   * - *Serialization*: Records use a custom internal representation to
+   *   efficiently store and update their values. Converting to and from this
+   *   form isn't free. If converting Records to plain objects is common,
+   *   consider sticking with plain objects to begin with.
+   */
+  namespace Record {
+    /**
+     * True if `maybeRecord` is an instance of a Record.
+     */
+    function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>;
+
+    /**
+     * Records allow passing a second parameter to supply a descriptive name
+     * that appears when converting a Record to a string or in any error
+     * messages. A descriptive name for any record can be accessed by using this
+     * method. If one was not provided, the string "Record" is returned.
+     *
+     * ```js
+     * const { Record } = require('immutable')
+     * const Person = Record({
+     *   name: null
+     * }, 'Person')
+     *
+     * var me = Person({ name: 'My Name' })
+     * me.toString() // "Person { "name": "My Name" }"
+     * Record.getDescriptiveName(me) // "Person"
+     * ```
+     */
+    function getDescriptiveName(record: Record<any>): string;
+
+    /**
+     * A Record.Factory is created by the `Record()` function. Record instances
+     * are created by passing it some of the accepted values for that Record
+     * type:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Record } = require('immutable')" }
+     * -->
+     * ```js
+     * // makePerson is a Record Factory function
+     * const makePerson = Record({ name: null, favoriteColor: 'unknown' });
+     *
+     * // alan is a Record instance
+     * const alan = makePerson({ name: 'Alan' });
+     * ```
+     *
+     * Note that Record Factories return `Record<TProps> & Readonly<TProps>`,
+     * this allows use of both the Record instance API, and direct property
+     * access on the resulting instances:
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Record } = require('immutable');const makePerson = Record({ name: null, favoriteColor: 'unknown' });const alan = makePerson({ name: 'Alan' });" }
+     * -->
+     * ```js
+     * // Use the Record API
+     * console.log('Record API: ' + alan.get('name'))
+     *
+     * // Or direct property access (Readonly)
+     * console.log('property access: ' + alan.name)
+     * ```
+     *
+     * **Flow Typing Records:**
+     *
+     * Use the `RecordFactory<TProps>` Flow type to get high quality type checking of
+     * Records:
+     *
+     * ```js
+     * import type { RecordFactory, RecordOf } from 'immutable';
+     *
+     * // Use RecordFactory<TProps> for defining new Record factory functions.
+     * type PersonProps = { name: ?string, favoriteColor: string };
+     * const makePerson: RecordFactory<PersonProps> = Record({ name: null, favoriteColor: 'unknown' });
+     *
+     * // Use RecordOf<T> for defining new instances of that Record.
+     * type Person = RecordOf<PersonProps>;
+     * const alan: Person = makePerson({ name: 'Alan' });
+     * ```
+     */
+    namespace Factory {}
+
+    interface Factory<TProps extends object> {
+      (values?: Partial<TProps> | Iterable<[string, unknown]>): Record<TProps> &
+        Readonly<TProps>;
+      new (
+        values?: Partial<TProps> | Iterable<[string, unknown]>
+      ): Record<TProps> & Readonly<TProps>;
+
+      /**
+       * The name provided to `Record(values, name)` can be accessed with
+       * `displayName`.
+       */
+      displayName: string;
+    }
+
+    function Factory<TProps extends object>(
+      values?: Partial<TProps> | Iterable<[string, unknown]>
+    ): Record<TProps> & Readonly<TProps>;
+  }
+
+  /**
+   * Unlike other types in Immutable.js, the `Record()` function creates a new
+   * Record Factory, which is a function that creates Record instances.
+   *
+   * See above for examples of using `Record()`.
+   *
+   * Note: `Record` is a factory function and not a class, and does not use the
+   * `new` keyword during construction.
+   */
+  function Record<TProps extends object>(
+    defaultValues: TProps,
+    name?: string
+  ): Record.Factory<TProps>;
+
+  interface Record<TProps extends object> {
+    // Reading values
+
+    has(key: string): key is keyof TProps & string;
+
+    /**
+     * Returns the value associated with the provided key, which may be the
+     * default value defined when creating the Record factory function.
+     *
+     * If the requested key is not defined by this Record type, then
+     * notSetValue will be returned if provided. Note that this scenario would
+     * produce an error when using Flow or TypeScript.
+     */
+    get<K extends keyof TProps>(key: K, notSetValue?: unknown): TProps[K];
+    get<T>(key: string, notSetValue: T): T;
+
+    // Reading deep values
+
+    hasIn(keyPath: Iterable<unknown>): boolean;
+    getIn(keyPath: Iterable<unknown>): unknown;
+
+    // Value equality
+
+    equals(other: unknown): boolean;
+    hashCode(): number;
+
+    // Persistent changes
+
+    set<K extends keyof TProps>(key: K, value: TProps[K]): this;
+    update<K extends keyof TProps>(
+      key: K,
+      updater: (value: TProps[K]) => TProps[K]
+    ): this;
+    merge(
+      ...collections: Array<Partial<TProps> | Iterable<[string, unknown]>>
+    ): this;
+    mergeDeep(
+      ...collections: Array<Partial<TProps> | Iterable<[string, unknown]>>
+    ): this;
+
+    mergeWith(
+      merger: (oldVal: unknown, newVal: unknown, key: keyof TProps) => unknown,
+      ...collections: Array<Partial<TProps> | Iterable<[string, unknown]>>
+    ): this;
+    mergeDeepWith(
+      merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown,
+      ...collections: Array<Partial<TProps> | Iterable<[string, unknown]>>
+    ): this;
+
+    /**
+     * Returns a new instance of this Record type with the value for the
+     * specific key set to its default value.
+     *
+     * @alias remove
+     */
+    delete<K extends keyof TProps>(key: K): this;
+    remove<K extends keyof TProps>(key: K): this;
+
+    /**
+     * Returns a new instance of this Record type with all values set
+     * to their default values.
+     */
+    clear(): this;
+
+    // Deep persistent changes
+
+    setIn(keyPath: Iterable<unknown>, value: unknown): this;
+    updateIn(
+      keyPath: Iterable<unknown>,
+      updater: (value: unknown) => unknown
+    ): this;
+    mergeIn(keyPath: Iterable<unknown>, ...collections: Array<unknown>): this;
+    mergeDeepIn(
+      keyPath: Iterable<unknown>,
+      ...collections: Array<unknown>
+    ): this;
+
+    /**
+     * @alias removeIn
+     */
+    deleteIn(keyPath: Iterable<unknown>): this;
+    removeIn(keyPath: Iterable<unknown>): this;
+
+    // Conversion to JavaScript types
+
+    /**
+     * Deeply converts this Record to equivalent native JavaScript Object.
+     *
+     * Note: This method may not be overridden. Objects with custom
+     * serialization to plain JS may override toJSON() instead.
+     */
+    toJS(): DeepCopy<TProps>;
+
+    /**
+     * Shallowly converts this Record to equivalent native JavaScript Object.
+     */
+    toJSON(): TProps;
+
+    /**
+     * Shallowly converts this Record to equivalent JavaScript Object.
+     */
+    toObject(): TProps;
+
+    // Transient changes
+
+    /**
+     * Note: Not all methods can be used on a mutable collection or within
+     * `withMutations`! Only `set` may be used mutatively.
+     *
+     * @see `Map#withMutations`
+     */
+    withMutations(mutator: (mutable: this) => unknown): this;
+
+    /**
+     * @see `Map#asMutable`
+     */
+    asMutable(): this;
+
+    /**
+     * @see `Map#wasAltered`
+     */
+    wasAltered(): boolean;
+
+    /**
+     * @see `Map#asImmutable`
+     */
+    asImmutable(): this;
+
+    // Sequence algorithms
+
+    toSeq(): Seq.Keyed<keyof TProps, TProps[keyof TProps]>;
+
+    [Symbol.iterator](): IterableIterator<[keyof TProps, TProps[keyof TProps]]>;
+  }
+
+  /**
+   * RecordOf<T> is used in TypeScript to define interfaces expecting an
+   * instance of record with type T.
+   *
+   * This is equivalent to an instance of a record created by a Record Factory.
+   */
+  type RecordOf<TProps extends object> = Record<TProps> & Readonly<TProps>;
+
+  /**
+   * `Seq` describes a lazy operation, allowing them to efficiently chain
+   * use of all the higher-order collection methods (such as `map` and `filter`)
+   * by not creating intermediate collections.
+   *
+   * **Seq is immutable** — Once a Seq is created, it cannot be
+   * changed, appended to, rearranged or otherwise modified. Instead, any
+   * mutative method called on a `Seq` will return a new `Seq`.
+   *
+   * **Seq is lazy** — `Seq` does as little work as necessary to respond to any
+   * method call. Values are often created during iteration, including implicit
+   * iteration when reducing or converting to a concrete data structure such as
+   * a `List` or JavaScript `Array`.
+   *
+   * For example, the following performs no work, because the resulting
+   * `Seq`'s values are never iterated:
+   *
+   * ```js
+   * const { Seq } = require('immutable')
+   * const oddSquares = Seq([ 1, 2, 3, 4, 5, 6, 7, 8 ])
+   *   .filter(x => x % 2 !== 0)
+   *   .map(x => x * x)
+   * ```
+   *
+   * Once the `Seq` is used, it performs only the work necessary. In this
+   * example, no intermediate arrays are ever created, filter is called three
+   * times, and map is only called once:
+   *
+   * ```js
+   * oddSquares.get(1); // 9
+   * ```
+   *
+   * Any collection can be converted to a lazy Seq with `Seq()`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Map } = require('immutable')
+   * const map = Map({ a: 1, b: 2, c: 3 })
+   * const lazySeq = Seq(map)
+   * ```
+   *
+   * `Seq` allows for the efficient chaining of operations, allowing for the
+   * expression of logic that can otherwise be very tedious:
+   *
+   * ```js
+   * lazySeq
+   *   .flip()
+   *   .map(key => key.toUpperCase())
+   *   .flip()
+   * // Seq { A: 1, B: 1, C: 1 }
+   * ```
+   *
+   * As well as expressing logic that would otherwise seem memory or time
+   * limited, for example `Range` is a special kind of Lazy sequence.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Range } = require('immutable')
+   * Range(1, Infinity)
+   *   .skip(1000)
+   *   .map(n => -n)
+   *   .filter(n => n % 2 === 0)
+   *   .take(2)
+   *   .reduce((r, n) => r * n, 1)
+   * // 1006008
+   * ```
+   *
+   * Seq is often used to provide a rich collection API to JavaScript Object.
+   *
+   * ```js
+   * Seq({ x: 0, y: 1, z: 2 }).map(v => v * 2).toObject();
+   * // { x: 0, y: 2, z: 4 }
+   * ```
+   */
+
+  namespace Seq {
+    /**
+     * True if `maybeSeq` is a Seq, it is not backed by a concrete
+     * structure such as Map, List, or Set.
+     */
+    function isSeq(
+      maybeSeq: unknown
+    ): maybeSeq is
+      | Seq.Indexed<unknown>
+      | Seq.Keyed<unknown, unknown>
+      | Seq.Set<unknown>;
+
+    /**
+     * `Seq` which represents key-value pairs.
+     */
+    namespace Keyed {}
+
+    /**
+     * Always returns a Seq.Keyed, if input is not keyed, expects an
+     * collection of [K, V] tuples.
+     *
+     * Note: `Seq.Keyed` is a conversion function and not a class, and does not
+     * use the `new` keyword during construction.
+     */
+    function Keyed<K, V>(collection?: Iterable<[K, V]>): Seq.Keyed<K, V>;
+    function Keyed<V>(obj: { [key: string]: V }): Seq.Keyed<string, V>;
+
+    interface Keyed<K, V> extends Seq<K, V>, Collection.Keyed<K, V> {
+      /**
+       * Deeply converts this Keyed Seq to equivalent native JavaScript Object.
+       *
+       * Converts keys to Strings.
+       */
+      toJS(): { [key in string | number | symbol]: DeepCopy<V> };
+
+      /**
+       * Shallowly converts this Keyed Seq to equivalent native JavaScript Object.
+       *
+       * Converts keys to Strings.
+       */
+      toJSON(): { [key in string | number | symbol]: V };
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<[K, V]>;
+
+      /**
+       * Returns itself
+       */
+      toSeq(): this;
+
+      /**
+       * Returns a new Seq with other collections concatenated to this one.
+       *
+       * All entries will be present in the resulting Seq, even if they
+       * have the same key.
+       */
+      concat<KC, VC>(
+        ...collections: Array<Iterable<[KC, VC]>>
+      ): Seq.Keyed<K | KC, V | VC>;
+      concat<C>(
+        ...collections: Array<{ [key: string]: C }>
+      ): Seq.Keyed<K | string, V | C>;
+
+      /**
+       * Returns a new Seq.Keyed with values passed through a
+       * `mapper` function.
+       *
+       * ```js
+       * const { Seq } = require('immutable')
+       * Seq.Keyed({ a: 1, b: 2 }).map(x => 10 * x)
+       * // Seq { "a": 10, "b": 20 }
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: V, key: K, iter: this) => M,
+        context?: unknown
+      ): Seq.Keyed<K, M>;
+
+      /**
+       * @see Collection.Keyed.mapKeys
+       */
+      mapKeys<M>(
+        mapper: (key: K, value: V, iter: this) => M,
+        context?: unknown
+      ): Seq.Keyed<M, V>;
+
+      /**
+       * @see Collection.Keyed.mapEntries
+       */
+      mapEntries<KM, VM>(
+        mapper: (
+          entry: [K, V],
+          index: number,
+          iter: this
+        ) => [KM, VM] | undefined,
+        context?: unknown
+      ): Seq.Keyed<KM, VM>;
+
+      /**
+       * Flat-maps the Seq, returning a Seq of the same type.
+       *
+       * Similar to `seq.map(...).flatten(true)`.
+       */
+      flatMap<KM, VM>(
+        mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+        context?: unknown
+      ): Seq.Keyed<KM, VM>;
+
+      /**
+       * Returns a new Seq with only the entries for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends V>(
+        predicate: (value: V, key: K, iter: this) => value is F,
+        context?: unknown
+      ): Seq.Keyed<K, F>;
+      filter(
+        predicate: (value: V, key: K, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new keyed Seq with the values for which the `predicate`
+       * function returns false and another for which is returns true.
+       */
+      partition<F extends V, C>(
+        predicate: (this: C, value: V, key: K, iter: this) => value is F,
+        context?: C
+      ): [Seq.Keyed<K, V>, Seq.Keyed<K, F>];
+      partition<C>(
+        predicate: (this: C, value: V, key: K, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      /**
+       * @see Collection.Keyed.flip
+       */
+      flip(): Seq.Keyed<V, K>;
+
+      [Symbol.iterator](): IterableIterator<[K, V]>;
+    }
+
+    /**
+     * `Seq` which represents an ordered indexed list of values.
+     */
+    namespace Indexed {
+      /**
+       * Provides an Seq.Indexed of the values provided.
+       */
+      function of<T>(...values: Array<T>): Seq.Indexed<T>;
+    }
+
+    /**
+     * Always returns Seq.Indexed, discarding associated keys and
+     * supplying incrementing indices.
+     *
+     * Note: `Seq.Indexed` is a conversion function and not a class, and does
+     * not use the `new` keyword during construction.
+     */
+    function Indexed<T>(
+      collection?: Iterable<T> | ArrayLike<T>
+    ): Seq.Indexed<T>;
+
+    interface Indexed<T> extends Seq<number, T>, Collection.Indexed<T> {
+      /**
+       * Deeply converts this Indexed Seq to equivalent native JavaScript Array.
+       */
+      toJS(): Array<DeepCopy<T>>;
+
+      /**
+       * Shallowly converts this Indexed Seq to equivalent native JavaScript Array.
+       */
+      toJSON(): Array<T>;
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<T>;
+
+      /**
+       * Returns itself
+       */
+      toSeq(): this;
+
+      /**
+       * Returns a new Seq with other collections concatenated to this one.
+       */
+      concat<C>(
+        ...valuesOrCollections: Array<Iterable<C> | C>
+      ): Seq.Indexed<T | C>;
+
+      /**
+       * Returns a new Seq.Indexed with values passed through a
+       * `mapper` function.
+       *
+       * ```js
+       * const { Seq } = require('immutable')
+       * Seq.Indexed([ 1, 2 ]).map(x => 10 * x)
+       * // Seq [ 10, 20 ]
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: T, key: number, iter: this) => M,
+        context?: unknown
+      ): Seq.Indexed<M>;
+
+      /**
+       * Flat-maps the Seq, returning a a Seq of the same type.
+       *
+       * Similar to `seq.map(...).flatten(true)`.
+       */
+      flatMap<M>(
+        mapper: (value: T, key: number, iter: this) => Iterable<M>,
+        context?: unknown
+      ): Seq.Indexed<M>;
+
+      /**
+       * Returns a new Seq with only the values for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends T>(
+        predicate: (value: T, index: number, iter: this) => value is F,
+        context?: unknown
+      ): Seq.Indexed<F>;
+      filter(
+        predicate: (value: T, index: number, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new indexed Seq with the values for which the `predicate`
+       * function returns false and another for which is returns true.
+       */
+      partition<F extends T, C>(
+        predicate: (this: C, value: T, index: number, iter: this) => value is F,
+        context?: C
+      ): [Seq.Indexed<T>, Seq.Indexed<F>];
+      partition<C>(
+        predicate: (this: C, value: T, index: number, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      /**
+       * Returns a Seq "zipped" with the provided collections.
+       *
+       * Like `zipWith`, but using the default `zipper`: creating an `Array`.
+       *
+       * ```js
+       * const a = Seq([ 1, 2, 3 ]);
+       * const b = Seq([ 4, 5, 6 ]);
+       * const c = a.zip(b); // Seq [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
+       * ```
+       */
+      zip<U>(other: Collection<unknown, U>): Seq.Indexed<[T, U]>;
+      zip<U, V>(
+        other: Collection<unknown, U>,
+        other2: Collection<unknown, V>
+      ): Seq.Indexed<[T, U, V]>;
+      zip(
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Seq.Indexed<unknown>;
+
+      /**
+       * Returns a Seq "zipped" with the provided collections.
+       *
+       * Unlike `zip`, `zipAll` continues zipping until the longest collection is
+       * exhausted. Missing values from shorter collections are filled with `undefined`.
+       *
+       * ```js
+       * const a = Seq([ 1, 2 ]);
+       * const b = Seq([ 3, 4, 5 ]);
+       * const c = a.zipAll(b); // Seq [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ]
+       * ```
+       */
+      zipAll<U>(other: Collection<unknown, U>): Seq.Indexed<[T, U]>;
+      zipAll<U, V>(
+        other: Collection<unknown, U>,
+        other2: Collection<unknown, V>
+      ): Seq.Indexed<[T, U, V]>;
+      zipAll(
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Seq.Indexed<unknown>;
+
+      /**
+       * Returns a Seq "zipped" with the provided collections by using a
+       * custom `zipper` function.
+       *
+       * ```js
+       * const a = Seq([ 1, 2, 3 ]);
+       * const b = Seq([ 4, 5, 6 ]);
+       * const c = a.zipWith((a, b) => a + b, b);
+       * // Seq [ 5, 7, 9 ]
+       * ```
+       */
+      zipWith<U, Z>(
+        zipper: (value: T, otherValue: U) => Z,
+        otherCollection: Collection<unknown, U>
+      ): Seq.Indexed<Z>;
+      zipWith<U, V, Z>(
+        zipper: (value: T, otherValue: U, thirdValue: V) => Z,
+        otherCollection: Collection<unknown, U>,
+        thirdCollection: Collection<unknown, V>
+      ): Seq.Indexed<Z>;
+      zipWith<Z>(
+        zipper: (...values: Array<unknown>) => Z,
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Seq.Indexed<Z>;
+
+      [Symbol.iterator](): IterableIterator<T>;
+    }
+
+    /**
+     * `Seq` which represents a set of values.
+     *
+     * Because `Seq` are often lazy, `Seq.Set` does not provide the same guarantee
+     * of value uniqueness as the concrete `Set`.
+     */
+    namespace Set {
+      /**
+       * Returns a Seq.Set of the provided values
+       */
+      function of<T>(...values: Array<T>): Seq.Set<T>;
+    }
+
+    /**
+     * Always returns a Seq.Set, discarding associated indices or keys.
+     *
+     * Note: `Seq.Set` is a conversion function and not a class, and does not
+     * use the `new` keyword during construction.
+     */
+    function Set<T>(collection?: Iterable<T> | ArrayLike<T>): Seq.Set<T>;
+
+    interface Set<T> extends Seq<T, T>, Collection.Set<T> {
+      /**
+       * Deeply converts this Set Seq to equivalent native JavaScript Array.
+       */
+      toJS(): Array<DeepCopy<T>>;
+
+      /**
+       * Shallowly converts this Set Seq to equivalent native JavaScript Array.
+       */
+      toJSON(): Array<T>;
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<T>;
+
+      /**
+       * Returns itself
+       */
+      toSeq(): this;
+
+      /**
+       * Returns a new Seq with other collections concatenated to this one.
+       *
+       * All entries will be present in the resulting Seq, even if they
+       * are duplicates.
+       */
+      concat<U>(...collections: Array<Iterable<U>>): Seq.Set<T | U>;
+
+      /**
+       * Returns a new Seq.Set with values passed through a
+       * `mapper` function.
+       *
+       * ```js
+       * Seq.Set([ 1, 2 ]).map(x => 10 * x)
+       * // Seq { 10, 20 }
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: T, key: T, iter: this) => M,
+        context?: unknown
+      ): Seq.Set<M>;
+
+      /**
+       * Flat-maps the Seq, returning a Seq of the same type.
+       *
+       * Similar to `seq.map(...).flatten(true)`.
+       */
+      flatMap<M>(
+        mapper: (value: T, key: T, iter: this) => Iterable<M>,
+        context?: unknown
+      ): Seq.Set<M>;
+
+      /**
+       * Returns a new Seq with only the values for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends T>(
+        predicate: (value: T, key: T, iter: this) => value is F,
+        context?: unknown
+      ): Seq.Set<F>;
+      filter(
+        predicate: (value: T, key: T, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new set Seq with the values for which the `predicate`
+       * function returns false and another for which is returns true.
+       */
+      partition<F extends T, C>(
+        predicate: (this: C, value: T, key: T, iter: this) => value is F,
+        context?: C
+      ): [Seq.Set<T>, Seq.Set<F>];
+      partition<C>(
+        predicate: (this: C, value: T, key: T, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      [Symbol.iterator](): IterableIterator<T>;
+    }
+  }
+
+  /**
+   * Creates a Seq.
+   *
+   * Returns a particular kind of `Seq` based on the input.
+   *
+   *   * If a `Seq`, that same `Seq`.
+   *   * If an `Collection`, a `Seq` of the same kind (Keyed, Indexed, or Set).
+   *   * If an Array-like, an `Seq.Indexed`.
+   *   * If an Iterable Object, an `Seq.Indexed`.
+   *   * If an Object, a `Seq.Keyed`.
+   *
+   * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`,
+   * which is usually not what you want. You should turn your Iterator Object into
+   * an iterable object by defining a Symbol.iterator (or @@iterator) method which
+   * returns `this`.
+   *
+   * Note: `Seq` is a conversion function and not a class, and does not use the
+   * `new` keyword during construction.
+   */
+  function Seq<S extends Seq<unknown, unknown>>(seq: S): S;
+  function Seq<K, V>(collection: Collection.Keyed<K, V>): Seq.Keyed<K, V>;
+  function Seq<T>(collection: Collection.Set<T>): Seq.Set<T>;
+  function Seq<T>(
+    collection: Collection.Indexed<T> | Iterable<T> | ArrayLike<T>
+  ): Seq.Indexed<T>;
+  function Seq<V>(obj: { [key: string]: V }): Seq.Keyed<string, V>;
+  function Seq<K = unknown, V = unknown>(): Seq<K, V>;
+
+  interface Seq<K, V> extends Collection<K, V> {
+    /**
+     * Some Seqs can describe their size lazily. When this is the case,
+     * size will be an integer. Otherwise it will be undefined.
+     *
+     * For example, Seqs returned from `map()` or `reverse()`
+     * preserve the size of the original `Seq` while `filter()` does not.
+     *
+     * Note: `Range`, `Repeat` and `Seq`s made from `Array`s and `Object`s will
+     * always have a size.
+     */
+    readonly size: number | undefined;
+
+    // Force evaluation
+
+    /**
+     * Because Sequences are lazy and designed to be chained together, they do
+     * not cache their results. For example, this map function is called a total
+     * of 6 times, as each `join` iterates the Seq of three values.
+     *
+     *     var squares = Seq([ 1, 2, 3 ]).map(x => x * x)
+     *     squares.join() + squares.join()
+     *
+     * If you know a `Seq` will be used multiple times, it may be more
+     * efficient to first cache it in memory. Here, the map function is called
+     * only 3 times.
+     *
+     *     var squares = Seq([ 1, 2, 3 ]).map(x => x * x).cacheResult()
+     *     squares.join() + squares.join()
+     *
+     * Use this method judiciously, as it must fully evaluate a Seq which can be
+     * a burden on memory and possibly performance.
+     *
+     * Note: after calling `cacheResult`, a Seq will always have a `size`.
+     */
+    cacheResult(): this;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Seq with values passed through a
+     * `mapper` function.
+     *
+     * ```js
+     * const { Seq } = require('immutable')
+     * Seq([ 1, 2 ]).map(x => 10 * x)
+     * // Seq [ 10, 20 ]
+     * ```
+     *
+     * Note: `map()` always returns a new instance, even if it produced the same
+     * value at every step.
+     */
+    map<M>(
+      mapper: (value: V, key: K, iter: this) => M,
+      context?: unknown
+    ): Seq<K, M>;
+
+    /**
+     * Returns a new Seq with values passed through a
+     * `mapper` function.
+     *
+     * ```js
+     * const { Seq } = require('immutable')
+     * Seq([ 1, 2 ]).map(x => 10 * x)
+     * // Seq [ 10, 20 ]
+     * ```
+     *
+     * Note: `map()` always returns a new instance, even if it produced the same
+     * value at every step.
+     * Note: used only for sets.
+     */
+    map<M>(
+      mapper: (value: V, key: K, iter: this) => M,
+      context?: unknown
+    ): Seq<M, M>;
+
+    /**
+     * Flat-maps the Seq, returning a Seq of the same type.
+     *
+     * Similar to `seq.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: V, key: K, iter: this) => Iterable<M>,
+      context?: unknown
+    ): Seq<K, M>;
+
+    /**
+     * Flat-maps the Seq, returning a Seq of the same type.
+     *
+     * Similar to `seq.map(...).flatten(true)`.
+     * Note: Used only for sets.
+     */
+    flatMap<M>(
+      mapper: (value: V, key: K, iter: this) => Iterable<M>,
+      context?: unknown
+    ): Seq<M, M>;
+
+    /**
+     * Returns a new Seq with only the values for which the `predicate`
+     * function returns true.
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends V>(
+      predicate: (value: V, key: K, iter: this) => value is F,
+      context?: unknown
+    ): Seq<K, F>;
+    filter(
+      predicate: (value: V, key: K, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Seq with the values for which the `predicate` function
+     * returns false and another for which is returns true.
+     */
+    partition<F extends V, C>(
+      predicate: (this: C, value: V, key: K, iter: this) => value is F,
+      context?: C
+    ): [Seq<K, V>, Seq<K, F>];
+    partition<C>(
+      predicate: (this: C, value: V, key: K, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+  }
+
+  /**
+   * The `Collection` is a set of (key, value) entries which can be iterated, and
+   * is the base class for all collections in `immutable`, allowing them to
+   * make use of all the Collection methods (such as `map` and `filter`).
+   *
+   * Note: A collection is always iterated in the same order, however that order
+   * may not always be well defined, as is the case for the `Map` and `Set`.
+   *
+   * Collection is the abstract base class for concrete data structures. It
+   * cannot be constructed directly.
+   *
+   * Implementations should extend one of the subclasses, `Collection.Keyed`,
+   * `Collection.Indexed`, or `Collection.Set`.
+   */
+  namespace Collection {
+    /**
+     * @deprecated use `const { isKeyed } = require('immutable')`
+     */
+    function isKeyed(
+      maybeKeyed: unknown
+    ): maybeKeyed is Collection.Keyed<unknown, unknown>;
+
+    /**
+     * @deprecated use `const { isIndexed } = require('immutable')`
+     */
+    function isIndexed(
+      maybeIndexed: unknown
+    ): maybeIndexed is Collection.Indexed<unknown>;
+
+    /**
+     * @deprecated use `const { isAssociative } = require('immutable')`
+     */
+    function isAssociative(
+      maybeAssociative: unknown
+    ): maybeAssociative is
+      | Collection.Keyed<unknown, unknown>
+      | Collection.Indexed<unknown>;
+
+    /**
+     * @deprecated use `const { isOrdered } = require('immutable')`
+     */
+    function isOrdered(maybeOrdered: unknown): boolean;
+
+    /**
+     * Keyed Collections have discrete keys tied to each value.
+     *
+     * When iterating `Collection.Keyed`, each iteration will yield a `[K, V]`
+     * tuple, in other words, `Collection#entries` is the default iterator for
+     * Keyed Collections.
+     */
+    namespace Keyed {}
+
+    /**
+     * Creates a Collection.Keyed
+     *
+     * Similar to `Collection()`, however it expects collection-likes of [K, V]
+     * tuples if not constructed from a Collection.Keyed or JS Object.
+     *
+     * Note: `Collection.Keyed` is a conversion function and not a class, and
+     * does not use the `new` keyword during construction.
+     */
+    function Keyed<K, V>(collection?: Iterable<[K, V]>): Collection.Keyed<K, V>;
+    function Keyed<V>(obj: { [key: string]: V }): Collection.Keyed<string, V>;
+
+    interface Keyed<K, V> extends Collection<K, V> {
+      /**
+       * Deeply converts this Keyed collection to equivalent native JavaScript Object.
+       *
+       * Converts keys to Strings.
+       */
+      toJS(): { [key in string | number | symbol]: DeepCopy<V> };
+
+      /**
+       * Shallowly converts this Keyed collection to equivalent native JavaScript Object.
+       *
+       * Converts keys to Strings.
+       */
+      toJSON(): { [key in string | number | symbol]: V };
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<[K, V]>;
+
+      /**
+       * Returns Seq.Keyed.
+       * @override
+       */
+      toSeq(): Seq.Keyed<K, V>;
+
+      // Sequence functions
+
+      /**
+       * Returns a new Collection.Keyed of the same type where the keys and values
+       * have been flipped.
+       *
+       * <!-- runkit:activate -->
+       * ```js
+       * const { Map } = require('immutable')
+       * Map({ a: 'z', b: 'y' }).flip()
+       * // Map { "z": "a", "y": "b" }
+       * ```
+       */
+      flip(): Collection.Keyed<V, K>;
+
+      /**
+       * Returns a new Collection with other collections concatenated to this one.
+       */
+      concat<KC, VC>(
+        ...collections: Array<Iterable<[KC, VC]>>
+      ): Collection.Keyed<K | KC, V | VC>;
+      concat<C>(
+        ...collections: Array<{ [key: string]: C }>
+      ): Collection.Keyed<K | string, V | C>;
+
+      /**
+       * Returns a new Collection.Keyed with values passed through a
+       * `mapper` function.
+       *
+       * ```js
+       * const { Collection } = require('immutable')
+       * Collection.Keyed({ a: 1, b: 2 }).map(x => 10 * x)
+       * // Seq { "a": 10, "b": 20 }
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: V, key: K, iter: this) => M,
+        context?: unknown
+      ): Collection.Keyed<K, M>;
+
+      /**
+       * Returns a new Collection.Keyed of the same type with keys passed through
+       * a `mapper` function.
+       *
+       * <!-- runkit:activate -->
+       * ```js
+       * const { Map } = require('immutable')
+       * Map({ a: 1, b: 2 }).mapKeys(x => x.toUpperCase())
+       * // Map { "A": 1, "B": 2 }
+       * ```
+       *
+       * Note: `mapKeys()` always returns a new instance, even if it produced
+       * the same key at every step.
+       */
+      mapKeys<M>(
+        mapper: (key: K, value: V, iter: this) => M,
+        context?: unknown
+      ): Collection.Keyed<M, V>;
+
+      /**
+       * Returns a new Collection.Keyed of the same type with entries
+       * ([key, value] tuples) passed through a `mapper` function.
+       *
+       * <!-- runkit:activate -->
+       * ```js
+       * const { Map } = require('immutable')
+       * Map({ a: 1, b: 2 })
+       *   .mapEntries(([ k, v ]) => [ k.toUpperCase(), v * 2 ])
+       * // Map { "A": 2, "B": 4 }
+       * ```
+       *
+       * Note: `mapEntries()` always returns a new instance, even if it produced
+       * the same entry at every step.
+       *
+       * If the mapper function returns `undefined`, then the entry will be filtered
+       */
+      mapEntries<KM, VM>(
+        mapper: (
+          entry: [K, V],
+          index: number,
+          iter: this
+        ) => [KM, VM] | undefined,
+        context?: unknown
+      ): Collection.Keyed<KM, VM>;
+
+      /**
+       * Flat-maps the Collection, returning a Collection of the same type.
+       *
+       * Similar to `collection.map(...).flatten(true)`.
+       */
+      flatMap<KM, VM>(
+        mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+        context?: unknown
+      ): Collection.Keyed<KM, VM>;
+
+      /**
+       * Returns a new Collection with only the values for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends V>(
+        predicate: (value: V, key: K, iter: this) => value is F,
+        context?: unknown
+      ): Collection.Keyed<K, F>;
+      filter(
+        predicate: (value: V, key: K, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new keyed Collection with the values for which the
+       * `predicate` function returns false and another for which is returns
+       * true.
+       */
+      partition<F extends V, C>(
+        predicate: (this: C, value: V, key: K, iter: this) => value is F,
+        context?: C
+      ): [Collection.Keyed<K, V>, Collection.Keyed<K, F>];
+      partition<C>(
+        predicate: (this: C, value: V, key: K, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      [Symbol.iterator](): IterableIterator<[K, V]>;
+    }
+
+    /**
+     * Indexed Collections have incrementing numeric keys. They exhibit
+     * slightly different behavior than `Collection.Keyed` for some methods in order
+     * to better mirror the behavior of JavaScript's `Array`, and add methods
+     * which do not make sense on non-indexed Collections such as `indexOf`.
+     *
+     * Unlike JavaScript arrays, `Collection.Indexed`s are always dense. "Unset"
+     * indices and `undefined` indices are indistinguishable, and all indices from
+     * 0 to `size` are visited when iterated.
+     *
+     * All Collection.Indexed methods return re-indexed Collections. In other words,
+     * indices always start at 0 and increment until size. If you wish to
+     * preserve indices, using them as keys, convert to a Collection.Keyed by
+     * calling `toKeyedSeq`.
+     */
+    namespace Indexed {}
+
+    /**
+     * Creates a new Collection.Indexed.
+     *
+     * Note: `Collection.Indexed` is a conversion function and not a class, and
+     * does not use the `new` keyword during construction.
+     */
+    function Indexed<T>(
+      collection?: Iterable<T> | ArrayLike<T>
+    ): Collection.Indexed<T>;
+
+    interface Indexed<T> extends Collection<number, T> {
+      /**
+       * Deeply converts this Indexed collection to equivalent native JavaScript Array.
+       */
+      toJS(): Array<DeepCopy<T>>;
+
+      /**
+       * Shallowly converts this Indexed collection to equivalent native JavaScript Array.
+       */
+      toJSON(): Array<T>;
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<T>;
+
+      // Reading values
+
+      /**
+       * Returns the value associated with the provided index, or notSetValue if
+       * the index is beyond the bounds of the Collection.
+       *
+       * `index` may be a negative number, which indexes back from the end of the
+       * Collection. `s.get(-1)` gets the last item in the Collection.
+       */
+      get<NSV>(index: number, notSetValue: NSV): T | NSV;
+      get(index: number): T | undefined;
+
+      // Conversion to Seq
+
+      /**
+       * Returns Seq.Indexed.
+       * @override
+       */
+      toSeq(): Seq.Indexed<T>;
+
+      /**
+       * If this is a collection of [key, value] entry tuples, it will return a
+       * Seq.Keyed of those entries.
+       */
+      fromEntrySeq(): Seq.Keyed<unknown, unknown>;
+
+      // Combination
+
+      /**
+       * Returns a Collection of the same type with `separator` between each item
+       * in this Collection.
+       */
+      interpose(separator: T): this;
+
+      /**
+       * Returns a Collection of the same type with the provided `collections`
+       * interleaved into this collection.
+       *
+       * The resulting Collection includes the first item from each, then the
+       * second from each, etc.
+       *
+       * <!-- runkit:activate
+       *      { "preamble": "require('immutable')"}
+       * -->
+       * ```js
+       * const { List } = require('immutable')
+       * List([ 1, 2, 3 ]).interleave(List([ 'A', 'B', 'C' ]))
+       * // List [ 1, "A", 2, "B", 3, "C" ]
+       * ```
+       *
+       * The shortest Collection stops interleave.
+       *
+       * <!-- runkit:activate
+       *      { "preamble": "const { List } = require('immutable')" }
+       * -->
+       * ```js
+       * List([ 1, 2, 3 ]).interleave(
+       *   List([ 'A', 'B' ]),
+       *   List([ 'X', 'Y', 'Z' ])
+       * )
+       * // List [ 1, "A", "X", 2, "B", "Y" ]
+       * ```
+       *
+       * Since `interleave()` re-indexes values, it produces a complete copy,
+       * which has `O(N)` complexity.
+       *
+       * Note: `interleave` *cannot* be used in `withMutations`.
+       */
+      interleave(...collections: Array<Collection<unknown, T>>): this;
+
+      /**
+       * Splice returns a new indexed Collection by replacing a region of this
+       * Collection with new values. If values are not provided, it only skips the
+       * region to be removed.
+       *
+       * `index` may be a negative number, which indexes back from the end of the
+       * Collection. `s.splice(-2)` splices after the second to last item.
+       *
+       * <!-- runkit:activate -->
+       * ```js
+       * const { List } = require('immutable')
+       * List([ 'a', 'b', 'c', 'd' ]).splice(1, 2, 'q', 'r', 's')
+       * // List [ "a", "q", "r", "s", "d" ]
+       * ```
+       *
+       * Since `splice()` re-indexes values, it produces a complete copy, which
+       * has `O(N)` complexity.
+       *
+       * Note: `splice` *cannot* be used in `withMutations`.
+       */
+      splice(index: number, removeNum: number, ...values: Array<T>): this;
+
+      /**
+       * Returns a Collection of the same type "zipped" with the provided
+       * collections.
+       *
+       * Like `zipWith`, but using the default `zipper`: creating an `Array`.
+       *
+       *
+       * <!-- runkit:activate
+       *      { "preamble": "const { List } = require('immutable')" }
+       * -->
+       * ```js
+       * const a = List([ 1, 2, 3 ]);
+       * const b = List([ 4, 5, 6 ]);
+       * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
+       * ```
+       */
+      zip<U>(other: Collection<unknown, U>): Collection.Indexed<[T, U]>;
+      zip<U, V>(
+        other: Collection<unknown, U>,
+        other2: Collection<unknown, V>
+      ): Collection.Indexed<[T, U, V]>;
+      zip(
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Collection.Indexed<unknown>;
+
+      /**
+       * Returns a Collection "zipped" with the provided collections.
+       *
+       * Unlike `zip`, `zipAll` continues zipping until the longest collection is
+       * exhausted. Missing values from shorter collections are filled with `undefined`.
+       *
+       * ```js
+       * const a = List([ 1, 2 ]);
+       * const b = List([ 3, 4, 5 ]);
+       * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ]
+       * ```
+       */
+      zipAll<U>(other: Collection<unknown, U>): Collection.Indexed<[T, U]>;
+      zipAll<U, V>(
+        other: Collection<unknown, U>,
+        other2: Collection<unknown, V>
+      ): Collection.Indexed<[T, U, V]>;
+      zipAll(
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Collection.Indexed<unknown>;
+
+      /**
+       * Returns a Collection of the same type "zipped" with the provided
+       * collections by using a custom `zipper` function.
+       *
+       * <!-- runkit:activate
+       *      { "preamble": "const { List } = require('immutable')" }
+       * -->
+       * ```js
+       * const a = List([ 1, 2, 3 ]);
+       * const b = List([ 4, 5, 6 ]);
+       * const c = a.zipWith((a, b) => a + b, b);
+       * // List [ 5, 7, 9 ]
+       * ```
+       */
+      zipWith<U, Z>(
+        zipper: (value: T, otherValue: U) => Z,
+        otherCollection: Collection<unknown, U>
+      ): Collection.Indexed<Z>;
+      zipWith<U, V, Z>(
+        zipper: (value: T, otherValue: U, thirdValue: V) => Z,
+        otherCollection: Collection<unknown, U>,
+        thirdCollection: Collection<unknown, V>
+      ): Collection.Indexed<Z>;
+      zipWith<Z>(
+        zipper: (...values: Array<unknown>) => Z,
+        ...collections: Array<Collection<unknown, unknown>>
+      ): Collection.Indexed<Z>;
+
+      // Search for value
+
+      /**
+       * Returns the first index at which a given value can be found in the
+       * Collection, or -1 if it is not present.
+       */
+      indexOf(searchValue: T): number;
+
+      /**
+       * Returns the last index at which a given value can be found in the
+       * Collection, or -1 if it is not present.
+       */
+      lastIndexOf(searchValue: T): number;
+
+      /**
+       * Returns the first index in the Collection where a value satisfies the
+       * provided predicate function. Otherwise -1 is returned.
+       */
+      findIndex(
+        predicate: (value: T, index: number, iter: this) => boolean,
+        context?: unknown
+      ): number;
+
+      /**
+       * Returns the last index in the Collection where a value satisfies the
+       * provided predicate function. Otherwise -1 is returned.
+       */
+      findLastIndex(
+        predicate: (value: T, index: number, iter: this) => boolean,
+        context?: unknown
+      ): number;
+
+      // Sequence algorithms
+
+      /**
+       * Returns a new Collection with other collections concatenated to this one.
+       */
+      concat<C>(
+        ...valuesOrCollections: Array<Iterable<C> | C>
+      ): Collection.Indexed<T | C>;
+
+      /**
+       * Returns a new Collection.Indexed with values passed through a
+       * `mapper` function.
+       *
+       * ```js
+       * const { Collection } = require('immutable')
+       * Collection.Indexed([1,2]).map(x => 10 * x)
+       * // Seq [ 1, 2 ]
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: T, key: number, iter: this) => M,
+        context?: unknown
+      ): Collection.Indexed<M>;
+
+      /**
+       * Flat-maps the Collection, returning a Collection of the same type.
+       *
+       * Similar to `collection.map(...).flatten(true)`.
+       */
+      flatMap<M>(
+        mapper: (value: T, key: number, iter: this) => Iterable<M>,
+        context?: unknown
+      ): Collection.Indexed<M>;
+
+      /**
+       * Returns a new Collection with only the values for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends T>(
+        predicate: (value: T, index: number, iter: this) => value is F,
+        context?: unknown
+      ): Collection.Indexed<F>;
+      filter(
+        predicate: (value: T, index: number, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new indexed Collection with the values for which the
+       * `predicate` function returns false and another for which is returns
+       * true.
+       */
+      partition<F extends T, C>(
+        predicate: (this: C, value: T, index: number, iter: this) => value is F,
+        context?: C
+      ): [Collection.Indexed<T>, Collection.Indexed<F>];
+      partition<C>(
+        predicate: (this: C, value: T, index: number, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      [Symbol.iterator](): IterableIterator<T>;
+    }
+
+    /**
+     * Set Collections only represent values. They have no associated keys or
+     * indices. Duplicate values are possible in the lazy `Seq.Set`s, however
+     * the concrete `Set` Collection does not allow duplicate values.
+     *
+     * Collection methods on Collection.Set such as `map` and `forEach` will provide
+     * the value as both the first and second arguments to the provided function.
+     *
+     * ```js
+     * const { Collection } = require('immutable')
+     * const seq = Collection.Set([ 'A', 'B', 'C' ])
+     * // Seq { "A", "B", "C" }
+     * seq.forEach((v, k) =>
+     *  assert.equal(v, k)
+     * )
+     * ```
+     */
+    namespace Set {}
+
+    /**
+     * Similar to `Collection()`, but always returns a Collection.Set.
+     *
+     * Note: `Collection.Set` is a factory function and not a class, and does
+     * not use the `new` keyword during construction.
+     */
+    function Set<T>(collection?: Iterable<T> | ArrayLike<T>): Collection.Set<T>;
+
+    interface Set<T> extends Collection<T, T> {
+      /**
+       * Deeply converts this Set collection to equivalent native JavaScript Array.
+       */
+      toJS(): Array<DeepCopy<T>>;
+
+      /**
+       * Shallowly converts this Set collection to equivalent native JavaScript Array.
+       */
+      toJSON(): Array<T>;
+
+      /**
+       * Shallowly converts this collection to an Array.
+       */
+      toArray(): Array<T>;
+
+      /**
+       * Returns Seq.Set.
+       * @override
+       */
+      toSeq(): Seq.Set<T>;
+
+      // Sequence algorithms
+
+      /**
+       * Returns a new Collection with other collections concatenated to this one.
+       */
+      concat<U>(...collections: Array<Iterable<U>>): Collection.Set<T | U>;
+
+      /**
+       * Returns a new Collection.Set with values passed through a
+       * `mapper` function.
+       *
+       * ```
+       * Collection.Set([ 1, 2 ]).map(x => 10 * x)
+       * // Seq { 1, 2 }
+       * ```
+       *
+       * Note: `map()` always returns a new instance, even if it produced the
+       * same value at every step.
+       */
+      map<M>(
+        mapper: (value: T, key: T, iter: this) => M,
+        context?: unknown
+      ): Collection.Set<M>;
+
+      /**
+       * Flat-maps the Collection, returning a Collection of the same type.
+       *
+       * Similar to `collection.map(...).flatten(true)`.
+       */
+      flatMap<M>(
+        mapper: (value: T, key: T, iter: this) => Iterable<M>,
+        context?: unknown
+      ): Collection.Set<M>;
+
+      /**
+       * Returns a new Collection with only the values for which the `predicate`
+       * function returns true.
+       *
+       * Note: `filter()` always returns a new instance, even if it results in
+       * not filtering out any values.
+       */
+      filter<F extends T>(
+        predicate: (value: T, key: T, iter: this) => value is F,
+        context?: unknown
+      ): Collection.Set<F>;
+      filter(
+        predicate: (value: T, key: T, iter: this) => unknown,
+        context?: unknown
+      ): this;
+
+      /**
+       * Returns a new set Collection with the values for which the
+       * `predicate` function returns false and another for which is returns
+       * true.
+       */
+      partition<F extends T, C>(
+        predicate: (this: C, value: T, key: T, iter: this) => value is F,
+        context?: C
+      ): [Collection.Set<T>, Collection.Set<F>];
+      partition<C>(
+        predicate: (this: C, value: T, key: T, iter: this) => unknown,
+        context?: C
+      ): [this, this];
+
+      [Symbol.iterator](): IterableIterator<T>;
+    }
+  }
+
+  /**
+   * Creates a Collection.
+   *
+   * The type of Collection created is based on the input.
+   *
+   *   * If an `Collection`, that same `Collection`.
+   *   * If an Array-like, an `Collection.Indexed`.
+   *   * If an Object with an Iterator defined, an `Collection.Indexed`.
+   *   * If an Object, an `Collection.Keyed`.
+   *
+   * This methods forces the conversion of Objects and Strings to Collections.
+   * If you want to ensure that a Collection of one item is returned, use
+   * `Seq.of`.
+   *
+   * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`,
+   * which is usually not what you want. You should turn your Iterator Object into
+   * an iterable object by defining a Symbol.iterator (or @@iterator) method which
+   * returns `this`.
+   *
+   * Note: `Collection` is a conversion function and not a class, and does not
+   * use the `new` keyword during construction.
+   */
+  function Collection<I extends Collection<unknown, unknown>>(collection: I): I;
+  function Collection<T>(
+    collection: Iterable<T> | ArrayLike<T>
+  ): Collection.Indexed<T>;
+  function Collection<V>(obj: {
+    [key: string]: V;
+  }): Collection.Keyed<string, V>;
+  function Collection<K = unknown, V = unknown>(): Collection<K, V>;
+
+  interface Collection<K, V> extends ValueObject {
+    // Value equality
+
+    /**
+     * True if this and the other Collection have value equality, as defined
+     * by `Immutable.is()`.
+     *
+     * Note: This is equivalent to `Immutable.is(this, other)`, but provided to
+     * allow for chained expressions.
+     */
+    equals(other: unknown): boolean;
+
+    /**
+     * Computes and returns the hashed identity for this Collection.
+     *
+     * The `hashCode` of a Collection is used to determine potential equality,
+     * and is used when adding this to a `Set` or as a key in a `Map`, enabling
+     * lookup via a different instance.
+     *
+     * <!-- runkit:activate
+     *      { "preamble": "const { Set,  List } = require('immutable')" }
+     * -->
+     * ```js
+     * const a = List([ 1, 2, 3 ]);
+     * const b = List([ 1, 2, 3 ]);
+     * assert.notStrictEqual(a, b); // different instances
+     * const set = Set([ a ]);
+     * assert.equal(set.has(b), true);
+     * ```
+     *
+     * If two values have the same `hashCode`, they are [not guaranteed
+     * to be equal][Hash Collision]. If two values have different `hashCode`s,
+     * they must not be equal.
+     *
+     * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science)
+     */
+    hashCode(): number;
+
+    // Reading values
+
+    /**
+     * Returns the value associated with the provided key, or notSetValue if
+     * the Collection does not contain this key.
+     *
+     * Note: it is possible a key may be associated with an `undefined` value,
+     * so if `notSetValue` is not provided and this method returns `undefined`,
+     * that does not guarantee the key was not found.
+     */
+    get<NSV>(key: K, notSetValue: NSV): V | NSV;
+    get(key: K): V | undefined;
+
+    /**
+     * True if a key exists within this `Collection`, using `Immutable.is`
+     * to determine equality
+     */
+    has(key: K): boolean;
+
+    /**
+     * True if a value exists within this `Collection`, using `Immutable.is`
+     * to determine equality
+     * @alias contains
+     */
+    includes(value: V): boolean;
+    contains(value: V): boolean;
+
+    /**
+     * In case the `Collection` is not empty returns the first element of the
+     * `Collection`.
+     * In case the `Collection` is empty returns the optional default
+     * value if provided, if no default value is provided returns undefined.
+     */
+    first<NSV = undefined>(notSetValue?: NSV): V | NSV;
+
+    /**
+     * In case the `Collection` is not empty returns the last element of the
+     * `Collection`.
+     * In case the `Collection` is empty returns the optional default
+     * value if provided, if no default value is provided returns undefined.
+     */
+    last<NSV = undefined>(notSetValue?: NSV): V | NSV;
+
+    // Reading deep values
+
+    /**
+     * Returns the value found by following a path of keys or indices through
+     * nested Collections.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map, List } = require('immutable')
+     * const deepData = Map({ x: List([ Map({ y: 123 }) ]) });
+     * deepData.getIn(['x', 0, 'y']) // 123
+     * ```
+     *
+     * Plain JavaScript Object or Arrays may be nested within an Immutable.js
+     * Collection, and getIn() can access those values as well:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map, List } = require('immutable')
+     * const deepData = Map({ x: [ { y: 123 } ] });
+     * deepData.getIn(['x', 0, 'y']) // 123
+     * ```
+     */
+    getIn(searchKeyPath: Iterable<unknown>, notSetValue?: unknown): unknown;
+
+    /**
+     * True if the result of following a path of keys or indices through nested
+     * Collections results in a set value.
+     */
+    hasIn(searchKeyPath: Iterable<unknown>): boolean;
+
+    // Persistent changes
+
+    /**
+     * This can be very useful as a way to "chain" a normal function into a
+     * sequence of methods. RxJS calls this "let" and lodash calls it "thru".
+     *
+     * For example, to sum a Seq after mapping and filtering:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Seq } = require('immutable')
+     *
+     * function sum(collection) {
+     *   return collection.reduce((sum, x) => sum + x, 0)
+     * }
+     *
+     * Seq([ 1, 2, 3 ])
+     *   .map(x => x + 1)
+     *   .filter(x => x % 2 === 0)
+     *   .update(sum)
+     * // 6
+     * ```
+     */
+    update<R>(updater: (value: this) => R): R;
+
+    // Conversion to JavaScript types
+
+    /**
+     * Deeply converts this Collection to equivalent native JavaScript Array or Object.
+     *
+     * `Collection.Indexed`, and `Collection.Set` become `Array`, while
+     * `Collection.Keyed` become `Object`, converting keys to Strings.
+     */
+    toJS():
+      | Array<DeepCopy<V>>
+      | { [key in string | number | symbol]: DeepCopy<V> };
+
+    /**
+     * Shallowly converts this Collection to equivalent native JavaScript Array or Object.
+     *
+     * `Collection.Indexed`, and `Collection.Set` become `Array`, while
+     * `Collection.Keyed` become `Object`, converting keys to Strings.
+     */
+    toJSON(): Array<V> | { [key in string | number | symbol]: V };
+
+    /**
+     * Shallowly converts this collection to an Array.
+     *
+     * `Collection.Indexed`, and `Collection.Set` produce an Array of values.
+     * `Collection.Keyed` produce an Array of [key, value] tuples.
+     */
+    toArray(): Array<V> | Array<[K, V]>;
+
+    /**
+     * Shallowly converts this Collection to an Object.
+     *
+     * Converts keys to Strings.
+     */
+    toObject(): { [key: string]: V };
+
+    // Conversion to Collections
+
+    /**
+     * Converts this Collection to a Map, Throws if keys are not hashable.
+     *
+     * Note: This is equivalent to `Map(this.toKeyedSeq())`, but provided
+     * for convenience and to allow for chained expressions.
+     */
+    toMap(): Map<K, V>;
+
+    /**
+     * Converts this Collection to a Map, maintaining the order of iteration.
+     *
+     * Note: This is equivalent to `OrderedMap(this.toKeyedSeq())`, but
+     * provided for convenience and to allow for chained expressions.
+     */
+    toOrderedMap(): OrderedMap<K, V>;
+
+    /**
+     * Converts this Collection to a Set, discarding keys. Throws if values
+     * are not hashable.
+     *
+     * Note: This is equivalent to `Set(this)`, but provided to allow for
+     * chained expressions.
+     */
+    toSet(): Set<V>;
+
+    /**
+     * Converts this Collection to a Set, maintaining the order of iteration and
+     * discarding keys.
+     *
+     * Note: This is equivalent to `OrderedSet(this.valueSeq())`, but provided
+     * for convenience and to allow for chained expressions.
+     */
+    toOrderedSet(): OrderedSet<V>;
+
+    /**
+     * Converts this Collection to a List, discarding keys.
+     *
+     * This is similar to `List(collection)`, but provided to allow for chained
+     * expressions. However, when called on `Map` or other keyed collections,
+     * `collection.toList()` discards the keys and creates a list of only the
+     * values, whereas `List(collection)` creates a list of entry tuples.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map, List } = require('immutable')
+     * var myMap = Map({ a: 'Apple', b: 'Banana' })
+     * List(myMap) // List [ [ "a", "Apple" ], [ "b", "Banana" ] ]
+     * myMap.toList() // List [ "Apple", "Banana" ]
+     * ```
+     */
+    toList(): List<V>;
+
+    /**
+     * Converts this Collection to a Stack, discarding keys. Throws if values
+     * are not hashable.
+     *
+     * Note: This is equivalent to `Stack(this)`, but provided to allow for
+     * chained expressions.
+     */
+    toStack(): Stack<V>;
+
+    // Conversion to Seq
+
+    /**
+     * Converts this Collection to a Seq of the same kind (indexed,
+     * keyed, or set).
+     */
+    toSeq(): Seq<K, V>;
+
+    /**
+     * Returns a Seq.Keyed from this Collection where indices are treated as keys.
+     *
+     * This is useful if you want to operate on an
+     * Collection.Indexed and preserve the [index, value] pairs.
+     *
+     * The returned Seq will have identical iteration order as
+     * this Collection.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Seq } = require('immutable')
+     * const indexedSeq = Seq([ 'A', 'B', 'C' ])
+     * // Seq [ "A", "B", "C" ]
+     * indexedSeq.filter(v => v === 'B')
+     * // Seq [ "B" ]
+     * const keyedSeq = indexedSeq.toKeyedSeq()
+     * // Seq { 0: "A", 1: "B", 2: "C" }
+     * keyedSeq.filter(v => v === 'B')
+     * // Seq { 1: "B" }
+     * ```
+     */
+    toKeyedSeq(): Seq.Keyed<K, V>;
+
+    /**
+     * Returns an Seq.Indexed of the values of this Collection, discarding keys.
+     */
+    toIndexedSeq(): Seq.Indexed<V>;
+
+    /**
+     * Returns a Seq.Set of the values of this Collection, discarding keys.
+     */
+    toSetSeq(): Seq.Set<V>;
+
+    // Iterators
+
+    /**
+     * An iterator of this `Collection`'s keys.
+     *
+     * Note: this will return an ES6 iterator which does not support
+     * Immutable.js sequence algorithms. Use `keySeq` instead, if this is
+     * what you want.
+     */
+    keys(): IterableIterator<K>;
+
+    /**
+     * An iterator of this `Collection`'s values.
+     *
+     * Note: this will return an ES6 iterator which does not support
+     * Immutable.js sequence algorithms. Use `valueSeq` instead, if this is
+     * what you want.
+     */
+    values(): IterableIterator<V>;
+
+    /**
+     * An iterator of this `Collection`'s entries as `[ key, value ]` tuples.
+     *
+     * Note: this will return an ES6 iterator which does not support
+     * Immutable.js sequence algorithms. Use `entrySeq` instead, if this is
+     * what you want.
+     */
+    entries(): IterableIterator<[K, V]>;
+
+    [Symbol.iterator](): IterableIterator<unknown>;
+
+    // Collections (Seq)
+
+    /**
+     * Returns a new Seq.Indexed of the keys of this Collection,
+     * discarding values.
+     */
+    keySeq(): Seq.Indexed<K>;
+
+    /**
+     * Returns an Seq.Indexed of the values of this Collection, discarding keys.
+     */
+    valueSeq(): Seq.Indexed<V>;
+
+    /**
+     * Returns a new Seq.Indexed of [key, value] tuples.
+     */
+    entrySeq(): Seq.Indexed<[K, V]>;
+
+    // Sequence algorithms
+
+    /**
+     * Returns a new Collection of the same type with values passed through a
+     * `mapper` function.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Collection } = require('immutable')
+     * Collection({ a: 1, b: 2 }).map(x => 10 * x)
+     * // Seq { "a": 10, "b": 20 }
+     * ```
+     *
+     * Note: `map()` always returns a new instance, even if it produced the same
+     * value at every step.
+     */
+    map<M>(
+      mapper: (value: V, key: K, iter: this) => M,
+      context?: unknown
+    ): Collection<K, M>;
+
+    /**
+     * Note: used only for sets, which return Collection<M, M> but are otherwise
+     * identical to normal `map()`.
+     *
+     * @ignore
+     */
+    map(...args: Array<never>): unknown;
+
+    /**
+     * Returns a new Collection of the same type with only the entries for which
+     * the `predicate` function returns true.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map({ a: 1, b: 2, c: 3, d: 4}).filter(x => x % 2 === 0)
+     * // Map { "b": 2, "d": 4 }
+     * ```
+     *
+     * Note: `filter()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filter<F extends V>(
+      predicate: (value: V, key: K, iter: this) => value is F,
+      context?: unknown
+    ): Collection<K, F>;
+    filter(
+      predicate: (value: V, key: K, iter: this) => unknown,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Collection of the same type with only the entries for which
+     * the `predicate` function returns false.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map({ a: 1, b: 2, c: 3, d: 4}).filterNot(x => x % 2 === 0)
+     * // Map { "a": 1, "c": 3 }
+     * ```
+     *
+     * Note: `filterNot()` always returns a new instance, even if it results in
+     * not filtering out any values.
+     */
+    filterNot(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Collection with the values for which the `predicate`
+     * function returns false and another for which is returns true.
+     */
+    partition<F extends V, C>(
+      predicate: (this: C, value: V, key: K, iter: this) => value is F,
+      context?: C
+    ): [Collection<K, V>, Collection<K, F>];
+    partition<C>(
+      predicate: (this: C, value: V, key: K, iter: this) => unknown,
+      context?: C
+    ): [this, this];
+
+    /**
+     * Returns a new Collection of the same type in reverse order.
+     */
+    reverse(): this;
+
+    /**
+     * Returns a new Collection of the same type which includes the same entries,
+     * stably sorted by using a `comparator`.
+     *
+     * If a `comparator` is not provided, a default comparator uses `<` and `>`.
+     *
+     * `comparator(valueA, valueB)`:
+     *
+     *   * Returns `0` if the elements should not be swapped.
+     *   * Returns `-1` (or any negative number) if `valueA` comes before `valueB`
+     *   * Returns `1` (or any positive number) if `valueA` comes after `valueB`
+     *   * Alternatively, can return a value of the `PairSorting` enum type
+     *   * Is pure, i.e. it must always return the same value for the same pair
+     *     of values.
+     *
+     * When sorting collections which have no defined order, their ordered
+     * equivalents will be returned. e.g. `map.sort()` returns OrderedMap.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * Map({ "c": 3, "a": 1, "b": 2 }).sort((a, b) => {
+     *   if (a < b) { return -1; }
+     *   if (a > b) { return 1; }
+     *   if (a === b) { return 0; }
+     * });
+     * // OrderedMap { "a": 1, "b": 2, "c": 3 }
+     * ```
+     *
+     * Note: `sort()` Always returns a new instance, even if the original was
+     * already sorted.
+     *
+     * Note: This is always an eager operation.
+     */
+    sort(comparator?: Comparator<V>): this;
+
+    /**
+     * Like `sort`, but also accepts a `comparatorValueMapper` which allows for
+     * sorting by more sophisticated means:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { Map } = require('immutable')
+     * const beattles = Map({
+     *   John: { name: "Lennon" },
+     *   Paul: { name: "McCartney" },
+     *   George: { name: "Harrison" },
+     *   Ringo: { name: "Starr" },
+     * });
+     * beattles.sortBy(member => member.name);
+     * ```
+     *
+     * Note: `sortBy()` Always returns a new instance, even if the original was
+     * already sorted.
+     *
+     * Note: This is always an eager operation.
+     */
+    sortBy<C>(
+      comparatorValueMapper: (value: V, key: K, iter: this) => C,
+      comparator?: Comparator<C>
+    ): this;
+
+    /**
+     * Returns a `Map` of `Collection`, grouped by the return
+     * value of the `grouper` function.
+     *
+     * Note: This is always an eager operation.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List, Map } = require('immutable')
+     * const listOfMaps = List([
+     *   Map({ v: 0 }),
+     *   Map({ v: 1 }),
+     *   Map({ v: 1 }),
+     *   Map({ v: 0 }),
+     *   Map({ v: 2 })
+     * ])
+     * const groupsOfMaps = listOfMaps.groupBy(x => x.get('v'))
+     * // Map {
+     * //   0: List [ Map{ "v": 0 }, Map { "v": 0 } ],
+     * //   1: List [ Map{ "v": 1 }, Map { "v": 1 } ],
+     * //   2: List [ Map{ "v": 2 } ],
+     * // }
+     * ```
+     */
+    groupBy<G>(
+      grouper: (value: V, key: K, iter: this) => G,
+      context?: unknown
+    ): Map<G, this>;
+
+    // Side effects
+
+    /**
+     * The `sideEffect` is executed for every entry in the Collection.
+     *
+     * Unlike `Array#forEach`, if any call of `sideEffect` returns
+     * `false`, the iteration will stop. Returns the number of entries iterated
+     * (including the last iteration which returned false).
+     */
+    forEach(
+      sideEffect: (value: V, key: K, iter: this) => unknown,
+      context?: unknown
+    ): number;
+
+    // Creating subsets
+
+    /**
+     * Returns a new Collection of the same type representing a portion of this
+     * Collection from start up to but not including end.
+     *
+     * If begin is negative, it is offset from the end of the Collection. e.g.
+     * `slice(-2)` returns a Collection of the last two entries. If it is not
+     * provided the new Collection will begin at the beginning of this Collection.
+     *
+     * If end is negative, it is offset from the end of the Collection. e.g.
+     * `slice(0, -1)` returns a Collection of everything but the last entry. If
+     * it is not provided, the new Collection will continue through the end of
+     * this Collection.
+     *
+     * If the requested slice is equivalent to the current Collection, then it
+     * will return itself.
+     */
+    slice(begin?: number, end?: number): this;
+
+    /**
+     * Returns a new Collection of the same type containing all entries except
+     * the first.
+     */
+    rest(): this;
+
+    /**
+     * Returns a new Collection of the same type containing all entries except
+     * the last.
+     */
+    butLast(): this;
+
+    /**
+     * Returns a new Collection of the same type which excludes the first `amount`
+     * entries from this Collection.
+     */
+    skip(amount: number): this;
+
+    /**
+     * Returns a new Collection of the same type which excludes the last `amount`
+     * entries from this Collection.
+     */
+    skipLast(amount: number): this;
+
+    /**
+     * Returns a new Collection of the same type which includes entries starting
+     * from when `predicate` first returns false.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * List([ 'dog', 'frog', 'cat', 'hat', 'god' ])
+     *   .skipWhile(x => x.match(/g/))
+     * // List [ "cat", "hat", "god" ]
+     * ```
+     */
+    skipWhile(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Collection of the same type which includes entries starting
+     * from when `predicate` first returns true.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * List([ 'dog', 'frog', 'cat', 'hat', 'god' ])
+     *   .skipUntil(x => x.match(/hat/))
+     * // List [ "hat", "god" ]
+     * ```
+     */
+    skipUntil(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Collection of the same type which includes the first `amount`
+     * entries from this Collection.
+     */
+    take(amount: number): this;
+
+    /**
+     * Returns a new Collection of the same type which includes the last `amount`
+     * entries from this Collection.
+     */
+    takeLast(amount: number): this;
+
+    /**
+     * Returns a new Collection of the same type which includes entries from this
+     * Collection as long as the `predicate` returns true.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * List([ 'dog', 'frog', 'cat', 'hat', 'god' ])
+     *   .takeWhile(x => x.match(/o/))
+     * // List [ "dog", "frog" ]
+     * ```
+     */
+    takeWhile(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): this;
+
+    /**
+     * Returns a new Collection of the same type which includes entries from this
+     * Collection as long as the `predicate` returns false.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List } = require('immutable')
+     * List([ 'dog', 'frog', 'cat', 'hat', 'god' ])
+     *   .takeUntil(x => x.match(/at/))
+     * // List [ "dog", "frog" ]
+     * ```
+     */
+    takeUntil(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): this;
+
+    // Combination
+
+    /**
+     * Returns a new Collection of the same type with other values and
+     * collection-like concatenated to this one.
+     *
+     * For Seqs, all entries will be present in the resulting Seq, even if they
+     * have the same key.
+     */
+    concat(
+      ...valuesOrCollections: Array<unknown>
+    ): Collection<unknown, unknown>;
+
+    /**
+     * Flattens nested Collections.
+     *
+     * Will deeply flatten the Collection by default, returning a Collection of the
+     * same type, but a `depth` can be provided in the form of a number or
+     * boolean (where true means to shallowly flatten one level). A depth of 0
+     * (or shallow: false) will deeply flatten.
+     *
+     * Flattens only others Collection, not Arrays or Objects.
+     *
+     * Note: `flatten(true)` operates on Collection<unknown, Collection<K, V>> and
+     * returns Collection<K, V>
+     */
+    flatten(depth?: number): Collection<unknown, unknown>;
+    // tslint:disable-next-line unified-signatures
+    flatten(shallow?: boolean): Collection<unknown, unknown>;
+
+    /**
+     * Flat-maps the Collection, returning a Collection of the same type.
+     *
+     * Similar to `collection.map(...).flatten(true)`.
+     */
+    flatMap<M>(
+      mapper: (value: V, key: K, iter: this) => Iterable<M>,
+      context?: unknown
+    ): Collection<K, M>;
+
+    /**
+     * Flat-maps the Collection, returning a Collection of the same type.
+     *
+     * Similar to `collection.map(...).flatten(true)`.
+     * Used for Dictionaries only.
+     */
+    flatMap<KM, VM>(
+      mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+      context?: unknown
+    ): Collection<KM, VM>;
+
+    // Reducing a value
+
+    /**
+     * Reduces the Collection to a value by calling the `reducer` for every entry
+     * in the Collection and passing along the reduced value.
+     *
+     * If `initialReduction` is not provided, the first item in the
+     * Collection will be used.
+     *
+     * @see `Array#reduce`.
+     */
+    reduce<R>(
+      reducer: (reduction: R, value: V, key: K, iter: this) => R,
+      initialReduction: R,
+      context?: unknown
+    ): R;
+    reduce<R>(
+      reducer: (reduction: V | R, value: V, key: K, iter: this) => R
+    ): R;
+
+    /**
+     * Reduces the Collection in reverse (from the right side).
+     *
+     * Note: Similar to this.reverse().reduce(), and provided for parity
+     * with `Array#reduceRight`.
+     */
+    reduceRight<R>(
+      reducer: (reduction: R, value: V, key: K, iter: this) => R,
+      initialReduction: R,
+      context?: unknown
+    ): R;
+    reduceRight<R>(
+      reducer: (reduction: V | R, value: V, key: K, iter: this) => R
+    ): R;
+
+    /**
+     * True if `predicate` returns true for all entries in the Collection.
+     */
+    every(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): boolean;
+
+    /**
+     * True if `predicate` returns true for any entry in the Collection.
+     */
+    some(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): boolean;
+
+    /**
+     * Joins values together as a string, inserting a separator between each.
+     * The default separator is `","`.
+     */
+    join(separator?: string): string;
+
+    /**
+     * Returns true if this Collection includes no values.
+     *
+     * For some lazy `Seq`, `isEmpty` might need to iterate to determine
+     * emptiness. At most one iteration will occur.
+     */
+    isEmpty(): boolean;
+
+    /**
+     * Returns the size of this Collection.
+     *
+     * Regardless of if this Collection can describe its size lazily (some Seqs
+     * cannot), this method will always return the correct size. E.g. it
+     * evaluates a lazy `Seq` if necessary.
+     *
+     * If `predicate` is provided, then this returns the count of entries in the
+     * Collection for which the `predicate` returns true.
+     */
+    count(): number;
+    count(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): number;
+
+    /**
+     * Returns a `Seq.Keyed` of counts, grouped by the return value of
+     * the `grouper` function.
+     *
+     * Note: This is not a lazy operation.
+     */
+    countBy<G>(
+      grouper: (value: V, key: K, iter: this) => G,
+      context?: unknown
+    ): Map<G, number>;
+
+    // Search for value
+
+    /**
+     * Returns the first value for which the `predicate` returns true.
+     */
+    find(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown,
+      notSetValue?: V
+    ): V | undefined;
+
+    /**
+     * Returns the last value for which the `predicate` returns true.
+     *
+     * Note: `predicate` will be called for each entry in reverse.
+     */
+    findLast(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown,
+      notSetValue?: V
+    ): V | undefined;
+
+    /**
+     * Returns the first [key, value] entry for which the `predicate` returns true.
+     */
+    findEntry(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown,
+      notSetValue?: V
+    ): [K, V] | undefined;
+
+    /**
+     * Returns the last [key, value] entry for which the `predicate`
+     * returns true.
+     *
+     * Note: `predicate` will be called for each entry in reverse.
+     */
+    findLastEntry(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown,
+      notSetValue?: V
+    ): [K, V] | undefined;
+
+    /**
+     * Returns the key for which the `predicate` returns true.
+     */
+    findKey(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): K | undefined;
+
+    /**
+     * Returns the last key for which the `predicate` returns true.
+     *
+     * Note: `predicate` will be called for each entry in reverse.
+     */
+    findLastKey(
+      predicate: (value: V, key: K, iter: this) => boolean,
+      context?: unknown
+    ): K | undefined;
+
+    /**
+     * Returns the key associated with the search value, or undefined.
+     */
+    keyOf(searchValue: V): K | undefined;
+
+    /**
+     * Returns the last key associated with the search value, or undefined.
+     */
+    lastKeyOf(searchValue: V): K | undefined;
+
+    /**
+     * Returns the maximum value in this collection. If any values are
+     * comparatively equivalent, the first one found will be returned.
+     *
+     * The `comparator` is used in the same way as `Collection#sort`. If it is not
+     * provided, the default comparator is `>`.
+     *
+     * When two values are considered equivalent, the first encountered will be
+     * returned. Otherwise, `max` will operate independent of the order of input
+     * as long as the comparator is commutative. The default comparator `>` is
+     * commutative *only* when types do not differ.
+     *
+     * If `comparator` returns 0 and either value is NaN, undefined, or null,
+     * that value will be returned.
+     */
+    max(comparator?: Comparator<V>): V | undefined;
+
+    /**
+     * Like `max`, but also accepts a `comparatorValueMapper` which allows for
+     * comparing by more sophisticated means:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List, } = require('immutable');
+     * const l = List([
+     *   { name: 'Bob', avgHit: 1 },
+     *   { name: 'Max', avgHit: 3 },
+     *   { name: 'Lili', avgHit: 2 } ,
+     * ]);
+     * l.maxBy(i => i.avgHit); // will output { name: 'Max', avgHit: 3 }
+     * ```
+     */
+    maxBy<C>(
+      comparatorValueMapper: (value: V, key: K, iter: this) => C,
+      comparator?: Comparator<C>
+    ): V | undefined;
+
+    /**
+     * Returns the minimum value in this collection. If any values are
+     * comparatively equivalent, the first one found will be returned.
+     *
+     * The `comparator` is used in the same way as `Collection#sort`. If it is not
+     * provided, the default comparator is `<`.
+     *
+     * When two values are considered equivalent, the first encountered will be
+     * returned. Otherwise, `min` will operate independent of the order of input
+     * as long as the comparator is commutative. The default comparator `<` is
+     * commutative *only* when types do not differ.
+     *
+     * If `comparator` returns 0 and either value is NaN, undefined, or null,
+     * that value will be returned.
+     */
+    min(comparator?: Comparator<V>): V | undefined;
+
+    /**
+     * Like `min`, but also accepts a `comparatorValueMapper` which allows for
+     * comparing by more sophisticated means:
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List, } = require('immutable');
+     * const l = List([
+     *   { name: 'Bob', avgHit: 1 },
+     *   { name: 'Max', avgHit: 3 },
+     *   { name: 'Lili', avgHit: 2 } ,
+     * ]);
+     * l.minBy(i => i.avgHit); // will output { name: 'Bob', avgHit: 1 }
+     * ```
+     */
+    minBy<C>(
+      comparatorValueMapper: (value: V, key: K, iter: this) => C,
+      comparator?: Comparator<C>
+    ): V | undefined;
+
+    // Comparison
+
+    /**
+     * True if `iter` includes every value in this Collection.
+     */
+    isSubset(iter: Iterable<V>): boolean;
+
+    /**
+     * True if this Collection includes every value in `iter`.
+     */
+    isSuperset(iter: Iterable<V>): boolean;
+  }
+
+  /**
+   * The interface to fulfill to qualify as a Value Object.
+   */
+  interface ValueObject {
+    /**
+     * True if this and the other Collection have value equality, as defined
+     * by `Immutable.is()`.
+     *
+     * Note: This is equivalent to `Immutable.is(this, other)`, but provided to
+     * allow for chained expressions.
+     */
+    equals(other: unknown): boolean;
+
+    /**
+     * Computes and returns the hashed identity for this Collection.
+     *
+     * The `hashCode` of a Collection is used to determine potential equality,
+     * and is used when adding this to a `Set` or as a key in a `Map`, enabling
+     * lookup via a different instance.
+     *
+     * <!-- runkit:activate -->
+     * ```js
+     * const { List, Set } = require('immutable');
+     * const a = List([ 1, 2, 3 ]);
+     * const b = List([ 1, 2, 3 ]);
+     * assert.notStrictEqual(a, b); // different instances
+     * const set = Set([ a ]);
+     * assert.equal(set.has(b), true);
+     * ```
+     *
+     * Note: hashCode() MUST return a Uint32 number. The easiest way to
+     * guarantee this is to return `myHash | 0` from a custom implementation.
+     *
+     * If two values have the same `hashCode`, they are [not guaranteed
+     * to be equal][Hash Collision]. If two values have different `hashCode`s,
+     * they must not be equal.
+     *
+     * Note: `hashCode()` is not guaranteed to always be called before
+     * `equals()`. Most but not all Immutable.js collections use hash codes to
+     * organize their internal data structures, while all Immutable.js
+     * collections use equality during lookups.
+     *
+     * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science)
+     */
+    hashCode(): number;
+  }
+
+  /**
+   * Deeply converts plain JS objects and arrays to Immutable Maps and Lists.
+   *
+   * `fromJS` will convert Arrays and [array-like objects][2] to a List, and
+   * plain objects (without a custom prototype) to a Map. [Iterable objects][3]
+   * may be converted to List, Map, or Set.
+   *
+   * If a `reviver` is optionally provided, it will be called with every
+   * collection as a Seq (beginning with the most nested collections
+   * and proceeding to the top-level collection itself), along with the key
+   * referring to each collection and the parent JS object provided as `this`.
+   * For the top level, object, the key will be `""`. This `reviver` is expected
+   * to return a new Immutable Collection, allowing for custom conversions from
+   * deep JS objects. Finally, a `path` is provided which is the sequence of
+   * keys to this value from the starting value.
+   *
+   * `reviver` acts similarly to the [same parameter in `JSON.parse`][1].
+   *
+   * If `reviver` is not provided, the default behavior will convert Objects
+   * into Maps and Arrays into Lists like so:
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { fromJS, isKeyed } = require('immutable')
+   * function (key, value) {
+   *   return isKeyed(value) ? value.toMap() : value.toList()
+   * }
+   * ```
+   *
+   * Accordingly, this example converts native JS data to OrderedMap and List:
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { fromJS, isKeyed } = require('immutable')
+   * fromJS({ a: {b: [10, 20, 30]}, c: 40}, function (key, value, path) {
+   *   console.log(key, value, path)
+   *   return isKeyed(value) ? value.toOrderedMap() : value.toList()
+   * })
+   *
+   * > "b", [ 10, 20, 30 ], [ "a", "b" ]
+   * > "a", {b: [10, 20, 30]}, [ "a" ]
+   * > "", {a: {b: [10, 20, 30]}, c: 40}, []
+   * ```
+   *
+   * Keep in mind, when using JS objects to construct Immutable Maps, that
+   * JavaScript Object properties are always strings, even if written in a
+   * quote-less shorthand, while Immutable Maps accept keys of any type.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Map } = require('immutable')
+   * let obj = { 1: "one" };
+   * Object.keys(obj); // [ "1" ]
+   * assert.equal(obj["1"], obj[1]); // "one" === "one"
+   *
+   * let map = Map(obj);
+   * assert.notEqual(map.get("1"), map.get(1)); // "one" !== undefined
+   * ```
+   *
+   * Property access for JavaScript Objects first converts the key to a string,
+   * but since Immutable Map keys can be of any type the argument to `get()` is
+   * not altered.
+   *
+   * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter
+   *      "Using the reviver parameter"
+   * [2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects
+   *      "Working with array-like objects"
+   * [3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol
+   *      "The iterable protocol"
+   */
+  function fromJS<JSValue>(
+    jsValue: JSValue,
+    reviver?: undefined
+  ): FromJS<JSValue>;
+  function fromJS(
+    jsValue: unknown,
+    reviver?: (
+      key: string | number,
+      sequence: Collection.Keyed<string, unknown> | Collection.Indexed<unknown>,
+      path?: Array<string | number>
+    ) => unknown
+  ): Collection<unknown, unknown>;
+
+  type FromJS<JSValue> = JSValue extends FromJSNoTransform
+    ? JSValue
+    : JSValue extends Array<any>
+    ? FromJSArray<JSValue>
+    : JSValue extends {}
+    ? FromJSObject<JSValue>
+    : any;
+
+  type FromJSNoTransform =
+    | Collection<any, any>
+    | number
+    | string
+    | null
+    | undefined;
+
+  type FromJSArray<JSValue> = JSValue extends Array<infer T>
+    ? List<FromJS<T>>
+    : never;
+
+  type FromJSObject<JSValue> = JSValue extends {}
+    ? Map<keyof JSValue, FromJS<JSValue[keyof JSValue]>>
+    : never;
+
+  /**
+   * Value equality check with semantics similar to `Object.is`, but treats
+   * Immutable `Collection`s as values, equal if the second `Collection` includes
+   * equivalent values.
+   *
+   * It's used throughout Immutable when checking for equality, including `Map`
+   * key equality and `Set` membership.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { Map, is } = require('immutable')
+   * const map1 = Map({ a: 1, b: 1, c: 1 })
+   * const map2 = Map({ a: 1, b: 1, c: 1 })
+   * assert.equal(map1 !== map2, true)
+   * assert.equal(Object.is(map1, map2), false)
+   * assert.equal(is(map1, map2), true)
+   * ```
+   *
+   * `is()` compares primitive types like strings and numbers, Immutable.js
+   * collections like `Map` and `List`, but also any custom object which
+   * implements `ValueObject` by providing `equals()` and `hashCode()` methods.
+   *
+   * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same
+   * value, matching the behavior of ES6 Map key equality.
+   */
+  function is(first: unknown, second: unknown): boolean;
+
+  /**
+   * The `hash()` function is an important part of how Immutable determines if
+   * two values are equivalent and is used to determine how to store those
+   * values. Provided with any value, `hash()` will return a 31-bit integer.
+   *
+   * When designing Objects which may be equal, it's important that when a
+   * `.equals()` method returns true, that both values `.hashCode()` method
+   * return the same value. `hash()` may be used to produce those values.
+   *
+   * For non-Immutable Objects that do not provide a `.hashCode()` functions
+   * (including plain Objects, plain Arrays, Date objects, etc), a unique hash
+   * value will be created for each *instance*. That is, the create hash
+   * represents referential equality, and not value equality for Objects. This
+   * ensures that if that Object is mutated over time that its hash code will
+   * remain consistent, allowing Objects to be used as keys and values in
+   * Immutable.js collections.
+   *
+   * Note that `hash()` attempts to balance between speed and avoiding
+   * collisions, however it makes no attempt to produce secure hashes.
+   *
+   * *New in Version 4.0*
+   */
+  function hash(value: unknown): number;
+
+  /**
+   * True if `maybeImmutable` is an Immutable Collection or Record.
+   *
+   * Note: Still returns true even if the collections is within a `withMutations()`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isImmutable, Map, List, Stack } = require('immutable');
+   * isImmutable([]); // false
+   * isImmutable({}); // false
+   * isImmutable(Map()); // true
+   * isImmutable(List()); // true
+   * isImmutable(Stack()); // true
+   * isImmutable(Map().asMutable()); // true
+   * ```
+   */
+  function isImmutable(
+    maybeImmutable: unknown
+  ): maybeImmutable is Collection<unknown, unknown>;
+
+  /**
+   * True if `maybeCollection` is a Collection, or any of its subclasses.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isCollection, Map, List, Stack } = require('immutable');
+   * isCollection([]); // false
+   * isCollection({}); // false
+   * isCollection(Map()); // true
+   * isCollection(List()); // true
+   * isCollection(Stack()); // true
+   * ```
+   */
+  function isCollection(
+    maybeCollection: unknown
+  ): maybeCollection is Collection<unknown, unknown>;
+
+  /**
+   * True if `maybeKeyed` is a Collection.Keyed, or any of its subclasses.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isKeyed, Map, List, Stack } = require('immutable');
+   * isKeyed([]); // false
+   * isKeyed({}); // false
+   * isKeyed(Map()); // true
+   * isKeyed(List()); // false
+   * isKeyed(Stack()); // false
+   * ```
+   */
+  function isKeyed(
+    maybeKeyed: unknown
+  ): maybeKeyed is Collection.Keyed<unknown, unknown>;
+
+  /**
+   * True if `maybeIndexed` is a Collection.Indexed, or any of its subclasses.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isIndexed, Map, List, Stack, Set } = require('immutable');
+   * isIndexed([]); // false
+   * isIndexed({}); // false
+   * isIndexed(Map()); // false
+   * isIndexed(List()); // true
+   * isIndexed(Stack()); // true
+   * isIndexed(Set()); // false
+   * ```
+   */
+  function isIndexed(
+    maybeIndexed: unknown
+  ): maybeIndexed is Collection.Indexed<unknown>;
+
+  /**
+   * True if `maybeAssociative` is either a Keyed or Indexed Collection.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isAssociative, Map, List, Stack, Set } = require('immutable');
+   * isAssociative([]); // false
+   * isAssociative({}); // false
+   * isAssociative(Map()); // true
+   * isAssociative(List()); // true
+   * isAssociative(Stack()); // true
+   * isAssociative(Set()); // false
+   * ```
+   */
+  function isAssociative(
+    maybeAssociative: unknown
+  ): maybeAssociative is
+    | Collection.Keyed<unknown, unknown>
+    | Collection.Indexed<unknown>;
+
+  /**
+   * True if `maybeOrdered` is a Collection where iteration order is well
+   * defined. True for Collection.Indexed as well as OrderedMap and OrderedSet.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { isOrdered, Map, OrderedMap, List, Set } = require('immutable');
+   * isOrdered([]); // false
+   * isOrdered({}); // false
+   * isOrdered(Map()); // false
+   * isOrdered(OrderedMap()); // true
+   * isOrdered(List()); // true
+   * isOrdered(Set()); // false
+   * ```
+   */
+  function isOrdered(maybeOrdered: unknown): boolean;
+
+  /**
+   * True if `maybeValue` is a JavaScript Object which has *both* `equals()`
+   * and `hashCode()` methods.
+   *
+   * Any two instances of *value objects* can be compared for value equality with
+   * `Immutable.is()` and can be used as keys in a `Map` or members in a `Set`.
+   */
+  function isValueObject(maybeValue: unknown): maybeValue is ValueObject;
+
+  /**
+   * True if `maybeSeq` is a Seq.
+   */
+  function isSeq(
+    maybeSeq: unknown
+  ): maybeSeq is
+    | Seq.Indexed<unknown>
+    | Seq.Keyed<unknown, unknown>
+    | Seq.Set<unknown>;
+
+  /**
+   * True if `maybeList` is a List.
+   */
+  function isList(maybeList: unknown): maybeList is List<unknown>;
+
+  /**
+   * True if `maybeMap` is a Map.
+   *
+   * Also true for OrderedMaps.
+   */
+  function isMap(maybeMap: unknown): maybeMap is Map<unknown, unknown>;
+
+  /**
+   * True if `maybeOrderedMap` is an OrderedMap.
+   */
+  function isOrderedMap(
+    maybeOrderedMap: unknown
+  ): maybeOrderedMap is OrderedMap<unknown, unknown>;
+
+  /**
+   * True if `maybeStack` is a Stack.
+   */
+  function isStack(maybeStack: unknown): maybeStack is Stack<unknown>;
+
+  /**
+   * True if `maybeSet` is a Set.
+   *
+   * Also true for OrderedSets.
+   */
+  function isSet(maybeSet: unknown): maybeSet is Set<unknown>;
+
+  /**
+   * True if `maybeOrderedSet` is an OrderedSet.
+   */
+  function isOrderedSet(
+    maybeOrderedSet: unknown
+  ): maybeOrderedSet is OrderedSet<unknown>;
+
+  /**
+   * True if `maybeRecord` is a Record.
+   */
+  function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>;
+
+  /**
+   * Returns the value within the provided collection associated with the
+   * provided key, or notSetValue if the key is not defined in the collection.
+   *
+   * A functional alternative to `collection.get(key)` which will also work on
+   * plain Objects and Arrays as an alternative for `collection[key]`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { get } = require('immutable')
+   * get([ 'dog', 'frog', 'cat' ], 2) // 'frog'
+   * get({ x: 123, y: 456 }, 'x') // 123
+   * get({ x: 123, y: 456 }, 'z', 'ifNotSet') // 'ifNotSet'
+   * ```
+   */
+  function get<K, V>(collection: Collection<K, V>, key: K): V | undefined;
+  function get<K, V, NSV>(
+    collection: Collection<K, V>,
+    key: K,
+    notSetValue: NSV
+  ): V | NSV;
+  function get<TProps extends object, K extends keyof TProps>(
+    record: Record<TProps>,
+    key: K,
+    notSetValue: unknown
+  ): TProps[K];
+  function get<V>(collection: Array<V>, key: number): V | undefined;
+  function get<V, NSV>(
+    collection: Array<V>,
+    key: number,
+    notSetValue: NSV
+  ): V | NSV;
+  function get<C extends object, K extends keyof C>(
+    object: C,
+    key: K,
+    notSetValue: unknown
+  ): C[K];
+  function get<V>(collection: { [key: string]: V }, key: string): V | undefined;
+  function get<V, NSV>(
+    collection: { [key: string]: V },
+    key: string,
+    notSetValue: NSV
+  ): V | NSV;
+
+  /**
+   * Returns true if the key is defined in the provided collection.
+   *
+   * A functional alternative to `collection.has(key)` which will also work with
+   * plain Objects and Arrays as an alternative for
+   * `collection.hasOwnProperty(key)`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { has } = require('immutable')
+   * has([ 'dog', 'frog', 'cat' ], 2) // true
+   * has([ 'dog', 'frog', 'cat' ], 5) // false
+   * has({ x: 123, y: 456 }, 'x') // true
+   * has({ x: 123, y: 456 }, 'z') // false
+   * ```
+   */
+  function has(collection: object, key: unknown): boolean;
+
+  /**
+   * Returns a copy of the collection with the value at key removed.
+   *
+   * A functional alternative to `collection.remove(key)` which will also work
+   * with plain Objects and Arrays as an alternative for
+   * `delete collectionCopy[key]`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { remove } = require('immutable')
+   * const originalArray = [ 'dog', 'frog', 'cat' ]
+   * remove(originalArray, 1) // [ 'dog', 'cat' ]
+   * console.log(originalArray) // [ 'dog', 'frog', 'cat' ]
+   * const originalObject = { x: 123, y: 456 }
+   * remove(originalObject, 'x') // { y: 456 }
+   * console.log(originalObject) // { x: 123, y: 456 }
+   * ```
+   */
+  function remove<K, C extends Collection<K, unknown>>(
+    collection: C,
+    key: K
+  ): C;
+  function remove<
+    TProps extends object,
+    C extends Record<TProps>,
+    K extends keyof TProps
+  >(collection: C, key: K): C;
+  function remove<C extends Array<unknown>>(collection: C, key: number): C;
+  function remove<C, K extends keyof C>(collection: C, key: K): C;
+  function remove<C extends { [key: string]: unknown }, K extends keyof C>(
+    collection: C,
+    key: K
+  ): C;
+
+  /**
+   * Returns a copy of the collection with the value at key set to the provided
+   * value.
+   *
+   * A functional alternative to `collection.set(key, value)` which will also
+   * work with plain Objects and Arrays as an alternative for
+   * `collectionCopy[key] = value`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { set } = require('immutable')
+   * const originalArray = [ 'dog', 'frog', 'cat' ]
+   * set(originalArray, 1, 'cow') // [ 'dog', 'cow', 'cat' ]
+   * console.log(originalArray) // [ 'dog', 'frog', 'cat' ]
+   * const originalObject = { x: 123, y: 456 }
+   * set(originalObject, 'x', 789) // { x: 789, y: 456 }
+   * console.log(originalObject) // { x: 123, y: 456 }
+   * ```
+   */
+  function set<K, V, C extends Collection<K, V>>(
+    collection: C,
+    key: K,
+    value: V
+  ): C;
+  function set<
+    TProps extends object,
+    C extends Record<TProps>,
+    K extends keyof TProps
+  >(record: C, key: K, value: TProps[K]): C;
+  function set<V, C extends Array<V>>(collection: C, key: number, value: V): C;
+  function set<C, K extends keyof C>(object: C, key: K, value: C[K]): C;
+  function set<V, C extends { [key: string]: V }>(
+    collection: C,
+    key: string,
+    value: V
+  ): C;
+
+  /**
+   * Returns a copy of the collection with the value at key set to the result of
+   * providing the existing value to the updating function.
+   *
+   * A functional alternative to `collection.update(key, fn)` which will also
+   * work with plain Objects and Arrays as an alternative for
+   * `collectionCopy[key] = fn(collection[key])`.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { update } = require('immutable')
+   * const originalArray = [ 'dog', 'frog', 'cat' ]
+   * update(originalArray, 1, val => val.toUpperCase()) // [ 'dog', 'FROG', 'cat' ]
+   * console.log(originalArray) // [ 'dog', 'frog', 'cat' ]
+   * const originalObject = { x: 123, y: 456 }
+   * update(originalObject, 'x', val => val * 6) // { x: 738, y: 456 }
+   * console.log(originalObject) // { x: 123, y: 456 }
+   * ```
+   */
+  function update<K, V, C extends Collection<K, V>>(
+    collection: C,
+    key: K,
+    updater: (value: V | undefined) => V | undefined
+  ): C;
+  function update<K, V, C extends Collection<K, V>, NSV>(
+    collection: C,
+    key: K,
+    notSetValue: NSV,
+    updater: (value: V | NSV) => V
+  ): C;
+  function update<
+    TProps extends object,
+    C extends Record<TProps>,
+    K extends keyof TProps
+  >(record: C, key: K, updater: (value: TProps[K]) => TProps[K]): C;
+  function update<
+    TProps extends object,
+    C extends Record<TProps>,
+    K extends keyof TProps,
+    NSV
+  >(
+    record: C,
+    key: K,
+    notSetValue: NSV,
+    updater: (value: TProps[K] | NSV) => TProps[K]
+  ): C;
+  function update<V>(
+    collection: Array<V>,
+    key: number,
+    updater: (value: V | undefined) => V | undefined
+  ): Array<V>;
+  function update<V, NSV>(
+    collection: Array<V>,
+    key: number,
+    notSetValue: NSV,
+    updater: (value: V | NSV) => V
+  ): Array<V>;
+  function update<C, K extends keyof C>(
+    object: C,
+    key: K,
+    updater: (value: C[K]) => C[K]
+  ): C;
+  function update<C, K extends keyof C, NSV>(
+    object: C,
+    key: K,
+    notSetValue: NSV,
+    updater: (value: C[K] | NSV) => C[K]
+  ): C;
+  function update<V, C extends { [key: string]: V }, K extends keyof C>(
+    collection: C,
+    key: K,
+    updater: (value: V) => V
+  ): { [key: string]: V };
+  function update<V, C extends { [key: string]: V }, K extends keyof C, NSV>(
+    collection: C,
+    key: K,
+    notSetValue: NSV,
+    updater: (value: V | NSV) => V
+  ): { [key: string]: V };
+
+  /**
+   * Returns the value at the provided key path starting at the provided
+   * collection, or notSetValue if the key path is not defined.
+   *
+   * A functional alternative to `collection.getIn(keypath)` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { getIn } = require('immutable')
+   * getIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // 123
+   * getIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p'], 'ifNotSet') // 'ifNotSet'
+   * ```
+   */
+  function getIn(
+    collection: unknown,
+    keyPath: Iterable<unknown>,
+    notSetValue?: unknown
+  ): unknown;
+
+  /**
+   * Returns true if the key path is defined in the provided collection.
+   *
+   * A functional alternative to `collection.hasIn(keypath)` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { hasIn } = require('immutable')
+   * hasIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // true
+   * hasIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p']) // false
+   * ```
+   */
+  function hasIn(collection: unknown, keyPath: Iterable<unknown>): boolean;
+
+  /**
+   * Returns a copy of the collection with the value at the key path removed.
+   *
+   * A functional alternative to `collection.removeIn(keypath)` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { removeIn } = require('immutable')
+   * const original = { x: { y: { z: 123 }}}
+   * removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}}
+   * console.log(original) // { x: { y: { z: 123 }}}
+   * ```
+   */
+  function removeIn<C>(collection: C, keyPath: Iterable<unknown>): C;
+
+  /**
+   * Returns a copy of the collection with the value at the key path set to the
+   * provided value.
+   *
+   * A functional alternative to `collection.setIn(keypath)` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { setIn } = require('immutable')
+   * const original = { x: { y: { z: 123 }}}
+   * setIn(original, ['x', 'y', 'z'], 456) // { x: { y: { z: 456 }}}
+   * console.log(original) // { x: { y: { z: 123 }}}
+   * ```
+   */
+  function setIn<C>(
+    collection: C,
+    keyPath: Iterable<unknown>,
+    value: unknown
+  ): C;
+
+  /**
+   * Returns a copy of the collection with the value at key path set to the
+   * result of providing the existing value to the updating function.
+   *
+   * A functional alternative to `collection.updateIn(keypath)` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { updateIn } = require('immutable')
+   * const original = { x: { y: { z: 123 }}}
+   * updateIn(original, ['x', 'y', 'z'], val => val * 6) // { x: { y: { z: 738 }}}
+   * console.log(original) // { x: { y: { z: 123 }}}
+   * ```
+   */
+  function updateIn<C>(
+    collection: C,
+    keyPath: Iterable<unknown>,
+    updater: (value: unknown) => unknown
+  ): C;
+  function updateIn<C>(
+    collection: C,
+    keyPath: Iterable<unknown>,
+    notSetValue: unknown,
+    updater: (value: unknown) => unknown
+  ): C;
+
+  /**
+   * Returns a copy of the collection with the remaining collections merged in.
+   *
+   * A functional alternative to `collection.merge()` which will also work with
+   * plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { merge } = require('immutable')
+   * const original = { x: 123, y: 456 }
+   * merge(original, { y: 789, z: 'abc' }) // { x: 123, y: 789, z: 'abc' }
+   * console.log(original) // { x: 123, y: 456 }
+   * ```
+   */
+  function merge<C>(
+    collection: C,
+    ...collections: Array<
+      | Iterable<unknown>
+      | Iterable<[unknown, unknown]>
+      | { [key: string]: unknown }
+    >
+  ): C;
+
+  /**
+   * Returns a copy of the collection with the remaining collections merged in,
+   * calling the `merger` function whenever an existing value is encountered.
+   *
+   * A functional alternative to `collection.mergeWith()` which will also work
+   * with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { mergeWith } = require('immutable')
+   * const original = { x: 123, y: 456 }
+   * mergeWith(
+   *   (oldVal, newVal) => oldVal + newVal,
+   *   original,
+   *   { y: 789, z: 'abc' }
+   * ) // { x: 123, y: 1245, z: 'abc' }
+   * console.log(original) // { x: 123, y: 456 }
+   * ```
+   */
+  function mergeWith<C>(
+    merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown,
+    collection: C,
+    ...collections: Array<
+      | Iterable<unknown>
+      | Iterable<[unknown, unknown]>
+      | { [key: string]: unknown }
+    >
+  ): C;
+
+  /**
+   * Like `merge()`, but when two compatible collections are encountered with
+   * the same key, it merges them as well, recursing deeply through the nested
+   * data. Two collections are considered to be compatible (and thus will be
+   * merged together) if they both fall into one of three categories: keyed
+   * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and
+   * arrays), or set-like (e.g., `Set`s). If they fall into separate
+   * categories, `mergeDeep` will replace the existing collection with the
+   * collection being merged in. This behavior can be customized by using
+   * `mergeDeepWith()`.
+   *
+   * Note: Indexed and set-like collections are merged using
+   * `concat()`/`union()` and therefore do not recurse.
+   *
+   * A functional alternative to `collection.mergeDeep()` which will also work
+   * with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { mergeDeep } = require('immutable')
+   * const original = { x: { y: 123 }}
+   * mergeDeep(original, { x: { z: 456 }}) // { x: { y: 123, z: 456 }}
+   * console.log(original) // { x: { y: 123 }}
+   * ```
+   */
+  function mergeDeep<C>(
+    collection: C,
+    ...collections: Array<
+      | Iterable<unknown>
+      | Iterable<[unknown, unknown]>
+      | { [key: string]: unknown }
+    >
+  ): C;
+
+  /**
+   * Like `mergeDeep()`, but when two non-collections or incompatible
+   * collections are encountered at the same key, it uses the `merger` function
+   * to determine the resulting value. Collections are considered incompatible
+   * if they fall into separate categories between keyed, indexed, and set-like.
+   *
+   * A functional alternative to `collection.mergeDeepWith()` which will also
+   * work with plain Objects and Arrays.
+   *
+   * <!-- runkit:activate -->
+   * ```js
+   * const { mergeDeepWith } = require('immutable')
+   * const original = { x: { y: 123 }}
+   * mergeDeepWith(
+   *   (oldVal, newVal) => oldVal + newVal,
+   *   original,
+   *   { x: { y: 456 }}
+   * ) // { x: { y: 579 }}
+   * console.log(original) // { x: { y: 123 }}
+   * ```
+   */
+  function mergeDeepWith<C>(
+    merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown,
+    collection: C,
+    ...collections: Array<
+      | Iterable<unknown>
+      | Iterable<[unknown, unknown]>
+      | { [key: string]: unknown }
+    >
+  ): C;
+}
+
+/**
+ * Defines the main export of the immutable module to be the Immutable namespace
+ * This supports many common module import patterns:
+ *
+ *     const Immutable = require("immutable");
+ *     const { List } = require("immutable");
+ *     import Immutable from "immutable";
+ *     import * as Immutable from "immutable";
+ *     import { List } from "immutable";
+ *
+ */
+export = Immutable;
+
+/**
+ * A global "Immutable" namespace used by UMD modules which allows the use of
+ * the full Immutable API.
+ *
+ * If using Immutable as an imported module, prefer using:
+ *
+ *     import Immutable from 'immutable'
+ *
+ */
+export as namespace Immutable;

+ 5965 - 0
node_modules/immutable/dist/immutable.es.js

@@ -0,0 +1,5965 @@
+/**
+ * MIT License
+ * 
+ * Copyright (c) 2014-present, Lee Byron and other contributors.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+var DELETE = 'delete';
+
+// Constants describing the size of trie nodes.
+var SHIFT = 5; // Resulted in best performance after ______?
+var SIZE = 1 << SHIFT;
+var MASK = SIZE - 1;
+
+// A consistent shared value representing "not set" which equals nothing other
+// than itself, and nothing that could be provided externally.
+var NOT_SET = {};
+
+// Boolean references, Rough equivalent of `bool &`.
+function MakeRef() {
+  return { value: false };
+}
+
+function SetRef(ref) {
+  if (ref) {
+    ref.value = true;
+  }
+}
+
+// A function which returns a value representing an "owner" for transient writes
+// to tries. The return value will only ever equal itself, and will not equal
+// the return of any subsequent call of this function.
+function OwnerID() {}
+
+function ensureSize(iter) {
+  if (iter.size === undefined) {
+    iter.size = iter.__iterate(returnTrue);
+  }
+  return iter.size;
+}
+
+function wrapIndex(iter, index) {
+  // This implements "is array index" which the ECMAString spec defines as:
+  //
+  //     A String property name P is an array index if and only if
+  //     ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
+  //     to 2^32−1.
+  //
+  // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
+  if (typeof index !== 'number') {
+    var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
+    if ('' + uint32Index !== index || uint32Index === 4294967295) {
+      return NaN;
+    }
+    index = uint32Index;
+  }
+  return index < 0 ? ensureSize(iter) + index : index;
+}
+
+function returnTrue() {
+  return true;
+}
+
+function wholeSlice(begin, end, size) {
+  return (
+    ((begin === 0 && !isNeg(begin)) ||
+      (size !== undefined && begin <= -size)) &&
+    (end === undefined || (size !== undefined && end >= size))
+  );
+}
+
+function resolveBegin(begin, size) {
+  return resolveIndex(begin, size, 0);
+}
+
+function resolveEnd(end, size) {
+  return resolveIndex(end, size, size);
+}
+
+function resolveIndex(index, size, defaultIndex) {
+  // Sanitize indices using this shorthand for ToInt32(argument)
+  // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+  return index === undefined
+    ? defaultIndex
+    : isNeg(index)
+    ? size === Infinity
+      ? size
+      : Math.max(0, size + index) | 0
+    : size === undefined || size === index
+    ? index
+    : Math.min(size, index) | 0;
+}
+
+function isNeg(value) {
+  // Account for -0 which is negative, but not less than 0.
+  return value < 0 || (value === 0 && 1 / value === -Infinity);
+}
+
+var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';
+
+function isCollection(maybeCollection) {
+  return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);
+}
+
+var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';
+
+function isKeyed(maybeKeyed) {
+  return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);
+}
+
+var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';
+
+function isIndexed(maybeIndexed) {
+  return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);
+}
+
+function isAssociative(maybeAssociative) {
+  return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
+}
+
+var Collection = function Collection(value) {
+  return isCollection(value) ? value : Seq(value);
+};
+
+var KeyedCollection = /*@__PURE__*/(function (Collection) {
+  function KeyedCollection(value) {
+    return isKeyed(value) ? value : KeyedSeq(value);
+  }
+
+  if ( Collection ) KeyedCollection.__proto__ = Collection;
+  KeyedCollection.prototype = Object.create( Collection && Collection.prototype );
+  KeyedCollection.prototype.constructor = KeyedCollection;
+
+  return KeyedCollection;
+}(Collection));
+
+var IndexedCollection = /*@__PURE__*/(function (Collection) {
+  function IndexedCollection(value) {
+    return isIndexed(value) ? value : IndexedSeq(value);
+  }
+
+  if ( Collection ) IndexedCollection.__proto__ = Collection;
+  IndexedCollection.prototype = Object.create( Collection && Collection.prototype );
+  IndexedCollection.prototype.constructor = IndexedCollection;
+
+  return IndexedCollection;
+}(Collection));
+
+var SetCollection = /*@__PURE__*/(function (Collection) {
+  function SetCollection(value) {
+    return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);
+  }
+
+  if ( Collection ) SetCollection.__proto__ = Collection;
+  SetCollection.prototype = Object.create( Collection && Collection.prototype );
+  SetCollection.prototype.constructor = SetCollection;
+
+  return SetCollection;
+}(Collection));
+
+Collection.Keyed = KeyedCollection;
+Collection.Indexed = IndexedCollection;
+Collection.Set = SetCollection;
+
+var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';
+
+function isSeq(maybeSeq) {
+  return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);
+}
+
+var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';
+
+function isRecord(maybeRecord) {
+  return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);
+}
+
+function isImmutable(maybeImmutable) {
+  return isCollection(maybeImmutable) || isRecord(maybeImmutable);
+}
+
+var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';
+
+function isOrdered(maybeOrdered) {
+  return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);
+}
+
+var ITERATE_KEYS = 0;
+var ITERATE_VALUES = 1;
+var ITERATE_ENTRIES = 2;
+
+var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator';
+
+var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
+
+var Iterator = function Iterator(next) {
+  this.next = next;
+};
+
+Iterator.prototype.toString = function toString () {
+  return '[Iterator]';
+};
+
+Iterator.KEYS = ITERATE_KEYS;
+Iterator.VALUES = ITERATE_VALUES;
+Iterator.ENTRIES = ITERATE_ENTRIES;
+
+Iterator.prototype.inspect = Iterator.prototype.toSource = function () {
+  return this.toString();
+};
+Iterator.prototype[ITERATOR_SYMBOL] = function () {
+  return this;
+};
+
+function iteratorValue(type, k, v, iteratorResult) {
+  var value = type === 0 ? k : type === 1 ? v : [k, v];
+  iteratorResult
+    ? (iteratorResult.value = value)
+    : (iteratorResult = {
+        value: value,
+        done: false,
+      });
+  return iteratorResult;
+}
+
+function iteratorDone() {
+  return { value: undefined, done: true };
+}
+
+function hasIterator(maybeIterable) {
+  if (Array.isArray(maybeIterable)) {
+    // IE11 trick as it does not support `Symbol.iterator`
+    return true;
+  }
+
+  return !!getIteratorFn(maybeIterable);
+}
+
+function isIterator(maybeIterator) {
+  return maybeIterator && typeof maybeIterator.next === 'function';
+}
+
+function getIterator(iterable) {
+  var iteratorFn = getIteratorFn(iterable);
+  return iteratorFn && iteratorFn.call(iterable);
+}
+
+function getIteratorFn(iterable) {
+  var iteratorFn =
+    iterable &&
+    ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
+      iterable[FAUX_ITERATOR_SYMBOL]);
+  if (typeof iteratorFn === 'function') {
+    return iteratorFn;
+  }
+}
+
+function isEntriesIterable(maybeIterable) {
+  var iteratorFn = getIteratorFn(maybeIterable);
+  return iteratorFn && iteratorFn === maybeIterable.entries;
+}
+
+function isKeysIterable(maybeIterable) {
+  var iteratorFn = getIteratorFn(maybeIterable);
+  return iteratorFn && iteratorFn === maybeIterable.keys;
+}
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function isArrayLike(value) {
+  if (Array.isArray(value) || typeof value === 'string') {
+    return true;
+  }
+
+  return (
+    value &&
+    typeof value === 'object' &&
+    Number.isInteger(value.length) &&
+    value.length >= 0 &&
+    (value.length === 0
+      ? // Only {length: 0} is considered Array-like.
+        Object.keys(value).length === 1
+      : // An object is only Array-like if it has a property where the last value
+        // in the array-like may be found (which could be undefined).
+        value.hasOwnProperty(value.length - 1))
+  );
+}
+
+var Seq = /*@__PURE__*/(function (Collection) {
+  function Seq(value) {
+    return value === undefined || value === null
+      ? emptySequence()
+      : isImmutable(value)
+      ? value.toSeq()
+      : seqFromValue(value);
+  }
+
+  if ( Collection ) Seq.__proto__ = Collection;
+  Seq.prototype = Object.create( Collection && Collection.prototype );
+  Seq.prototype.constructor = Seq;
+
+  Seq.prototype.toSeq = function toSeq () {
+    return this;
+  };
+
+  Seq.prototype.toString = function toString () {
+    return this.__toString('Seq {', '}');
+  };
+
+  Seq.prototype.cacheResult = function cacheResult () {
+    if (!this._cache && this.__iterateUncached) {
+      this._cache = this.entrySeq().toArray();
+      this.size = this._cache.length;
+    }
+    return this;
+  };
+
+  // abstract __iterateUncached(fn, reverse)
+
+  Seq.prototype.__iterate = function __iterate (fn, reverse) {
+    var cache = this._cache;
+    if (cache) {
+      var size = cache.length;
+      var i = 0;
+      while (i !== size) {
+        var entry = cache[reverse ? size - ++i : i++];
+        if (fn(entry[1], entry[0], this) === false) {
+          break;
+        }
+      }
+      return i;
+    }
+    return this.__iterateUncached(fn, reverse);
+  };
+
+  // abstract __iteratorUncached(type, reverse)
+
+  Seq.prototype.__iterator = function __iterator (type, reverse) {
+    var cache = this._cache;
+    if (cache) {
+      var size = cache.length;
+      var i = 0;
+      return new Iterator(function () {
+        if (i === size) {
+          return iteratorDone();
+        }
+        var entry = cache[reverse ? size - ++i : i++];
+        return iteratorValue(type, entry[0], entry[1]);
+      });
+    }
+    return this.__iteratorUncached(type, reverse);
+  };
+
+  return Seq;
+}(Collection));
+
+var KeyedSeq = /*@__PURE__*/(function (Seq) {
+  function KeyedSeq(value) {
+    return value === undefined || value === null
+      ? emptySequence().toKeyedSeq()
+      : isCollection(value)
+      ? isKeyed(value)
+        ? value.toSeq()
+        : value.fromEntrySeq()
+      : isRecord(value)
+      ? value.toSeq()
+      : keyedSeqFromValue(value);
+  }
+
+  if ( Seq ) KeyedSeq.__proto__ = Seq;
+  KeyedSeq.prototype = Object.create( Seq && Seq.prototype );
+  KeyedSeq.prototype.constructor = KeyedSeq;
+
+  KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {
+    return this;
+  };
+
+  return KeyedSeq;
+}(Seq));
+
+var IndexedSeq = /*@__PURE__*/(function (Seq) {
+  function IndexedSeq(value) {
+    return value === undefined || value === null
+      ? emptySequence()
+      : isCollection(value)
+      ? isKeyed(value)
+        ? value.entrySeq()
+        : value.toIndexedSeq()
+      : isRecord(value)
+      ? value.toSeq().entrySeq()
+      : indexedSeqFromValue(value);
+  }
+
+  if ( Seq ) IndexedSeq.__proto__ = Seq;
+  IndexedSeq.prototype = Object.create( Seq && Seq.prototype );
+  IndexedSeq.prototype.constructor = IndexedSeq;
+
+  IndexedSeq.of = function of (/*...values*/) {
+    return IndexedSeq(arguments);
+  };
+
+  IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {
+    return this;
+  };
+
+  IndexedSeq.prototype.toString = function toString () {
+    return this.__toString('Seq [', ']');
+  };
+
+  return IndexedSeq;
+}(Seq));
+
+var SetSeq = /*@__PURE__*/(function (Seq) {
+  function SetSeq(value) {
+    return (
+      isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)
+    ).toSetSeq();
+  }
+
+  if ( Seq ) SetSeq.__proto__ = Seq;
+  SetSeq.prototype = Object.create( Seq && Seq.prototype );
+  SetSeq.prototype.constructor = SetSeq;
+
+  SetSeq.of = function of (/*...values*/) {
+    return SetSeq(arguments);
+  };
+
+  SetSeq.prototype.toSetSeq = function toSetSeq () {
+    return this;
+  };
+
+  return SetSeq;
+}(Seq));
+
+Seq.isSeq = isSeq;
+Seq.Keyed = KeyedSeq;
+Seq.Set = SetSeq;
+Seq.Indexed = IndexedSeq;
+
+Seq.prototype[IS_SEQ_SYMBOL] = true;
+
+// #pragma Root Sequences
+
+var ArraySeq = /*@__PURE__*/(function (IndexedSeq) {
+  function ArraySeq(array) {
+    this._array = array;
+    this.size = array.length;
+  }
+
+  if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;
+  ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+  ArraySeq.prototype.constructor = ArraySeq;
+
+  ArraySeq.prototype.get = function get (index, notSetValue) {
+    return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
+  };
+
+  ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {
+    var array = this._array;
+    var size = array.length;
+    var i = 0;
+    while (i !== size) {
+      var ii = reverse ? size - ++i : i++;
+      if (fn(array[ii], ii, this) === false) {
+        break;
+      }
+    }
+    return i;
+  };
+
+  ArraySeq.prototype.__iterator = function __iterator (type, reverse) {
+    var array = this._array;
+    var size = array.length;
+    var i = 0;
+    return new Iterator(function () {
+      if (i === size) {
+        return iteratorDone();
+      }
+      var ii = reverse ? size - ++i : i++;
+      return iteratorValue(type, ii, array[ii]);
+    });
+  };
+
+  return ArraySeq;
+}(IndexedSeq));
+
+var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {
+  function ObjectSeq(object) {
+    var keys = Object.keys(object).concat(
+      Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []
+    );
+    this._object = object;
+    this._keys = keys;
+    this.size = keys.length;
+  }
+
+  if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;
+  ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+  ObjectSeq.prototype.constructor = ObjectSeq;
+
+  ObjectSeq.prototype.get = function get (key, notSetValue) {
+    if (notSetValue !== undefined && !this.has(key)) {
+      return notSetValue;
+    }
+    return this._object[key];
+  };
+
+  ObjectSeq.prototype.has = function has (key) {
+    return hasOwnProperty.call(this._object, key);
+  };
+
+  ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {
+    var object = this._object;
+    var keys = this._keys;
+    var size = keys.length;
+    var i = 0;
+    while (i !== size) {
+      var key = keys[reverse ? size - ++i : i++];
+      if (fn(object[key], key, this) === false) {
+        break;
+      }
+    }
+    return i;
+  };
+
+  ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {
+    var object = this._object;
+    var keys = this._keys;
+    var size = keys.length;
+    var i = 0;
+    return new Iterator(function () {
+      if (i === size) {
+        return iteratorDone();
+      }
+      var key = keys[reverse ? size - ++i : i++];
+      return iteratorValue(type, key, object[key]);
+    });
+  };
+
+  return ObjectSeq;
+}(KeyedSeq));
+ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;
+
+var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {
+  function CollectionSeq(collection) {
+    this._collection = collection;
+    this.size = collection.length || collection.size;
+  }
+
+  if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;
+  CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+  CollectionSeq.prototype.constructor = CollectionSeq;
+
+  CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {
+    if (reverse) {
+      return this.cacheResult().__iterate(fn, reverse);
+    }
+    var collection = this._collection;
+    var iterator = getIterator(collection);
+    var iterations = 0;
+    if (isIterator(iterator)) {
+      var step;
+      while (!(step = iterator.next()).done) {
+        if (fn(step.value, iterations++, this) === false) {
+          break;
+        }
+      }
+    }
+    return iterations;
+  };
+
+  CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {
+    if (reverse) {
+      return this.cacheResult().__iterator(type, reverse);
+    }
+    var collection = this._collection;
+    var iterator = getIterator(collection);
+    if (!isIterator(iterator)) {
+      return new Iterator(iteratorDone);
+    }
+    var iterations = 0;
+    return new Iterator(function () {
+      var step = iterator.next();
+      return step.done ? step : iteratorValue(type, iterations++, step.value);
+    });
+  };
+
+  return CollectionSeq;
+}(IndexedSeq));
+
+// # pragma Helper functions
+
+var EMPTY_SEQ;
+
+function emptySequence() {
+  return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
+}
+
+function keyedSeqFromValue(value) {
+  var seq = maybeIndexedSeqFromValue(value);
+  if (seq) {
+    return seq.fromEntrySeq();
+  }
+  if (typeof value === 'object') {
+    return new ObjectSeq(value);
+  }
+  throw new TypeError(
+    'Expected Array or collection object of [k, v] entries, or keyed object: ' +
+      value
+  );
+}
+
+function indexedSeqFromValue(value) {
+  var seq = maybeIndexedSeqFromValue(value);
+  if (seq) {
+    return seq;
+  }
+  throw new TypeError(
+    'Expected Array or collection object of values: ' + value
+  );
+}
+
+function seqFromValue(value) {
+  var seq = maybeIndexedSeqFromValue(value);
+  if (seq) {
+    return isEntriesIterable(value)
+      ? seq.fromEntrySeq()
+      : isKeysIterable(value)
+      ? seq.toSetSeq()
+      : seq;
+  }
+  if (typeof value === 'object') {
+    return new ObjectSeq(value);
+  }
+  throw new TypeError(
+    'Expected Array or collection object of values, or keyed object: ' + value
+  );
+}
+
+function maybeIndexedSeqFromValue(value) {
+  return isArrayLike(value)
+    ? new ArraySeq(value)
+    : hasIterator(value)
+    ? new CollectionSeq(value)
+    : undefined;
+}
+
+var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';
+
+function isMap(maybeMap) {
+  return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);
+}
+
+function isOrderedMap(maybeOrderedMap) {
+  return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
+}
+
+function isValueObject(maybeValue) {
+  return Boolean(
+    maybeValue &&
+      typeof maybeValue.equals === 'function' &&
+      typeof maybeValue.hashCode === 'function'
+  );
+}
+
+/**
+ * An extension of the "same-value" algorithm as [described for use by ES6 Map
+ * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
+ *
+ * NaN is considered the same as NaN, however -0 and 0 are considered the same
+ * value, which is different from the algorithm described by
+ * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * This is extended further to allow Objects to describe the values they
+ * represent, by way of `valueOf` or `equals` (and `hashCode`).
+ *
+ * Note: because of this extension, the key equality of Immutable.Map and the
+ * value equality of Immutable.Set will differ from ES6 Map and Set.
+ *
+ * ### Defining custom values
+ *
+ * The easiest way to describe the value an object represents is by implementing
+ * `valueOf`. For example, `Date` represents a value by returning a unix
+ * timestamp for `valueOf`:
+ *
+ *     var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
+ *     var date2 = new Date(1234567890000);
+ *     date1.valueOf(); // 1234567890000
+ *     assert( date1 !== date2 );
+ *     assert( Immutable.is( date1, date2 ) );
+ *
+ * Note: overriding `valueOf` may have other implications if you use this object
+ * where JavaScript expects a primitive, such as implicit string coercion.
+ *
+ * For more complex types, especially collections, implementing `valueOf` may
+ * not be performant. An alternative is to implement `equals` and `hashCode`.
+ *
+ * `equals` takes another object, presumably of similar type, and returns true
+ * if it is equal. Equality is symmetrical, so the same result should be
+ * returned if this and the argument are flipped.
+ *
+ *     assert( a.equals(b) === b.equals(a) );
+ *
+ * `hashCode` returns a 32bit integer number representing the object which will
+ * be used to determine how to store the value object in a Map or Set. You must
+ * provide both or neither methods, one must not exist without the other.
+ *
+ * Also, an important relationship between these methods must be upheld: if two
+ * values are equal, they *must* return the same hashCode. If the values are not
+ * equal, they might have the same hashCode; this is called a hash collision,
+ * and while undesirable for performance reasons, it is acceptable.
+ *
+ *     if (a.equals(b)) {
+ *       assert( a.hashCode() === b.hashCode() );
+ *     }
+ *
+ * All Immutable collections are Value Objects: they implement `equals()`
+ * and `hashCode()`.
+ */
+function is(valueA, valueB) {
+  if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+    return true;
+  }
+  if (!valueA || !valueB) {
+    return false;
+  }
+  if (
+    typeof valueA.valueOf === 'function' &&
+    typeof valueB.valueOf === 'function'
+  ) {
+    valueA = valueA.valueOf();
+    valueB = valueB.valueOf();
+    if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+      return true;
+    }
+    if (!valueA || !valueB) {
+      return false;
+    }
+  }
+  return !!(
+    isValueObject(valueA) &&
+    isValueObject(valueB) &&
+    valueA.equals(valueB)
+  );
+}
+
+var imul =
+  typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2
+    ? Math.imul
+    : function imul(a, b) {
+        a |= 0; // int
+        b |= 0; // int
+        var c = a & 0xffff;
+        var d = b & 0xffff;
+        // Shift by 0 fixes the sign on the high part.
+        return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int
+      };
+
+// v8 has an optimization for storing 31-bit signed numbers.
+// Values which have either 00 or 11 as the high order bits qualify.
+// This function drops the highest order bit in a signed number, maintaining
+// the sign bit.
+function smi(i32) {
+  return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);
+}
+
+var defaultValueOf = Object.prototype.valueOf;
+
+function hash(o) {
+  if (o == null) {
+    return hashNullish(o);
+  }
+
+  if (typeof o.hashCode === 'function') {
+    // Drop any high bits from accidentally long hash codes.
+    return smi(o.hashCode(o));
+  }
+
+  var v = valueOf(o);
+
+  if (v == null) {
+    return hashNullish(v);
+  }
+
+  switch (typeof v) {
+    case 'boolean':
+      // The hash values for built-in constants are a 1 value for each 5-byte
+      // shift region expect for the first, which encodes the value. This
+      // reduces the odds of a hash collision for these common values.
+      return v ? 0x42108421 : 0x42108420;
+    case 'number':
+      return hashNumber(v);
+    case 'string':
+      return v.length > STRING_HASH_CACHE_MIN_STRLEN
+        ? cachedHashString(v)
+        : hashString(v);
+    case 'object':
+    case 'function':
+      return hashJSObj(v);
+    case 'symbol':
+      return hashSymbol(v);
+    default:
+      if (typeof v.toString === 'function') {
+        return hashString(v.toString());
+      }
+      throw new Error('Value type ' + typeof v + ' cannot be hashed.');
+  }
+}
+
+function hashNullish(nullish) {
+  return nullish === null ? 0x42108422 : /* undefined */ 0x42108423;
+}
+
+// Compress arbitrarily large numbers into smi hashes.
+function hashNumber(n) {
+  if (n !== n || n === Infinity) {
+    return 0;
+  }
+  var hash = n | 0;
+  if (hash !== n) {
+    hash ^= n * 0xffffffff;
+  }
+  while (n > 0xffffffff) {
+    n /= 0xffffffff;
+    hash ^= n;
+  }
+  return smi(hash);
+}
+
+function cachedHashString(string) {
+  var hashed = stringHashCache[string];
+  if (hashed === undefined) {
+    hashed = hashString(string);
+    if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
+      STRING_HASH_CACHE_SIZE = 0;
+      stringHashCache = {};
+    }
+    STRING_HASH_CACHE_SIZE++;
+    stringHashCache[string] = hashed;
+  }
+  return hashed;
+}
+
+// http://jsperf.com/hashing-strings
+function hashString(string) {
+  // This is the hash from JVM
+  // The hash code for a string is computed as
+  // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
+  // where s[i] is the ith character of the string and n is the length of
+  // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
+  // (exclusive) by dropping high bits.
+  var hashed = 0;
+  for (var ii = 0; ii < string.length; ii++) {
+    hashed = (31 * hashed + string.charCodeAt(ii)) | 0;
+  }
+  return smi(hashed);
+}
+
+function hashSymbol(sym) {
+  var hashed = symbolMap[sym];
+  if (hashed !== undefined) {
+    return hashed;
+  }
+
+  hashed = nextHash();
+
+  symbolMap[sym] = hashed;
+
+  return hashed;
+}
+
+function hashJSObj(obj) {
+  var hashed;
+  if (usingWeakMap) {
+    hashed = weakMap.get(obj);
+    if (hashed !== undefined) {
+      return hashed;
+    }
+  }
+
+  hashed = obj[UID_HASH_KEY];
+  if (hashed !== undefined) {
+    return hashed;
+  }
+
+  if (!canDefineProperty) {
+    hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
+    if (hashed !== undefined) {
+      return hashed;
+    }
+
+    hashed = getIENodeHash(obj);
+    if (hashed !== undefined) {
+      return hashed;
+    }
+  }
+
+  hashed = nextHash();
+
+  if (usingWeakMap) {
+    weakMap.set(obj, hashed);
+  } else if (isExtensible !== undefined && isExtensible(obj) === false) {
+    throw new Error('Non-extensible objects are not allowed as keys.');
+  } else if (canDefineProperty) {
+    Object.defineProperty(obj, UID_HASH_KEY, {
+      enumerable: false,
+      configurable: false,
+      writable: false,
+      value: hashed,
+    });
+  } else if (
+    obj.propertyIsEnumerable !== undefined &&
+    obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable
+  ) {
+    // Since we can't define a non-enumerable property on the object
+    // we'll hijack one of the less-used non-enumerable properties to
+    // save our hash on it. Since this is a function it will not show up in
+    // `JSON.stringify` which is what we want.
+    obj.propertyIsEnumerable = function () {
+      return this.constructor.prototype.propertyIsEnumerable.apply(
+        this,
+        arguments
+      );
+    };
+    obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;
+  } else if (obj.nodeType !== undefined) {
+    // At this point we couldn't get the IE `uniqueID` to use as a hash
+    // and we couldn't use a non-enumerable property to exploit the
+    // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
+    // itself.
+    obj[UID_HASH_KEY] = hashed;
+  } else {
+    throw new Error('Unable to set a non-enumerable property on object.');
+  }
+
+  return hashed;
+}
+
+// Get references to ES5 object methods.
+var isExtensible = Object.isExtensible;
+
+// True if Object.defineProperty works as expected. IE8 fails this test.
+var canDefineProperty = (function () {
+  try {
+    Object.defineProperty({}, '@', {});
+    return true;
+  } catch (e) {
+    return false;
+  }
+})();
+
+// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
+// and avoid memory leaks from the IE cloneNode bug.
+function getIENodeHash(node) {
+  if (node && node.nodeType > 0) {
+    switch (node.nodeType) {
+      case 1: // Element
+        return node.uniqueID;
+      case 9: // Document
+        return node.documentElement && node.documentElement.uniqueID;
+    }
+  }
+}
+
+function valueOf(obj) {
+  return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function'
+    ? obj.valueOf(obj)
+    : obj;
+}
+
+function nextHash() {
+  var nextHash = ++_objHashUID;
+  if (_objHashUID & 0x40000000) {
+    _objHashUID = 0;
+  }
+  return nextHash;
+}
+
+// If possible, use a WeakMap.
+var usingWeakMap = typeof WeakMap === 'function';
+var weakMap;
+if (usingWeakMap) {
+  weakMap = new WeakMap();
+}
+
+var symbolMap = Object.create(null);
+
+var _objHashUID = 0;
+
+var UID_HASH_KEY = '__immutablehash__';
+if (typeof Symbol === 'function') {
+  UID_HASH_KEY = Symbol(UID_HASH_KEY);
+}
+
+var STRING_HASH_CACHE_MIN_STRLEN = 16;
+var STRING_HASH_CACHE_MAX_SIZE = 255;
+var STRING_HASH_CACHE_SIZE = 0;
+var stringHashCache = {};
+
+var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) {
+  function ToKeyedSequence(indexed, useKeys) {
+    this._iter = indexed;
+    this._useKeys = useKeys;
+    this.size = indexed.size;
+  }
+
+  if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq;
+  ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+  ToKeyedSequence.prototype.constructor = ToKeyedSequence;
+
+  ToKeyedSequence.prototype.get = function get (key, notSetValue) {
+    return this._iter.get(key, notSetValue);
+  };
+
+  ToKeyedSequence.prototype.has = function has (key) {
+    return this._iter.has(key);
+  };
+
+  ToKeyedSequence.prototype.valueSeq = function valueSeq () {
+    return this._iter.valueSeq();
+  };
+
+  ToKeyedSequence.prototype.reverse = function reverse () {
+    var this$1$1 = this;
+
+    var reversedSequence = reverseFactory(this, true);
+    if (!this._useKeys) {
+      reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); };
+    }
+    return reversedSequence;
+  };
+
+  ToKeyedSequence.prototype.map = function map (mapper, context) {
+    var this$1$1 = this;
+
+    var mappedSequence = mapFactory(this, mapper, context);
+    if (!this._useKeys) {
+      mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); };
+    }
+    return mappedSequence;
+  };
+
+  ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse);
+  };
+
+  ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {
+    return this._iter.__iterator(type, reverse);
+  };
+
+  return ToKeyedSequence;
+}(KeyedSeq));
+ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;
+
+var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) {
+  function ToIndexedSequence(iter) {
+    this._iter = iter;
+    this.size = iter.size;
+  }
+
+  if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq;
+  ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+  ToIndexedSequence.prototype.constructor = ToIndexedSequence;
+
+  ToIndexedSequence.prototype.includes = function includes (value) {
+    return this._iter.includes(value);
+  };
+
+  ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    var i = 0;
+    reverse && ensureSize(this);
+    return this._iter.__iterate(
+      function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); },
+      reverse
+    );
+  };
+
+  ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {
+    var this$1$1 = this;
+
+    var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+    var i = 0;
+    reverse && ensureSize(this);
+    return new Iterator(function () {
+      var step = iterator.next();
+      return step.done
+        ? step
+        : iteratorValue(
+            type,
+            reverse ? this$1$1.size - ++i : i++,
+            step.value,
+            step
+          );
+    });
+  };
+
+  return ToIndexedSequence;
+}(IndexedSeq));
+
+var ToSetSequence = /*@__PURE__*/(function (SetSeq) {
+  function ToSetSequence(iter) {
+    this._iter = iter;
+    this.size = iter.size;
+  }
+
+  if ( SetSeq ) ToSetSequence.__proto__ = SetSeq;
+  ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype );
+  ToSetSequence.prototype.constructor = ToSetSequence;
+
+  ToSetSequence.prototype.has = function has (key) {
+    return this._iter.includes(key);
+  };
+
+  ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse);
+  };
+
+  ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {
+    var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+    return new Iterator(function () {
+      var step = iterator.next();
+      return step.done
+        ? step
+        : iteratorValue(type, step.value, step.value, step);
+    });
+  };
+
+  return ToSetSequence;
+}(SetSeq));
+
+var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) {
+  function FromEntriesSequence(entries) {
+    this._iter = entries;
+    this.size = entries.size;
+  }
+
+  if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq;
+  FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+  FromEntriesSequence.prototype.constructor = FromEntriesSequence;
+
+  FromEntriesSequence.prototype.entrySeq = function entrySeq () {
+    return this._iter.toSeq();
+  };
+
+  FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    return this._iter.__iterate(function (entry) {
+      // Check if entry exists first so array access doesn't throw for holes
+      // in the parent iteration.
+      if (entry) {
+        validateEntry(entry);
+        var indexedCollection = isCollection(entry);
+        return fn(
+          indexedCollection ? entry.get(1) : entry[1],
+          indexedCollection ? entry.get(0) : entry[0],
+          this$1$1
+        );
+      }
+    }, reverse);
+  };
+
+  FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {
+    var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+    return new Iterator(function () {
+      while (true) {
+        var step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+        var entry = step.value;
+        // Check if entry exists first so array access doesn't throw for holes
+        // in the parent iteration.
+        if (entry) {
+          validateEntry(entry);
+          var indexedCollection = isCollection(entry);
+          return iteratorValue(
+            type,
+            indexedCollection ? entry.get(0) : entry[0],
+            indexedCollection ? entry.get(1) : entry[1],
+            step
+          );
+        }
+      }
+    });
+  };
+
+  return FromEntriesSequence;
+}(KeyedSeq));
+
+ToIndexedSequence.prototype.cacheResult =
+  ToKeyedSequence.prototype.cacheResult =
+  ToSetSequence.prototype.cacheResult =
+  FromEntriesSequence.prototype.cacheResult =
+    cacheResultThrough;
+
+function flipFactory(collection) {
+  var flipSequence = makeSequence(collection);
+  flipSequence._iter = collection;
+  flipSequence.size = collection.size;
+  flipSequence.flip = function () { return collection; };
+  flipSequence.reverse = function () {
+    var reversedSequence = collection.reverse.apply(this); // super.reverse()
+    reversedSequence.flip = function () { return collection.reverse(); };
+    return reversedSequence;
+  };
+  flipSequence.has = function (key) { return collection.includes(key); };
+  flipSequence.includes = function (key) { return collection.has(key); };
+  flipSequence.cacheResult = cacheResultThrough;
+  flipSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse);
+  };
+  flipSequence.__iteratorUncached = function (type, reverse) {
+    if (type === ITERATE_ENTRIES) {
+      var iterator = collection.__iterator(type, reverse);
+      return new Iterator(function () {
+        var step = iterator.next();
+        if (!step.done) {
+          var k = step.value[0];
+          step.value[0] = step.value[1];
+          step.value[1] = k;
+        }
+        return step;
+      });
+    }
+    return collection.__iterator(
+      type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
+      reverse
+    );
+  };
+  return flipSequence;
+}
+
+function mapFactory(collection, mapper, context) {
+  var mappedSequence = makeSequence(collection);
+  mappedSequence.size = collection.size;
+  mappedSequence.has = function (key) { return collection.has(key); };
+  mappedSequence.get = function (key, notSetValue) {
+    var v = collection.get(key, NOT_SET);
+    return v === NOT_SET
+      ? notSetValue
+      : mapper.call(context, v, key, collection);
+  };
+  mappedSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    return collection.__iterate(
+      function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; },
+      reverse
+    );
+  };
+  mappedSequence.__iteratorUncached = function (type, reverse) {
+    var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+    return new Iterator(function () {
+      var step = iterator.next();
+      if (step.done) {
+        return step;
+      }
+      var entry = step.value;
+      var key = entry[0];
+      return iteratorValue(
+        type,
+        key,
+        mapper.call(context, entry[1], key, collection),
+        step
+      );
+    });
+  };
+  return mappedSequence;
+}
+
+function reverseFactory(collection, useKeys) {
+  var this$1$1 = this;
+
+  var reversedSequence = makeSequence(collection);
+  reversedSequence._iter = collection;
+  reversedSequence.size = collection.size;
+  reversedSequence.reverse = function () { return collection; };
+  if (collection.flip) {
+    reversedSequence.flip = function () {
+      var flipSequence = flipFactory(collection);
+      flipSequence.reverse = function () { return collection.flip(); };
+      return flipSequence;
+    };
+  }
+  reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };
+  reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };
+  reversedSequence.includes = function (value) { return collection.includes(value); };
+  reversedSequence.cacheResult = cacheResultThrough;
+  reversedSequence.__iterate = function (fn, reverse) {
+    var this$1$1 = this;
+
+    var i = 0;
+    reverse && ensureSize(collection);
+    return collection.__iterate(
+      function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); },
+      !reverse
+    );
+  };
+  reversedSequence.__iterator = function (type, reverse) {
+    var i = 0;
+    reverse && ensureSize(collection);
+    var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);
+    return new Iterator(function () {
+      var step = iterator.next();
+      if (step.done) {
+        return step;
+      }
+      var entry = step.value;
+      return iteratorValue(
+        type,
+        useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++,
+        entry[1],
+        step
+      );
+    });
+  };
+  return reversedSequence;
+}
+
+function filterFactory(collection, predicate, context, useKeys) {
+  var filterSequence = makeSequence(collection);
+  if (useKeys) {
+    filterSequence.has = function (key) {
+      var v = collection.get(key, NOT_SET);
+      return v !== NOT_SET && !!predicate.call(context, v, key, collection);
+    };
+    filterSequence.get = function (key, notSetValue) {
+      var v = collection.get(key, NOT_SET);
+      return v !== NOT_SET && predicate.call(context, v, key, collection)
+        ? v
+        : notSetValue;
+    };
+  }
+  filterSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    var iterations = 0;
+    collection.__iterate(function (v, k, c) {
+      if (predicate.call(context, v, k, c)) {
+        iterations++;
+        return fn(v, useKeys ? k : iterations - 1, this$1$1);
+      }
+    }, reverse);
+    return iterations;
+  };
+  filterSequence.__iteratorUncached = function (type, reverse) {
+    var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+    var iterations = 0;
+    return new Iterator(function () {
+      while (true) {
+        var step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+        var entry = step.value;
+        var key = entry[0];
+        var value = entry[1];
+        if (predicate.call(context, value, key, collection)) {
+          return iteratorValue(type, useKeys ? key : iterations++, value, step);
+        }
+      }
+    });
+  };
+  return filterSequence;
+}
+
+function countByFactory(collection, grouper, context) {
+  var groups = Map().asMutable();
+  collection.__iterate(function (v, k) {
+    groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });
+  });
+  return groups.asImmutable();
+}
+
+function groupByFactory(collection, grouper, context) {
+  var isKeyedIter = isKeyed(collection);
+  var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();
+  collection.__iterate(function (v, k) {
+    groups.update(
+      grouper.call(context, v, k, collection),
+      function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }
+    );
+  });
+  var coerce = collectionClass(collection);
+  return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();
+}
+
+function partitionFactory(collection, predicate, context) {
+  var isKeyedIter = isKeyed(collection);
+  var groups = [[], []];
+  collection.__iterate(function (v, k) {
+    groups[predicate.call(context, v, k, collection) ? 1 : 0].push(
+      isKeyedIter ? [k, v] : v
+    );
+  });
+  var coerce = collectionClass(collection);
+  return groups.map(function (arr) { return reify(collection, coerce(arr)); });
+}
+
+function sliceFactory(collection, begin, end, useKeys) {
+  var originalSize = collection.size;
+
+  if (wholeSlice(begin, end, originalSize)) {
+    return collection;
+  }
+
+  var resolvedBegin = resolveBegin(begin, originalSize);
+  var resolvedEnd = resolveEnd(end, originalSize);
+
+  // begin or end will be NaN if they were provided as negative numbers and
+  // this collection's size is unknown. In that case, cache first so there is
+  // a known size and these do not resolve to NaN.
+  if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
+    return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);
+  }
+
+  // Note: resolvedEnd is undefined when the original sequence's length is
+  // unknown and this slice did not supply an end and should contain all
+  // elements after resolvedBegin.
+  // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
+  var resolvedSize = resolvedEnd - resolvedBegin;
+  var sliceSize;
+  if (resolvedSize === resolvedSize) {
+    sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
+  }
+
+  var sliceSeq = makeSequence(collection);
+
+  // If collection.size is undefined, the size of the realized sliceSeq is
+  // unknown at this point unless the number of items to slice is 0
+  sliceSeq.size =
+    sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;
+
+  if (!useKeys && isSeq(collection) && sliceSize >= 0) {
+    sliceSeq.get = function (index, notSetValue) {
+      index = wrapIndex(this, index);
+      return index >= 0 && index < sliceSize
+        ? collection.get(index + resolvedBegin, notSetValue)
+        : notSetValue;
+    };
+  }
+
+  sliceSeq.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    if (sliceSize === 0) {
+      return 0;
+    }
+    if (reverse) {
+      return this.cacheResult().__iterate(fn, reverse);
+    }
+    var skipped = 0;
+    var isSkipping = true;
+    var iterations = 0;
+    collection.__iterate(function (v, k) {
+      if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
+        iterations++;
+        return (
+          fn(v, useKeys ? k : iterations - 1, this$1$1) !== false &&
+          iterations !== sliceSize
+        );
+      }
+    });
+    return iterations;
+  };
+
+  sliceSeq.__iteratorUncached = function (type, reverse) {
+    if (sliceSize !== 0 && reverse) {
+      return this.cacheResult().__iterator(type, reverse);
+    }
+    // Don't bother instantiating parent iterator if taking 0.
+    if (sliceSize === 0) {
+      return new Iterator(iteratorDone);
+    }
+    var iterator = collection.__iterator(type, reverse);
+    var skipped = 0;
+    var iterations = 0;
+    return new Iterator(function () {
+      while (skipped++ < resolvedBegin) {
+        iterator.next();
+      }
+      if (++iterations > sliceSize) {
+        return iteratorDone();
+      }
+      var step = iterator.next();
+      if (useKeys || type === ITERATE_VALUES || step.done) {
+        return step;
+      }
+      if (type === ITERATE_KEYS) {
+        return iteratorValue(type, iterations - 1, undefined, step);
+      }
+      return iteratorValue(type, iterations - 1, step.value[1], step);
+    });
+  };
+
+  return sliceSeq;
+}
+
+function takeWhileFactory(collection, predicate, context) {
+  var takeSequence = makeSequence(collection);
+  takeSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    if (reverse) {
+      return this.cacheResult().__iterate(fn, reverse);
+    }
+    var iterations = 0;
+    collection.__iterate(
+      function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); }
+    );
+    return iterations;
+  };
+  takeSequence.__iteratorUncached = function (type, reverse) {
+    var this$1$1 = this;
+
+    if (reverse) {
+      return this.cacheResult().__iterator(type, reverse);
+    }
+    var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+    var iterating = true;
+    return new Iterator(function () {
+      if (!iterating) {
+        return iteratorDone();
+      }
+      var step = iterator.next();
+      if (step.done) {
+        return step;
+      }
+      var entry = step.value;
+      var k = entry[0];
+      var v = entry[1];
+      if (!predicate.call(context, v, k, this$1$1)) {
+        iterating = false;
+        return iteratorDone();
+      }
+      return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
+    });
+  };
+  return takeSequence;
+}
+
+function skipWhileFactory(collection, predicate, context, useKeys) {
+  var skipSequence = makeSequence(collection);
+  skipSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    if (reverse) {
+      return this.cacheResult().__iterate(fn, reverse);
+    }
+    var isSkipping = true;
+    var iterations = 0;
+    collection.__iterate(function (v, k, c) {
+      if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
+        iterations++;
+        return fn(v, useKeys ? k : iterations - 1, this$1$1);
+      }
+    });
+    return iterations;
+  };
+  skipSequence.__iteratorUncached = function (type, reverse) {
+    var this$1$1 = this;
+
+    if (reverse) {
+      return this.cacheResult().__iterator(type, reverse);
+    }
+    var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+    var skipping = true;
+    var iterations = 0;
+    return new Iterator(function () {
+      var step;
+      var k;
+      var v;
+      do {
+        step = iterator.next();
+        if (step.done) {
+          if (useKeys || type === ITERATE_VALUES) {
+            return step;
+          }
+          if (type === ITERATE_KEYS) {
+            return iteratorValue(type, iterations++, undefined, step);
+          }
+          return iteratorValue(type, iterations++, step.value[1], step);
+        }
+        var entry = step.value;
+        k = entry[0];
+        v = entry[1];
+        skipping && (skipping = predicate.call(context, v, k, this$1$1));
+      } while (skipping);
+      return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
+    });
+  };
+  return skipSequence;
+}
+
+function concatFactory(collection, values) {
+  var isKeyedCollection = isKeyed(collection);
+  var iters = [collection]
+    .concat(values)
+    .map(function (v) {
+      if (!isCollection(v)) {
+        v = isKeyedCollection
+          ? keyedSeqFromValue(v)
+          : indexedSeqFromValue(Array.isArray(v) ? v : [v]);
+      } else if (isKeyedCollection) {
+        v = KeyedCollection(v);
+      }
+      return v;
+    })
+    .filter(function (v) { return v.size !== 0; });
+
+  if (iters.length === 0) {
+    return collection;
+  }
+
+  if (iters.length === 1) {
+    var singleton = iters[0];
+    if (
+      singleton === collection ||
+      (isKeyedCollection && isKeyed(singleton)) ||
+      (isIndexed(collection) && isIndexed(singleton))
+    ) {
+      return singleton;
+    }
+  }
+
+  var concatSeq = new ArraySeq(iters);
+  if (isKeyedCollection) {
+    concatSeq = concatSeq.toKeyedSeq();
+  } else if (!isIndexed(collection)) {
+    concatSeq = concatSeq.toSetSeq();
+  }
+  concatSeq = concatSeq.flatten(true);
+  concatSeq.size = iters.reduce(function (sum, seq) {
+    if (sum !== undefined) {
+      var size = seq.size;
+      if (size !== undefined) {
+        return sum + size;
+      }
+    }
+  }, 0);
+  return concatSeq;
+}
+
+function flattenFactory(collection, depth, useKeys) {
+  var flatSequence = makeSequence(collection);
+  flatSequence.__iterateUncached = function (fn, reverse) {
+    if (reverse) {
+      return this.cacheResult().__iterate(fn, reverse);
+    }
+    var iterations = 0;
+    var stopped = false;
+    function flatDeep(iter, currentDepth) {
+      iter.__iterate(function (v, k) {
+        if ((!depth || currentDepth < depth) && isCollection(v)) {
+          flatDeep(v, currentDepth + 1);
+        } else {
+          iterations++;
+          if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {
+            stopped = true;
+          }
+        }
+        return !stopped;
+      }, reverse);
+    }
+    flatDeep(collection, 0);
+    return iterations;
+  };
+  flatSequence.__iteratorUncached = function (type, reverse) {
+    if (reverse) {
+      return this.cacheResult().__iterator(type, reverse);
+    }
+    var iterator = collection.__iterator(type, reverse);
+    var stack = [];
+    var iterations = 0;
+    return new Iterator(function () {
+      while (iterator) {
+        var step = iterator.next();
+        if (step.done !== false) {
+          iterator = stack.pop();
+          continue;
+        }
+        var v = step.value;
+        if (type === ITERATE_ENTRIES) {
+          v = v[1];
+        }
+        if ((!depth || stack.length < depth) && isCollection(v)) {
+          stack.push(iterator);
+          iterator = v.__iterator(type, reverse);
+        } else {
+          return useKeys ? step : iteratorValue(type, iterations++, v, step);
+        }
+      }
+      return iteratorDone();
+    });
+  };
+  return flatSequence;
+}
+
+function flatMapFactory(collection, mapper, context) {
+  var coerce = collectionClass(collection);
+  return collection
+    .toSeq()
+    .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })
+    .flatten(true);
+}
+
+function interposeFactory(collection, separator) {
+  var interposedSequence = makeSequence(collection);
+  interposedSequence.size = collection.size && collection.size * 2 - 1;
+  interposedSequence.__iterateUncached = function (fn, reverse) {
+    var this$1$1 = this;
+
+    var iterations = 0;
+    collection.__iterate(
+      function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) &&
+        fn(v, iterations++, this$1$1) !== false; },
+      reverse
+    );
+    return iterations;
+  };
+  interposedSequence.__iteratorUncached = function (type, reverse) {
+    var iterator = collection.__iterator(ITERATE_VALUES, reverse);
+    var iterations = 0;
+    var step;
+    return new Iterator(function () {
+      if (!step || iterations % 2) {
+        step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+      }
+      return iterations % 2
+        ? iteratorValue(type, iterations++, separator)
+        : iteratorValue(type, iterations++, step.value, step);
+    });
+  };
+  return interposedSequence;
+}
+
+function sortFactory(collection, comparator, mapper) {
+  if (!comparator) {
+    comparator = defaultComparator;
+  }
+  var isKeyedCollection = isKeyed(collection);
+  var index = 0;
+  var entries = collection
+    .toSeq()
+    .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })
+    .valueSeq()
+    .toArray();
+  entries
+    .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; })
+    .forEach(
+      isKeyedCollection
+        ? function (v, i) {
+            entries[i].length = 2;
+          }
+        : function (v, i) {
+            entries[i] = v[1];
+          }
+    );
+  return isKeyedCollection
+    ? KeyedSeq(entries)
+    : isIndexed(collection)
+    ? IndexedSeq(entries)
+    : SetSeq(entries);
+}
+
+function maxFactory(collection, comparator, mapper) {
+  if (!comparator) {
+    comparator = defaultComparator;
+  }
+  if (mapper) {
+    var entry = collection
+      .toSeq()
+      .map(function (v, k) { return [v, mapper(v, k, collection)]; })
+      .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });
+    return entry && entry[0];
+  }
+  return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });
+}
+
+function maxCompare(comparator, a, b) {
+  var comp = comparator(b, a);
+  // b is considered the new max if the comparator declares them equal, but
+  // they are not equal and b is in fact a nullish value.
+  return (
+    (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||
+    comp > 0
+  );
+}
+
+function zipWithFactory(keyIter, zipper, iters, zipAll) {
+  var zipSequence = makeSequence(keyIter);
+  var sizes = new ArraySeq(iters).map(function (i) { return i.size; });
+  zipSequence.size = zipAll ? sizes.max() : sizes.min();
+  // Note: this a generic base implementation of __iterate in terms of
+  // __iterator which may be more generically useful in the future.
+  zipSequence.__iterate = function (fn, reverse) {
+    /* generic:
+    var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
+    var step;
+    var iterations = 0;
+    while (!(step = iterator.next()).done) {
+      iterations++;
+      if (fn(step.value[1], step.value[0], this) === false) {
+        break;
+      }
+    }
+    return iterations;
+    */
+    // indexed:
+    var iterator = this.__iterator(ITERATE_VALUES, reverse);
+    var step;
+    var iterations = 0;
+    while (!(step = iterator.next()).done) {
+      if (fn(step.value, iterations++, this) === false) {
+        break;
+      }
+    }
+    return iterations;
+  };
+  zipSequence.__iteratorUncached = function (type, reverse) {
+    var iterators = iters.map(
+      function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }
+    );
+    var iterations = 0;
+    var isDone = false;
+    return new Iterator(function () {
+      var steps;
+      if (!isDone) {
+        steps = iterators.map(function (i) { return i.next(); });
+        isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });
+      }
+      if (isDone) {
+        return iteratorDone();
+      }
+      return iteratorValue(
+        type,
+        iterations++,
+        zipper.apply(
+          null,
+          steps.map(function (s) { return s.value; })
+        )
+      );
+    });
+  };
+  return zipSequence;
+}
+
+// #pragma Helper Functions
+
+function reify(iter, seq) {
+  return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);
+}
+
+function validateEntry(entry) {
+  if (entry !== Object(entry)) {
+    throw new TypeError('Expected [K, V] tuple: ' + entry);
+  }
+}
+
+function collectionClass(collection) {
+  return isKeyed(collection)
+    ? KeyedCollection
+    : isIndexed(collection)
+    ? IndexedCollection
+    : SetCollection;
+}
+
+function makeSequence(collection) {
+  return Object.create(
+    (isKeyed(collection)
+      ? KeyedSeq
+      : isIndexed(collection)
+      ? IndexedSeq
+      : SetSeq
+    ).prototype
+  );
+}
+
+function cacheResultThrough() {
+  if (this._iter.cacheResult) {
+    this._iter.cacheResult();
+    this.size = this._iter.size;
+    return this;
+  }
+  return Seq.prototype.cacheResult.call(this);
+}
+
+function defaultComparator(a, b) {
+  if (a === undefined && b === undefined) {
+    return 0;
+  }
+
+  if (a === undefined) {
+    return 1;
+  }
+
+  if (b === undefined) {
+    return -1;
+  }
+
+  return a > b ? 1 : a < b ? -1 : 0;
+}
+
+function arrCopy(arr, offset) {
+  offset = offset || 0;
+  var len = Math.max(0, arr.length - offset);
+  var newArr = new Array(len);
+  for (var ii = 0; ii < len; ii++) {
+    newArr[ii] = arr[ii + offset];
+  }
+  return newArr;
+}
+
+function invariant(condition, error) {
+  if (!condition) { throw new Error(error); }
+}
+
+function assertNotInfinite(size) {
+  invariant(
+    size !== Infinity,
+    'Cannot perform this action with an infinite size.'
+  );
+}
+
+function coerceKeyPath(keyPath) {
+  if (isArrayLike(keyPath) && typeof keyPath !== 'string') {
+    return keyPath;
+  }
+  if (isOrdered(keyPath)) {
+    return keyPath.toArray();
+  }
+  throw new TypeError(
+    'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath
+  );
+}
+
+var toString = Object.prototype.toString;
+
+function isPlainObject(value) {
+  // The base prototype's toString deals with Argument objects and native namespaces like Math
+  if (
+    !value ||
+    typeof value !== 'object' ||
+    toString.call(value) !== '[object Object]'
+  ) {
+    return false;
+  }
+
+  var proto = Object.getPrototypeOf(value);
+  if (proto === null) {
+    return true;
+  }
+
+  // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)
+  var parentProto = proto;
+  var nextProto = Object.getPrototypeOf(proto);
+  while (nextProto !== null) {
+    parentProto = nextProto;
+    nextProto = Object.getPrototypeOf(parentProto);
+  }
+  return parentProto === proto;
+}
+
+/**
+ * Returns true if the value is a potentially-persistent data structure, either
+ * provided by Immutable.js or a plain Array or Object.
+ */
+function isDataStructure(value) {
+  return (
+    typeof value === 'object' &&
+    (isImmutable(value) || Array.isArray(value) || isPlainObject(value))
+  );
+}
+
+function quoteString(value) {
+  try {
+    return typeof value === 'string' ? JSON.stringify(value) : String(value);
+  } catch (_ignoreError) {
+    return JSON.stringify(value);
+  }
+}
+
+function has(collection, key) {
+  return isImmutable(collection)
+    ? collection.has(key)
+    : isDataStructure(collection) && hasOwnProperty.call(collection, key);
+}
+
+function get(collection, key, notSetValue) {
+  return isImmutable(collection)
+    ? collection.get(key, notSetValue)
+    : !has(collection, key)
+    ? notSetValue
+    : typeof collection.get === 'function'
+    ? collection.get(key)
+    : collection[key];
+}
+
+function shallowCopy(from) {
+  if (Array.isArray(from)) {
+    return arrCopy(from);
+  }
+  var to = {};
+  for (var key in from) {
+    if (hasOwnProperty.call(from, key)) {
+      to[key] = from[key];
+    }
+  }
+  return to;
+}
+
+function remove(collection, key) {
+  if (!isDataStructure(collection)) {
+    throw new TypeError(
+      'Cannot update non-data-structure value: ' + collection
+    );
+  }
+  if (isImmutable(collection)) {
+    if (!collection.remove) {
+      throw new TypeError(
+        'Cannot update immutable value without .remove() method: ' + collection
+      );
+    }
+    return collection.remove(key);
+  }
+  if (!hasOwnProperty.call(collection, key)) {
+    return collection;
+  }
+  var collectionCopy = shallowCopy(collection);
+  if (Array.isArray(collectionCopy)) {
+    collectionCopy.splice(key, 1);
+  } else {
+    delete collectionCopy[key];
+  }
+  return collectionCopy;
+}
+
+function set(collection, key, value) {
+  if (!isDataStructure(collection)) {
+    throw new TypeError(
+      'Cannot update non-data-structure value: ' + collection
+    );
+  }
+  if (isImmutable(collection)) {
+    if (!collection.set) {
+      throw new TypeError(
+        'Cannot update immutable value without .set() method: ' + collection
+      );
+    }
+    return collection.set(key, value);
+  }
+  if (hasOwnProperty.call(collection, key) && value === collection[key]) {
+    return collection;
+  }
+  var collectionCopy = shallowCopy(collection);
+  collectionCopy[key] = value;
+  return collectionCopy;
+}
+
+function updateIn$1(collection, keyPath, notSetValue, updater) {
+  if (!updater) {
+    updater = notSetValue;
+    notSetValue = undefined;
+  }
+  var updatedValue = updateInDeeply(
+    isImmutable(collection),
+    collection,
+    coerceKeyPath(keyPath),
+    0,
+    notSetValue,
+    updater
+  );
+  return updatedValue === NOT_SET ? notSetValue : updatedValue;
+}
+
+function updateInDeeply(
+  inImmutable,
+  existing,
+  keyPath,
+  i,
+  notSetValue,
+  updater
+) {
+  var wasNotSet = existing === NOT_SET;
+  if (i === keyPath.length) {
+    var existingValue = wasNotSet ? notSetValue : existing;
+    var newValue = updater(existingValue);
+    return newValue === existingValue ? existing : newValue;
+  }
+  if (!wasNotSet && !isDataStructure(existing)) {
+    throw new TypeError(
+      'Cannot update within non-data-structure value in path [' +
+        keyPath.slice(0, i).map(quoteString) +
+        ']: ' +
+        existing
+    );
+  }
+  var key = keyPath[i];
+  var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);
+  var nextUpdated = updateInDeeply(
+    nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),
+    nextExisting,
+    keyPath,
+    i + 1,
+    notSetValue,
+    updater
+  );
+  return nextUpdated === nextExisting
+    ? existing
+    : nextUpdated === NOT_SET
+    ? remove(existing, key)
+    : set(
+        wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,
+        key,
+        nextUpdated
+      );
+}
+
+function setIn$1(collection, keyPath, value) {
+  return updateIn$1(collection, keyPath, NOT_SET, function () { return value; });
+}
+
+function setIn(keyPath, v) {
+  return setIn$1(this, keyPath, v);
+}
+
+function removeIn(collection, keyPath) {
+  return updateIn$1(collection, keyPath, function () { return NOT_SET; });
+}
+
+function deleteIn(keyPath) {
+  return removeIn(this, keyPath);
+}
+
+function update$1(collection, key, notSetValue, updater) {
+  return updateIn$1(collection, [key], notSetValue, updater);
+}
+
+function update(key, notSetValue, updater) {
+  return arguments.length === 1
+    ? key(this)
+    : update$1(this, key, notSetValue, updater);
+}
+
+function updateIn(keyPath, notSetValue, updater) {
+  return updateIn$1(this, keyPath, notSetValue, updater);
+}
+
+function merge$1() {
+  var iters = [], len = arguments.length;
+  while ( len-- ) iters[ len ] = arguments[ len ];
+
+  return mergeIntoKeyedWith(this, iters);
+}
+
+function mergeWith$1(merger) {
+  var iters = [], len = arguments.length - 1;
+  while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+  if (typeof merger !== 'function') {
+    throw new TypeError('Invalid merger function: ' + merger);
+  }
+  return mergeIntoKeyedWith(this, iters, merger);
+}
+
+function mergeIntoKeyedWith(collection, collections, merger) {
+  var iters = [];
+  for (var ii = 0; ii < collections.length; ii++) {
+    var collection$1 = KeyedCollection(collections[ii]);
+    if (collection$1.size !== 0) {
+      iters.push(collection$1);
+    }
+  }
+  if (iters.length === 0) {
+    return collection;
+  }
+  if (
+    collection.toSeq().size === 0 &&
+    !collection.__ownerID &&
+    iters.length === 1
+  ) {
+    return collection.constructor(iters[0]);
+  }
+  return collection.withMutations(function (collection) {
+    var mergeIntoCollection = merger
+      ? function (value, key) {
+          update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }
+          );
+        }
+      : function (value, key) {
+          collection.set(key, value);
+        };
+    for (var ii = 0; ii < iters.length; ii++) {
+      iters[ii].forEach(mergeIntoCollection);
+    }
+  });
+}
+
+function merge(collection) {
+  var sources = [], len = arguments.length - 1;
+  while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+  return mergeWithSources(collection, sources);
+}
+
+function mergeWith(merger, collection) {
+  var sources = [], len = arguments.length - 2;
+  while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
+
+  return mergeWithSources(collection, sources, merger);
+}
+
+function mergeDeep$1(collection) {
+  var sources = [], len = arguments.length - 1;
+  while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+  return mergeDeepWithSources(collection, sources);
+}
+
+function mergeDeepWith$1(merger, collection) {
+  var sources = [], len = arguments.length - 2;
+  while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
+
+  return mergeDeepWithSources(collection, sources, merger);
+}
+
+function mergeDeepWithSources(collection, sources, merger) {
+  return mergeWithSources(collection, sources, deepMergerWith(merger));
+}
+
+function mergeWithSources(collection, sources, merger) {
+  if (!isDataStructure(collection)) {
+    throw new TypeError(
+      'Cannot merge into non-data-structure value: ' + collection
+    );
+  }
+  if (isImmutable(collection)) {
+    return typeof merger === 'function' && collection.mergeWith
+      ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))
+      : collection.merge
+      ? collection.merge.apply(collection, sources)
+      : collection.concat.apply(collection, sources);
+  }
+  var isArray = Array.isArray(collection);
+  var merged = collection;
+  var Collection = isArray ? IndexedCollection : KeyedCollection;
+  var mergeItem = isArray
+    ? function (value) {
+        // Copy on write
+        if (merged === collection) {
+          merged = shallowCopy(merged);
+        }
+        merged.push(value);
+      }
+    : function (value, key) {
+        var hasVal = hasOwnProperty.call(merged, key);
+        var nextVal =
+          hasVal && merger ? merger(merged[key], value, key) : value;
+        if (!hasVal || nextVal !== merged[key]) {
+          // Copy on write
+          if (merged === collection) {
+            merged = shallowCopy(merged);
+          }
+          merged[key] = nextVal;
+        }
+      };
+  for (var i = 0; i < sources.length; i++) {
+    Collection(sources[i]).forEach(mergeItem);
+  }
+  return merged;
+}
+
+function deepMergerWith(merger) {
+  function deepMerger(oldValue, newValue, key) {
+    return isDataStructure(oldValue) &&
+      isDataStructure(newValue) &&
+      areMergeable(oldValue, newValue)
+      ? mergeWithSources(oldValue, [newValue], deepMerger)
+      : merger
+      ? merger(oldValue, newValue, key)
+      : newValue;
+  }
+  return deepMerger;
+}
+
+/**
+ * It's unclear what the desired behavior is for merging two collections that
+ * fall into separate categories between keyed, indexed, or set-like, so we only
+ * consider them mergeable if they fall into the same category.
+ */
+function areMergeable(oldDataStructure, newDataStructure) {
+  var oldSeq = Seq(oldDataStructure);
+  var newSeq = Seq(newDataStructure);
+  // This logic assumes that a sequence can only fall into one of the three
+  // categories mentioned above (since there's no `isSetLike()` method).
+  return (
+    isIndexed(oldSeq) === isIndexed(newSeq) &&
+    isKeyed(oldSeq) === isKeyed(newSeq)
+  );
+}
+
+function mergeDeep() {
+  var iters = [], len = arguments.length;
+  while ( len-- ) iters[ len ] = arguments[ len ];
+
+  return mergeDeepWithSources(this, iters);
+}
+
+function mergeDeepWith(merger) {
+  var iters = [], len = arguments.length - 1;
+  while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+  return mergeDeepWithSources(this, iters, merger);
+}
+
+function mergeIn(keyPath) {
+  var iters = [], len = arguments.length - 1;
+  while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+  return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });
+}
+
+function mergeDeepIn(keyPath) {
+  var iters = [], len = arguments.length - 1;
+  while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+  return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }
+  );
+}
+
+function withMutations(fn) {
+  var mutable = this.asMutable();
+  fn(mutable);
+  return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
+}
+
+function asMutable() {
+  return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
+}
+
+function asImmutable() {
+  return this.__ensureOwner();
+}
+
+function wasAltered() {
+  return this.__altered;
+}
+
+var Map = /*@__PURE__*/(function (KeyedCollection) {
+  function Map(value) {
+    return value === undefined || value === null
+      ? emptyMap()
+      : isMap(value) && !isOrdered(value)
+      ? value
+      : emptyMap().withMutations(function (map) {
+          var iter = KeyedCollection(value);
+          assertNotInfinite(iter.size);
+          iter.forEach(function (v, k) { return map.set(k, v); });
+        });
+  }
+
+  if ( KeyedCollection ) Map.__proto__ = KeyedCollection;
+  Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype );
+  Map.prototype.constructor = Map;
+
+  Map.of = function of () {
+    var keyValues = [], len = arguments.length;
+    while ( len-- ) keyValues[ len ] = arguments[ len ];
+
+    return emptyMap().withMutations(function (map) {
+      for (var i = 0; i < keyValues.length; i += 2) {
+        if (i + 1 >= keyValues.length) {
+          throw new Error('Missing value for key: ' + keyValues[i]);
+        }
+        map.set(keyValues[i], keyValues[i + 1]);
+      }
+    });
+  };
+
+  Map.prototype.toString = function toString () {
+    return this.__toString('Map {', '}');
+  };
+
+  // @pragma Access
+
+  Map.prototype.get = function get (k, notSetValue) {
+    return this._root
+      ? this._root.get(0, undefined, k, notSetValue)
+      : notSetValue;
+  };
+
+  // @pragma Modification
+
+  Map.prototype.set = function set (k, v) {
+    return updateMap(this, k, v);
+  };
+
+  Map.prototype.remove = function remove (k) {
+    return updateMap(this, k, NOT_SET);
+  };
+
+  Map.prototype.deleteAll = function deleteAll (keys) {
+    var collection = Collection(keys);
+
+    if (collection.size === 0) {
+      return this;
+    }
+
+    return this.withMutations(function (map) {
+      collection.forEach(function (key) { return map.remove(key); });
+    });
+  };
+
+  Map.prototype.clear = function clear () {
+    if (this.size === 0) {
+      return this;
+    }
+    if (this.__ownerID) {
+      this.size = 0;
+      this._root = null;
+      this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return emptyMap();
+  };
+
+  // @pragma Composition
+
+  Map.prototype.sort = function sort (comparator) {
+    // Late binding
+    return OrderedMap(sortFactory(this, comparator));
+  };
+
+  Map.prototype.sortBy = function sortBy (mapper, comparator) {
+    // Late binding
+    return OrderedMap(sortFactory(this, comparator, mapper));
+  };
+
+  Map.prototype.map = function map (mapper, context) {
+    var this$1$1 = this;
+
+    return this.withMutations(function (map) {
+      map.forEach(function (value, key) {
+        map.set(key, mapper.call(context, value, key, this$1$1));
+      });
+    });
+  };
+
+  // @pragma Mutability
+
+  Map.prototype.__iterator = function __iterator (type, reverse) {
+    return new MapIterator(this, type, reverse);
+  };
+
+  Map.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    var iterations = 0;
+    this._root &&
+      this._root.iterate(function (entry) {
+        iterations++;
+        return fn(entry[1], entry[0], this$1$1);
+      }, reverse);
+    return iterations;
+  };
+
+  Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    if (!ownerID) {
+      if (this.size === 0) {
+        return emptyMap();
+      }
+      this.__ownerID = ownerID;
+      this.__altered = false;
+      return this;
+    }
+    return makeMap(this.size, this._root, ownerID, this.__hash);
+  };
+
+  return Map;
+}(KeyedCollection));
+
+Map.isMap = isMap;
+
+var MapPrototype = Map.prototype;
+MapPrototype[IS_MAP_SYMBOL] = true;
+MapPrototype[DELETE] = MapPrototype.remove;
+MapPrototype.removeAll = MapPrototype.deleteAll;
+MapPrototype.setIn = setIn;
+MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;
+MapPrototype.update = update;
+MapPrototype.updateIn = updateIn;
+MapPrototype.merge = MapPrototype.concat = merge$1;
+MapPrototype.mergeWith = mergeWith$1;
+MapPrototype.mergeDeep = mergeDeep;
+MapPrototype.mergeDeepWith = mergeDeepWith;
+MapPrototype.mergeIn = mergeIn;
+MapPrototype.mergeDeepIn = mergeDeepIn;
+MapPrototype.withMutations = withMutations;
+MapPrototype.wasAltered = wasAltered;
+MapPrototype.asImmutable = asImmutable;
+MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;
+MapPrototype['@@transducer/step'] = function (result, arr) {
+  return result.set(arr[0], arr[1]);
+};
+MapPrototype['@@transducer/result'] = function (obj) {
+  return obj.asImmutable();
+};
+
+// #pragma Trie Nodes
+
+var ArrayMapNode = function ArrayMapNode(ownerID, entries) {
+  this.ownerID = ownerID;
+  this.entries = entries;
+};
+
+ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+  var entries = this.entries;
+  for (var ii = 0, len = entries.length; ii < len; ii++) {
+    if (is(key, entries[ii][0])) {
+      return entries[ii][1];
+    }
+  }
+  return notSetValue;
+};
+
+ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+  var removed = value === NOT_SET;
+
+  var entries = this.entries;
+  var idx = 0;
+  var len = entries.length;
+  for (; idx < len; idx++) {
+    if (is(key, entries[idx][0])) {
+      break;
+    }
+  }
+  var exists = idx < len;
+
+  if (exists ? entries[idx][1] === value : removed) {
+    return this;
+  }
+
+  SetRef(didAlter);
+  (removed || !exists) && SetRef(didChangeSize);
+
+  if (removed && entries.length === 1) {
+    return; // undefined
+  }
+
+  if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
+    return createNodes(ownerID, entries, key, value);
+  }
+
+  var isEditable = ownerID && ownerID === this.ownerID;
+  var newEntries = isEditable ? entries : arrCopy(entries);
+
+  if (exists) {
+    if (removed) {
+      idx === len - 1
+        ? newEntries.pop()
+        : (newEntries[idx] = newEntries.pop());
+    } else {
+      newEntries[idx] = [key, value];
+    }
+  } else {
+    newEntries.push([key, value]);
+  }
+
+  if (isEditable) {
+    this.entries = newEntries;
+    return this;
+  }
+
+  return new ArrayMapNode(ownerID, newEntries);
+};
+
+var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {
+  this.ownerID = ownerID;
+  this.bitmap = bitmap;
+  this.nodes = nodes;
+};
+
+BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+  if (keyHash === undefined) {
+    keyHash = hash(key);
+  }
+  var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);
+  var bitmap = this.bitmap;
+  return (bitmap & bit) === 0
+    ? notSetValue
+    : this.nodes[popCount(bitmap & (bit - 1))].get(
+        shift + SHIFT,
+        keyHash,
+        key,
+        notSetValue
+      );
+};
+
+BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+  if (keyHash === undefined) {
+    keyHash = hash(key);
+  }
+  var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+  var bit = 1 << keyHashFrag;
+  var bitmap = this.bitmap;
+  var exists = (bitmap & bit) !== 0;
+
+  if (!exists && value === NOT_SET) {
+    return this;
+  }
+
+  var idx = popCount(bitmap & (bit - 1));
+  var nodes = this.nodes;
+  var node = exists ? nodes[idx] : undefined;
+  var newNode = updateNode(
+    node,
+    ownerID,
+    shift + SHIFT,
+    keyHash,
+    key,
+    value,
+    didChangeSize,
+    didAlter
+  );
+
+  if (newNode === node) {
+    return this;
+  }
+
+  if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
+    return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
+  }
+
+  if (
+    exists &&
+    !newNode &&
+    nodes.length === 2 &&
+    isLeafNode(nodes[idx ^ 1])
+  ) {
+    return nodes[idx ^ 1];
+  }
+
+  if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
+    return newNode;
+  }
+
+  var isEditable = ownerID && ownerID === this.ownerID;
+  var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;
+  var newNodes = exists
+    ? newNode
+      ? setAt(nodes, idx, newNode, isEditable)
+      : spliceOut(nodes, idx, isEditable)
+    : spliceIn(nodes, idx, newNode, isEditable);
+
+  if (isEditable) {
+    this.bitmap = newBitmap;
+    this.nodes = newNodes;
+    return this;
+  }
+
+  return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
+};
+
+var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {
+  this.ownerID = ownerID;
+  this.count = count;
+  this.nodes = nodes;
+};
+
+HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+  if (keyHash === undefined) {
+    keyHash = hash(key);
+  }
+  var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+  var node = this.nodes[idx];
+  return node
+    ? node.get(shift + SHIFT, keyHash, key, notSetValue)
+    : notSetValue;
+};
+
+HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+  if (keyHash === undefined) {
+    keyHash = hash(key);
+  }
+  var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+  var removed = value === NOT_SET;
+  var nodes = this.nodes;
+  var node = nodes[idx];
+
+  if (removed && !node) {
+    return this;
+  }
+
+  var newNode = updateNode(
+    node,
+    ownerID,
+    shift + SHIFT,
+    keyHash,
+    key,
+    value,
+    didChangeSize,
+    didAlter
+  );
+  if (newNode === node) {
+    return this;
+  }
+
+  var newCount = this.count;
+  if (!node) {
+    newCount++;
+  } else if (!newNode) {
+    newCount--;
+    if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
+      return packNodes(ownerID, nodes, newCount, idx);
+    }
+  }
+
+  var isEditable = ownerID && ownerID === this.ownerID;
+  var newNodes = setAt(nodes, idx, newNode, isEditable);
+
+  if (isEditable) {
+    this.count = newCount;
+    this.nodes = newNodes;
+    return this;
+  }
+
+  return new HashArrayMapNode(ownerID, newCount, newNodes);
+};
+
+var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {
+  this.ownerID = ownerID;
+  this.keyHash = keyHash;
+  this.entries = entries;
+};
+
+HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+  var entries = this.entries;
+  for (var ii = 0, len = entries.length; ii < len; ii++) {
+    if (is(key, entries[ii][0])) {
+      return entries[ii][1];
+    }
+  }
+  return notSetValue;
+};
+
+HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+  if (keyHash === undefined) {
+    keyHash = hash(key);
+  }
+
+  var removed = value === NOT_SET;
+
+  if (keyHash !== this.keyHash) {
+    if (removed) {
+      return this;
+    }
+    SetRef(didAlter);
+    SetRef(didChangeSize);
+    return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
+  }
+
+  var entries = this.entries;
+  var idx = 0;
+  var len = entries.length;
+  for (; idx < len; idx++) {
+    if (is(key, entries[idx][0])) {
+      break;
+    }
+  }
+  var exists = idx < len;
+
+  if (exists ? entries[idx][1] === value : removed) {
+    return this;
+  }
+
+  SetRef(didAlter);
+  (removed || !exists) && SetRef(didChangeSize);
+
+  if (removed && len === 2) {
+    return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
+  }
+
+  var isEditable = ownerID && ownerID === this.ownerID;
+  var newEntries = isEditable ? entries : arrCopy(entries);
+
+  if (exists) {
+    if (removed) {
+      idx === len - 1
+        ? newEntries.pop()
+        : (newEntries[idx] = newEntries.pop());
+    } else {
+      newEntries[idx] = [key, value];
+    }
+  } else {
+    newEntries.push([key, value]);
+  }
+
+  if (isEditable) {
+    this.entries = newEntries;
+    return this;
+  }
+
+  return new HashCollisionNode(ownerID, this.keyHash, newEntries);
+};
+
+var ValueNode = function ValueNode(ownerID, keyHash, entry) {
+  this.ownerID = ownerID;
+  this.keyHash = keyHash;
+  this.entry = entry;
+};
+
+ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+  return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
+};
+
+ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+  var removed = value === NOT_SET;
+  var keyMatch = is(key, this.entry[0]);
+  if (keyMatch ? value === this.entry[1] : removed) {
+    return this;
+  }
+
+  SetRef(didAlter);
+
+  if (removed) {
+    SetRef(didChangeSize);
+    return; // undefined
+  }
+
+  if (keyMatch) {
+    if (ownerID && ownerID === this.ownerID) {
+      this.entry[1] = value;
+      return this;
+    }
+    return new ValueNode(ownerID, this.keyHash, [key, value]);
+  }
+
+  SetRef(didChangeSize);
+  return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
+};
+
+// #pragma Iterators
+
+ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate =
+  function (fn, reverse) {
+    var entries = this.entries;
+    for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
+      if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
+        return false;
+      }
+    }
+  };
+
+BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate =
+  function (fn, reverse) {
+    var nodes = this.nodes;
+    for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
+      var node = nodes[reverse ? maxIndex - ii : ii];
+      if (node && node.iterate(fn, reverse) === false) {
+        return false;
+      }
+    }
+  };
+
+// eslint-disable-next-line no-unused-vars
+ValueNode.prototype.iterate = function (fn, reverse) {
+  return fn(this.entry);
+};
+
+var MapIterator = /*@__PURE__*/(function (Iterator) {
+  function MapIterator(map, type, reverse) {
+    this._type = type;
+    this._reverse = reverse;
+    this._stack = map._root && mapIteratorFrame(map._root);
+  }
+
+  if ( Iterator ) MapIterator.__proto__ = Iterator;
+  MapIterator.prototype = Object.create( Iterator && Iterator.prototype );
+  MapIterator.prototype.constructor = MapIterator;
+
+  MapIterator.prototype.next = function next () {
+    var type = this._type;
+    var stack = this._stack;
+    while (stack) {
+      var node = stack.node;
+      var index = stack.index++;
+      var maxIndex = (void 0);
+      if (node.entry) {
+        if (index === 0) {
+          return mapIteratorValue(type, node.entry);
+        }
+      } else if (node.entries) {
+        maxIndex = node.entries.length - 1;
+        if (index <= maxIndex) {
+          return mapIteratorValue(
+            type,
+            node.entries[this._reverse ? maxIndex - index : index]
+          );
+        }
+      } else {
+        maxIndex = node.nodes.length - 1;
+        if (index <= maxIndex) {
+          var subNode = node.nodes[this._reverse ? maxIndex - index : index];
+          if (subNode) {
+            if (subNode.entry) {
+              return mapIteratorValue(type, subNode.entry);
+            }
+            stack = this._stack = mapIteratorFrame(subNode, stack);
+          }
+          continue;
+        }
+      }
+      stack = this._stack = this._stack.__prev;
+    }
+    return iteratorDone();
+  };
+
+  return MapIterator;
+}(Iterator));
+
+function mapIteratorValue(type, entry) {
+  return iteratorValue(type, entry[0], entry[1]);
+}
+
+function mapIteratorFrame(node, prev) {
+  return {
+    node: node,
+    index: 0,
+    __prev: prev,
+  };
+}
+
+function makeMap(size, root, ownerID, hash) {
+  var map = Object.create(MapPrototype);
+  map.size = size;
+  map._root = root;
+  map.__ownerID = ownerID;
+  map.__hash = hash;
+  map.__altered = false;
+  return map;
+}
+
+var EMPTY_MAP;
+function emptyMap() {
+  return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
+}
+
+function updateMap(map, k, v) {
+  var newRoot;
+  var newSize;
+  if (!map._root) {
+    if (v === NOT_SET) {
+      return map;
+    }
+    newSize = 1;
+    newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
+  } else {
+    var didChangeSize = MakeRef();
+    var didAlter = MakeRef();
+    newRoot = updateNode(
+      map._root,
+      map.__ownerID,
+      0,
+      undefined,
+      k,
+      v,
+      didChangeSize,
+      didAlter
+    );
+    if (!didAlter.value) {
+      return map;
+    }
+    newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);
+  }
+  if (map.__ownerID) {
+    map.size = newSize;
+    map._root = newRoot;
+    map.__hash = undefined;
+    map.__altered = true;
+    return map;
+  }
+  return newRoot ? makeMap(newSize, newRoot) : emptyMap();
+}
+
+function updateNode(
+  node,
+  ownerID,
+  shift,
+  keyHash,
+  key,
+  value,
+  didChangeSize,
+  didAlter
+) {
+  if (!node) {
+    if (value === NOT_SET) {
+      return node;
+    }
+    SetRef(didAlter);
+    SetRef(didChangeSize);
+    return new ValueNode(ownerID, keyHash, [key, value]);
+  }
+  return node.update(
+    ownerID,
+    shift,
+    keyHash,
+    key,
+    value,
+    didChangeSize,
+    didAlter
+  );
+}
+
+function isLeafNode(node) {
+  return (
+    node.constructor === ValueNode || node.constructor === HashCollisionNode
+  );
+}
+
+function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
+  if (node.keyHash === keyHash) {
+    return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
+  }
+
+  var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
+  var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+
+  var newNode;
+  var nodes =
+    idx1 === idx2
+      ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]
+      : ((newNode = new ValueNode(ownerID, keyHash, entry)),
+        idx1 < idx2 ? [node, newNode] : [newNode, node]);
+
+  return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
+}
+
+function createNodes(ownerID, entries, key, value) {
+  if (!ownerID) {
+    ownerID = new OwnerID();
+  }
+  var node = new ValueNode(ownerID, hash(key), [key, value]);
+  for (var ii = 0; ii < entries.length; ii++) {
+    var entry = entries[ii];
+    node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
+  }
+  return node;
+}
+
+function packNodes(ownerID, nodes, count, excluding) {
+  var bitmap = 0;
+  var packedII = 0;
+  var packedNodes = new Array(count);
+  for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
+    var node = nodes[ii];
+    if (node !== undefined && ii !== excluding) {
+      bitmap |= bit;
+      packedNodes[packedII++] = node;
+    }
+  }
+  return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
+}
+
+function expandNodes(ownerID, nodes, bitmap, including, node) {
+  var count = 0;
+  var expandedNodes = new Array(SIZE);
+  for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
+    expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
+  }
+  expandedNodes[including] = node;
+  return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
+}
+
+function popCount(x) {
+  x -= (x >> 1) & 0x55555555;
+  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
+  x = (x + (x >> 4)) & 0x0f0f0f0f;
+  x += x >> 8;
+  x += x >> 16;
+  return x & 0x7f;
+}
+
+function setAt(array, idx, val, canEdit) {
+  var newArray = canEdit ? array : arrCopy(array);
+  newArray[idx] = val;
+  return newArray;
+}
+
+function spliceIn(array, idx, val, canEdit) {
+  var newLen = array.length + 1;
+  if (canEdit && idx + 1 === newLen) {
+    array[idx] = val;
+    return array;
+  }
+  var newArray = new Array(newLen);
+  var after = 0;
+  for (var ii = 0; ii < newLen; ii++) {
+    if (ii === idx) {
+      newArray[ii] = val;
+      after = -1;
+    } else {
+      newArray[ii] = array[ii + after];
+    }
+  }
+  return newArray;
+}
+
+function spliceOut(array, idx, canEdit) {
+  var newLen = array.length - 1;
+  if (canEdit && idx === newLen) {
+    array.pop();
+    return array;
+  }
+  var newArray = new Array(newLen);
+  var after = 0;
+  for (var ii = 0; ii < newLen; ii++) {
+    if (ii === idx) {
+      after = 1;
+    }
+    newArray[ii] = array[ii + after];
+  }
+  return newArray;
+}
+
+var MAX_ARRAY_MAP_SIZE = SIZE / 4;
+var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
+var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
+
+var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';
+
+function isList(maybeList) {
+  return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);
+}
+
+var List = /*@__PURE__*/(function (IndexedCollection) {
+  function List(value) {
+    var empty = emptyList();
+    if (value === undefined || value === null) {
+      return empty;
+    }
+    if (isList(value)) {
+      return value;
+    }
+    var iter = IndexedCollection(value);
+    var size = iter.size;
+    if (size === 0) {
+      return empty;
+    }
+    assertNotInfinite(size);
+    if (size > 0 && size < SIZE) {
+      return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
+    }
+    return empty.withMutations(function (list) {
+      list.setSize(size);
+      iter.forEach(function (v, i) { return list.set(i, v); });
+    });
+  }
+
+  if ( IndexedCollection ) List.__proto__ = IndexedCollection;
+  List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
+  List.prototype.constructor = List;
+
+  List.of = function of (/*...values*/) {
+    return this(arguments);
+  };
+
+  List.prototype.toString = function toString () {
+    return this.__toString('List [', ']');
+  };
+
+  // @pragma Access
+
+  List.prototype.get = function get (index, notSetValue) {
+    index = wrapIndex(this, index);
+    if (index >= 0 && index < this.size) {
+      index += this._origin;
+      var node = listNodeFor(this, index);
+      return node && node.array[index & MASK];
+    }
+    return notSetValue;
+  };
+
+  // @pragma Modification
+
+  List.prototype.set = function set (index, value) {
+    return updateList(this, index, value);
+  };
+
+  List.prototype.remove = function remove (index) {
+    return !this.has(index)
+      ? this
+      : index === 0
+      ? this.shift()
+      : index === this.size - 1
+      ? this.pop()
+      : this.splice(index, 1);
+  };
+
+  List.prototype.insert = function insert (index, value) {
+    return this.splice(index, 0, value);
+  };
+
+  List.prototype.clear = function clear () {
+    if (this.size === 0) {
+      return this;
+    }
+    if (this.__ownerID) {
+      this.size = this._origin = this._capacity = 0;
+      this._level = SHIFT;
+      this._root = this._tail = this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return emptyList();
+  };
+
+  List.prototype.push = function push (/*...values*/) {
+    var values = arguments;
+    var oldSize = this.size;
+    return this.withMutations(function (list) {
+      setListBounds(list, 0, oldSize + values.length);
+      for (var ii = 0; ii < values.length; ii++) {
+        list.set(oldSize + ii, values[ii]);
+      }
+    });
+  };
+
+  List.prototype.pop = function pop () {
+    return setListBounds(this, 0, -1);
+  };
+
+  List.prototype.unshift = function unshift (/*...values*/) {
+    var values = arguments;
+    return this.withMutations(function (list) {
+      setListBounds(list, -values.length);
+      for (var ii = 0; ii < values.length; ii++) {
+        list.set(ii, values[ii]);
+      }
+    });
+  };
+
+  List.prototype.shift = function shift () {
+    return setListBounds(this, 1);
+  };
+
+  // @pragma Composition
+
+  List.prototype.concat = function concat (/*...collections*/) {
+    var arguments$1 = arguments;
+
+    var seqs = [];
+    for (var i = 0; i < arguments.length; i++) {
+      var argument = arguments$1[i];
+      var seq = IndexedCollection(
+        typeof argument !== 'string' && hasIterator(argument)
+          ? argument
+          : [argument]
+      );
+      if (seq.size !== 0) {
+        seqs.push(seq);
+      }
+    }
+    if (seqs.length === 0) {
+      return this;
+    }
+    if (this.size === 0 && !this.__ownerID && seqs.length === 1) {
+      return this.constructor(seqs[0]);
+    }
+    return this.withMutations(function (list) {
+      seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });
+    });
+  };
+
+  List.prototype.setSize = function setSize (size) {
+    return setListBounds(this, 0, size);
+  };
+
+  List.prototype.map = function map (mapper, context) {
+    var this$1$1 = this;
+
+    return this.withMutations(function (list) {
+      for (var i = 0; i < this$1$1.size; i++) {
+        list.set(i, mapper.call(context, list.get(i), i, this$1$1));
+      }
+    });
+  };
+
+  // @pragma Iteration
+
+  List.prototype.slice = function slice (begin, end) {
+    var size = this.size;
+    if (wholeSlice(begin, end, size)) {
+      return this;
+    }
+    return setListBounds(
+      this,
+      resolveBegin(begin, size),
+      resolveEnd(end, size)
+    );
+  };
+
+  List.prototype.__iterator = function __iterator (type, reverse) {
+    var index = reverse ? this.size : 0;
+    var values = iterateList(this, reverse);
+    return new Iterator(function () {
+      var value = values();
+      return value === DONE
+        ? iteratorDone()
+        : iteratorValue(type, reverse ? --index : index++, value);
+    });
+  };
+
+  List.prototype.__iterate = function __iterate (fn, reverse) {
+    var index = reverse ? this.size : 0;
+    var values = iterateList(this, reverse);
+    var value;
+    while ((value = values()) !== DONE) {
+      if (fn(value, reverse ? --index : index++, this) === false) {
+        break;
+      }
+    }
+    return index;
+  };
+
+  List.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    if (!ownerID) {
+      if (this.size === 0) {
+        return emptyList();
+      }
+      this.__ownerID = ownerID;
+      this.__altered = false;
+      return this;
+    }
+    return makeList(
+      this._origin,
+      this._capacity,
+      this._level,
+      this._root,
+      this._tail,
+      ownerID,
+      this.__hash
+    );
+  };
+
+  return List;
+}(IndexedCollection));
+
+List.isList = isList;
+
+var ListPrototype = List.prototype;
+ListPrototype[IS_LIST_SYMBOL] = true;
+ListPrototype[DELETE] = ListPrototype.remove;
+ListPrototype.merge = ListPrototype.concat;
+ListPrototype.setIn = setIn;
+ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;
+ListPrototype.update = update;
+ListPrototype.updateIn = updateIn;
+ListPrototype.mergeIn = mergeIn;
+ListPrototype.mergeDeepIn = mergeDeepIn;
+ListPrototype.withMutations = withMutations;
+ListPrototype.wasAltered = wasAltered;
+ListPrototype.asImmutable = asImmutable;
+ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;
+ListPrototype['@@transducer/step'] = function (result, arr) {
+  return result.push(arr);
+};
+ListPrototype['@@transducer/result'] = function (obj) {
+  return obj.asImmutable();
+};
+
+var VNode = function VNode(array, ownerID) {
+  this.array = array;
+  this.ownerID = ownerID;
+};
+
+// TODO: seems like these methods are very similar
+
+VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {
+  if (index === level ? 1 << level : this.array.length === 0) {
+    return this;
+  }
+  var originIndex = (index >>> level) & MASK;
+  if (originIndex >= this.array.length) {
+    return new VNode([], ownerID);
+  }
+  var removingFirst = originIndex === 0;
+  var newChild;
+  if (level > 0) {
+    var oldChild = this.array[originIndex];
+    newChild =
+      oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
+    if (newChild === oldChild && removingFirst) {
+      return this;
+    }
+  }
+  if (removingFirst && !newChild) {
+    return this;
+  }
+  var editable = editableVNode(this, ownerID);
+  if (!removingFirst) {
+    for (var ii = 0; ii < originIndex; ii++) {
+      editable.array[ii] = undefined;
+    }
+  }
+  if (newChild) {
+    editable.array[originIndex] = newChild;
+  }
+  return editable;
+};
+
+VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {
+  if (index === (level ? 1 << level : 0) || this.array.length === 0) {
+    return this;
+  }
+  var sizeIndex = ((index - 1) >>> level) & MASK;
+  if (sizeIndex >= this.array.length) {
+    return this;
+  }
+
+  var newChild;
+  if (level > 0) {
+    var oldChild = this.array[sizeIndex];
+    newChild =
+      oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
+    if (newChild === oldChild && sizeIndex === this.array.length - 1) {
+      return this;
+    }
+  }
+
+  var editable = editableVNode(this, ownerID);
+  editable.array.splice(sizeIndex + 1);
+  if (newChild) {
+    editable.array[sizeIndex] = newChild;
+  }
+  return editable;
+};
+
+var DONE = {};
+
+function iterateList(list, reverse) {
+  var left = list._origin;
+  var right = list._capacity;
+  var tailPos = getTailOffset(right);
+  var tail = list._tail;
+
+  return iterateNodeOrLeaf(list._root, list._level, 0);
+
+  function iterateNodeOrLeaf(node, level, offset) {
+    return level === 0
+      ? iterateLeaf(node, offset)
+      : iterateNode(node, level, offset);
+  }
+
+  function iterateLeaf(node, offset) {
+    var array = offset === tailPos ? tail && tail.array : node && node.array;
+    var from = offset > left ? 0 : left - offset;
+    var to = right - offset;
+    if (to > SIZE) {
+      to = SIZE;
+    }
+    return function () {
+      if (from === to) {
+        return DONE;
+      }
+      var idx = reverse ? --to : from++;
+      return array && array[idx];
+    };
+  }
+
+  function iterateNode(node, level, offset) {
+    var values;
+    var array = node && node.array;
+    var from = offset > left ? 0 : (left - offset) >> level;
+    var to = ((right - offset) >> level) + 1;
+    if (to > SIZE) {
+      to = SIZE;
+    }
+    return function () {
+      while (true) {
+        if (values) {
+          var value = values();
+          if (value !== DONE) {
+            return value;
+          }
+          values = null;
+        }
+        if (from === to) {
+          return DONE;
+        }
+        var idx = reverse ? --to : from++;
+        values = iterateNodeOrLeaf(
+          array && array[idx],
+          level - SHIFT,
+          offset + (idx << level)
+        );
+      }
+    };
+  }
+}
+
+function makeList(origin, capacity, level, root, tail, ownerID, hash) {
+  var list = Object.create(ListPrototype);
+  list.size = capacity - origin;
+  list._origin = origin;
+  list._capacity = capacity;
+  list._level = level;
+  list._root = root;
+  list._tail = tail;
+  list.__ownerID = ownerID;
+  list.__hash = hash;
+  list.__altered = false;
+  return list;
+}
+
+var EMPTY_LIST;
+function emptyList() {
+  return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
+}
+
+function updateList(list, index, value) {
+  index = wrapIndex(list, index);
+
+  if (index !== index) {
+    return list;
+  }
+
+  if (index >= list.size || index < 0) {
+    return list.withMutations(function (list) {
+      index < 0
+        ? setListBounds(list, index).set(0, value)
+        : setListBounds(list, 0, index + 1).set(index, value);
+    });
+  }
+
+  index += list._origin;
+
+  var newTail = list._tail;
+  var newRoot = list._root;
+  var didAlter = MakeRef();
+  if (index >= getTailOffset(list._capacity)) {
+    newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
+  } else {
+    newRoot = updateVNode(
+      newRoot,
+      list.__ownerID,
+      list._level,
+      index,
+      value,
+      didAlter
+    );
+  }
+
+  if (!didAlter.value) {
+    return list;
+  }
+
+  if (list.__ownerID) {
+    list._root = newRoot;
+    list._tail = newTail;
+    list.__hash = undefined;
+    list.__altered = true;
+    return list;
+  }
+  return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
+}
+
+function updateVNode(node, ownerID, level, index, value, didAlter) {
+  var idx = (index >>> level) & MASK;
+  var nodeHas = node && idx < node.array.length;
+  if (!nodeHas && value === undefined) {
+    return node;
+  }
+
+  var newNode;
+
+  if (level > 0) {
+    var lowerNode = node && node.array[idx];
+    var newLowerNode = updateVNode(
+      lowerNode,
+      ownerID,
+      level - SHIFT,
+      index,
+      value,
+      didAlter
+    );
+    if (newLowerNode === lowerNode) {
+      return node;
+    }
+    newNode = editableVNode(node, ownerID);
+    newNode.array[idx] = newLowerNode;
+    return newNode;
+  }
+
+  if (nodeHas && node.array[idx] === value) {
+    return node;
+  }
+
+  if (didAlter) {
+    SetRef(didAlter);
+  }
+
+  newNode = editableVNode(node, ownerID);
+  if (value === undefined && idx === newNode.array.length - 1) {
+    newNode.array.pop();
+  } else {
+    newNode.array[idx] = value;
+  }
+  return newNode;
+}
+
+function editableVNode(node, ownerID) {
+  if (ownerID && node && ownerID === node.ownerID) {
+    return node;
+  }
+  return new VNode(node ? node.array.slice() : [], ownerID);
+}
+
+function listNodeFor(list, rawIndex) {
+  if (rawIndex >= getTailOffset(list._capacity)) {
+    return list._tail;
+  }
+  if (rawIndex < 1 << (list._level + SHIFT)) {
+    var node = list._root;
+    var level = list._level;
+    while (node && level > 0) {
+      node = node.array[(rawIndex >>> level) & MASK];
+      level -= SHIFT;
+    }
+    return node;
+  }
+}
+
+function setListBounds(list, begin, end) {
+  // Sanitize begin & end using this shorthand for ToInt32(argument)
+  // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+  if (begin !== undefined) {
+    begin |= 0;
+  }
+  if (end !== undefined) {
+    end |= 0;
+  }
+  var owner = list.__ownerID || new OwnerID();
+  var oldOrigin = list._origin;
+  var oldCapacity = list._capacity;
+  var newOrigin = oldOrigin + begin;
+  var newCapacity =
+    end === undefined
+      ? oldCapacity
+      : end < 0
+      ? oldCapacity + end
+      : oldOrigin + end;
+  if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
+    return list;
+  }
+
+  // If it's going to end after it starts, it's empty.
+  if (newOrigin >= newCapacity) {
+    return list.clear();
+  }
+
+  var newLevel = list._level;
+  var newRoot = list._root;
+
+  // New origin might need creating a higher root.
+  var offsetShift = 0;
+  while (newOrigin + offsetShift < 0) {
+    newRoot = new VNode(
+      newRoot && newRoot.array.length ? [undefined, newRoot] : [],
+      owner
+    );
+    newLevel += SHIFT;
+    offsetShift += 1 << newLevel;
+  }
+  if (offsetShift) {
+    newOrigin += offsetShift;
+    oldOrigin += offsetShift;
+    newCapacity += offsetShift;
+    oldCapacity += offsetShift;
+  }
+
+  var oldTailOffset = getTailOffset(oldCapacity);
+  var newTailOffset = getTailOffset(newCapacity);
+
+  // New size might need creating a higher root.
+  while (newTailOffset >= 1 << (newLevel + SHIFT)) {
+    newRoot = new VNode(
+      newRoot && newRoot.array.length ? [newRoot] : [],
+      owner
+    );
+    newLevel += SHIFT;
+  }
+
+  // Locate or create the new tail.
+  var oldTail = list._tail;
+  var newTail =
+    newTailOffset < oldTailOffset
+      ? listNodeFor(list, newCapacity - 1)
+      : newTailOffset > oldTailOffset
+      ? new VNode([], owner)
+      : oldTail;
+
+  // Merge Tail into tree.
+  if (
+    oldTail &&
+    newTailOffset > oldTailOffset &&
+    newOrigin < oldCapacity &&
+    oldTail.array.length
+  ) {
+    newRoot = editableVNode(newRoot, owner);
+    var node = newRoot;
+    for (var level = newLevel; level > SHIFT; level -= SHIFT) {
+      var idx = (oldTailOffset >>> level) & MASK;
+      node = node.array[idx] = editableVNode(node.array[idx], owner);
+    }
+    node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
+  }
+
+  // If the size has been reduced, there's a chance the tail needs to be trimmed.
+  if (newCapacity < oldCapacity) {
+    newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
+  }
+
+  // If the new origin is within the tail, then we do not need a root.
+  if (newOrigin >= newTailOffset) {
+    newOrigin -= newTailOffset;
+    newCapacity -= newTailOffset;
+    newLevel = SHIFT;
+    newRoot = null;
+    newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
+
+    // Otherwise, if the root has been trimmed, garbage collect.
+  } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
+    offsetShift = 0;
+
+    // Identify the new top root node of the subtree of the old root.
+    while (newRoot) {
+      var beginIndex = (newOrigin >>> newLevel) & MASK;
+      if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {
+        break;
+      }
+      if (beginIndex) {
+        offsetShift += (1 << newLevel) * beginIndex;
+      }
+      newLevel -= SHIFT;
+      newRoot = newRoot.array[beginIndex];
+    }
+
+    // Trim the new sides of the new root.
+    if (newRoot && newOrigin > oldOrigin) {
+      newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
+    }
+    if (newRoot && newTailOffset < oldTailOffset) {
+      newRoot = newRoot.removeAfter(
+        owner,
+        newLevel,
+        newTailOffset - offsetShift
+      );
+    }
+    if (offsetShift) {
+      newOrigin -= offsetShift;
+      newCapacity -= offsetShift;
+    }
+  }
+
+  if (list.__ownerID) {
+    list.size = newCapacity - newOrigin;
+    list._origin = newOrigin;
+    list._capacity = newCapacity;
+    list._level = newLevel;
+    list._root = newRoot;
+    list._tail = newTail;
+    list.__hash = undefined;
+    list.__altered = true;
+    return list;
+  }
+  return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
+}
+
+function getTailOffset(size) {
+  return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;
+}
+
+var OrderedMap = /*@__PURE__*/(function (Map) {
+  function OrderedMap(value) {
+    return value === undefined || value === null
+      ? emptyOrderedMap()
+      : isOrderedMap(value)
+      ? value
+      : emptyOrderedMap().withMutations(function (map) {
+          var iter = KeyedCollection(value);
+          assertNotInfinite(iter.size);
+          iter.forEach(function (v, k) { return map.set(k, v); });
+        });
+  }
+
+  if ( Map ) OrderedMap.__proto__ = Map;
+  OrderedMap.prototype = Object.create( Map && Map.prototype );
+  OrderedMap.prototype.constructor = OrderedMap;
+
+  OrderedMap.of = function of (/*...values*/) {
+    return this(arguments);
+  };
+
+  OrderedMap.prototype.toString = function toString () {
+    return this.__toString('OrderedMap {', '}');
+  };
+
+  // @pragma Access
+
+  OrderedMap.prototype.get = function get (k, notSetValue) {
+    var index = this._map.get(k);
+    return index !== undefined ? this._list.get(index)[1] : notSetValue;
+  };
+
+  // @pragma Modification
+
+  OrderedMap.prototype.clear = function clear () {
+    if (this.size === 0) {
+      return this;
+    }
+    if (this.__ownerID) {
+      this.size = 0;
+      this._map.clear();
+      this._list.clear();
+      this.__altered = true;
+      return this;
+    }
+    return emptyOrderedMap();
+  };
+
+  OrderedMap.prototype.set = function set (k, v) {
+    return updateOrderedMap(this, k, v);
+  };
+
+  OrderedMap.prototype.remove = function remove (k) {
+    return updateOrderedMap(this, k, NOT_SET);
+  };
+
+  OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    return this._list.__iterate(
+      function (entry) { return entry && fn(entry[1], entry[0], this$1$1); },
+      reverse
+    );
+  };
+
+  OrderedMap.prototype.__iterator = function __iterator (type, reverse) {
+    return this._list.fromEntrySeq().__iterator(type, reverse);
+  };
+
+  OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    var newMap = this._map.__ensureOwner(ownerID);
+    var newList = this._list.__ensureOwner(ownerID);
+    if (!ownerID) {
+      if (this.size === 0) {
+        return emptyOrderedMap();
+      }
+      this.__ownerID = ownerID;
+      this.__altered = false;
+      this._map = newMap;
+      this._list = newList;
+      return this;
+    }
+    return makeOrderedMap(newMap, newList, ownerID, this.__hash);
+  };
+
+  return OrderedMap;
+}(Map));
+
+OrderedMap.isOrderedMap = isOrderedMap;
+
+OrderedMap.prototype[IS_ORDERED_SYMBOL] = true;
+OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
+
+function makeOrderedMap(map, list, ownerID, hash) {
+  var omap = Object.create(OrderedMap.prototype);
+  omap.size = map ? map.size : 0;
+  omap._map = map;
+  omap._list = list;
+  omap.__ownerID = ownerID;
+  omap.__hash = hash;
+  omap.__altered = false;
+  return omap;
+}
+
+var EMPTY_ORDERED_MAP;
+function emptyOrderedMap() {
+  return (
+    EMPTY_ORDERED_MAP ||
+    (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))
+  );
+}
+
+function updateOrderedMap(omap, k, v) {
+  var map = omap._map;
+  var list = omap._list;
+  var i = map.get(k);
+  var has = i !== undefined;
+  var newMap;
+  var newList;
+  if (v === NOT_SET) {
+    // removed
+    if (!has) {
+      return omap;
+    }
+    if (list.size >= SIZE && list.size >= map.size * 2) {
+      newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });
+      newMap = newList
+        .toKeyedSeq()
+        .map(function (entry) { return entry[0]; })
+        .flip()
+        .toMap();
+      if (omap.__ownerID) {
+        newMap.__ownerID = newList.__ownerID = omap.__ownerID;
+      }
+    } else {
+      newMap = map.remove(k);
+      newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
+    }
+  } else if (has) {
+    if (v === list.get(i)[1]) {
+      return omap;
+    }
+    newMap = map;
+    newList = list.set(i, [k, v]);
+  } else {
+    newMap = map.set(k, list.size);
+    newList = list.set(list.size, [k, v]);
+  }
+  if (omap.__ownerID) {
+    omap.size = newMap.size;
+    omap._map = newMap;
+    omap._list = newList;
+    omap.__hash = undefined;
+    omap.__altered = true;
+    return omap;
+  }
+  return makeOrderedMap(newMap, newList);
+}
+
+var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';
+
+function isStack(maybeStack) {
+  return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);
+}
+
+var Stack = /*@__PURE__*/(function (IndexedCollection) {
+  function Stack(value) {
+    return value === undefined || value === null
+      ? emptyStack()
+      : isStack(value)
+      ? value
+      : emptyStack().pushAll(value);
+  }
+
+  if ( IndexedCollection ) Stack.__proto__ = IndexedCollection;
+  Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
+  Stack.prototype.constructor = Stack;
+
+  Stack.of = function of (/*...values*/) {
+    return this(arguments);
+  };
+
+  Stack.prototype.toString = function toString () {
+    return this.__toString('Stack [', ']');
+  };
+
+  // @pragma Access
+
+  Stack.prototype.get = function get (index, notSetValue) {
+    var head = this._head;
+    index = wrapIndex(this, index);
+    while (head && index--) {
+      head = head.next;
+    }
+    return head ? head.value : notSetValue;
+  };
+
+  Stack.prototype.peek = function peek () {
+    return this._head && this._head.value;
+  };
+
+  // @pragma Modification
+
+  Stack.prototype.push = function push (/*...values*/) {
+    var arguments$1 = arguments;
+
+    if (arguments.length === 0) {
+      return this;
+    }
+    var newSize = this.size + arguments.length;
+    var head = this._head;
+    for (var ii = arguments.length - 1; ii >= 0; ii--) {
+      head = {
+        value: arguments$1[ii],
+        next: head,
+      };
+    }
+    if (this.__ownerID) {
+      this.size = newSize;
+      this._head = head;
+      this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return makeStack(newSize, head);
+  };
+
+  Stack.prototype.pushAll = function pushAll (iter) {
+    iter = IndexedCollection(iter);
+    if (iter.size === 0) {
+      return this;
+    }
+    if (this.size === 0 && isStack(iter)) {
+      return iter;
+    }
+    assertNotInfinite(iter.size);
+    var newSize = this.size;
+    var head = this._head;
+    iter.__iterate(function (value) {
+      newSize++;
+      head = {
+        value: value,
+        next: head,
+      };
+    }, /* reverse */ true);
+    if (this.__ownerID) {
+      this.size = newSize;
+      this._head = head;
+      this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return makeStack(newSize, head);
+  };
+
+  Stack.prototype.pop = function pop () {
+    return this.slice(1);
+  };
+
+  Stack.prototype.clear = function clear () {
+    if (this.size === 0) {
+      return this;
+    }
+    if (this.__ownerID) {
+      this.size = 0;
+      this._head = undefined;
+      this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return emptyStack();
+  };
+
+  Stack.prototype.slice = function slice (begin, end) {
+    if (wholeSlice(begin, end, this.size)) {
+      return this;
+    }
+    var resolvedBegin = resolveBegin(begin, this.size);
+    var resolvedEnd = resolveEnd(end, this.size);
+    if (resolvedEnd !== this.size) {
+      // super.slice(begin, end);
+      return IndexedCollection.prototype.slice.call(this, begin, end);
+    }
+    var newSize = this.size - resolvedBegin;
+    var head = this._head;
+    while (resolvedBegin--) {
+      head = head.next;
+    }
+    if (this.__ownerID) {
+      this.size = newSize;
+      this._head = head;
+      this.__hash = undefined;
+      this.__altered = true;
+      return this;
+    }
+    return makeStack(newSize, head);
+  };
+
+  // @pragma Mutability
+
+  Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    if (!ownerID) {
+      if (this.size === 0) {
+        return emptyStack();
+      }
+      this.__ownerID = ownerID;
+      this.__altered = false;
+      return this;
+    }
+    return makeStack(this.size, this._head, ownerID, this.__hash);
+  };
+
+  // @pragma Iteration
+
+  Stack.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    if (reverse) {
+      return new ArraySeq(this.toArray()).__iterate(
+        function (v, k) { return fn(v, k, this$1$1); },
+        reverse
+      );
+    }
+    var iterations = 0;
+    var node = this._head;
+    while (node) {
+      if (fn(node.value, iterations++, this) === false) {
+        break;
+      }
+      node = node.next;
+    }
+    return iterations;
+  };
+
+  Stack.prototype.__iterator = function __iterator (type, reverse) {
+    if (reverse) {
+      return new ArraySeq(this.toArray()).__iterator(type, reverse);
+    }
+    var iterations = 0;
+    var node = this._head;
+    return new Iterator(function () {
+      if (node) {
+        var value = node.value;
+        node = node.next;
+        return iteratorValue(type, iterations++, value);
+      }
+      return iteratorDone();
+    });
+  };
+
+  return Stack;
+}(IndexedCollection));
+
+Stack.isStack = isStack;
+
+var StackPrototype = Stack.prototype;
+StackPrototype[IS_STACK_SYMBOL] = true;
+StackPrototype.shift = StackPrototype.pop;
+StackPrototype.unshift = StackPrototype.push;
+StackPrototype.unshiftAll = StackPrototype.pushAll;
+StackPrototype.withMutations = withMutations;
+StackPrototype.wasAltered = wasAltered;
+StackPrototype.asImmutable = asImmutable;
+StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;
+StackPrototype['@@transducer/step'] = function (result, arr) {
+  return result.unshift(arr);
+};
+StackPrototype['@@transducer/result'] = function (obj) {
+  return obj.asImmutable();
+};
+
+function makeStack(size, head, ownerID, hash) {
+  var map = Object.create(StackPrototype);
+  map.size = size;
+  map._head = head;
+  map.__ownerID = ownerID;
+  map.__hash = hash;
+  map.__altered = false;
+  return map;
+}
+
+var EMPTY_STACK;
+function emptyStack() {
+  return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
+}
+
+var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';
+
+function isSet(maybeSet) {
+  return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);
+}
+
+function isOrderedSet(maybeOrderedSet) {
+  return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
+}
+
+function deepEqual(a, b) {
+  if (a === b) {
+    return true;
+  }
+
+  if (
+    !isCollection(b) ||
+    (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||
+    (a.__hash !== undefined &&
+      b.__hash !== undefined &&
+      a.__hash !== b.__hash) ||
+    isKeyed(a) !== isKeyed(b) ||
+    isIndexed(a) !== isIndexed(b) ||
+    isOrdered(a) !== isOrdered(b)
+  ) {
+    return false;
+  }
+
+  if (a.size === 0 && b.size === 0) {
+    return true;
+  }
+
+  var notAssociative = !isAssociative(a);
+
+  if (isOrdered(a)) {
+    var entries = a.entries();
+    return (
+      b.every(function (v, k) {
+        var entry = entries.next().value;
+        return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
+      }) && entries.next().done
+    );
+  }
+
+  var flipped = false;
+
+  if (a.size === undefined) {
+    if (b.size === undefined) {
+      if (typeof a.cacheResult === 'function') {
+        a.cacheResult();
+      }
+    } else {
+      flipped = true;
+      var _ = a;
+      a = b;
+      b = _;
+    }
+  }
+
+  var allEqual = true;
+  var bSize = b.__iterate(function (v, k) {
+    if (
+      notAssociative
+        ? !a.has(v)
+        : flipped
+        ? !is(v, a.get(k, NOT_SET))
+        : !is(a.get(k, NOT_SET), v)
+    ) {
+      allEqual = false;
+      return false;
+    }
+  });
+
+  return allEqual && a.size === bSize;
+}
+
+function mixin(ctor, methods) {
+  var keyCopier = function (key) {
+    ctor.prototype[key] = methods[key];
+  };
+  Object.keys(methods).forEach(keyCopier);
+  Object.getOwnPropertySymbols &&
+    Object.getOwnPropertySymbols(methods).forEach(keyCopier);
+  return ctor;
+}
+
+function toJS(value) {
+  if (!value || typeof value !== 'object') {
+    return value;
+  }
+  if (!isCollection(value)) {
+    if (!isDataStructure(value)) {
+      return value;
+    }
+    value = Seq(value);
+  }
+  if (isKeyed(value)) {
+    var result$1 = {};
+    value.__iterate(function (v, k) {
+      result$1[k] = toJS(v);
+    });
+    return result$1;
+  }
+  var result = [];
+  value.__iterate(function (v) {
+    result.push(toJS(v));
+  });
+  return result;
+}
+
+var Set = /*@__PURE__*/(function (SetCollection) {
+  function Set(value) {
+    return value === undefined || value === null
+      ? emptySet()
+      : isSet(value) && !isOrdered(value)
+      ? value
+      : emptySet().withMutations(function (set) {
+          var iter = SetCollection(value);
+          assertNotInfinite(iter.size);
+          iter.forEach(function (v) { return set.add(v); });
+        });
+  }
+
+  if ( SetCollection ) Set.__proto__ = SetCollection;
+  Set.prototype = Object.create( SetCollection && SetCollection.prototype );
+  Set.prototype.constructor = Set;
+
+  Set.of = function of (/*...values*/) {
+    return this(arguments);
+  };
+
+  Set.fromKeys = function fromKeys (value) {
+    return this(KeyedCollection(value).keySeq());
+  };
+
+  Set.intersect = function intersect (sets) {
+    sets = Collection(sets).toArray();
+    return sets.length
+      ? SetPrototype.intersect.apply(Set(sets.pop()), sets)
+      : emptySet();
+  };
+
+  Set.union = function union (sets) {
+    sets = Collection(sets).toArray();
+    return sets.length
+      ? SetPrototype.union.apply(Set(sets.pop()), sets)
+      : emptySet();
+  };
+
+  Set.prototype.toString = function toString () {
+    return this.__toString('Set {', '}');
+  };
+
+  // @pragma Access
+
+  Set.prototype.has = function has (value) {
+    return this._map.has(value);
+  };
+
+  // @pragma Modification
+
+  Set.prototype.add = function add (value) {
+    return updateSet(this, this._map.set(value, value));
+  };
+
+  Set.prototype.remove = function remove (value) {
+    return updateSet(this, this._map.remove(value));
+  };
+
+  Set.prototype.clear = function clear () {
+    return updateSet(this, this._map.clear());
+  };
+
+  // @pragma Composition
+
+  Set.prototype.map = function map (mapper, context) {
+    var this$1$1 = this;
+
+    // keep track if the set is altered by the map function
+    var didChanges = false;
+
+    var newMap = updateSet(
+      this,
+      this._map.mapEntries(function (ref) {
+        var v = ref[1];
+
+        var mapped = mapper.call(context, v, v, this$1$1);
+
+        if (mapped !== v) {
+          didChanges = true;
+        }
+
+        return [mapped, mapped];
+      }, context)
+    );
+
+    return didChanges ? newMap : this;
+  };
+
+  Set.prototype.union = function union () {
+    var iters = [], len = arguments.length;
+    while ( len-- ) iters[ len ] = arguments[ len ];
+
+    iters = iters.filter(function (x) { return x.size !== 0; });
+    if (iters.length === 0) {
+      return this;
+    }
+    if (this.size === 0 && !this.__ownerID && iters.length === 1) {
+      return this.constructor(iters[0]);
+    }
+    return this.withMutations(function (set) {
+      for (var ii = 0; ii < iters.length; ii++) {
+        if (typeof iters[ii] === 'string') {
+          set.add(iters[ii]);
+        } else {
+          SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });
+        }
+      }
+    });
+  };
+
+  Set.prototype.intersect = function intersect () {
+    var iters = [], len = arguments.length;
+    while ( len-- ) iters[ len ] = arguments[ len ];
+
+    if (iters.length === 0) {
+      return this;
+    }
+    iters = iters.map(function (iter) { return SetCollection(iter); });
+    var toRemove = [];
+    this.forEach(function (value) {
+      if (!iters.every(function (iter) { return iter.includes(value); })) {
+        toRemove.push(value);
+      }
+    });
+    return this.withMutations(function (set) {
+      toRemove.forEach(function (value) {
+        set.remove(value);
+      });
+    });
+  };
+
+  Set.prototype.subtract = function subtract () {
+    var iters = [], len = arguments.length;
+    while ( len-- ) iters[ len ] = arguments[ len ];
+
+    if (iters.length === 0) {
+      return this;
+    }
+    iters = iters.map(function (iter) { return SetCollection(iter); });
+    var toRemove = [];
+    this.forEach(function (value) {
+      if (iters.some(function (iter) { return iter.includes(value); })) {
+        toRemove.push(value);
+      }
+    });
+    return this.withMutations(function (set) {
+      toRemove.forEach(function (value) {
+        set.remove(value);
+      });
+    });
+  };
+
+  Set.prototype.sort = function sort (comparator) {
+    // Late binding
+    return OrderedSet(sortFactory(this, comparator));
+  };
+
+  Set.prototype.sortBy = function sortBy (mapper, comparator) {
+    // Late binding
+    return OrderedSet(sortFactory(this, comparator, mapper));
+  };
+
+  Set.prototype.wasAltered = function wasAltered () {
+    return this._map.wasAltered();
+  };
+
+  Set.prototype.__iterate = function __iterate (fn, reverse) {
+    var this$1$1 = this;
+
+    return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse);
+  };
+
+  Set.prototype.__iterator = function __iterator (type, reverse) {
+    return this._map.__iterator(type, reverse);
+  };
+
+  Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    var newMap = this._map.__ensureOwner(ownerID);
+    if (!ownerID) {
+      if (this.size === 0) {
+        return this.__empty();
+      }
+      this.__ownerID = ownerID;
+      this._map = newMap;
+      return this;
+    }
+    return this.__make(newMap, ownerID);
+  };
+
+  return Set;
+}(SetCollection));
+
+Set.isSet = isSet;
+
+var SetPrototype = Set.prototype;
+SetPrototype[IS_SET_SYMBOL] = true;
+SetPrototype[DELETE] = SetPrototype.remove;
+SetPrototype.merge = SetPrototype.concat = SetPrototype.union;
+SetPrototype.withMutations = withMutations;
+SetPrototype.asImmutable = asImmutable;
+SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;
+SetPrototype['@@transducer/step'] = function (result, arr) {
+  return result.add(arr);
+};
+SetPrototype['@@transducer/result'] = function (obj) {
+  return obj.asImmutable();
+};
+
+SetPrototype.__empty = emptySet;
+SetPrototype.__make = makeSet;
+
+function updateSet(set, newMap) {
+  if (set.__ownerID) {
+    set.size = newMap.size;
+    set._map = newMap;
+    return set;
+  }
+  return newMap === set._map
+    ? set
+    : newMap.size === 0
+    ? set.__empty()
+    : set.__make(newMap);
+}
+
+function makeSet(map, ownerID) {
+  var set = Object.create(SetPrototype);
+  set.size = map ? map.size : 0;
+  set._map = map;
+  set.__ownerID = ownerID;
+  return set;
+}
+
+var EMPTY_SET;
+function emptySet() {
+  return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
+}
+
+/**
+ * Returns a lazy seq of nums from start (inclusive) to end
+ * (exclusive), by step, where start defaults to 0, step to 1, and end to
+ * infinity. When start is equal to end, returns empty list.
+ */
+var Range = /*@__PURE__*/(function (IndexedSeq) {
+  function Range(start, end, step) {
+    if (!(this instanceof Range)) {
+      return new Range(start, end, step);
+    }
+    invariant(step !== 0, 'Cannot step a Range by 0');
+    start = start || 0;
+    if (end === undefined) {
+      end = Infinity;
+    }
+    step = step === undefined ? 1 : Math.abs(step);
+    if (end < start) {
+      step = -step;
+    }
+    this._start = start;
+    this._end = end;
+    this._step = step;
+    this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
+    if (this.size === 0) {
+      if (EMPTY_RANGE) {
+        return EMPTY_RANGE;
+      }
+      EMPTY_RANGE = this;
+    }
+  }
+
+  if ( IndexedSeq ) Range.__proto__ = IndexedSeq;
+  Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+  Range.prototype.constructor = Range;
+
+  Range.prototype.toString = function toString () {
+    if (this.size === 0) {
+      return 'Range []';
+    }
+    return (
+      'Range [ ' +
+      this._start +
+      '...' +
+      this._end +
+      (this._step !== 1 ? ' by ' + this._step : '') +
+      ' ]'
+    );
+  };
+
+  Range.prototype.get = function get (index, notSetValue) {
+    return this.has(index)
+      ? this._start + wrapIndex(this, index) * this._step
+      : notSetValue;
+  };
+
+  Range.prototype.includes = function includes (searchValue) {
+    var possibleIndex = (searchValue - this._start) / this._step;
+    return (
+      possibleIndex >= 0 &&
+      possibleIndex < this.size &&
+      possibleIndex === Math.floor(possibleIndex)
+    );
+  };
+
+  Range.prototype.slice = function slice (begin, end) {
+    if (wholeSlice(begin, end, this.size)) {
+      return this;
+    }
+    begin = resolveBegin(begin, this.size);
+    end = resolveEnd(end, this.size);
+    if (end <= begin) {
+      return new Range(0, 0);
+    }
+    return new Range(
+      this.get(begin, this._end),
+      this.get(end, this._end),
+      this._step
+    );
+  };
+
+  Range.prototype.indexOf = function indexOf (searchValue) {
+    var offsetValue = searchValue - this._start;
+    if (offsetValue % this._step === 0) {
+      var index = offsetValue / this._step;
+      if (index >= 0 && index < this.size) {
+        return index;
+      }
+    }
+    return -1;
+  };
+
+  Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {
+    return this.indexOf(searchValue);
+  };
+
+  Range.prototype.__iterate = function __iterate (fn, reverse) {
+    var size = this.size;
+    var step = this._step;
+    var value = reverse ? this._start + (size - 1) * step : this._start;
+    var i = 0;
+    while (i !== size) {
+      if (fn(value, reverse ? size - ++i : i++, this) === false) {
+        break;
+      }
+      value += reverse ? -step : step;
+    }
+    return i;
+  };
+
+  Range.prototype.__iterator = function __iterator (type, reverse) {
+    var size = this.size;
+    var step = this._step;
+    var value = reverse ? this._start + (size - 1) * step : this._start;
+    var i = 0;
+    return new Iterator(function () {
+      if (i === size) {
+        return iteratorDone();
+      }
+      var v = value;
+      value += reverse ? -step : step;
+      return iteratorValue(type, reverse ? size - ++i : i++, v);
+    });
+  };
+
+  Range.prototype.equals = function equals (other) {
+    return other instanceof Range
+      ? this._start === other._start &&
+          this._end === other._end &&
+          this._step === other._step
+      : deepEqual(this, other);
+  };
+
+  return Range;
+}(IndexedSeq));
+
+var EMPTY_RANGE;
+
+function getIn$1(collection, searchKeyPath, notSetValue) {
+  var keyPath = coerceKeyPath(searchKeyPath);
+  var i = 0;
+  while (i !== keyPath.length) {
+    collection = get(collection, keyPath[i++], NOT_SET);
+    if (collection === NOT_SET) {
+      return notSetValue;
+    }
+  }
+  return collection;
+}
+
+function getIn(searchKeyPath, notSetValue) {
+  return getIn$1(this, searchKeyPath, notSetValue);
+}
+
+function hasIn$1(collection, keyPath) {
+  return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;
+}
+
+function hasIn(searchKeyPath) {
+  return hasIn$1(this, searchKeyPath);
+}
+
+function toObject() {
+  assertNotInfinite(this.size);
+  var object = {};
+  this.__iterate(function (v, k) {
+    object[k] = v;
+  });
+  return object;
+}
+
+// Note: all of these methods are deprecated.
+Collection.isIterable = isCollection;
+Collection.isKeyed = isKeyed;
+Collection.isIndexed = isIndexed;
+Collection.isAssociative = isAssociative;
+Collection.isOrdered = isOrdered;
+
+Collection.Iterator = Iterator;
+
+mixin(Collection, {
+  // ### Conversion to other types
+
+  toArray: function toArray() {
+    assertNotInfinite(this.size);
+    var array = new Array(this.size || 0);
+    var useTuples = isKeyed(this);
+    var i = 0;
+    this.__iterate(function (v, k) {
+      // Keyed collections produce an array of tuples.
+      array[i++] = useTuples ? [k, v] : v;
+    });
+    return array;
+  },
+
+  toIndexedSeq: function toIndexedSeq() {
+    return new ToIndexedSequence(this);
+  },
+
+  toJS: function toJS$1() {
+    return toJS(this);
+  },
+
+  toKeyedSeq: function toKeyedSeq() {
+    return new ToKeyedSequence(this, true);
+  },
+
+  toMap: function toMap() {
+    // Use Late Binding here to solve the circular dependency.
+    return Map(this.toKeyedSeq());
+  },
+
+  toObject: toObject,
+
+  toOrderedMap: function toOrderedMap() {
+    // Use Late Binding here to solve the circular dependency.
+    return OrderedMap(this.toKeyedSeq());
+  },
+
+  toOrderedSet: function toOrderedSet() {
+    // Use Late Binding here to solve the circular dependency.
+    return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
+  },
+
+  toSet: function toSet() {
+    // Use Late Binding here to solve the circular dependency.
+    return Set(isKeyed(this) ? this.valueSeq() : this);
+  },
+
+  toSetSeq: function toSetSeq() {
+    return new ToSetSequence(this);
+  },
+
+  toSeq: function toSeq() {
+    return isIndexed(this)
+      ? this.toIndexedSeq()
+      : isKeyed(this)
+      ? this.toKeyedSeq()
+      : this.toSetSeq();
+  },
+
+  toStack: function toStack() {
+    // Use Late Binding here to solve the circular dependency.
+    return Stack(isKeyed(this) ? this.valueSeq() : this);
+  },
+
+  toList: function toList() {
+    // Use Late Binding here to solve the circular dependency.
+    return List(isKeyed(this) ? this.valueSeq() : this);
+  },
+
+  // ### Common JavaScript methods and properties
+
+  toString: function toString() {
+    return '[Collection]';
+  },
+
+  __toString: function __toString(head, tail) {
+    if (this.size === 0) {
+      return head + tail;
+    }
+    return (
+      head +
+      ' ' +
+      this.toSeq().map(this.__toStringMapper).join(', ') +
+      ' ' +
+      tail
+    );
+  },
+
+  // ### ES6 Collection methods (ES6 Array and Map)
+
+  concat: function concat() {
+    var values = [], len = arguments.length;
+    while ( len-- ) values[ len ] = arguments[ len ];
+
+    return reify(this, concatFactory(this, values));
+  },
+
+  includes: function includes(searchValue) {
+    return this.some(function (value) { return is(value, searchValue); });
+  },
+
+  entries: function entries() {
+    return this.__iterator(ITERATE_ENTRIES);
+  },
+
+  every: function every(predicate, context) {
+    assertNotInfinite(this.size);
+    var returnValue = true;
+    this.__iterate(function (v, k, c) {
+      if (!predicate.call(context, v, k, c)) {
+        returnValue = false;
+        return false;
+      }
+    });
+    return returnValue;
+  },
+
+  filter: function filter(predicate, context) {
+    return reify(this, filterFactory(this, predicate, context, true));
+  },
+
+  partition: function partition(predicate, context) {
+    return partitionFactory(this, predicate, context);
+  },
+
+  find: function find(predicate, context, notSetValue) {
+    var entry = this.findEntry(predicate, context);
+    return entry ? entry[1] : notSetValue;
+  },
+
+  forEach: function forEach(sideEffect, context) {
+    assertNotInfinite(this.size);
+    return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
+  },
+
+  join: function join(separator) {
+    assertNotInfinite(this.size);
+    separator = separator !== undefined ? '' + separator : ',';
+    var joined = '';
+    var isFirst = true;
+    this.__iterate(function (v) {
+      isFirst ? (isFirst = false) : (joined += separator);
+      joined += v !== null && v !== undefined ? v.toString() : '';
+    });
+    return joined;
+  },
+
+  keys: function keys() {
+    return this.__iterator(ITERATE_KEYS);
+  },
+
+  map: function map(mapper, context) {
+    return reify(this, mapFactory(this, mapper, context));
+  },
+
+  reduce: function reduce$1(reducer, initialReduction, context) {
+    return reduce(
+      this,
+      reducer,
+      initialReduction,
+      context,
+      arguments.length < 2,
+      false
+    );
+  },
+
+  reduceRight: function reduceRight(reducer, initialReduction, context) {
+    return reduce(
+      this,
+      reducer,
+      initialReduction,
+      context,
+      arguments.length < 2,
+      true
+    );
+  },
+
+  reverse: function reverse() {
+    return reify(this, reverseFactory(this, true));
+  },
+
+  slice: function slice(begin, end) {
+    return reify(this, sliceFactory(this, begin, end, true));
+  },
+
+  some: function some(predicate, context) {
+    assertNotInfinite(this.size);
+    var returnValue = false;
+    this.__iterate(function (v, k, c) {
+      if (predicate.call(context, v, k, c)) {
+        returnValue = true;
+        return false;
+      }
+    });
+    return returnValue;
+  },
+
+  sort: function sort(comparator) {
+    return reify(this, sortFactory(this, comparator));
+  },
+
+  values: function values() {
+    return this.__iterator(ITERATE_VALUES);
+  },
+
+  // ### More sequential methods
+
+  butLast: function butLast() {
+    return this.slice(0, -1);
+  },
+
+  isEmpty: function isEmpty() {
+    return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });
+  },
+
+  count: function count(predicate, context) {
+    return ensureSize(
+      predicate ? this.toSeq().filter(predicate, context) : this
+    );
+  },
+
+  countBy: function countBy(grouper, context) {
+    return countByFactory(this, grouper, context);
+  },
+
+  equals: function equals(other) {
+    return deepEqual(this, other);
+  },
+
+  entrySeq: function entrySeq() {
+    var collection = this;
+    if (collection._cache) {
+      // We cache as an entries array, so we can just return the cache!
+      return new ArraySeq(collection._cache);
+    }
+    var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();
+    entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };
+    return entriesSequence;
+  },
+
+  filterNot: function filterNot(predicate, context) {
+    return this.filter(not(predicate), context);
+  },
+
+  findEntry: function findEntry(predicate, context, notSetValue) {
+    var found = notSetValue;
+    this.__iterate(function (v, k, c) {
+      if (predicate.call(context, v, k, c)) {
+        found = [k, v];
+        return false;
+      }
+    });
+    return found;
+  },
+
+  findKey: function findKey(predicate, context) {
+    var entry = this.findEntry(predicate, context);
+    return entry && entry[0];
+  },
+
+  findLast: function findLast(predicate, context, notSetValue) {
+    return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
+  },
+
+  findLastEntry: function findLastEntry(predicate, context, notSetValue) {
+    return this.toKeyedSeq()
+      .reverse()
+      .findEntry(predicate, context, notSetValue);
+  },
+
+  findLastKey: function findLastKey(predicate, context) {
+    return this.toKeyedSeq().reverse().findKey(predicate, context);
+  },
+
+  first: function first(notSetValue) {
+    return this.find(returnTrue, null, notSetValue);
+  },
+
+  flatMap: function flatMap(mapper, context) {
+    return reify(this, flatMapFactory(this, mapper, context));
+  },
+
+  flatten: function flatten(depth) {
+    return reify(this, flattenFactory(this, depth, true));
+  },
+
+  fromEntrySeq: function fromEntrySeq() {
+    return new FromEntriesSequence(this);
+  },
+
+  get: function get(searchKey, notSetValue) {
+    return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);
+  },
+
+  getIn: getIn,
+
+  groupBy: function groupBy(grouper, context) {
+    return groupByFactory(this, grouper, context);
+  },
+
+  has: function has(searchKey) {
+    return this.get(searchKey, NOT_SET) !== NOT_SET;
+  },
+
+  hasIn: hasIn,
+
+  isSubset: function isSubset(iter) {
+    iter = typeof iter.includes === 'function' ? iter : Collection(iter);
+    return this.every(function (value) { return iter.includes(value); });
+  },
+
+  isSuperset: function isSuperset(iter) {
+    iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);
+    return iter.isSubset(this);
+  },
+
+  keyOf: function keyOf(searchValue) {
+    return this.findKey(function (value) { return is(value, searchValue); });
+  },
+
+  keySeq: function keySeq() {
+    return this.toSeq().map(keyMapper).toIndexedSeq();
+  },
+
+  last: function last(notSetValue) {
+    return this.toSeq().reverse().first(notSetValue);
+  },
+
+  lastKeyOf: function lastKeyOf(searchValue) {
+    return this.toKeyedSeq().reverse().keyOf(searchValue);
+  },
+
+  max: function max(comparator) {
+    return maxFactory(this, comparator);
+  },
+
+  maxBy: function maxBy(mapper, comparator) {
+    return maxFactory(this, comparator, mapper);
+  },
+
+  min: function min(comparator) {
+    return maxFactory(
+      this,
+      comparator ? neg(comparator) : defaultNegComparator
+    );
+  },
+
+  minBy: function minBy(mapper, comparator) {
+    return maxFactory(
+      this,
+      comparator ? neg(comparator) : defaultNegComparator,
+      mapper
+    );
+  },
+
+  rest: function rest() {
+    return this.slice(1);
+  },
+
+  skip: function skip(amount) {
+    return amount === 0 ? this : this.slice(Math.max(0, amount));
+  },
+
+  skipLast: function skipLast(amount) {
+    return amount === 0 ? this : this.slice(0, -Math.max(0, amount));
+  },
+
+  skipWhile: function skipWhile(predicate, context) {
+    return reify(this, skipWhileFactory(this, predicate, context, true));
+  },
+
+  skipUntil: function skipUntil(predicate, context) {
+    return this.skipWhile(not(predicate), context);
+  },
+
+  sortBy: function sortBy(mapper, comparator) {
+    return reify(this, sortFactory(this, comparator, mapper));
+  },
+
+  take: function take(amount) {
+    return this.slice(0, Math.max(0, amount));
+  },
+
+  takeLast: function takeLast(amount) {
+    return this.slice(-Math.max(0, amount));
+  },
+
+  takeWhile: function takeWhile(predicate, context) {
+    return reify(this, takeWhileFactory(this, predicate, context));
+  },
+
+  takeUntil: function takeUntil(predicate, context) {
+    return this.takeWhile(not(predicate), context);
+  },
+
+  update: function update(fn) {
+    return fn(this);
+  },
+
+  valueSeq: function valueSeq() {
+    return this.toIndexedSeq();
+  },
+
+  // ### Hashable Object
+
+  hashCode: function hashCode() {
+    return this.__hash || (this.__hash = hashCollection(this));
+  },
+
+  // ### Internal
+
+  // abstract __iterate(fn, reverse)
+
+  // abstract __iterator(type, reverse)
+});
+
+var CollectionPrototype = Collection.prototype;
+CollectionPrototype[IS_COLLECTION_SYMBOL] = true;
+CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;
+CollectionPrototype.toJSON = CollectionPrototype.toArray;
+CollectionPrototype.__toStringMapper = quoteString;
+CollectionPrototype.inspect = CollectionPrototype.toSource = function () {
+  return this.toString();
+};
+CollectionPrototype.chain = CollectionPrototype.flatMap;
+CollectionPrototype.contains = CollectionPrototype.includes;
+
+mixin(KeyedCollection, {
+  // ### More sequential methods
+
+  flip: function flip() {
+    return reify(this, flipFactory(this));
+  },
+
+  mapEntries: function mapEntries(mapper, context) {
+    var this$1$1 = this;
+
+    var iterations = 0;
+    return reify(
+      this,
+      this.toSeq()
+        .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); })
+        .fromEntrySeq()
+    );
+  },
+
+  mapKeys: function mapKeys(mapper, context) {
+    var this$1$1 = this;
+
+    return reify(
+      this,
+      this.toSeq()
+        .flip()
+        .map(function (k, v) { return mapper.call(context, k, v, this$1$1); })
+        .flip()
+    );
+  },
+});
+
+var KeyedCollectionPrototype = KeyedCollection.prototype;
+KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;
+KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;
+KeyedCollectionPrototype.toJSON = toObject;
+KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };
+
+mixin(IndexedCollection, {
+  // ### Conversion to other types
+
+  toKeyedSeq: function toKeyedSeq() {
+    return new ToKeyedSequence(this, false);
+  },
+
+  // ### ES6 Collection methods (ES6 Array and Map)
+
+  filter: function filter(predicate, context) {
+    return reify(this, filterFactory(this, predicate, context, false));
+  },
+
+  findIndex: function findIndex(predicate, context) {
+    var entry = this.findEntry(predicate, context);
+    return entry ? entry[0] : -1;
+  },
+
+  indexOf: function indexOf(searchValue) {
+    var key = this.keyOf(searchValue);
+    return key === undefined ? -1 : key;
+  },
+
+  lastIndexOf: function lastIndexOf(searchValue) {
+    var key = this.lastKeyOf(searchValue);
+    return key === undefined ? -1 : key;
+  },
+
+  reverse: function reverse() {
+    return reify(this, reverseFactory(this, false));
+  },
+
+  slice: function slice(begin, end) {
+    return reify(this, sliceFactory(this, begin, end, false));
+  },
+
+  splice: function splice(index, removeNum /*, ...values*/) {
+    var numArgs = arguments.length;
+    removeNum = Math.max(removeNum || 0, 0);
+    if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
+      return this;
+    }
+    // If index is negative, it should resolve relative to the size of the
+    // collection. However size may be expensive to compute if not cached, so
+    // only call count() if the number is in fact negative.
+    index = resolveBegin(index, index < 0 ? this.count() : this.size);
+    var spliced = this.slice(0, index);
+    return reify(
+      this,
+      numArgs === 1
+        ? spliced
+        : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
+    );
+  },
+
+  // ### More collection methods
+
+  findLastIndex: function findLastIndex(predicate, context) {
+    var entry = this.findLastEntry(predicate, context);
+    return entry ? entry[0] : -1;
+  },
+
+  first: function first(notSetValue) {
+    return this.get(0, notSetValue);
+  },
+
+  flatten: function flatten(depth) {
+    return reify(this, flattenFactory(this, depth, false));
+  },
+
+  get: function get(index, notSetValue) {
+    index = wrapIndex(this, index);
+    return index < 0 ||
+      this.size === Infinity ||
+      (this.size !== undefined && index > this.size)
+      ? notSetValue
+      : this.find(function (_, key) { return key === index; }, undefined, notSetValue);
+  },
+
+  has: function has(index) {
+    index = wrapIndex(this, index);
+    return (
+      index >= 0 &&
+      (this.size !== undefined
+        ? this.size === Infinity || index < this.size
+        : this.indexOf(index) !== -1)
+    );
+  },
+
+  interpose: function interpose(separator) {
+    return reify(this, interposeFactory(this, separator));
+  },
+
+  interleave: function interleave(/*...collections*/) {
+    var collections = [this].concat(arrCopy(arguments));
+    var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);
+    var interleaved = zipped.flatten(true);
+    if (zipped.size) {
+      interleaved.size = zipped.size * collections.length;
+    }
+    return reify(this, interleaved);
+  },
+
+  keySeq: function keySeq() {
+    return Range(0, this.size);
+  },
+
+  last: function last(notSetValue) {
+    return this.get(-1, notSetValue);
+  },
+
+  skipWhile: function skipWhile(predicate, context) {
+    return reify(this, skipWhileFactory(this, predicate, context, false));
+  },
+
+  zip: function zip(/*, ...collections */) {
+    var collections = [this].concat(arrCopy(arguments));
+    return reify(this, zipWithFactory(this, defaultZipper, collections));
+  },
+
+  zipAll: function zipAll(/*, ...collections */) {
+    var collections = [this].concat(arrCopy(arguments));
+    return reify(this, zipWithFactory(this, defaultZipper, collections, true));
+  },
+
+  zipWith: function zipWith(zipper /*, ...collections */) {
+    var collections = arrCopy(arguments);
+    collections[0] = this;
+    return reify(this, zipWithFactory(this, zipper, collections));
+  },
+});
+
+var IndexedCollectionPrototype = IndexedCollection.prototype;
+IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;
+IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;
+
+mixin(SetCollection, {
+  // ### ES6 Collection methods (ES6 Array and Map)
+
+  get: function get(value, notSetValue) {
+    return this.has(value) ? value : notSetValue;
+  },
+
+  includes: function includes(value) {
+    return this.has(value);
+  },
+
+  // ### More sequential methods
+
+  keySeq: function keySeq() {
+    return this.valueSeq();
+  },
+});
+
+var SetCollectionPrototype = SetCollection.prototype;
+SetCollectionPrototype.has = CollectionPrototype.includes;
+SetCollectionPrototype.contains = SetCollectionPrototype.includes;
+SetCollectionPrototype.keys = SetCollectionPrototype.values;
+
+// Mixin subclasses
+
+mixin(KeyedSeq, KeyedCollectionPrototype);
+mixin(IndexedSeq, IndexedCollectionPrototype);
+mixin(SetSeq, SetCollectionPrototype);
+
+// #pragma Helper functions
+
+function reduce(collection, reducer, reduction, context, useFirst, reverse) {
+  assertNotInfinite(collection.size);
+  collection.__iterate(function (v, k, c) {
+    if (useFirst) {
+      useFirst = false;
+      reduction = v;
+    } else {
+      reduction = reducer.call(context, reduction, v, k, c);
+    }
+  }, reverse);
+  return reduction;
+}
+
+function keyMapper(v, k) {
+  return k;
+}
+
+function entryMapper(v, k) {
+  return [k, v];
+}
+
+function not(predicate) {
+  return function () {
+    return !predicate.apply(this, arguments);
+  };
+}
+
+function neg(predicate) {
+  return function () {
+    return -predicate.apply(this, arguments);
+  };
+}
+
+function defaultZipper() {
+  return arrCopy(arguments);
+}
+
+function defaultNegComparator(a, b) {
+  return a < b ? 1 : a > b ? -1 : 0;
+}
+
+function hashCollection(collection) {
+  if (collection.size === Infinity) {
+    return 0;
+  }
+  var ordered = isOrdered(collection);
+  var keyed = isKeyed(collection);
+  var h = ordered ? 1 : 0;
+  var size = collection.__iterate(
+    keyed
+      ? ordered
+        ? function (v, k) {
+            h = (31 * h + hashMerge(hash(v), hash(k))) | 0;
+          }
+        : function (v, k) {
+            h = (h + hashMerge(hash(v), hash(k))) | 0;
+          }
+      : ordered
+      ? function (v) {
+          h = (31 * h + hash(v)) | 0;
+        }
+      : function (v) {
+          h = (h + hash(v)) | 0;
+        }
+  );
+  return murmurHashOfSize(size, h);
+}
+
+function murmurHashOfSize(size, h) {
+  h = imul(h, 0xcc9e2d51);
+  h = imul((h << 15) | (h >>> -15), 0x1b873593);
+  h = imul((h << 13) | (h >>> -13), 5);
+  h = ((h + 0xe6546b64) | 0) ^ size;
+  h = imul(h ^ (h >>> 16), 0x85ebca6b);
+  h = imul(h ^ (h >>> 13), 0xc2b2ae35);
+  h = smi(h ^ (h >>> 16));
+  return h;
+}
+
+function hashMerge(a, b) {
+  return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int
+}
+
+var OrderedSet = /*@__PURE__*/(function (Set) {
+  function OrderedSet(value) {
+    return value === undefined || value === null
+      ? emptyOrderedSet()
+      : isOrderedSet(value)
+      ? value
+      : emptyOrderedSet().withMutations(function (set) {
+          var iter = SetCollection(value);
+          assertNotInfinite(iter.size);
+          iter.forEach(function (v) { return set.add(v); });
+        });
+  }
+
+  if ( Set ) OrderedSet.__proto__ = Set;
+  OrderedSet.prototype = Object.create( Set && Set.prototype );
+  OrderedSet.prototype.constructor = OrderedSet;
+
+  OrderedSet.of = function of (/*...values*/) {
+    return this(arguments);
+  };
+
+  OrderedSet.fromKeys = function fromKeys (value) {
+    return this(KeyedCollection(value).keySeq());
+  };
+
+  OrderedSet.prototype.toString = function toString () {
+    return this.__toString('OrderedSet {', '}');
+  };
+
+  return OrderedSet;
+}(Set));
+
+OrderedSet.isOrderedSet = isOrderedSet;
+
+var OrderedSetPrototype = OrderedSet.prototype;
+OrderedSetPrototype[IS_ORDERED_SYMBOL] = true;
+OrderedSetPrototype.zip = IndexedCollectionPrototype.zip;
+OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;
+OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;
+
+OrderedSetPrototype.__empty = emptyOrderedSet;
+OrderedSetPrototype.__make = makeOrderedSet;
+
+function makeOrderedSet(map, ownerID) {
+  var set = Object.create(OrderedSetPrototype);
+  set.size = map ? map.size : 0;
+  set._map = map;
+  set.__ownerID = ownerID;
+  return set;
+}
+
+var EMPTY_ORDERED_SET;
+function emptyOrderedSet() {
+  return (
+    EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))
+  );
+}
+
+var PairSorting = {
+  LeftThenRight: -1,
+  RightThenLeft: +1,
+};
+
+function throwOnInvalidDefaultValues(defaultValues) {
+  if (isRecord(defaultValues)) {
+    throw new Error(
+      'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.'
+    );
+  }
+
+  if (isImmutable(defaultValues)) {
+    throw new Error(
+      'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.'
+    );
+  }
+
+  if (defaultValues === null || typeof defaultValues !== 'object') {
+    throw new Error(
+      'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.'
+    );
+  }
+}
+
+var Record = function Record(defaultValues, name) {
+  var hasInitialized;
+
+  throwOnInvalidDefaultValues(defaultValues);
+
+  var RecordType = function Record(values) {
+    var this$1$1 = this;
+
+    if (values instanceof RecordType) {
+      return values;
+    }
+    if (!(this instanceof RecordType)) {
+      return new RecordType(values);
+    }
+    if (!hasInitialized) {
+      hasInitialized = true;
+      var keys = Object.keys(defaultValues);
+      var indices = (RecordTypePrototype._indices = {});
+      // Deprecated: left to attempt not to break any external code which
+      // relies on a ._name property existing on record instances.
+      // Use Record.getDescriptiveName() instead
+      RecordTypePrototype._name = name;
+      RecordTypePrototype._keys = keys;
+      RecordTypePrototype._defaultValues = defaultValues;
+      for (var i = 0; i < keys.length; i++) {
+        var propName = keys[i];
+        indices[propName] = i;
+        if (RecordTypePrototype[propName]) {
+          /* eslint-disable no-console */
+          typeof console === 'object' &&
+            console.warn &&
+            console.warn(
+              'Cannot define ' +
+                recordName(this) +
+                ' with property "' +
+                propName +
+                '" since that property name is part of the Record API.'
+            );
+          /* eslint-enable no-console */
+        } else {
+          setProp(RecordTypePrototype, propName);
+        }
+      }
+    }
+    this.__ownerID = undefined;
+    this._values = List().withMutations(function (l) {
+      l.setSize(this$1$1._keys.length);
+      KeyedCollection(values).forEach(function (v, k) {
+        l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);
+      });
+    });
+    return this;
+  };
+
+  var RecordTypePrototype = (RecordType.prototype =
+    Object.create(RecordPrototype));
+  RecordTypePrototype.constructor = RecordType;
+
+  if (name) {
+    RecordType.displayName = name;
+  }
+
+  return RecordType;
+};
+
+Record.prototype.toString = function toString () {
+  var str = recordName(this) + ' { ';
+  var keys = this._keys;
+  var k;
+  for (var i = 0, l = keys.length; i !== l; i++) {
+    k = keys[i];
+    str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));
+  }
+  return str + ' }';
+};
+
+Record.prototype.equals = function equals (other) {
+  return (
+    this === other ||
+    (isRecord(other) && recordSeq(this).equals(recordSeq(other)))
+  );
+};
+
+Record.prototype.hashCode = function hashCode () {
+  return recordSeq(this).hashCode();
+};
+
+// @pragma Access
+
+Record.prototype.has = function has (k) {
+  return this._indices.hasOwnProperty(k);
+};
+
+Record.prototype.get = function get (k, notSetValue) {
+  if (!this.has(k)) {
+    return notSetValue;
+  }
+  var index = this._indices[k];
+  var value = this._values.get(index);
+  return value === undefined ? this._defaultValues[k] : value;
+};
+
+// @pragma Modification
+
+Record.prototype.set = function set (k, v) {
+  if (this.has(k)) {
+    var newValues = this._values.set(
+      this._indices[k],
+      v === this._defaultValues[k] ? undefined : v
+    );
+    if (newValues !== this._values && !this.__ownerID) {
+      return makeRecord(this, newValues);
+    }
+  }
+  return this;
+};
+
+Record.prototype.remove = function remove (k) {
+  return this.set(k);
+};
+
+Record.prototype.clear = function clear () {
+  var newValues = this._values.clear().setSize(this._keys.length);
+
+  return this.__ownerID ? this : makeRecord(this, newValues);
+};
+
+Record.prototype.wasAltered = function wasAltered () {
+  return this._values.wasAltered();
+};
+
+Record.prototype.toSeq = function toSeq () {
+  return recordSeq(this);
+};
+
+Record.prototype.toJS = function toJS$1 () {
+  return toJS(this);
+};
+
+Record.prototype.entries = function entries () {
+  return this.__iterator(ITERATE_ENTRIES);
+};
+
+Record.prototype.__iterator = function __iterator (type, reverse) {
+  return recordSeq(this).__iterator(type, reverse);
+};
+
+Record.prototype.__iterate = function __iterate (fn, reverse) {
+  return recordSeq(this).__iterate(fn, reverse);
+};
+
+Record.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+  if (ownerID === this.__ownerID) {
+    return this;
+  }
+  var newValues = this._values.__ensureOwner(ownerID);
+  if (!ownerID) {
+    this.__ownerID = ownerID;
+    this._values = newValues;
+    return this;
+  }
+  return makeRecord(this, newValues, ownerID);
+};
+
+Record.isRecord = isRecord;
+Record.getDescriptiveName = recordName;
+var RecordPrototype = Record.prototype;
+RecordPrototype[IS_RECORD_SYMBOL] = true;
+RecordPrototype[DELETE] = RecordPrototype.remove;
+RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;
+RecordPrototype.getIn = getIn;
+RecordPrototype.hasIn = CollectionPrototype.hasIn;
+RecordPrototype.merge = merge$1;
+RecordPrototype.mergeWith = mergeWith$1;
+RecordPrototype.mergeIn = mergeIn;
+RecordPrototype.mergeDeep = mergeDeep;
+RecordPrototype.mergeDeepWith = mergeDeepWith;
+RecordPrototype.mergeDeepIn = mergeDeepIn;
+RecordPrototype.setIn = setIn;
+RecordPrototype.update = update;
+RecordPrototype.updateIn = updateIn;
+RecordPrototype.withMutations = withMutations;
+RecordPrototype.asMutable = asMutable;
+RecordPrototype.asImmutable = asImmutable;
+RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;
+RecordPrototype.toJSON = RecordPrototype.toObject =
+  CollectionPrototype.toObject;
+RecordPrototype.inspect = RecordPrototype.toSource = function () {
+  return this.toString();
+};
+
+function makeRecord(likeRecord, values, ownerID) {
+  var record = Object.create(Object.getPrototypeOf(likeRecord));
+  record._values = values;
+  record.__ownerID = ownerID;
+  return record;
+}
+
+function recordName(record) {
+  return record.constructor.displayName || record.constructor.name || 'Record';
+}
+
+function recordSeq(record) {
+  return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));
+}
+
+function setProp(prototype, name) {
+  try {
+    Object.defineProperty(prototype, name, {
+      get: function () {
+        return this.get(name);
+      },
+      set: function (value) {
+        invariant(this.__ownerID, 'Cannot set on an immutable record.');
+        this.set(name, value);
+      },
+    });
+  } catch (error) {
+    // Object.defineProperty failed. Probably IE8.
+  }
+}
+
+/**
+ * Returns a lazy Seq of `value` repeated `times` times. When `times` is
+ * undefined, returns an infinite sequence of `value`.
+ */
+var Repeat = /*@__PURE__*/(function (IndexedSeq) {
+  function Repeat(value, times) {
+    if (!(this instanceof Repeat)) {
+      return new Repeat(value, times);
+    }
+    this._value = value;
+    this.size = times === undefined ? Infinity : Math.max(0, times);
+    if (this.size === 0) {
+      if (EMPTY_REPEAT) {
+        return EMPTY_REPEAT;
+      }
+      EMPTY_REPEAT = this;
+    }
+  }
+
+  if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq;
+  Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+  Repeat.prototype.constructor = Repeat;
+
+  Repeat.prototype.toString = function toString () {
+    if (this.size === 0) {
+      return 'Repeat []';
+    }
+    return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
+  };
+
+  Repeat.prototype.get = function get (index, notSetValue) {
+    return this.has(index) ? this._value : notSetValue;
+  };
+
+  Repeat.prototype.includes = function includes (searchValue) {
+    return is(this._value, searchValue);
+  };
+
+  Repeat.prototype.slice = function slice (begin, end) {
+    var size = this.size;
+    return wholeSlice(begin, end, size)
+      ? this
+      : new Repeat(
+          this._value,
+          resolveEnd(end, size) - resolveBegin(begin, size)
+        );
+  };
+
+  Repeat.prototype.reverse = function reverse () {
+    return this;
+  };
+
+  Repeat.prototype.indexOf = function indexOf (searchValue) {
+    if (is(this._value, searchValue)) {
+      return 0;
+    }
+    return -1;
+  };
+
+  Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {
+    if (is(this._value, searchValue)) {
+      return this.size;
+    }
+    return -1;
+  };
+
+  Repeat.prototype.__iterate = function __iterate (fn, reverse) {
+    var size = this.size;
+    var i = 0;
+    while (i !== size) {
+      if (fn(this._value, reverse ? size - ++i : i++, this) === false) {
+        break;
+      }
+    }
+    return i;
+  };
+
+  Repeat.prototype.__iterator = function __iterator (type, reverse) {
+    var this$1$1 = this;
+
+    var size = this.size;
+    var i = 0;
+    return new Iterator(function () { return i === size
+        ? iteratorDone()
+        : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); }
+    );
+  };
+
+  Repeat.prototype.equals = function equals (other) {
+    return other instanceof Repeat
+      ? is(this._value, other._value)
+      : deepEqual(other);
+  };
+
+  return Repeat;
+}(IndexedSeq));
+
+var EMPTY_REPEAT;
+
+function fromJS(value, converter) {
+  return fromJSWith(
+    [],
+    converter || defaultConverter,
+    value,
+    '',
+    converter && converter.length > 2 ? [] : undefined,
+    { '': value }
+  );
+}
+
+function fromJSWith(stack, converter, value, key, keyPath, parentValue) {
+  if (
+    typeof value !== 'string' &&
+    !isImmutable(value) &&
+    (isArrayLike(value) || hasIterator(value) || isPlainObject(value))
+  ) {
+    if (~stack.indexOf(value)) {
+      throw new TypeError('Cannot convert circular structure to Immutable');
+    }
+    stack.push(value);
+    keyPath && key !== '' && keyPath.push(key);
+    var converted = converter.call(
+      parentValue,
+      key,
+      Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }
+      ),
+      keyPath && keyPath.slice()
+    );
+    stack.pop();
+    keyPath && keyPath.pop();
+    return converted;
+  }
+  return value;
+}
+
+function defaultConverter(k, v) {
+  // Effectively the opposite of "Collection.toSeq()"
+  return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
+}
+
+var version = "4.3.4";
+
+var Immutable = {
+  version: version,
+
+  Collection: Collection,
+  // Note: Iterable is deprecated
+  Iterable: Collection,
+
+  Seq: Seq,
+  Map: Map,
+  OrderedMap: OrderedMap,
+  List: List,
+  Stack: Stack,
+  Set: Set,
+  OrderedSet: OrderedSet,
+  PairSorting: PairSorting,
+
+  Record: Record,
+  Range: Range,
+  Repeat: Repeat,
+
+  is: is,
+  fromJS: fromJS,
+  hash: hash,
+
+  isImmutable: isImmutable,
+  isCollection: isCollection,
+  isKeyed: isKeyed,
+  isIndexed: isIndexed,
+  isAssociative: isAssociative,
+  isOrdered: isOrdered,
+  isValueObject: isValueObject,
+  isPlainObject: isPlainObject,
+  isSeq: isSeq,
+  isList: isList,
+  isMap: isMap,
+  isOrderedMap: isOrderedMap,
+  isStack: isStack,
+  isSet: isSet,
+  isOrderedSet: isOrderedSet,
+  isRecord: isRecord,
+
+  get: get,
+  getIn: getIn$1,
+  has: has,
+  hasIn: hasIn$1,
+  merge: merge,
+  mergeDeep: mergeDeep$1,
+  mergeWith: mergeWith,
+  mergeDeepWith: mergeDeepWith$1,
+  remove: remove,
+  removeIn: removeIn,
+  set: set,
+  setIn: setIn$1,
+  update: update$1,
+  updateIn: updateIn$1,
+};
+
+// Note: Iterable is deprecated
+var Iterable = Collection;
+
+export default Immutable;
+export { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version };

+ 6021 - 0
node_modules/immutable/dist/immutable.js

@@ -0,0 +1,6021 @@
+/**
+ * MIT License
+ * 
+ * Copyright (c) 2014-present, Lee Byron and other contributors.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Immutable = {}));
+}(this, (function (exports) { 'use strict';
+
+  var DELETE = 'delete';
+
+  // Constants describing the size of trie nodes.
+  var SHIFT = 5; // Resulted in best performance after ______?
+  var SIZE = 1 << SHIFT;
+  var MASK = SIZE - 1;
+
+  // A consistent shared value representing "not set" which equals nothing other
+  // than itself, and nothing that could be provided externally.
+  var NOT_SET = {};
+
+  // Boolean references, Rough equivalent of `bool &`.
+  function MakeRef() {
+    return { value: false };
+  }
+
+  function SetRef(ref) {
+    if (ref) {
+      ref.value = true;
+    }
+  }
+
+  // A function which returns a value representing an "owner" for transient writes
+  // to tries. The return value will only ever equal itself, and will not equal
+  // the return of any subsequent call of this function.
+  function OwnerID() {}
+
+  function ensureSize(iter) {
+    if (iter.size === undefined) {
+      iter.size = iter.__iterate(returnTrue);
+    }
+    return iter.size;
+  }
+
+  function wrapIndex(iter, index) {
+    // This implements "is array index" which the ECMAString spec defines as:
+    //
+    //     A String property name P is an array index if and only if
+    //     ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
+    //     to 2^32−1.
+    //
+    // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
+    if (typeof index !== 'number') {
+      var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
+      if ('' + uint32Index !== index || uint32Index === 4294967295) {
+        return NaN;
+      }
+      index = uint32Index;
+    }
+    return index < 0 ? ensureSize(iter) + index : index;
+  }
+
+  function returnTrue() {
+    return true;
+  }
+
+  function wholeSlice(begin, end, size) {
+    return (
+      ((begin === 0 && !isNeg(begin)) ||
+        (size !== undefined && begin <= -size)) &&
+      (end === undefined || (size !== undefined && end >= size))
+    );
+  }
+
+  function resolveBegin(begin, size) {
+    return resolveIndex(begin, size, 0);
+  }
+
+  function resolveEnd(end, size) {
+    return resolveIndex(end, size, size);
+  }
+
+  function resolveIndex(index, size, defaultIndex) {
+    // Sanitize indices using this shorthand for ToInt32(argument)
+    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+    return index === undefined
+      ? defaultIndex
+      : isNeg(index)
+      ? size === Infinity
+        ? size
+        : Math.max(0, size + index) | 0
+      : size === undefined || size === index
+      ? index
+      : Math.min(size, index) | 0;
+  }
+
+  function isNeg(value) {
+    // Account for -0 which is negative, but not less than 0.
+    return value < 0 || (value === 0 && 1 / value === -Infinity);
+  }
+
+  var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';
+
+  function isCollection(maybeCollection) {
+    return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);
+  }
+
+  var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';
+
+  function isKeyed(maybeKeyed) {
+    return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);
+  }
+
+  var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';
+
+  function isIndexed(maybeIndexed) {
+    return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);
+  }
+
+  function isAssociative(maybeAssociative) {
+    return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
+  }
+
+  var Collection = function Collection(value) {
+    return isCollection(value) ? value : Seq(value);
+  };
+
+  var KeyedCollection = /*@__PURE__*/(function (Collection) {
+    function KeyedCollection(value) {
+      return isKeyed(value) ? value : KeyedSeq(value);
+    }
+
+    if ( Collection ) KeyedCollection.__proto__ = Collection;
+    KeyedCollection.prototype = Object.create( Collection && Collection.prototype );
+    KeyedCollection.prototype.constructor = KeyedCollection;
+
+    return KeyedCollection;
+  }(Collection));
+
+  var IndexedCollection = /*@__PURE__*/(function (Collection) {
+    function IndexedCollection(value) {
+      return isIndexed(value) ? value : IndexedSeq(value);
+    }
+
+    if ( Collection ) IndexedCollection.__proto__ = Collection;
+    IndexedCollection.prototype = Object.create( Collection && Collection.prototype );
+    IndexedCollection.prototype.constructor = IndexedCollection;
+
+    return IndexedCollection;
+  }(Collection));
+
+  var SetCollection = /*@__PURE__*/(function (Collection) {
+    function SetCollection(value) {
+      return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);
+    }
+
+    if ( Collection ) SetCollection.__proto__ = Collection;
+    SetCollection.prototype = Object.create( Collection && Collection.prototype );
+    SetCollection.prototype.constructor = SetCollection;
+
+    return SetCollection;
+  }(Collection));
+
+  Collection.Keyed = KeyedCollection;
+  Collection.Indexed = IndexedCollection;
+  Collection.Set = SetCollection;
+
+  var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';
+
+  function isSeq(maybeSeq) {
+    return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);
+  }
+
+  var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';
+
+  function isRecord(maybeRecord) {
+    return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);
+  }
+
+  function isImmutable(maybeImmutable) {
+    return isCollection(maybeImmutable) || isRecord(maybeImmutable);
+  }
+
+  var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';
+
+  function isOrdered(maybeOrdered) {
+    return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);
+  }
+
+  var ITERATE_KEYS = 0;
+  var ITERATE_VALUES = 1;
+  var ITERATE_ENTRIES = 2;
+
+  var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+  var FAUX_ITERATOR_SYMBOL = '@@iterator';
+
+  var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
+
+  var Iterator = function Iterator(next) {
+    this.next = next;
+  };
+
+  Iterator.prototype.toString = function toString () {
+    return '[Iterator]';
+  };
+
+  Iterator.KEYS = ITERATE_KEYS;
+  Iterator.VALUES = ITERATE_VALUES;
+  Iterator.ENTRIES = ITERATE_ENTRIES;
+
+  Iterator.prototype.inspect = Iterator.prototype.toSource = function () {
+    return this.toString();
+  };
+  Iterator.prototype[ITERATOR_SYMBOL] = function () {
+    return this;
+  };
+
+  function iteratorValue(type, k, v, iteratorResult) {
+    var value = type === 0 ? k : type === 1 ? v : [k, v];
+    iteratorResult
+      ? (iteratorResult.value = value)
+      : (iteratorResult = {
+          value: value,
+          done: false,
+        });
+    return iteratorResult;
+  }
+
+  function iteratorDone() {
+    return { value: undefined, done: true };
+  }
+
+  function hasIterator(maybeIterable) {
+    if (Array.isArray(maybeIterable)) {
+      // IE11 trick as it does not support `Symbol.iterator`
+      return true;
+    }
+
+    return !!getIteratorFn(maybeIterable);
+  }
+
+  function isIterator(maybeIterator) {
+    return maybeIterator && typeof maybeIterator.next === 'function';
+  }
+
+  function getIterator(iterable) {
+    var iteratorFn = getIteratorFn(iterable);
+    return iteratorFn && iteratorFn.call(iterable);
+  }
+
+  function getIteratorFn(iterable) {
+    var iteratorFn =
+      iterable &&
+      ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
+        iterable[FAUX_ITERATOR_SYMBOL]);
+    if (typeof iteratorFn === 'function') {
+      return iteratorFn;
+    }
+  }
+
+  function isEntriesIterable(maybeIterable) {
+    var iteratorFn = getIteratorFn(maybeIterable);
+    return iteratorFn && iteratorFn === maybeIterable.entries;
+  }
+
+  function isKeysIterable(maybeIterable) {
+    var iteratorFn = getIteratorFn(maybeIterable);
+    return iteratorFn && iteratorFn === maybeIterable.keys;
+  }
+
+  var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+  function isArrayLike(value) {
+    if (Array.isArray(value) || typeof value === 'string') {
+      return true;
+    }
+
+    return (
+      value &&
+      typeof value === 'object' &&
+      Number.isInteger(value.length) &&
+      value.length >= 0 &&
+      (value.length === 0
+        ? // Only {length: 0} is considered Array-like.
+          Object.keys(value).length === 1
+        : // An object is only Array-like if it has a property where the last value
+          // in the array-like may be found (which could be undefined).
+          value.hasOwnProperty(value.length - 1))
+    );
+  }
+
+  var Seq = /*@__PURE__*/(function (Collection) {
+    function Seq(value) {
+      return value === undefined || value === null
+        ? emptySequence()
+        : isImmutable(value)
+        ? value.toSeq()
+        : seqFromValue(value);
+    }
+
+    if ( Collection ) Seq.__proto__ = Collection;
+    Seq.prototype = Object.create( Collection && Collection.prototype );
+    Seq.prototype.constructor = Seq;
+
+    Seq.prototype.toSeq = function toSeq () {
+      return this;
+    };
+
+    Seq.prototype.toString = function toString () {
+      return this.__toString('Seq {', '}');
+    };
+
+    Seq.prototype.cacheResult = function cacheResult () {
+      if (!this._cache && this.__iterateUncached) {
+        this._cache = this.entrySeq().toArray();
+        this.size = this._cache.length;
+      }
+      return this;
+    };
+
+    // abstract __iterateUncached(fn, reverse)
+
+    Seq.prototype.__iterate = function __iterate (fn, reverse) {
+      var cache = this._cache;
+      if (cache) {
+        var size = cache.length;
+        var i = 0;
+        while (i !== size) {
+          var entry = cache[reverse ? size - ++i : i++];
+          if (fn(entry[1], entry[0], this) === false) {
+            break;
+          }
+        }
+        return i;
+      }
+      return this.__iterateUncached(fn, reverse);
+    };
+
+    // abstract __iteratorUncached(type, reverse)
+
+    Seq.prototype.__iterator = function __iterator (type, reverse) {
+      var cache = this._cache;
+      if (cache) {
+        var size = cache.length;
+        var i = 0;
+        return new Iterator(function () {
+          if (i === size) {
+            return iteratorDone();
+          }
+          var entry = cache[reverse ? size - ++i : i++];
+          return iteratorValue(type, entry[0], entry[1]);
+        });
+      }
+      return this.__iteratorUncached(type, reverse);
+    };
+
+    return Seq;
+  }(Collection));
+
+  var KeyedSeq = /*@__PURE__*/(function (Seq) {
+    function KeyedSeq(value) {
+      return value === undefined || value === null
+        ? emptySequence().toKeyedSeq()
+        : isCollection(value)
+        ? isKeyed(value)
+          ? value.toSeq()
+          : value.fromEntrySeq()
+        : isRecord(value)
+        ? value.toSeq()
+        : keyedSeqFromValue(value);
+    }
+
+    if ( Seq ) KeyedSeq.__proto__ = Seq;
+    KeyedSeq.prototype = Object.create( Seq && Seq.prototype );
+    KeyedSeq.prototype.constructor = KeyedSeq;
+
+    KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {
+      return this;
+    };
+
+    return KeyedSeq;
+  }(Seq));
+
+  var IndexedSeq = /*@__PURE__*/(function (Seq) {
+    function IndexedSeq(value) {
+      return value === undefined || value === null
+        ? emptySequence()
+        : isCollection(value)
+        ? isKeyed(value)
+          ? value.entrySeq()
+          : value.toIndexedSeq()
+        : isRecord(value)
+        ? value.toSeq().entrySeq()
+        : indexedSeqFromValue(value);
+    }
+
+    if ( Seq ) IndexedSeq.__proto__ = Seq;
+    IndexedSeq.prototype = Object.create( Seq && Seq.prototype );
+    IndexedSeq.prototype.constructor = IndexedSeq;
+
+    IndexedSeq.of = function of (/*...values*/) {
+      return IndexedSeq(arguments);
+    };
+
+    IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {
+      return this;
+    };
+
+    IndexedSeq.prototype.toString = function toString () {
+      return this.__toString('Seq [', ']');
+    };
+
+    return IndexedSeq;
+  }(Seq));
+
+  var SetSeq = /*@__PURE__*/(function (Seq) {
+    function SetSeq(value) {
+      return (
+        isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)
+      ).toSetSeq();
+    }
+
+    if ( Seq ) SetSeq.__proto__ = Seq;
+    SetSeq.prototype = Object.create( Seq && Seq.prototype );
+    SetSeq.prototype.constructor = SetSeq;
+
+    SetSeq.of = function of (/*...values*/) {
+      return SetSeq(arguments);
+    };
+
+    SetSeq.prototype.toSetSeq = function toSetSeq () {
+      return this;
+    };
+
+    return SetSeq;
+  }(Seq));
+
+  Seq.isSeq = isSeq;
+  Seq.Keyed = KeyedSeq;
+  Seq.Set = SetSeq;
+  Seq.Indexed = IndexedSeq;
+
+  Seq.prototype[IS_SEQ_SYMBOL] = true;
+
+  // #pragma Root Sequences
+
+  var ArraySeq = /*@__PURE__*/(function (IndexedSeq) {
+    function ArraySeq(array) {
+      this._array = array;
+      this.size = array.length;
+    }
+
+    if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;
+    ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+    ArraySeq.prototype.constructor = ArraySeq;
+
+    ArraySeq.prototype.get = function get (index, notSetValue) {
+      return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
+    };
+
+    ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {
+      var array = this._array;
+      var size = array.length;
+      var i = 0;
+      while (i !== size) {
+        var ii = reverse ? size - ++i : i++;
+        if (fn(array[ii], ii, this) === false) {
+          break;
+        }
+      }
+      return i;
+    };
+
+    ArraySeq.prototype.__iterator = function __iterator (type, reverse) {
+      var array = this._array;
+      var size = array.length;
+      var i = 0;
+      return new Iterator(function () {
+        if (i === size) {
+          return iteratorDone();
+        }
+        var ii = reverse ? size - ++i : i++;
+        return iteratorValue(type, ii, array[ii]);
+      });
+    };
+
+    return ArraySeq;
+  }(IndexedSeq));
+
+  var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {
+    function ObjectSeq(object) {
+      var keys = Object.keys(object).concat(
+        Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []
+      );
+      this._object = object;
+      this._keys = keys;
+      this.size = keys.length;
+    }
+
+    if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;
+    ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+    ObjectSeq.prototype.constructor = ObjectSeq;
+
+    ObjectSeq.prototype.get = function get (key, notSetValue) {
+      if (notSetValue !== undefined && !this.has(key)) {
+        return notSetValue;
+      }
+      return this._object[key];
+    };
+
+    ObjectSeq.prototype.has = function has (key) {
+      return hasOwnProperty.call(this._object, key);
+    };
+
+    ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {
+      var object = this._object;
+      var keys = this._keys;
+      var size = keys.length;
+      var i = 0;
+      while (i !== size) {
+        var key = keys[reverse ? size - ++i : i++];
+        if (fn(object[key], key, this) === false) {
+          break;
+        }
+      }
+      return i;
+    };
+
+    ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {
+      var object = this._object;
+      var keys = this._keys;
+      var size = keys.length;
+      var i = 0;
+      return new Iterator(function () {
+        if (i === size) {
+          return iteratorDone();
+        }
+        var key = keys[reverse ? size - ++i : i++];
+        return iteratorValue(type, key, object[key]);
+      });
+    };
+
+    return ObjectSeq;
+  }(KeyedSeq));
+  ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;
+
+  var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {
+    function CollectionSeq(collection) {
+      this._collection = collection;
+      this.size = collection.length || collection.size;
+    }
+
+    if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;
+    CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+    CollectionSeq.prototype.constructor = CollectionSeq;
+
+    CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {
+      if (reverse) {
+        return this.cacheResult().__iterate(fn, reverse);
+      }
+      var collection = this._collection;
+      var iterator = getIterator(collection);
+      var iterations = 0;
+      if (isIterator(iterator)) {
+        var step;
+        while (!(step = iterator.next()).done) {
+          if (fn(step.value, iterations++, this) === false) {
+            break;
+          }
+        }
+      }
+      return iterations;
+    };
+
+    CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {
+      if (reverse) {
+        return this.cacheResult().__iterator(type, reverse);
+      }
+      var collection = this._collection;
+      var iterator = getIterator(collection);
+      if (!isIterator(iterator)) {
+        return new Iterator(iteratorDone);
+      }
+      var iterations = 0;
+      return new Iterator(function () {
+        var step = iterator.next();
+        return step.done ? step : iteratorValue(type, iterations++, step.value);
+      });
+    };
+
+    return CollectionSeq;
+  }(IndexedSeq));
+
+  // # pragma Helper functions
+
+  var EMPTY_SEQ;
+
+  function emptySequence() {
+    return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
+  }
+
+  function keyedSeqFromValue(value) {
+    var seq = maybeIndexedSeqFromValue(value);
+    if (seq) {
+      return seq.fromEntrySeq();
+    }
+    if (typeof value === 'object') {
+      return new ObjectSeq(value);
+    }
+    throw new TypeError(
+      'Expected Array or collection object of [k, v] entries, or keyed object: ' +
+        value
+    );
+  }
+
+  function indexedSeqFromValue(value) {
+    var seq = maybeIndexedSeqFromValue(value);
+    if (seq) {
+      return seq;
+    }
+    throw new TypeError(
+      'Expected Array or collection object of values: ' + value
+    );
+  }
+
+  function seqFromValue(value) {
+    var seq = maybeIndexedSeqFromValue(value);
+    if (seq) {
+      return isEntriesIterable(value)
+        ? seq.fromEntrySeq()
+        : isKeysIterable(value)
+        ? seq.toSetSeq()
+        : seq;
+    }
+    if (typeof value === 'object') {
+      return new ObjectSeq(value);
+    }
+    throw new TypeError(
+      'Expected Array or collection object of values, or keyed object: ' + value
+    );
+  }
+
+  function maybeIndexedSeqFromValue(value) {
+    return isArrayLike(value)
+      ? new ArraySeq(value)
+      : hasIterator(value)
+      ? new CollectionSeq(value)
+      : undefined;
+  }
+
+  var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';
+
+  function isMap(maybeMap) {
+    return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);
+  }
+
+  function isOrderedMap(maybeOrderedMap) {
+    return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
+  }
+
+  function isValueObject(maybeValue) {
+    return Boolean(
+      maybeValue &&
+        typeof maybeValue.equals === 'function' &&
+        typeof maybeValue.hashCode === 'function'
+    );
+  }
+
+  /**
+   * An extension of the "same-value" algorithm as [described for use by ES6 Map
+   * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
+   *
+   * NaN is considered the same as NaN, however -0 and 0 are considered the same
+   * value, which is different from the algorithm described by
+   * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+   *
+   * This is extended further to allow Objects to describe the values they
+   * represent, by way of `valueOf` or `equals` (and `hashCode`).
+   *
+   * Note: because of this extension, the key equality of Immutable.Map and the
+   * value equality of Immutable.Set will differ from ES6 Map and Set.
+   *
+   * ### Defining custom values
+   *
+   * The easiest way to describe the value an object represents is by implementing
+   * `valueOf`. For example, `Date` represents a value by returning a unix
+   * timestamp for `valueOf`:
+   *
+   *     var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
+   *     var date2 = new Date(1234567890000);
+   *     date1.valueOf(); // 1234567890000
+   *     assert( date1 !== date2 );
+   *     assert( Immutable.is( date1, date2 ) );
+   *
+   * Note: overriding `valueOf` may have other implications if you use this object
+   * where JavaScript expects a primitive, such as implicit string coercion.
+   *
+   * For more complex types, especially collections, implementing `valueOf` may
+   * not be performant. An alternative is to implement `equals` and `hashCode`.
+   *
+   * `equals` takes another object, presumably of similar type, and returns true
+   * if it is equal. Equality is symmetrical, so the same result should be
+   * returned if this and the argument are flipped.
+   *
+   *     assert( a.equals(b) === b.equals(a) );
+   *
+   * `hashCode` returns a 32bit integer number representing the object which will
+   * be used to determine how to store the value object in a Map or Set. You must
+   * provide both or neither methods, one must not exist without the other.
+   *
+   * Also, an important relationship between these methods must be upheld: if two
+   * values are equal, they *must* return the same hashCode. If the values are not
+   * equal, they might have the same hashCode; this is called a hash collision,
+   * and while undesirable for performance reasons, it is acceptable.
+   *
+   *     if (a.equals(b)) {
+   *       assert( a.hashCode() === b.hashCode() );
+   *     }
+   *
+   * All Immutable collections are Value Objects: they implement `equals()`
+   * and `hashCode()`.
+   */
+  function is(valueA, valueB) {
+    if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+      return true;
+    }
+    if (!valueA || !valueB) {
+      return false;
+    }
+    if (
+      typeof valueA.valueOf === 'function' &&
+      typeof valueB.valueOf === 'function'
+    ) {
+      valueA = valueA.valueOf();
+      valueB = valueB.valueOf();
+      if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+        return true;
+      }
+      if (!valueA || !valueB) {
+        return false;
+      }
+    }
+    return !!(
+      isValueObject(valueA) &&
+      isValueObject(valueB) &&
+      valueA.equals(valueB)
+    );
+  }
+
+  var imul =
+    typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2
+      ? Math.imul
+      : function imul(a, b) {
+          a |= 0; // int
+          b |= 0; // int
+          var c = a & 0xffff;
+          var d = b & 0xffff;
+          // Shift by 0 fixes the sign on the high part.
+          return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int
+        };
+
+  // v8 has an optimization for storing 31-bit signed numbers.
+  // Values which have either 00 or 11 as the high order bits qualify.
+  // This function drops the highest order bit in a signed number, maintaining
+  // the sign bit.
+  function smi(i32) {
+    return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);
+  }
+
+  var defaultValueOf = Object.prototype.valueOf;
+
+  function hash(o) {
+    if (o == null) {
+      return hashNullish(o);
+    }
+
+    if (typeof o.hashCode === 'function') {
+      // Drop any high bits from accidentally long hash codes.
+      return smi(o.hashCode(o));
+    }
+
+    var v = valueOf(o);
+
+    if (v == null) {
+      return hashNullish(v);
+    }
+
+    switch (typeof v) {
+      case 'boolean':
+        // The hash values for built-in constants are a 1 value for each 5-byte
+        // shift region expect for the first, which encodes the value. This
+        // reduces the odds of a hash collision for these common values.
+        return v ? 0x42108421 : 0x42108420;
+      case 'number':
+        return hashNumber(v);
+      case 'string':
+        return v.length > STRING_HASH_CACHE_MIN_STRLEN
+          ? cachedHashString(v)
+          : hashString(v);
+      case 'object':
+      case 'function':
+        return hashJSObj(v);
+      case 'symbol':
+        return hashSymbol(v);
+      default:
+        if (typeof v.toString === 'function') {
+          return hashString(v.toString());
+        }
+        throw new Error('Value type ' + typeof v + ' cannot be hashed.');
+    }
+  }
+
+  function hashNullish(nullish) {
+    return nullish === null ? 0x42108422 : /* undefined */ 0x42108423;
+  }
+
+  // Compress arbitrarily large numbers into smi hashes.
+  function hashNumber(n) {
+    if (n !== n || n === Infinity) {
+      return 0;
+    }
+    var hash = n | 0;
+    if (hash !== n) {
+      hash ^= n * 0xffffffff;
+    }
+    while (n > 0xffffffff) {
+      n /= 0xffffffff;
+      hash ^= n;
+    }
+    return smi(hash);
+  }
+
+  function cachedHashString(string) {
+    var hashed = stringHashCache[string];
+    if (hashed === undefined) {
+      hashed = hashString(string);
+      if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
+        STRING_HASH_CACHE_SIZE = 0;
+        stringHashCache = {};
+      }
+      STRING_HASH_CACHE_SIZE++;
+      stringHashCache[string] = hashed;
+    }
+    return hashed;
+  }
+
+  // http://jsperf.com/hashing-strings
+  function hashString(string) {
+    // This is the hash from JVM
+    // The hash code for a string is computed as
+    // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
+    // where s[i] is the ith character of the string and n is the length of
+    // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
+    // (exclusive) by dropping high bits.
+    var hashed = 0;
+    for (var ii = 0; ii < string.length; ii++) {
+      hashed = (31 * hashed + string.charCodeAt(ii)) | 0;
+    }
+    return smi(hashed);
+  }
+
+  function hashSymbol(sym) {
+    var hashed = symbolMap[sym];
+    if (hashed !== undefined) {
+      return hashed;
+    }
+
+    hashed = nextHash();
+
+    symbolMap[sym] = hashed;
+
+    return hashed;
+  }
+
+  function hashJSObj(obj) {
+    var hashed;
+    if (usingWeakMap) {
+      hashed = weakMap.get(obj);
+      if (hashed !== undefined) {
+        return hashed;
+      }
+    }
+
+    hashed = obj[UID_HASH_KEY];
+    if (hashed !== undefined) {
+      return hashed;
+    }
+
+    if (!canDefineProperty) {
+      hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
+      if (hashed !== undefined) {
+        return hashed;
+      }
+
+      hashed = getIENodeHash(obj);
+      if (hashed !== undefined) {
+        return hashed;
+      }
+    }
+
+    hashed = nextHash();
+
+    if (usingWeakMap) {
+      weakMap.set(obj, hashed);
+    } else if (isExtensible !== undefined && isExtensible(obj) === false) {
+      throw new Error('Non-extensible objects are not allowed as keys.');
+    } else if (canDefineProperty) {
+      Object.defineProperty(obj, UID_HASH_KEY, {
+        enumerable: false,
+        configurable: false,
+        writable: false,
+        value: hashed,
+      });
+    } else if (
+      obj.propertyIsEnumerable !== undefined &&
+      obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable
+    ) {
+      // Since we can't define a non-enumerable property on the object
+      // we'll hijack one of the less-used non-enumerable properties to
+      // save our hash on it. Since this is a function it will not show up in
+      // `JSON.stringify` which is what we want.
+      obj.propertyIsEnumerable = function () {
+        return this.constructor.prototype.propertyIsEnumerable.apply(
+          this,
+          arguments
+        );
+      };
+      obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;
+    } else if (obj.nodeType !== undefined) {
+      // At this point we couldn't get the IE `uniqueID` to use as a hash
+      // and we couldn't use a non-enumerable property to exploit the
+      // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
+      // itself.
+      obj[UID_HASH_KEY] = hashed;
+    } else {
+      throw new Error('Unable to set a non-enumerable property on object.');
+    }
+
+    return hashed;
+  }
+
+  // Get references to ES5 object methods.
+  var isExtensible = Object.isExtensible;
+
+  // True if Object.defineProperty works as expected. IE8 fails this test.
+  var canDefineProperty = (function () {
+    try {
+      Object.defineProperty({}, '@', {});
+      return true;
+    } catch (e) {
+      return false;
+    }
+  })();
+
+  // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
+  // and avoid memory leaks from the IE cloneNode bug.
+  function getIENodeHash(node) {
+    if (node && node.nodeType > 0) {
+      switch (node.nodeType) {
+        case 1: // Element
+          return node.uniqueID;
+        case 9: // Document
+          return node.documentElement && node.documentElement.uniqueID;
+      }
+    }
+  }
+
+  function valueOf(obj) {
+    return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function'
+      ? obj.valueOf(obj)
+      : obj;
+  }
+
+  function nextHash() {
+    var nextHash = ++_objHashUID;
+    if (_objHashUID & 0x40000000) {
+      _objHashUID = 0;
+    }
+    return nextHash;
+  }
+
+  // If possible, use a WeakMap.
+  var usingWeakMap = typeof WeakMap === 'function';
+  var weakMap;
+  if (usingWeakMap) {
+    weakMap = new WeakMap();
+  }
+
+  var symbolMap = Object.create(null);
+
+  var _objHashUID = 0;
+
+  var UID_HASH_KEY = '__immutablehash__';
+  if (typeof Symbol === 'function') {
+    UID_HASH_KEY = Symbol(UID_HASH_KEY);
+  }
+
+  var STRING_HASH_CACHE_MIN_STRLEN = 16;
+  var STRING_HASH_CACHE_MAX_SIZE = 255;
+  var STRING_HASH_CACHE_SIZE = 0;
+  var stringHashCache = {};
+
+  var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) {
+    function ToKeyedSequence(indexed, useKeys) {
+      this._iter = indexed;
+      this._useKeys = useKeys;
+      this.size = indexed.size;
+    }
+
+    if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq;
+    ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+    ToKeyedSequence.prototype.constructor = ToKeyedSequence;
+
+    ToKeyedSequence.prototype.get = function get (key, notSetValue) {
+      return this._iter.get(key, notSetValue);
+    };
+
+    ToKeyedSequence.prototype.has = function has (key) {
+      return this._iter.has(key);
+    };
+
+    ToKeyedSequence.prototype.valueSeq = function valueSeq () {
+      return this._iter.valueSeq();
+    };
+
+    ToKeyedSequence.prototype.reverse = function reverse () {
+      var this$1$1 = this;
+
+      var reversedSequence = reverseFactory(this, true);
+      if (!this._useKeys) {
+        reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); };
+      }
+      return reversedSequence;
+    };
+
+    ToKeyedSequence.prototype.map = function map (mapper, context) {
+      var this$1$1 = this;
+
+      var mappedSequence = mapFactory(this, mapper, context);
+      if (!this._useKeys) {
+        mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); };
+      }
+      return mappedSequence;
+    };
+
+    ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse);
+    };
+
+    ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {
+      return this._iter.__iterator(type, reverse);
+    };
+
+    return ToKeyedSequence;
+  }(KeyedSeq));
+  ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;
+
+  var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) {
+    function ToIndexedSequence(iter) {
+      this._iter = iter;
+      this.size = iter.size;
+    }
+
+    if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq;
+    ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+    ToIndexedSequence.prototype.constructor = ToIndexedSequence;
+
+    ToIndexedSequence.prototype.includes = function includes (value) {
+      return this._iter.includes(value);
+    };
+
+    ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      var i = 0;
+      reverse && ensureSize(this);
+      return this._iter.__iterate(
+        function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); },
+        reverse
+      );
+    };
+
+    ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {
+      var this$1$1 = this;
+
+      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+      var i = 0;
+      reverse && ensureSize(this);
+      return new Iterator(function () {
+        var step = iterator.next();
+        return step.done
+          ? step
+          : iteratorValue(
+              type,
+              reverse ? this$1$1.size - ++i : i++,
+              step.value,
+              step
+            );
+      });
+    };
+
+    return ToIndexedSequence;
+  }(IndexedSeq));
+
+  var ToSetSequence = /*@__PURE__*/(function (SetSeq) {
+    function ToSetSequence(iter) {
+      this._iter = iter;
+      this.size = iter.size;
+    }
+
+    if ( SetSeq ) ToSetSequence.__proto__ = SetSeq;
+    ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype );
+    ToSetSequence.prototype.constructor = ToSetSequence;
+
+    ToSetSequence.prototype.has = function has (key) {
+      return this._iter.includes(key);
+    };
+
+    ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse);
+    };
+
+    ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {
+      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+      return new Iterator(function () {
+        var step = iterator.next();
+        return step.done
+          ? step
+          : iteratorValue(type, step.value, step.value, step);
+      });
+    };
+
+    return ToSetSequence;
+  }(SetSeq));
+
+  var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) {
+    function FromEntriesSequence(entries) {
+      this._iter = entries;
+      this.size = entries.size;
+    }
+
+    if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq;
+    FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
+    FromEntriesSequence.prototype.constructor = FromEntriesSequence;
+
+    FromEntriesSequence.prototype.entrySeq = function entrySeq () {
+      return this._iter.toSeq();
+    };
+
+    FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      return this._iter.__iterate(function (entry) {
+        // Check if entry exists first so array access doesn't throw for holes
+        // in the parent iteration.
+        if (entry) {
+          validateEntry(entry);
+          var indexedCollection = isCollection(entry);
+          return fn(
+            indexedCollection ? entry.get(1) : entry[1],
+            indexedCollection ? entry.get(0) : entry[0],
+            this$1$1
+          );
+        }
+      }, reverse);
+    };
+
+    FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {
+      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+      return new Iterator(function () {
+        while (true) {
+          var step = iterator.next();
+          if (step.done) {
+            return step;
+          }
+          var entry = step.value;
+          // Check if entry exists first so array access doesn't throw for holes
+          // in the parent iteration.
+          if (entry) {
+            validateEntry(entry);
+            var indexedCollection = isCollection(entry);
+            return iteratorValue(
+              type,
+              indexedCollection ? entry.get(0) : entry[0],
+              indexedCollection ? entry.get(1) : entry[1],
+              step
+            );
+          }
+        }
+      });
+    };
+
+    return FromEntriesSequence;
+  }(KeyedSeq));
+
+  ToIndexedSequence.prototype.cacheResult =
+    ToKeyedSequence.prototype.cacheResult =
+    ToSetSequence.prototype.cacheResult =
+    FromEntriesSequence.prototype.cacheResult =
+      cacheResultThrough;
+
+  function flipFactory(collection) {
+    var flipSequence = makeSequence(collection);
+    flipSequence._iter = collection;
+    flipSequence.size = collection.size;
+    flipSequence.flip = function () { return collection; };
+    flipSequence.reverse = function () {
+      var reversedSequence = collection.reverse.apply(this); // super.reverse()
+      reversedSequence.flip = function () { return collection.reverse(); };
+      return reversedSequence;
+    };
+    flipSequence.has = function (key) { return collection.includes(key); };
+    flipSequence.includes = function (key) { return collection.has(key); };
+    flipSequence.cacheResult = cacheResultThrough;
+    flipSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse);
+    };
+    flipSequence.__iteratorUncached = function (type, reverse) {
+      if (type === ITERATE_ENTRIES) {
+        var iterator = collection.__iterator(type, reverse);
+        return new Iterator(function () {
+          var step = iterator.next();
+          if (!step.done) {
+            var k = step.value[0];
+            step.value[0] = step.value[1];
+            step.value[1] = k;
+          }
+          return step;
+        });
+      }
+      return collection.__iterator(
+        type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
+        reverse
+      );
+    };
+    return flipSequence;
+  }
+
+  function mapFactory(collection, mapper, context) {
+    var mappedSequence = makeSequence(collection);
+    mappedSequence.size = collection.size;
+    mappedSequence.has = function (key) { return collection.has(key); };
+    mappedSequence.get = function (key, notSetValue) {
+      var v = collection.get(key, NOT_SET);
+      return v === NOT_SET
+        ? notSetValue
+        : mapper.call(context, v, key, collection);
+    };
+    mappedSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      return collection.__iterate(
+        function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; },
+        reverse
+      );
+    };
+    mappedSequence.__iteratorUncached = function (type, reverse) {
+      var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+      return new Iterator(function () {
+        var step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+        var entry = step.value;
+        var key = entry[0];
+        return iteratorValue(
+          type,
+          key,
+          mapper.call(context, entry[1], key, collection),
+          step
+        );
+      });
+    };
+    return mappedSequence;
+  }
+
+  function reverseFactory(collection, useKeys) {
+    var this$1$1 = this;
+
+    var reversedSequence = makeSequence(collection);
+    reversedSequence._iter = collection;
+    reversedSequence.size = collection.size;
+    reversedSequence.reverse = function () { return collection; };
+    if (collection.flip) {
+      reversedSequence.flip = function () {
+        var flipSequence = flipFactory(collection);
+        flipSequence.reverse = function () { return collection.flip(); };
+        return flipSequence;
+      };
+    }
+    reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };
+    reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };
+    reversedSequence.includes = function (value) { return collection.includes(value); };
+    reversedSequence.cacheResult = cacheResultThrough;
+    reversedSequence.__iterate = function (fn, reverse) {
+      var this$1$1 = this;
+
+      var i = 0;
+      reverse && ensureSize(collection);
+      return collection.__iterate(
+        function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); },
+        !reverse
+      );
+    };
+    reversedSequence.__iterator = function (type, reverse) {
+      var i = 0;
+      reverse && ensureSize(collection);
+      var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);
+      return new Iterator(function () {
+        var step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+        var entry = step.value;
+        return iteratorValue(
+          type,
+          useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++,
+          entry[1],
+          step
+        );
+      });
+    };
+    return reversedSequence;
+  }
+
+  function filterFactory(collection, predicate, context, useKeys) {
+    var filterSequence = makeSequence(collection);
+    if (useKeys) {
+      filterSequence.has = function (key) {
+        var v = collection.get(key, NOT_SET);
+        return v !== NOT_SET && !!predicate.call(context, v, key, collection);
+      };
+      filterSequence.get = function (key, notSetValue) {
+        var v = collection.get(key, NOT_SET);
+        return v !== NOT_SET && predicate.call(context, v, key, collection)
+          ? v
+          : notSetValue;
+      };
+    }
+    filterSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      var iterations = 0;
+      collection.__iterate(function (v, k, c) {
+        if (predicate.call(context, v, k, c)) {
+          iterations++;
+          return fn(v, useKeys ? k : iterations - 1, this$1$1);
+        }
+      }, reverse);
+      return iterations;
+    };
+    filterSequence.__iteratorUncached = function (type, reverse) {
+      var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+      var iterations = 0;
+      return new Iterator(function () {
+        while (true) {
+          var step = iterator.next();
+          if (step.done) {
+            return step;
+          }
+          var entry = step.value;
+          var key = entry[0];
+          var value = entry[1];
+          if (predicate.call(context, value, key, collection)) {
+            return iteratorValue(type, useKeys ? key : iterations++, value, step);
+          }
+        }
+      });
+    };
+    return filterSequence;
+  }
+
+  function countByFactory(collection, grouper, context) {
+    var groups = Map().asMutable();
+    collection.__iterate(function (v, k) {
+      groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });
+    });
+    return groups.asImmutable();
+  }
+
+  function groupByFactory(collection, grouper, context) {
+    var isKeyedIter = isKeyed(collection);
+    var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();
+    collection.__iterate(function (v, k) {
+      groups.update(
+        grouper.call(context, v, k, collection),
+        function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }
+      );
+    });
+    var coerce = collectionClass(collection);
+    return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();
+  }
+
+  function partitionFactory(collection, predicate, context) {
+    var isKeyedIter = isKeyed(collection);
+    var groups = [[], []];
+    collection.__iterate(function (v, k) {
+      groups[predicate.call(context, v, k, collection) ? 1 : 0].push(
+        isKeyedIter ? [k, v] : v
+      );
+    });
+    var coerce = collectionClass(collection);
+    return groups.map(function (arr) { return reify(collection, coerce(arr)); });
+  }
+
+  function sliceFactory(collection, begin, end, useKeys) {
+    var originalSize = collection.size;
+
+    if (wholeSlice(begin, end, originalSize)) {
+      return collection;
+    }
+
+    var resolvedBegin = resolveBegin(begin, originalSize);
+    var resolvedEnd = resolveEnd(end, originalSize);
+
+    // begin or end will be NaN if they were provided as negative numbers and
+    // this collection's size is unknown. In that case, cache first so there is
+    // a known size and these do not resolve to NaN.
+    if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
+      return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);
+    }
+
+    // Note: resolvedEnd is undefined when the original sequence's length is
+    // unknown and this slice did not supply an end and should contain all
+    // elements after resolvedBegin.
+    // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
+    var resolvedSize = resolvedEnd - resolvedBegin;
+    var sliceSize;
+    if (resolvedSize === resolvedSize) {
+      sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
+    }
+
+    var sliceSeq = makeSequence(collection);
+
+    // If collection.size is undefined, the size of the realized sliceSeq is
+    // unknown at this point unless the number of items to slice is 0
+    sliceSeq.size =
+      sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;
+
+    if (!useKeys && isSeq(collection) && sliceSize >= 0) {
+      sliceSeq.get = function (index, notSetValue) {
+        index = wrapIndex(this, index);
+        return index >= 0 && index < sliceSize
+          ? collection.get(index + resolvedBegin, notSetValue)
+          : notSetValue;
+      };
+    }
+
+    sliceSeq.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      if (sliceSize === 0) {
+        return 0;
+      }
+      if (reverse) {
+        return this.cacheResult().__iterate(fn, reverse);
+      }
+      var skipped = 0;
+      var isSkipping = true;
+      var iterations = 0;
+      collection.__iterate(function (v, k) {
+        if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
+          iterations++;
+          return (
+            fn(v, useKeys ? k : iterations - 1, this$1$1) !== false &&
+            iterations !== sliceSize
+          );
+        }
+      });
+      return iterations;
+    };
+
+    sliceSeq.__iteratorUncached = function (type, reverse) {
+      if (sliceSize !== 0 && reverse) {
+        return this.cacheResult().__iterator(type, reverse);
+      }
+      // Don't bother instantiating parent iterator if taking 0.
+      if (sliceSize === 0) {
+        return new Iterator(iteratorDone);
+      }
+      var iterator = collection.__iterator(type, reverse);
+      var skipped = 0;
+      var iterations = 0;
+      return new Iterator(function () {
+        while (skipped++ < resolvedBegin) {
+          iterator.next();
+        }
+        if (++iterations > sliceSize) {
+          return iteratorDone();
+        }
+        var step = iterator.next();
+        if (useKeys || type === ITERATE_VALUES || step.done) {
+          return step;
+        }
+        if (type === ITERATE_KEYS) {
+          return iteratorValue(type, iterations - 1, undefined, step);
+        }
+        return iteratorValue(type, iterations - 1, step.value[1], step);
+      });
+    };
+
+    return sliceSeq;
+  }
+
+  function takeWhileFactory(collection, predicate, context) {
+    var takeSequence = makeSequence(collection);
+    takeSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      if (reverse) {
+        return this.cacheResult().__iterate(fn, reverse);
+      }
+      var iterations = 0;
+      collection.__iterate(
+        function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); }
+      );
+      return iterations;
+    };
+    takeSequence.__iteratorUncached = function (type, reverse) {
+      var this$1$1 = this;
+
+      if (reverse) {
+        return this.cacheResult().__iterator(type, reverse);
+      }
+      var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+      var iterating = true;
+      return new Iterator(function () {
+        if (!iterating) {
+          return iteratorDone();
+        }
+        var step = iterator.next();
+        if (step.done) {
+          return step;
+        }
+        var entry = step.value;
+        var k = entry[0];
+        var v = entry[1];
+        if (!predicate.call(context, v, k, this$1$1)) {
+          iterating = false;
+          return iteratorDone();
+        }
+        return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
+      });
+    };
+    return takeSequence;
+  }
+
+  function skipWhileFactory(collection, predicate, context, useKeys) {
+    var skipSequence = makeSequence(collection);
+    skipSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      if (reverse) {
+        return this.cacheResult().__iterate(fn, reverse);
+      }
+      var isSkipping = true;
+      var iterations = 0;
+      collection.__iterate(function (v, k, c) {
+        if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
+          iterations++;
+          return fn(v, useKeys ? k : iterations - 1, this$1$1);
+        }
+      });
+      return iterations;
+    };
+    skipSequence.__iteratorUncached = function (type, reverse) {
+      var this$1$1 = this;
+
+      if (reverse) {
+        return this.cacheResult().__iterator(type, reverse);
+      }
+      var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
+      var skipping = true;
+      var iterations = 0;
+      return new Iterator(function () {
+        var step;
+        var k;
+        var v;
+        do {
+          step = iterator.next();
+          if (step.done) {
+            if (useKeys || type === ITERATE_VALUES) {
+              return step;
+            }
+            if (type === ITERATE_KEYS) {
+              return iteratorValue(type, iterations++, undefined, step);
+            }
+            return iteratorValue(type, iterations++, step.value[1], step);
+          }
+          var entry = step.value;
+          k = entry[0];
+          v = entry[1];
+          skipping && (skipping = predicate.call(context, v, k, this$1$1));
+        } while (skipping);
+        return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
+      });
+    };
+    return skipSequence;
+  }
+
+  function concatFactory(collection, values) {
+    var isKeyedCollection = isKeyed(collection);
+    var iters = [collection]
+      .concat(values)
+      .map(function (v) {
+        if (!isCollection(v)) {
+          v = isKeyedCollection
+            ? keyedSeqFromValue(v)
+            : indexedSeqFromValue(Array.isArray(v) ? v : [v]);
+        } else if (isKeyedCollection) {
+          v = KeyedCollection(v);
+        }
+        return v;
+      })
+      .filter(function (v) { return v.size !== 0; });
+
+    if (iters.length === 0) {
+      return collection;
+    }
+
+    if (iters.length === 1) {
+      var singleton = iters[0];
+      if (
+        singleton === collection ||
+        (isKeyedCollection && isKeyed(singleton)) ||
+        (isIndexed(collection) && isIndexed(singleton))
+      ) {
+        return singleton;
+      }
+    }
+
+    var concatSeq = new ArraySeq(iters);
+    if (isKeyedCollection) {
+      concatSeq = concatSeq.toKeyedSeq();
+    } else if (!isIndexed(collection)) {
+      concatSeq = concatSeq.toSetSeq();
+    }
+    concatSeq = concatSeq.flatten(true);
+    concatSeq.size = iters.reduce(function (sum, seq) {
+      if (sum !== undefined) {
+        var size = seq.size;
+        if (size !== undefined) {
+          return sum + size;
+        }
+      }
+    }, 0);
+    return concatSeq;
+  }
+
+  function flattenFactory(collection, depth, useKeys) {
+    var flatSequence = makeSequence(collection);
+    flatSequence.__iterateUncached = function (fn, reverse) {
+      if (reverse) {
+        return this.cacheResult().__iterate(fn, reverse);
+      }
+      var iterations = 0;
+      var stopped = false;
+      function flatDeep(iter, currentDepth) {
+        iter.__iterate(function (v, k) {
+          if ((!depth || currentDepth < depth) && isCollection(v)) {
+            flatDeep(v, currentDepth + 1);
+          } else {
+            iterations++;
+            if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {
+              stopped = true;
+            }
+          }
+          return !stopped;
+        }, reverse);
+      }
+      flatDeep(collection, 0);
+      return iterations;
+    };
+    flatSequence.__iteratorUncached = function (type, reverse) {
+      if (reverse) {
+        return this.cacheResult().__iterator(type, reverse);
+      }
+      var iterator = collection.__iterator(type, reverse);
+      var stack = [];
+      var iterations = 0;
+      return new Iterator(function () {
+        while (iterator) {
+          var step = iterator.next();
+          if (step.done !== false) {
+            iterator = stack.pop();
+            continue;
+          }
+          var v = step.value;
+          if (type === ITERATE_ENTRIES) {
+            v = v[1];
+          }
+          if ((!depth || stack.length < depth) && isCollection(v)) {
+            stack.push(iterator);
+            iterator = v.__iterator(type, reverse);
+          } else {
+            return useKeys ? step : iteratorValue(type, iterations++, v, step);
+          }
+        }
+        return iteratorDone();
+      });
+    };
+    return flatSequence;
+  }
+
+  function flatMapFactory(collection, mapper, context) {
+    var coerce = collectionClass(collection);
+    return collection
+      .toSeq()
+      .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })
+      .flatten(true);
+  }
+
+  function interposeFactory(collection, separator) {
+    var interposedSequence = makeSequence(collection);
+    interposedSequence.size = collection.size && collection.size * 2 - 1;
+    interposedSequence.__iterateUncached = function (fn, reverse) {
+      var this$1$1 = this;
+
+      var iterations = 0;
+      collection.__iterate(
+        function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) &&
+          fn(v, iterations++, this$1$1) !== false; },
+        reverse
+      );
+      return iterations;
+    };
+    interposedSequence.__iteratorUncached = function (type, reverse) {
+      var iterator = collection.__iterator(ITERATE_VALUES, reverse);
+      var iterations = 0;
+      var step;
+      return new Iterator(function () {
+        if (!step || iterations % 2) {
+          step = iterator.next();
+          if (step.done) {
+            return step;
+          }
+        }
+        return iterations % 2
+          ? iteratorValue(type, iterations++, separator)
+          : iteratorValue(type, iterations++, step.value, step);
+      });
+    };
+    return interposedSequence;
+  }
+
+  function sortFactory(collection, comparator, mapper) {
+    if (!comparator) {
+      comparator = defaultComparator;
+    }
+    var isKeyedCollection = isKeyed(collection);
+    var index = 0;
+    var entries = collection
+      .toSeq()
+      .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })
+      .valueSeq()
+      .toArray();
+    entries
+      .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; })
+      .forEach(
+        isKeyedCollection
+          ? function (v, i) {
+              entries[i].length = 2;
+            }
+          : function (v, i) {
+              entries[i] = v[1];
+            }
+      );
+    return isKeyedCollection
+      ? KeyedSeq(entries)
+      : isIndexed(collection)
+      ? IndexedSeq(entries)
+      : SetSeq(entries);
+  }
+
+  function maxFactory(collection, comparator, mapper) {
+    if (!comparator) {
+      comparator = defaultComparator;
+    }
+    if (mapper) {
+      var entry = collection
+        .toSeq()
+        .map(function (v, k) { return [v, mapper(v, k, collection)]; })
+        .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });
+      return entry && entry[0];
+    }
+    return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });
+  }
+
+  function maxCompare(comparator, a, b) {
+    var comp = comparator(b, a);
+    // b is considered the new max if the comparator declares them equal, but
+    // they are not equal and b is in fact a nullish value.
+    return (
+      (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||
+      comp > 0
+    );
+  }
+
+  function zipWithFactory(keyIter, zipper, iters, zipAll) {
+    var zipSequence = makeSequence(keyIter);
+    var sizes = new ArraySeq(iters).map(function (i) { return i.size; });
+    zipSequence.size = zipAll ? sizes.max() : sizes.min();
+    // Note: this a generic base implementation of __iterate in terms of
+    // __iterator which may be more generically useful in the future.
+    zipSequence.__iterate = function (fn, reverse) {
+      /* generic:
+      var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
+      var step;
+      var iterations = 0;
+      while (!(step = iterator.next()).done) {
+        iterations++;
+        if (fn(step.value[1], step.value[0], this) === false) {
+          break;
+        }
+      }
+      return iterations;
+      */
+      // indexed:
+      var iterator = this.__iterator(ITERATE_VALUES, reverse);
+      var step;
+      var iterations = 0;
+      while (!(step = iterator.next()).done) {
+        if (fn(step.value, iterations++, this) === false) {
+          break;
+        }
+      }
+      return iterations;
+    };
+    zipSequence.__iteratorUncached = function (type, reverse) {
+      var iterators = iters.map(
+        function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }
+      );
+      var iterations = 0;
+      var isDone = false;
+      return new Iterator(function () {
+        var steps;
+        if (!isDone) {
+          steps = iterators.map(function (i) { return i.next(); });
+          isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });
+        }
+        if (isDone) {
+          return iteratorDone();
+        }
+        return iteratorValue(
+          type,
+          iterations++,
+          zipper.apply(
+            null,
+            steps.map(function (s) { return s.value; })
+          )
+        );
+      });
+    };
+    return zipSequence;
+  }
+
+  // #pragma Helper Functions
+
+  function reify(iter, seq) {
+    return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);
+  }
+
+  function validateEntry(entry) {
+    if (entry !== Object(entry)) {
+      throw new TypeError('Expected [K, V] tuple: ' + entry);
+    }
+  }
+
+  function collectionClass(collection) {
+    return isKeyed(collection)
+      ? KeyedCollection
+      : isIndexed(collection)
+      ? IndexedCollection
+      : SetCollection;
+  }
+
+  function makeSequence(collection) {
+    return Object.create(
+      (isKeyed(collection)
+        ? KeyedSeq
+        : isIndexed(collection)
+        ? IndexedSeq
+        : SetSeq
+      ).prototype
+    );
+  }
+
+  function cacheResultThrough() {
+    if (this._iter.cacheResult) {
+      this._iter.cacheResult();
+      this.size = this._iter.size;
+      return this;
+    }
+    return Seq.prototype.cacheResult.call(this);
+  }
+
+  function defaultComparator(a, b) {
+    if (a === undefined && b === undefined) {
+      return 0;
+    }
+
+    if (a === undefined) {
+      return 1;
+    }
+
+    if (b === undefined) {
+      return -1;
+    }
+
+    return a > b ? 1 : a < b ? -1 : 0;
+  }
+
+  function arrCopy(arr, offset) {
+    offset = offset || 0;
+    var len = Math.max(0, arr.length - offset);
+    var newArr = new Array(len);
+    for (var ii = 0; ii < len; ii++) {
+      newArr[ii] = arr[ii + offset];
+    }
+    return newArr;
+  }
+
+  function invariant(condition, error) {
+    if (!condition) { throw new Error(error); }
+  }
+
+  function assertNotInfinite(size) {
+    invariant(
+      size !== Infinity,
+      'Cannot perform this action with an infinite size.'
+    );
+  }
+
+  function coerceKeyPath(keyPath) {
+    if (isArrayLike(keyPath) && typeof keyPath !== 'string') {
+      return keyPath;
+    }
+    if (isOrdered(keyPath)) {
+      return keyPath.toArray();
+    }
+    throw new TypeError(
+      'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath
+    );
+  }
+
+  var toString = Object.prototype.toString;
+
+  function isPlainObject(value) {
+    // The base prototype's toString deals with Argument objects and native namespaces like Math
+    if (
+      !value ||
+      typeof value !== 'object' ||
+      toString.call(value) !== '[object Object]'
+    ) {
+      return false;
+    }
+
+    var proto = Object.getPrototypeOf(value);
+    if (proto === null) {
+      return true;
+    }
+
+    // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)
+    var parentProto = proto;
+    var nextProto = Object.getPrototypeOf(proto);
+    while (nextProto !== null) {
+      parentProto = nextProto;
+      nextProto = Object.getPrototypeOf(parentProto);
+    }
+    return parentProto === proto;
+  }
+
+  /**
+   * Returns true if the value is a potentially-persistent data structure, either
+   * provided by Immutable.js or a plain Array or Object.
+   */
+  function isDataStructure(value) {
+    return (
+      typeof value === 'object' &&
+      (isImmutable(value) || Array.isArray(value) || isPlainObject(value))
+    );
+  }
+
+  function quoteString(value) {
+    try {
+      return typeof value === 'string' ? JSON.stringify(value) : String(value);
+    } catch (_ignoreError) {
+      return JSON.stringify(value);
+    }
+  }
+
+  function has(collection, key) {
+    return isImmutable(collection)
+      ? collection.has(key)
+      : isDataStructure(collection) && hasOwnProperty.call(collection, key);
+  }
+
+  function get(collection, key, notSetValue) {
+    return isImmutable(collection)
+      ? collection.get(key, notSetValue)
+      : !has(collection, key)
+      ? notSetValue
+      : typeof collection.get === 'function'
+      ? collection.get(key)
+      : collection[key];
+  }
+
+  function shallowCopy(from) {
+    if (Array.isArray(from)) {
+      return arrCopy(from);
+    }
+    var to = {};
+    for (var key in from) {
+      if (hasOwnProperty.call(from, key)) {
+        to[key] = from[key];
+      }
+    }
+    return to;
+  }
+
+  function remove(collection, key) {
+    if (!isDataStructure(collection)) {
+      throw new TypeError(
+        'Cannot update non-data-structure value: ' + collection
+      );
+    }
+    if (isImmutable(collection)) {
+      if (!collection.remove) {
+        throw new TypeError(
+          'Cannot update immutable value without .remove() method: ' + collection
+        );
+      }
+      return collection.remove(key);
+    }
+    if (!hasOwnProperty.call(collection, key)) {
+      return collection;
+    }
+    var collectionCopy = shallowCopy(collection);
+    if (Array.isArray(collectionCopy)) {
+      collectionCopy.splice(key, 1);
+    } else {
+      delete collectionCopy[key];
+    }
+    return collectionCopy;
+  }
+
+  function set(collection, key, value) {
+    if (!isDataStructure(collection)) {
+      throw new TypeError(
+        'Cannot update non-data-structure value: ' + collection
+      );
+    }
+    if (isImmutable(collection)) {
+      if (!collection.set) {
+        throw new TypeError(
+          'Cannot update immutable value without .set() method: ' + collection
+        );
+      }
+      return collection.set(key, value);
+    }
+    if (hasOwnProperty.call(collection, key) && value === collection[key]) {
+      return collection;
+    }
+    var collectionCopy = shallowCopy(collection);
+    collectionCopy[key] = value;
+    return collectionCopy;
+  }
+
+  function updateIn$1(collection, keyPath, notSetValue, updater) {
+    if (!updater) {
+      updater = notSetValue;
+      notSetValue = undefined;
+    }
+    var updatedValue = updateInDeeply(
+      isImmutable(collection),
+      collection,
+      coerceKeyPath(keyPath),
+      0,
+      notSetValue,
+      updater
+    );
+    return updatedValue === NOT_SET ? notSetValue : updatedValue;
+  }
+
+  function updateInDeeply(
+    inImmutable,
+    existing,
+    keyPath,
+    i,
+    notSetValue,
+    updater
+  ) {
+    var wasNotSet = existing === NOT_SET;
+    if (i === keyPath.length) {
+      var existingValue = wasNotSet ? notSetValue : existing;
+      var newValue = updater(existingValue);
+      return newValue === existingValue ? existing : newValue;
+    }
+    if (!wasNotSet && !isDataStructure(existing)) {
+      throw new TypeError(
+        'Cannot update within non-data-structure value in path [' +
+          keyPath.slice(0, i).map(quoteString) +
+          ']: ' +
+          existing
+      );
+    }
+    var key = keyPath[i];
+    var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);
+    var nextUpdated = updateInDeeply(
+      nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),
+      nextExisting,
+      keyPath,
+      i + 1,
+      notSetValue,
+      updater
+    );
+    return nextUpdated === nextExisting
+      ? existing
+      : nextUpdated === NOT_SET
+      ? remove(existing, key)
+      : set(
+          wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,
+          key,
+          nextUpdated
+        );
+  }
+
+  function setIn$1(collection, keyPath, value) {
+    return updateIn$1(collection, keyPath, NOT_SET, function () { return value; });
+  }
+
+  function setIn(keyPath, v) {
+    return setIn$1(this, keyPath, v);
+  }
+
+  function removeIn(collection, keyPath) {
+    return updateIn$1(collection, keyPath, function () { return NOT_SET; });
+  }
+
+  function deleteIn(keyPath) {
+    return removeIn(this, keyPath);
+  }
+
+  function update$1(collection, key, notSetValue, updater) {
+    return updateIn$1(collection, [key], notSetValue, updater);
+  }
+
+  function update(key, notSetValue, updater) {
+    return arguments.length === 1
+      ? key(this)
+      : update$1(this, key, notSetValue, updater);
+  }
+
+  function updateIn(keyPath, notSetValue, updater) {
+    return updateIn$1(this, keyPath, notSetValue, updater);
+  }
+
+  function merge$1() {
+    var iters = [], len = arguments.length;
+    while ( len-- ) iters[ len ] = arguments[ len ];
+
+    return mergeIntoKeyedWith(this, iters);
+  }
+
+  function mergeWith$1(merger) {
+    var iters = [], len = arguments.length - 1;
+    while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+    if (typeof merger !== 'function') {
+      throw new TypeError('Invalid merger function: ' + merger);
+    }
+    return mergeIntoKeyedWith(this, iters, merger);
+  }
+
+  function mergeIntoKeyedWith(collection, collections, merger) {
+    var iters = [];
+    for (var ii = 0; ii < collections.length; ii++) {
+      var collection$1 = KeyedCollection(collections[ii]);
+      if (collection$1.size !== 0) {
+        iters.push(collection$1);
+      }
+    }
+    if (iters.length === 0) {
+      return collection;
+    }
+    if (
+      collection.toSeq().size === 0 &&
+      !collection.__ownerID &&
+      iters.length === 1
+    ) {
+      return collection.constructor(iters[0]);
+    }
+    return collection.withMutations(function (collection) {
+      var mergeIntoCollection = merger
+        ? function (value, key) {
+            update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }
+            );
+          }
+        : function (value, key) {
+            collection.set(key, value);
+          };
+      for (var ii = 0; ii < iters.length; ii++) {
+        iters[ii].forEach(mergeIntoCollection);
+      }
+    });
+  }
+
+  function merge(collection) {
+    var sources = [], len = arguments.length - 1;
+    while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+    return mergeWithSources(collection, sources);
+  }
+
+  function mergeWith(merger, collection) {
+    var sources = [], len = arguments.length - 2;
+    while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
+
+    return mergeWithSources(collection, sources, merger);
+  }
+
+  function mergeDeep$1(collection) {
+    var sources = [], len = arguments.length - 1;
+    while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+    return mergeDeepWithSources(collection, sources);
+  }
+
+  function mergeDeepWith$1(merger, collection) {
+    var sources = [], len = arguments.length - 2;
+    while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
+
+    return mergeDeepWithSources(collection, sources, merger);
+  }
+
+  function mergeDeepWithSources(collection, sources, merger) {
+    return mergeWithSources(collection, sources, deepMergerWith(merger));
+  }
+
+  function mergeWithSources(collection, sources, merger) {
+    if (!isDataStructure(collection)) {
+      throw new TypeError(
+        'Cannot merge into non-data-structure value: ' + collection
+      );
+    }
+    if (isImmutable(collection)) {
+      return typeof merger === 'function' && collection.mergeWith
+        ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))
+        : collection.merge
+        ? collection.merge.apply(collection, sources)
+        : collection.concat.apply(collection, sources);
+    }
+    var isArray = Array.isArray(collection);
+    var merged = collection;
+    var Collection = isArray ? IndexedCollection : KeyedCollection;
+    var mergeItem = isArray
+      ? function (value) {
+          // Copy on write
+          if (merged === collection) {
+            merged = shallowCopy(merged);
+          }
+          merged.push(value);
+        }
+      : function (value, key) {
+          var hasVal = hasOwnProperty.call(merged, key);
+          var nextVal =
+            hasVal && merger ? merger(merged[key], value, key) : value;
+          if (!hasVal || nextVal !== merged[key]) {
+            // Copy on write
+            if (merged === collection) {
+              merged = shallowCopy(merged);
+            }
+            merged[key] = nextVal;
+          }
+        };
+    for (var i = 0; i < sources.length; i++) {
+      Collection(sources[i]).forEach(mergeItem);
+    }
+    return merged;
+  }
+
+  function deepMergerWith(merger) {
+    function deepMerger(oldValue, newValue, key) {
+      return isDataStructure(oldValue) &&
+        isDataStructure(newValue) &&
+        areMergeable(oldValue, newValue)
+        ? mergeWithSources(oldValue, [newValue], deepMerger)
+        : merger
+        ? merger(oldValue, newValue, key)
+        : newValue;
+    }
+    return deepMerger;
+  }
+
+  /**
+   * It's unclear what the desired behavior is for merging two collections that
+   * fall into separate categories between keyed, indexed, or set-like, so we only
+   * consider them mergeable if they fall into the same category.
+   */
+  function areMergeable(oldDataStructure, newDataStructure) {
+    var oldSeq = Seq(oldDataStructure);
+    var newSeq = Seq(newDataStructure);
+    // This logic assumes that a sequence can only fall into one of the three
+    // categories mentioned above (since there's no `isSetLike()` method).
+    return (
+      isIndexed(oldSeq) === isIndexed(newSeq) &&
+      isKeyed(oldSeq) === isKeyed(newSeq)
+    );
+  }
+
+  function mergeDeep() {
+    var iters = [], len = arguments.length;
+    while ( len-- ) iters[ len ] = arguments[ len ];
+
+    return mergeDeepWithSources(this, iters);
+  }
+
+  function mergeDeepWith(merger) {
+    var iters = [], len = arguments.length - 1;
+    while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+    return mergeDeepWithSources(this, iters, merger);
+  }
+
+  function mergeIn(keyPath) {
+    var iters = [], len = arguments.length - 1;
+    while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+    return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });
+  }
+
+  function mergeDeepIn(keyPath) {
+    var iters = [], len = arguments.length - 1;
+    while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
+
+    return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }
+    );
+  }
+
+  function withMutations(fn) {
+    var mutable = this.asMutable();
+    fn(mutable);
+    return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
+  }
+
+  function asMutable() {
+    return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
+  }
+
+  function asImmutable() {
+    return this.__ensureOwner();
+  }
+
+  function wasAltered() {
+    return this.__altered;
+  }
+
+  var Map = /*@__PURE__*/(function (KeyedCollection) {
+    function Map(value) {
+      return value === undefined || value === null
+        ? emptyMap()
+        : isMap(value) && !isOrdered(value)
+        ? value
+        : emptyMap().withMutations(function (map) {
+            var iter = KeyedCollection(value);
+            assertNotInfinite(iter.size);
+            iter.forEach(function (v, k) { return map.set(k, v); });
+          });
+    }
+
+    if ( KeyedCollection ) Map.__proto__ = KeyedCollection;
+    Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype );
+    Map.prototype.constructor = Map;
+
+    Map.of = function of () {
+      var keyValues = [], len = arguments.length;
+      while ( len-- ) keyValues[ len ] = arguments[ len ];
+
+      return emptyMap().withMutations(function (map) {
+        for (var i = 0; i < keyValues.length; i += 2) {
+          if (i + 1 >= keyValues.length) {
+            throw new Error('Missing value for key: ' + keyValues[i]);
+          }
+          map.set(keyValues[i], keyValues[i + 1]);
+        }
+      });
+    };
+
+    Map.prototype.toString = function toString () {
+      return this.__toString('Map {', '}');
+    };
+
+    // @pragma Access
+
+    Map.prototype.get = function get (k, notSetValue) {
+      return this._root
+        ? this._root.get(0, undefined, k, notSetValue)
+        : notSetValue;
+    };
+
+    // @pragma Modification
+
+    Map.prototype.set = function set (k, v) {
+      return updateMap(this, k, v);
+    };
+
+    Map.prototype.remove = function remove (k) {
+      return updateMap(this, k, NOT_SET);
+    };
+
+    Map.prototype.deleteAll = function deleteAll (keys) {
+      var collection = Collection(keys);
+
+      if (collection.size === 0) {
+        return this;
+      }
+
+      return this.withMutations(function (map) {
+        collection.forEach(function (key) { return map.remove(key); });
+      });
+    };
+
+    Map.prototype.clear = function clear () {
+      if (this.size === 0) {
+        return this;
+      }
+      if (this.__ownerID) {
+        this.size = 0;
+        this._root = null;
+        this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return emptyMap();
+    };
+
+    // @pragma Composition
+
+    Map.prototype.sort = function sort (comparator) {
+      // Late binding
+      return OrderedMap(sortFactory(this, comparator));
+    };
+
+    Map.prototype.sortBy = function sortBy (mapper, comparator) {
+      // Late binding
+      return OrderedMap(sortFactory(this, comparator, mapper));
+    };
+
+    Map.prototype.map = function map (mapper, context) {
+      var this$1$1 = this;
+
+      return this.withMutations(function (map) {
+        map.forEach(function (value, key) {
+          map.set(key, mapper.call(context, value, key, this$1$1));
+        });
+      });
+    };
+
+    // @pragma Mutability
+
+    Map.prototype.__iterator = function __iterator (type, reverse) {
+      return new MapIterator(this, type, reverse);
+    };
+
+    Map.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      var iterations = 0;
+      this._root &&
+        this._root.iterate(function (entry) {
+          iterations++;
+          return fn(entry[1], entry[0], this$1$1);
+        }, reverse);
+      return iterations;
+    };
+
+    Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+      if (ownerID === this.__ownerID) {
+        return this;
+      }
+      if (!ownerID) {
+        if (this.size === 0) {
+          return emptyMap();
+        }
+        this.__ownerID = ownerID;
+        this.__altered = false;
+        return this;
+      }
+      return makeMap(this.size, this._root, ownerID, this.__hash);
+    };
+
+    return Map;
+  }(KeyedCollection));
+
+  Map.isMap = isMap;
+
+  var MapPrototype = Map.prototype;
+  MapPrototype[IS_MAP_SYMBOL] = true;
+  MapPrototype[DELETE] = MapPrototype.remove;
+  MapPrototype.removeAll = MapPrototype.deleteAll;
+  MapPrototype.setIn = setIn;
+  MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;
+  MapPrototype.update = update;
+  MapPrototype.updateIn = updateIn;
+  MapPrototype.merge = MapPrototype.concat = merge$1;
+  MapPrototype.mergeWith = mergeWith$1;
+  MapPrototype.mergeDeep = mergeDeep;
+  MapPrototype.mergeDeepWith = mergeDeepWith;
+  MapPrototype.mergeIn = mergeIn;
+  MapPrototype.mergeDeepIn = mergeDeepIn;
+  MapPrototype.withMutations = withMutations;
+  MapPrototype.wasAltered = wasAltered;
+  MapPrototype.asImmutable = asImmutable;
+  MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;
+  MapPrototype['@@transducer/step'] = function (result, arr) {
+    return result.set(arr[0], arr[1]);
+  };
+  MapPrototype['@@transducer/result'] = function (obj) {
+    return obj.asImmutable();
+  };
+
+  // #pragma Trie Nodes
+
+  var ArrayMapNode = function ArrayMapNode(ownerID, entries) {
+    this.ownerID = ownerID;
+    this.entries = entries;
+  };
+
+  ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+    var entries = this.entries;
+    for (var ii = 0, len = entries.length; ii < len; ii++) {
+      if (is(key, entries[ii][0])) {
+        return entries[ii][1];
+      }
+    }
+    return notSetValue;
+  };
+
+  ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+    var removed = value === NOT_SET;
+
+    var entries = this.entries;
+    var idx = 0;
+    var len = entries.length;
+    for (; idx < len; idx++) {
+      if (is(key, entries[idx][0])) {
+        break;
+      }
+    }
+    var exists = idx < len;
+
+    if (exists ? entries[idx][1] === value : removed) {
+      return this;
+    }
+
+    SetRef(didAlter);
+    (removed || !exists) && SetRef(didChangeSize);
+
+    if (removed && entries.length === 1) {
+      return; // undefined
+    }
+
+    if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
+      return createNodes(ownerID, entries, key, value);
+    }
+
+    var isEditable = ownerID && ownerID === this.ownerID;
+    var newEntries = isEditable ? entries : arrCopy(entries);
+
+    if (exists) {
+      if (removed) {
+        idx === len - 1
+          ? newEntries.pop()
+          : (newEntries[idx] = newEntries.pop());
+      } else {
+        newEntries[idx] = [key, value];
+      }
+    } else {
+      newEntries.push([key, value]);
+    }
+
+    if (isEditable) {
+      this.entries = newEntries;
+      return this;
+    }
+
+    return new ArrayMapNode(ownerID, newEntries);
+  };
+
+  var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {
+    this.ownerID = ownerID;
+    this.bitmap = bitmap;
+    this.nodes = nodes;
+  };
+
+  BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+    if (keyHash === undefined) {
+      keyHash = hash(key);
+    }
+    var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);
+    var bitmap = this.bitmap;
+    return (bitmap & bit) === 0
+      ? notSetValue
+      : this.nodes[popCount(bitmap & (bit - 1))].get(
+          shift + SHIFT,
+          keyHash,
+          key,
+          notSetValue
+        );
+  };
+
+  BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+    if (keyHash === undefined) {
+      keyHash = hash(key);
+    }
+    var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+    var bit = 1 << keyHashFrag;
+    var bitmap = this.bitmap;
+    var exists = (bitmap & bit) !== 0;
+
+    if (!exists && value === NOT_SET) {
+      return this;
+    }
+
+    var idx = popCount(bitmap & (bit - 1));
+    var nodes = this.nodes;
+    var node = exists ? nodes[idx] : undefined;
+    var newNode = updateNode(
+      node,
+      ownerID,
+      shift + SHIFT,
+      keyHash,
+      key,
+      value,
+      didChangeSize,
+      didAlter
+    );
+
+    if (newNode === node) {
+      return this;
+    }
+
+    if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
+      return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
+    }
+
+    if (
+      exists &&
+      !newNode &&
+      nodes.length === 2 &&
+      isLeafNode(nodes[idx ^ 1])
+    ) {
+      return nodes[idx ^ 1];
+    }
+
+    if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
+      return newNode;
+    }
+
+    var isEditable = ownerID && ownerID === this.ownerID;
+    var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;
+    var newNodes = exists
+      ? newNode
+        ? setAt(nodes, idx, newNode, isEditable)
+        : spliceOut(nodes, idx, isEditable)
+      : spliceIn(nodes, idx, newNode, isEditable);
+
+    if (isEditable) {
+      this.bitmap = newBitmap;
+      this.nodes = newNodes;
+      return this;
+    }
+
+    return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
+  };
+
+  var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {
+    this.ownerID = ownerID;
+    this.count = count;
+    this.nodes = nodes;
+  };
+
+  HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+    if (keyHash === undefined) {
+      keyHash = hash(key);
+    }
+    var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+    var node = this.nodes[idx];
+    return node
+      ? node.get(shift + SHIFT, keyHash, key, notSetValue)
+      : notSetValue;
+  };
+
+  HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+    if (keyHash === undefined) {
+      keyHash = hash(key);
+    }
+    var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+    var removed = value === NOT_SET;
+    var nodes = this.nodes;
+    var node = nodes[idx];
+
+    if (removed && !node) {
+      return this;
+    }
+
+    var newNode = updateNode(
+      node,
+      ownerID,
+      shift + SHIFT,
+      keyHash,
+      key,
+      value,
+      didChangeSize,
+      didAlter
+    );
+    if (newNode === node) {
+      return this;
+    }
+
+    var newCount = this.count;
+    if (!node) {
+      newCount++;
+    } else if (!newNode) {
+      newCount--;
+      if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
+        return packNodes(ownerID, nodes, newCount, idx);
+      }
+    }
+
+    var isEditable = ownerID && ownerID === this.ownerID;
+    var newNodes = setAt(nodes, idx, newNode, isEditable);
+
+    if (isEditable) {
+      this.count = newCount;
+      this.nodes = newNodes;
+      return this;
+    }
+
+    return new HashArrayMapNode(ownerID, newCount, newNodes);
+  };
+
+  var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {
+    this.ownerID = ownerID;
+    this.keyHash = keyHash;
+    this.entries = entries;
+  };
+
+  HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+    var entries = this.entries;
+    for (var ii = 0, len = entries.length; ii < len; ii++) {
+      if (is(key, entries[ii][0])) {
+        return entries[ii][1];
+      }
+    }
+    return notSetValue;
+  };
+
+  HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+    if (keyHash === undefined) {
+      keyHash = hash(key);
+    }
+
+    var removed = value === NOT_SET;
+
+    if (keyHash !== this.keyHash) {
+      if (removed) {
+        return this;
+      }
+      SetRef(didAlter);
+      SetRef(didChangeSize);
+      return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
+    }
+
+    var entries = this.entries;
+    var idx = 0;
+    var len = entries.length;
+    for (; idx < len; idx++) {
+      if (is(key, entries[idx][0])) {
+        break;
+      }
+    }
+    var exists = idx < len;
+
+    if (exists ? entries[idx][1] === value : removed) {
+      return this;
+    }
+
+    SetRef(didAlter);
+    (removed || !exists) && SetRef(didChangeSize);
+
+    if (removed && len === 2) {
+      return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
+    }
+
+    var isEditable = ownerID && ownerID === this.ownerID;
+    var newEntries = isEditable ? entries : arrCopy(entries);
+
+    if (exists) {
+      if (removed) {
+        idx === len - 1
+          ? newEntries.pop()
+          : (newEntries[idx] = newEntries.pop());
+      } else {
+        newEntries[idx] = [key, value];
+      }
+    } else {
+      newEntries.push([key, value]);
+    }
+
+    if (isEditable) {
+      this.entries = newEntries;
+      return this;
+    }
+
+    return new HashCollisionNode(ownerID, this.keyHash, newEntries);
+  };
+
+  var ValueNode = function ValueNode(ownerID, keyHash, entry) {
+    this.ownerID = ownerID;
+    this.keyHash = keyHash;
+    this.entry = entry;
+  };
+
+  ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
+    return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
+  };
+
+  ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+    var removed = value === NOT_SET;
+    var keyMatch = is(key, this.entry[0]);
+    if (keyMatch ? value === this.entry[1] : removed) {
+      return this;
+    }
+
+    SetRef(didAlter);
+
+    if (removed) {
+      SetRef(didChangeSize);
+      return; // undefined
+    }
+
+    if (keyMatch) {
+      if (ownerID && ownerID === this.ownerID) {
+        this.entry[1] = value;
+        return this;
+      }
+      return new ValueNode(ownerID, this.keyHash, [key, value]);
+    }
+
+    SetRef(didChangeSize);
+    return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
+  };
+
+  // #pragma Iterators
+
+  ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate =
+    function (fn, reverse) {
+      var entries = this.entries;
+      for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
+        if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
+          return false;
+        }
+      }
+    };
+
+  BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate =
+    function (fn, reverse) {
+      var nodes = this.nodes;
+      for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
+        var node = nodes[reverse ? maxIndex - ii : ii];
+        if (node && node.iterate(fn, reverse) === false) {
+          return false;
+        }
+      }
+    };
+
+  // eslint-disable-next-line no-unused-vars
+  ValueNode.prototype.iterate = function (fn, reverse) {
+    return fn(this.entry);
+  };
+
+  var MapIterator = /*@__PURE__*/(function (Iterator) {
+    function MapIterator(map, type, reverse) {
+      this._type = type;
+      this._reverse = reverse;
+      this._stack = map._root && mapIteratorFrame(map._root);
+    }
+
+    if ( Iterator ) MapIterator.__proto__ = Iterator;
+    MapIterator.prototype = Object.create( Iterator && Iterator.prototype );
+    MapIterator.prototype.constructor = MapIterator;
+
+    MapIterator.prototype.next = function next () {
+      var type = this._type;
+      var stack = this._stack;
+      while (stack) {
+        var node = stack.node;
+        var index = stack.index++;
+        var maxIndex = (void 0);
+        if (node.entry) {
+          if (index === 0) {
+            return mapIteratorValue(type, node.entry);
+          }
+        } else if (node.entries) {
+          maxIndex = node.entries.length - 1;
+          if (index <= maxIndex) {
+            return mapIteratorValue(
+              type,
+              node.entries[this._reverse ? maxIndex - index : index]
+            );
+          }
+        } else {
+          maxIndex = node.nodes.length - 1;
+          if (index <= maxIndex) {
+            var subNode = node.nodes[this._reverse ? maxIndex - index : index];
+            if (subNode) {
+              if (subNode.entry) {
+                return mapIteratorValue(type, subNode.entry);
+              }
+              stack = this._stack = mapIteratorFrame(subNode, stack);
+            }
+            continue;
+          }
+        }
+        stack = this._stack = this._stack.__prev;
+      }
+      return iteratorDone();
+    };
+
+    return MapIterator;
+  }(Iterator));
+
+  function mapIteratorValue(type, entry) {
+    return iteratorValue(type, entry[0], entry[1]);
+  }
+
+  function mapIteratorFrame(node, prev) {
+    return {
+      node: node,
+      index: 0,
+      __prev: prev,
+    };
+  }
+
+  function makeMap(size, root, ownerID, hash) {
+    var map = Object.create(MapPrototype);
+    map.size = size;
+    map._root = root;
+    map.__ownerID = ownerID;
+    map.__hash = hash;
+    map.__altered = false;
+    return map;
+  }
+
+  var EMPTY_MAP;
+  function emptyMap() {
+    return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
+  }
+
+  function updateMap(map, k, v) {
+    var newRoot;
+    var newSize;
+    if (!map._root) {
+      if (v === NOT_SET) {
+        return map;
+      }
+      newSize = 1;
+      newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
+    } else {
+      var didChangeSize = MakeRef();
+      var didAlter = MakeRef();
+      newRoot = updateNode(
+        map._root,
+        map.__ownerID,
+        0,
+        undefined,
+        k,
+        v,
+        didChangeSize,
+        didAlter
+      );
+      if (!didAlter.value) {
+        return map;
+      }
+      newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);
+    }
+    if (map.__ownerID) {
+      map.size = newSize;
+      map._root = newRoot;
+      map.__hash = undefined;
+      map.__altered = true;
+      return map;
+    }
+    return newRoot ? makeMap(newSize, newRoot) : emptyMap();
+  }
+
+  function updateNode(
+    node,
+    ownerID,
+    shift,
+    keyHash,
+    key,
+    value,
+    didChangeSize,
+    didAlter
+  ) {
+    if (!node) {
+      if (value === NOT_SET) {
+        return node;
+      }
+      SetRef(didAlter);
+      SetRef(didChangeSize);
+      return new ValueNode(ownerID, keyHash, [key, value]);
+    }
+    return node.update(
+      ownerID,
+      shift,
+      keyHash,
+      key,
+      value,
+      didChangeSize,
+      didAlter
+    );
+  }
+
+  function isLeafNode(node) {
+    return (
+      node.constructor === ValueNode || node.constructor === HashCollisionNode
+    );
+  }
+
+  function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
+    if (node.keyHash === keyHash) {
+      return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
+    }
+
+    var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
+    var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+
+    var newNode;
+    var nodes =
+      idx1 === idx2
+        ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]
+        : ((newNode = new ValueNode(ownerID, keyHash, entry)),
+          idx1 < idx2 ? [node, newNode] : [newNode, node]);
+
+    return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
+  }
+
+  function createNodes(ownerID, entries, key, value) {
+    if (!ownerID) {
+      ownerID = new OwnerID();
+    }
+    var node = new ValueNode(ownerID, hash(key), [key, value]);
+    for (var ii = 0; ii < entries.length; ii++) {
+      var entry = entries[ii];
+      node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
+    }
+    return node;
+  }
+
+  function packNodes(ownerID, nodes, count, excluding) {
+    var bitmap = 0;
+    var packedII = 0;
+    var packedNodes = new Array(count);
+    for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
+      var node = nodes[ii];
+      if (node !== undefined && ii !== excluding) {
+        bitmap |= bit;
+        packedNodes[packedII++] = node;
+      }
+    }
+    return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
+  }
+
+  function expandNodes(ownerID, nodes, bitmap, including, node) {
+    var count = 0;
+    var expandedNodes = new Array(SIZE);
+    for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
+      expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
+    }
+    expandedNodes[including] = node;
+    return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
+  }
+
+  function popCount(x) {
+    x -= (x >> 1) & 0x55555555;
+    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
+    x = (x + (x >> 4)) & 0x0f0f0f0f;
+    x += x >> 8;
+    x += x >> 16;
+    return x & 0x7f;
+  }
+
+  function setAt(array, idx, val, canEdit) {
+    var newArray = canEdit ? array : arrCopy(array);
+    newArray[idx] = val;
+    return newArray;
+  }
+
+  function spliceIn(array, idx, val, canEdit) {
+    var newLen = array.length + 1;
+    if (canEdit && idx + 1 === newLen) {
+      array[idx] = val;
+      return array;
+    }
+    var newArray = new Array(newLen);
+    var after = 0;
+    for (var ii = 0; ii < newLen; ii++) {
+      if (ii === idx) {
+        newArray[ii] = val;
+        after = -1;
+      } else {
+        newArray[ii] = array[ii + after];
+      }
+    }
+    return newArray;
+  }
+
+  function spliceOut(array, idx, canEdit) {
+    var newLen = array.length - 1;
+    if (canEdit && idx === newLen) {
+      array.pop();
+      return array;
+    }
+    var newArray = new Array(newLen);
+    var after = 0;
+    for (var ii = 0; ii < newLen; ii++) {
+      if (ii === idx) {
+        after = 1;
+      }
+      newArray[ii] = array[ii + after];
+    }
+    return newArray;
+  }
+
+  var MAX_ARRAY_MAP_SIZE = SIZE / 4;
+  var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
+  var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
+
+  var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';
+
+  function isList(maybeList) {
+    return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);
+  }
+
+  var List = /*@__PURE__*/(function (IndexedCollection) {
+    function List(value) {
+      var empty = emptyList();
+      if (value === undefined || value === null) {
+        return empty;
+      }
+      if (isList(value)) {
+        return value;
+      }
+      var iter = IndexedCollection(value);
+      var size = iter.size;
+      if (size === 0) {
+        return empty;
+      }
+      assertNotInfinite(size);
+      if (size > 0 && size < SIZE) {
+        return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
+      }
+      return empty.withMutations(function (list) {
+        list.setSize(size);
+        iter.forEach(function (v, i) { return list.set(i, v); });
+      });
+    }
+
+    if ( IndexedCollection ) List.__proto__ = IndexedCollection;
+    List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
+    List.prototype.constructor = List;
+
+    List.of = function of (/*...values*/) {
+      return this(arguments);
+    };
+
+    List.prototype.toString = function toString () {
+      return this.__toString('List [', ']');
+    };
+
+    // @pragma Access
+
+    List.prototype.get = function get (index, notSetValue) {
+      index = wrapIndex(this, index);
+      if (index >= 0 && index < this.size) {
+        index += this._origin;
+        var node = listNodeFor(this, index);
+        return node && node.array[index & MASK];
+      }
+      return notSetValue;
+    };
+
+    // @pragma Modification
+
+    List.prototype.set = function set (index, value) {
+      return updateList(this, index, value);
+    };
+
+    List.prototype.remove = function remove (index) {
+      return !this.has(index)
+        ? this
+        : index === 0
+        ? this.shift()
+        : index === this.size - 1
+        ? this.pop()
+        : this.splice(index, 1);
+    };
+
+    List.prototype.insert = function insert (index, value) {
+      return this.splice(index, 0, value);
+    };
+
+    List.prototype.clear = function clear () {
+      if (this.size === 0) {
+        return this;
+      }
+      if (this.__ownerID) {
+        this.size = this._origin = this._capacity = 0;
+        this._level = SHIFT;
+        this._root = this._tail = this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return emptyList();
+    };
+
+    List.prototype.push = function push (/*...values*/) {
+      var values = arguments;
+      var oldSize = this.size;
+      return this.withMutations(function (list) {
+        setListBounds(list, 0, oldSize + values.length);
+        for (var ii = 0; ii < values.length; ii++) {
+          list.set(oldSize + ii, values[ii]);
+        }
+      });
+    };
+
+    List.prototype.pop = function pop () {
+      return setListBounds(this, 0, -1);
+    };
+
+    List.prototype.unshift = function unshift (/*...values*/) {
+      var values = arguments;
+      return this.withMutations(function (list) {
+        setListBounds(list, -values.length);
+        for (var ii = 0; ii < values.length; ii++) {
+          list.set(ii, values[ii]);
+        }
+      });
+    };
+
+    List.prototype.shift = function shift () {
+      return setListBounds(this, 1);
+    };
+
+    // @pragma Composition
+
+    List.prototype.concat = function concat (/*...collections*/) {
+      var arguments$1 = arguments;
+
+      var seqs = [];
+      for (var i = 0; i < arguments.length; i++) {
+        var argument = arguments$1[i];
+        var seq = IndexedCollection(
+          typeof argument !== 'string' && hasIterator(argument)
+            ? argument
+            : [argument]
+        );
+        if (seq.size !== 0) {
+          seqs.push(seq);
+        }
+      }
+      if (seqs.length === 0) {
+        return this;
+      }
+      if (this.size === 0 && !this.__ownerID && seqs.length === 1) {
+        return this.constructor(seqs[0]);
+      }
+      return this.withMutations(function (list) {
+        seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });
+      });
+    };
+
+    List.prototype.setSize = function setSize (size) {
+      return setListBounds(this, 0, size);
+    };
+
+    List.prototype.map = function map (mapper, context) {
+      var this$1$1 = this;
+
+      return this.withMutations(function (list) {
+        for (var i = 0; i < this$1$1.size; i++) {
+          list.set(i, mapper.call(context, list.get(i), i, this$1$1));
+        }
+      });
+    };
+
+    // @pragma Iteration
+
+    List.prototype.slice = function slice (begin, end) {
+      var size = this.size;
+      if (wholeSlice(begin, end, size)) {
+        return this;
+      }
+      return setListBounds(
+        this,
+        resolveBegin(begin, size),
+        resolveEnd(end, size)
+      );
+    };
+
+    List.prototype.__iterator = function __iterator (type, reverse) {
+      var index = reverse ? this.size : 0;
+      var values = iterateList(this, reverse);
+      return new Iterator(function () {
+        var value = values();
+        return value === DONE
+          ? iteratorDone()
+          : iteratorValue(type, reverse ? --index : index++, value);
+      });
+    };
+
+    List.prototype.__iterate = function __iterate (fn, reverse) {
+      var index = reverse ? this.size : 0;
+      var values = iterateList(this, reverse);
+      var value;
+      while ((value = values()) !== DONE) {
+        if (fn(value, reverse ? --index : index++, this) === false) {
+          break;
+        }
+      }
+      return index;
+    };
+
+    List.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+      if (ownerID === this.__ownerID) {
+        return this;
+      }
+      if (!ownerID) {
+        if (this.size === 0) {
+          return emptyList();
+        }
+        this.__ownerID = ownerID;
+        this.__altered = false;
+        return this;
+      }
+      return makeList(
+        this._origin,
+        this._capacity,
+        this._level,
+        this._root,
+        this._tail,
+        ownerID,
+        this.__hash
+      );
+    };
+
+    return List;
+  }(IndexedCollection));
+
+  List.isList = isList;
+
+  var ListPrototype = List.prototype;
+  ListPrototype[IS_LIST_SYMBOL] = true;
+  ListPrototype[DELETE] = ListPrototype.remove;
+  ListPrototype.merge = ListPrototype.concat;
+  ListPrototype.setIn = setIn;
+  ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;
+  ListPrototype.update = update;
+  ListPrototype.updateIn = updateIn;
+  ListPrototype.mergeIn = mergeIn;
+  ListPrototype.mergeDeepIn = mergeDeepIn;
+  ListPrototype.withMutations = withMutations;
+  ListPrototype.wasAltered = wasAltered;
+  ListPrototype.asImmutable = asImmutable;
+  ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;
+  ListPrototype['@@transducer/step'] = function (result, arr) {
+    return result.push(arr);
+  };
+  ListPrototype['@@transducer/result'] = function (obj) {
+    return obj.asImmutable();
+  };
+
+  var VNode = function VNode(array, ownerID) {
+    this.array = array;
+    this.ownerID = ownerID;
+  };
+
+  // TODO: seems like these methods are very similar
+
+  VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {
+    if (index === level ? 1 << level : this.array.length === 0) {
+      return this;
+    }
+    var originIndex = (index >>> level) & MASK;
+    if (originIndex >= this.array.length) {
+      return new VNode([], ownerID);
+    }
+    var removingFirst = originIndex === 0;
+    var newChild;
+    if (level > 0) {
+      var oldChild = this.array[originIndex];
+      newChild =
+        oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
+      if (newChild === oldChild && removingFirst) {
+        return this;
+      }
+    }
+    if (removingFirst && !newChild) {
+      return this;
+    }
+    var editable = editableVNode(this, ownerID);
+    if (!removingFirst) {
+      for (var ii = 0; ii < originIndex; ii++) {
+        editable.array[ii] = undefined;
+      }
+    }
+    if (newChild) {
+      editable.array[originIndex] = newChild;
+    }
+    return editable;
+  };
+
+  VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {
+    if (index === (level ? 1 << level : 0) || this.array.length === 0) {
+      return this;
+    }
+    var sizeIndex = ((index - 1) >>> level) & MASK;
+    if (sizeIndex >= this.array.length) {
+      return this;
+    }
+
+    var newChild;
+    if (level > 0) {
+      var oldChild = this.array[sizeIndex];
+      newChild =
+        oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
+      if (newChild === oldChild && sizeIndex === this.array.length - 1) {
+        return this;
+      }
+    }
+
+    var editable = editableVNode(this, ownerID);
+    editable.array.splice(sizeIndex + 1);
+    if (newChild) {
+      editable.array[sizeIndex] = newChild;
+    }
+    return editable;
+  };
+
+  var DONE = {};
+
+  function iterateList(list, reverse) {
+    var left = list._origin;
+    var right = list._capacity;
+    var tailPos = getTailOffset(right);
+    var tail = list._tail;
+
+    return iterateNodeOrLeaf(list._root, list._level, 0);
+
+    function iterateNodeOrLeaf(node, level, offset) {
+      return level === 0
+        ? iterateLeaf(node, offset)
+        : iterateNode(node, level, offset);
+    }
+
+    function iterateLeaf(node, offset) {
+      var array = offset === tailPos ? tail && tail.array : node && node.array;
+      var from = offset > left ? 0 : left - offset;
+      var to = right - offset;
+      if (to > SIZE) {
+        to = SIZE;
+      }
+      return function () {
+        if (from === to) {
+          return DONE;
+        }
+        var idx = reverse ? --to : from++;
+        return array && array[idx];
+      };
+    }
+
+    function iterateNode(node, level, offset) {
+      var values;
+      var array = node && node.array;
+      var from = offset > left ? 0 : (left - offset) >> level;
+      var to = ((right - offset) >> level) + 1;
+      if (to > SIZE) {
+        to = SIZE;
+      }
+      return function () {
+        while (true) {
+          if (values) {
+            var value = values();
+            if (value !== DONE) {
+              return value;
+            }
+            values = null;
+          }
+          if (from === to) {
+            return DONE;
+          }
+          var idx = reverse ? --to : from++;
+          values = iterateNodeOrLeaf(
+            array && array[idx],
+            level - SHIFT,
+            offset + (idx << level)
+          );
+        }
+      };
+    }
+  }
+
+  function makeList(origin, capacity, level, root, tail, ownerID, hash) {
+    var list = Object.create(ListPrototype);
+    list.size = capacity - origin;
+    list._origin = origin;
+    list._capacity = capacity;
+    list._level = level;
+    list._root = root;
+    list._tail = tail;
+    list.__ownerID = ownerID;
+    list.__hash = hash;
+    list.__altered = false;
+    return list;
+  }
+
+  var EMPTY_LIST;
+  function emptyList() {
+    return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
+  }
+
+  function updateList(list, index, value) {
+    index = wrapIndex(list, index);
+
+    if (index !== index) {
+      return list;
+    }
+
+    if (index >= list.size || index < 0) {
+      return list.withMutations(function (list) {
+        index < 0
+          ? setListBounds(list, index).set(0, value)
+          : setListBounds(list, 0, index + 1).set(index, value);
+      });
+    }
+
+    index += list._origin;
+
+    var newTail = list._tail;
+    var newRoot = list._root;
+    var didAlter = MakeRef();
+    if (index >= getTailOffset(list._capacity)) {
+      newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
+    } else {
+      newRoot = updateVNode(
+        newRoot,
+        list.__ownerID,
+        list._level,
+        index,
+        value,
+        didAlter
+      );
+    }
+
+    if (!didAlter.value) {
+      return list;
+    }
+
+    if (list.__ownerID) {
+      list._root = newRoot;
+      list._tail = newTail;
+      list.__hash = undefined;
+      list.__altered = true;
+      return list;
+    }
+    return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
+  }
+
+  function updateVNode(node, ownerID, level, index, value, didAlter) {
+    var idx = (index >>> level) & MASK;
+    var nodeHas = node && idx < node.array.length;
+    if (!nodeHas && value === undefined) {
+      return node;
+    }
+
+    var newNode;
+
+    if (level > 0) {
+      var lowerNode = node && node.array[idx];
+      var newLowerNode = updateVNode(
+        lowerNode,
+        ownerID,
+        level - SHIFT,
+        index,
+        value,
+        didAlter
+      );
+      if (newLowerNode === lowerNode) {
+        return node;
+      }
+      newNode = editableVNode(node, ownerID);
+      newNode.array[idx] = newLowerNode;
+      return newNode;
+    }
+
+    if (nodeHas && node.array[idx] === value) {
+      return node;
+    }
+
+    if (didAlter) {
+      SetRef(didAlter);
+    }
+
+    newNode = editableVNode(node, ownerID);
+    if (value === undefined && idx === newNode.array.length - 1) {
+      newNode.array.pop();
+    } else {
+      newNode.array[idx] = value;
+    }
+    return newNode;
+  }
+
+  function editableVNode(node, ownerID) {
+    if (ownerID && node && ownerID === node.ownerID) {
+      return node;
+    }
+    return new VNode(node ? node.array.slice() : [], ownerID);
+  }
+
+  function listNodeFor(list, rawIndex) {
+    if (rawIndex >= getTailOffset(list._capacity)) {
+      return list._tail;
+    }
+    if (rawIndex < 1 << (list._level + SHIFT)) {
+      var node = list._root;
+      var level = list._level;
+      while (node && level > 0) {
+        node = node.array[(rawIndex >>> level) & MASK];
+        level -= SHIFT;
+      }
+      return node;
+    }
+  }
+
+  function setListBounds(list, begin, end) {
+    // Sanitize begin & end using this shorthand for ToInt32(argument)
+    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+    if (begin !== undefined) {
+      begin |= 0;
+    }
+    if (end !== undefined) {
+      end |= 0;
+    }
+    var owner = list.__ownerID || new OwnerID();
+    var oldOrigin = list._origin;
+    var oldCapacity = list._capacity;
+    var newOrigin = oldOrigin + begin;
+    var newCapacity =
+      end === undefined
+        ? oldCapacity
+        : end < 0
+        ? oldCapacity + end
+        : oldOrigin + end;
+    if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
+      return list;
+    }
+
+    // If it's going to end after it starts, it's empty.
+    if (newOrigin >= newCapacity) {
+      return list.clear();
+    }
+
+    var newLevel = list._level;
+    var newRoot = list._root;
+
+    // New origin might need creating a higher root.
+    var offsetShift = 0;
+    while (newOrigin + offsetShift < 0) {
+      newRoot = new VNode(
+        newRoot && newRoot.array.length ? [undefined, newRoot] : [],
+        owner
+      );
+      newLevel += SHIFT;
+      offsetShift += 1 << newLevel;
+    }
+    if (offsetShift) {
+      newOrigin += offsetShift;
+      oldOrigin += offsetShift;
+      newCapacity += offsetShift;
+      oldCapacity += offsetShift;
+    }
+
+    var oldTailOffset = getTailOffset(oldCapacity);
+    var newTailOffset = getTailOffset(newCapacity);
+
+    // New size might need creating a higher root.
+    while (newTailOffset >= 1 << (newLevel + SHIFT)) {
+      newRoot = new VNode(
+        newRoot && newRoot.array.length ? [newRoot] : [],
+        owner
+      );
+      newLevel += SHIFT;
+    }
+
+    // Locate or create the new tail.
+    var oldTail = list._tail;
+    var newTail =
+      newTailOffset < oldTailOffset
+        ? listNodeFor(list, newCapacity - 1)
+        : newTailOffset > oldTailOffset
+        ? new VNode([], owner)
+        : oldTail;
+
+    // Merge Tail into tree.
+    if (
+      oldTail &&
+      newTailOffset > oldTailOffset &&
+      newOrigin < oldCapacity &&
+      oldTail.array.length
+    ) {
+      newRoot = editableVNode(newRoot, owner);
+      var node = newRoot;
+      for (var level = newLevel; level > SHIFT; level -= SHIFT) {
+        var idx = (oldTailOffset >>> level) & MASK;
+        node = node.array[idx] = editableVNode(node.array[idx], owner);
+      }
+      node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
+    }
+
+    // If the size has been reduced, there's a chance the tail needs to be trimmed.
+    if (newCapacity < oldCapacity) {
+      newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
+    }
+
+    // If the new origin is within the tail, then we do not need a root.
+    if (newOrigin >= newTailOffset) {
+      newOrigin -= newTailOffset;
+      newCapacity -= newTailOffset;
+      newLevel = SHIFT;
+      newRoot = null;
+      newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
+
+      // Otherwise, if the root has been trimmed, garbage collect.
+    } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
+      offsetShift = 0;
+
+      // Identify the new top root node of the subtree of the old root.
+      while (newRoot) {
+        var beginIndex = (newOrigin >>> newLevel) & MASK;
+        if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {
+          break;
+        }
+        if (beginIndex) {
+          offsetShift += (1 << newLevel) * beginIndex;
+        }
+        newLevel -= SHIFT;
+        newRoot = newRoot.array[beginIndex];
+      }
+
+      // Trim the new sides of the new root.
+      if (newRoot && newOrigin > oldOrigin) {
+        newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
+      }
+      if (newRoot && newTailOffset < oldTailOffset) {
+        newRoot = newRoot.removeAfter(
+          owner,
+          newLevel,
+          newTailOffset - offsetShift
+        );
+      }
+      if (offsetShift) {
+        newOrigin -= offsetShift;
+        newCapacity -= offsetShift;
+      }
+    }
+
+    if (list.__ownerID) {
+      list.size = newCapacity - newOrigin;
+      list._origin = newOrigin;
+      list._capacity = newCapacity;
+      list._level = newLevel;
+      list._root = newRoot;
+      list._tail = newTail;
+      list.__hash = undefined;
+      list.__altered = true;
+      return list;
+    }
+    return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
+  }
+
+  function getTailOffset(size) {
+    return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;
+  }
+
+  var OrderedMap = /*@__PURE__*/(function (Map) {
+    function OrderedMap(value) {
+      return value === undefined || value === null
+        ? emptyOrderedMap()
+        : isOrderedMap(value)
+        ? value
+        : emptyOrderedMap().withMutations(function (map) {
+            var iter = KeyedCollection(value);
+            assertNotInfinite(iter.size);
+            iter.forEach(function (v, k) { return map.set(k, v); });
+          });
+    }
+
+    if ( Map ) OrderedMap.__proto__ = Map;
+    OrderedMap.prototype = Object.create( Map && Map.prototype );
+    OrderedMap.prototype.constructor = OrderedMap;
+
+    OrderedMap.of = function of (/*...values*/) {
+      return this(arguments);
+    };
+
+    OrderedMap.prototype.toString = function toString () {
+      return this.__toString('OrderedMap {', '}');
+    };
+
+    // @pragma Access
+
+    OrderedMap.prototype.get = function get (k, notSetValue) {
+      var index = this._map.get(k);
+      return index !== undefined ? this._list.get(index)[1] : notSetValue;
+    };
+
+    // @pragma Modification
+
+    OrderedMap.prototype.clear = function clear () {
+      if (this.size === 0) {
+        return this;
+      }
+      if (this.__ownerID) {
+        this.size = 0;
+        this._map.clear();
+        this._list.clear();
+        this.__altered = true;
+        return this;
+      }
+      return emptyOrderedMap();
+    };
+
+    OrderedMap.prototype.set = function set (k, v) {
+      return updateOrderedMap(this, k, v);
+    };
+
+    OrderedMap.prototype.remove = function remove (k) {
+      return updateOrderedMap(this, k, NOT_SET);
+    };
+
+    OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      return this._list.__iterate(
+        function (entry) { return entry && fn(entry[1], entry[0], this$1$1); },
+        reverse
+      );
+    };
+
+    OrderedMap.prototype.__iterator = function __iterator (type, reverse) {
+      return this._list.fromEntrySeq().__iterator(type, reverse);
+    };
+
+    OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+      if (ownerID === this.__ownerID) {
+        return this;
+      }
+      var newMap = this._map.__ensureOwner(ownerID);
+      var newList = this._list.__ensureOwner(ownerID);
+      if (!ownerID) {
+        if (this.size === 0) {
+          return emptyOrderedMap();
+        }
+        this.__ownerID = ownerID;
+        this.__altered = false;
+        this._map = newMap;
+        this._list = newList;
+        return this;
+      }
+      return makeOrderedMap(newMap, newList, ownerID, this.__hash);
+    };
+
+    return OrderedMap;
+  }(Map));
+
+  OrderedMap.isOrderedMap = isOrderedMap;
+
+  OrderedMap.prototype[IS_ORDERED_SYMBOL] = true;
+  OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
+
+  function makeOrderedMap(map, list, ownerID, hash) {
+    var omap = Object.create(OrderedMap.prototype);
+    omap.size = map ? map.size : 0;
+    omap._map = map;
+    omap._list = list;
+    omap.__ownerID = ownerID;
+    omap.__hash = hash;
+    omap.__altered = false;
+    return omap;
+  }
+
+  var EMPTY_ORDERED_MAP;
+  function emptyOrderedMap() {
+    return (
+      EMPTY_ORDERED_MAP ||
+      (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))
+    );
+  }
+
+  function updateOrderedMap(omap, k, v) {
+    var map = omap._map;
+    var list = omap._list;
+    var i = map.get(k);
+    var has = i !== undefined;
+    var newMap;
+    var newList;
+    if (v === NOT_SET) {
+      // removed
+      if (!has) {
+        return omap;
+      }
+      if (list.size >= SIZE && list.size >= map.size * 2) {
+        newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });
+        newMap = newList
+          .toKeyedSeq()
+          .map(function (entry) { return entry[0]; })
+          .flip()
+          .toMap();
+        if (omap.__ownerID) {
+          newMap.__ownerID = newList.__ownerID = omap.__ownerID;
+        }
+      } else {
+        newMap = map.remove(k);
+        newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
+      }
+    } else if (has) {
+      if (v === list.get(i)[1]) {
+        return omap;
+      }
+      newMap = map;
+      newList = list.set(i, [k, v]);
+    } else {
+      newMap = map.set(k, list.size);
+      newList = list.set(list.size, [k, v]);
+    }
+    if (omap.__ownerID) {
+      omap.size = newMap.size;
+      omap._map = newMap;
+      omap._list = newList;
+      omap.__hash = undefined;
+      omap.__altered = true;
+      return omap;
+    }
+    return makeOrderedMap(newMap, newList);
+  }
+
+  var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';
+
+  function isStack(maybeStack) {
+    return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);
+  }
+
+  var Stack = /*@__PURE__*/(function (IndexedCollection) {
+    function Stack(value) {
+      return value === undefined || value === null
+        ? emptyStack()
+        : isStack(value)
+        ? value
+        : emptyStack().pushAll(value);
+    }
+
+    if ( IndexedCollection ) Stack.__proto__ = IndexedCollection;
+    Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
+    Stack.prototype.constructor = Stack;
+
+    Stack.of = function of (/*...values*/) {
+      return this(arguments);
+    };
+
+    Stack.prototype.toString = function toString () {
+      return this.__toString('Stack [', ']');
+    };
+
+    // @pragma Access
+
+    Stack.prototype.get = function get (index, notSetValue) {
+      var head = this._head;
+      index = wrapIndex(this, index);
+      while (head && index--) {
+        head = head.next;
+      }
+      return head ? head.value : notSetValue;
+    };
+
+    Stack.prototype.peek = function peek () {
+      return this._head && this._head.value;
+    };
+
+    // @pragma Modification
+
+    Stack.prototype.push = function push (/*...values*/) {
+      var arguments$1 = arguments;
+
+      if (arguments.length === 0) {
+        return this;
+      }
+      var newSize = this.size + arguments.length;
+      var head = this._head;
+      for (var ii = arguments.length - 1; ii >= 0; ii--) {
+        head = {
+          value: arguments$1[ii],
+          next: head,
+        };
+      }
+      if (this.__ownerID) {
+        this.size = newSize;
+        this._head = head;
+        this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return makeStack(newSize, head);
+    };
+
+    Stack.prototype.pushAll = function pushAll (iter) {
+      iter = IndexedCollection(iter);
+      if (iter.size === 0) {
+        return this;
+      }
+      if (this.size === 0 && isStack(iter)) {
+        return iter;
+      }
+      assertNotInfinite(iter.size);
+      var newSize = this.size;
+      var head = this._head;
+      iter.__iterate(function (value) {
+        newSize++;
+        head = {
+          value: value,
+          next: head,
+        };
+      }, /* reverse */ true);
+      if (this.__ownerID) {
+        this.size = newSize;
+        this._head = head;
+        this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return makeStack(newSize, head);
+    };
+
+    Stack.prototype.pop = function pop () {
+      return this.slice(1);
+    };
+
+    Stack.prototype.clear = function clear () {
+      if (this.size === 0) {
+        return this;
+      }
+      if (this.__ownerID) {
+        this.size = 0;
+        this._head = undefined;
+        this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return emptyStack();
+    };
+
+    Stack.prototype.slice = function slice (begin, end) {
+      if (wholeSlice(begin, end, this.size)) {
+        return this;
+      }
+      var resolvedBegin = resolveBegin(begin, this.size);
+      var resolvedEnd = resolveEnd(end, this.size);
+      if (resolvedEnd !== this.size) {
+        // super.slice(begin, end);
+        return IndexedCollection.prototype.slice.call(this, begin, end);
+      }
+      var newSize = this.size - resolvedBegin;
+      var head = this._head;
+      while (resolvedBegin--) {
+        head = head.next;
+      }
+      if (this.__ownerID) {
+        this.size = newSize;
+        this._head = head;
+        this.__hash = undefined;
+        this.__altered = true;
+        return this;
+      }
+      return makeStack(newSize, head);
+    };
+
+    // @pragma Mutability
+
+    Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+      if (ownerID === this.__ownerID) {
+        return this;
+      }
+      if (!ownerID) {
+        if (this.size === 0) {
+          return emptyStack();
+        }
+        this.__ownerID = ownerID;
+        this.__altered = false;
+        return this;
+      }
+      return makeStack(this.size, this._head, ownerID, this.__hash);
+    };
+
+    // @pragma Iteration
+
+    Stack.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      if (reverse) {
+        return new ArraySeq(this.toArray()).__iterate(
+          function (v, k) { return fn(v, k, this$1$1); },
+          reverse
+        );
+      }
+      var iterations = 0;
+      var node = this._head;
+      while (node) {
+        if (fn(node.value, iterations++, this) === false) {
+          break;
+        }
+        node = node.next;
+      }
+      return iterations;
+    };
+
+    Stack.prototype.__iterator = function __iterator (type, reverse) {
+      if (reverse) {
+        return new ArraySeq(this.toArray()).__iterator(type, reverse);
+      }
+      var iterations = 0;
+      var node = this._head;
+      return new Iterator(function () {
+        if (node) {
+          var value = node.value;
+          node = node.next;
+          return iteratorValue(type, iterations++, value);
+        }
+        return iteratorDone();
+      });
+    };
+
+    return Stack;
+  }(IndexedCollection));
+
+  Stack.isStack = isStack;
+
+  var StackPrototype = Stack.prototype;
+  StackPrototype[IS_STACK_SYMBOL] = true;
+  StackPrototype.shift = StackPrototype.pop;
+  StackPrototype.unshift = StackPrototype.push;
+  StackPrototype.unshiftAll = StackPrototype.pushAll;
+  StackPrototype.withMutations = withMutations;
+  StackPrototype.wasAltered = wasAltered;
+  StackPrototype.asImmutable = asImmutable;
+  StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;
+  StackPrototype['@@transducer/step'] = function (result, arr) {
+    return result.unshift(arr);
+  };
+  StackPrototype['@@transducer/result'] = function (obj) {
+    return obj.asImmutable();
+  };
+
+  function makeStack(size, head, ownerID, hash) {
+    var map = Object.create(StackPrototype);
+    map.size = size;
+    map._head = head;
+    map.__ownerID = ownerID;
+    map.__hash = hash;
+    map.__altered = false;
+    return map;
+  }
+
+  var EMPTY_STACK;
+  function emptyStack() {
+    return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
+  }
+
+  var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';
+
+  function isSet(maybeSet) {
+    return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);
+  }
+
+  function isOrderedSet(maybeOrderedSet) {
+    return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
+  }
+
+  function deepEqual(a, b) {
+    if (a === b) {
+      return true;
+    }
+
+    if (
+      !isCollection(b) ||
+      (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||
+      (a.__hash !== undefined &&
+        b.__hash !== undefined &&
+        a.__hash !== b.__hash) ||
+      isKeyed(a) !== isKeyed(b) ||
+      isIndexed(a) !== isIndexed(b) ||
+      isOrdered(a) !== isOrdered(b)
+    ) {
+      return false;
+    }
+
+    if (a.size === 0 && b.size === 0) {
+      return true;
+    }
+
+    var notAssociative = !isAssociative(a);
+
+    if (isOrdered(a)) {
+      var entries = a.entries();
+      return (
+        b.every(function (v, k) {
+          var entry = entries.next().value;
+          return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
+        }) && entries.next().done
+      );
+    }
+
+    var flipped = false;
+
+    if (a.size === undefined) {
+      if (b.size === undefined) {
+        if (typeof a.cacheResult === 'function') {
+          a.cacheResult();
+        }
+      } else {
+        flipped = true;
+        var _ = a;
+        a = b;
+        b = _;
+      }
+    }
+
+    var allEqual = true;
+    var bSize = b.__iterate(function (v, k) {
+      if (
+        notAssociative
+          ? !a.has(v)
+          : flipped
+          ? !is(v, a.get(k, NOT_SET))
+          : !is(a.get(k, NOT_SET), v)
+      ) {
+        allEqual = false;
+        return false;
+      }
+    });
+
+    return allEqual && a.size === bSize;
+  }
+
+  function mixin(ctor, methods) {
+    var keyCopier = function (key) {
+      ctor.prototype[key] = methods[key];
+    };
+    Object.keys(methods).forEach(keyCopier);
+    Object.getOwnPropertySymbols &&
+      Object.getOwnPropertySymbols(methods).forEach(keyCopier);
+    return ctor;
+  }
+
+  function toJS(value) {
+    if (!value || typeof value !== 'object') {
+      return value;
+    }
+    if (!isCollection(value)) {
+      if (!isDataStructure(value)) {
+        return value;
+      }
+      value = Seq(value);
+    }
+    if (isKeyed(value)) {
+      var result$1 = {};
+      value.__iterate(function (v, k) {
+        result$1[k] = toJS(v);
+      });
+      return result$1;
+    }
+    var result = [];
+    value.__iterate(function (v) {
+      result.push(toJS(v));
+    });
+    return result;
+  }
+
+  var Set = /*@__PURE__*/(function (SetCollection) {
+    function Set(value) {
+      return value === undefined || value === null
+        ? emptySet()
+        : isSet(value) && !isOrdered(value)
+        ? value
+        : emptySet().withMutations(function (set) {
+            var iter = SetCollection(value);
+            assertNotInfinite(iter.size);
+            iter.forEach(function (v) { return set.add(v); });
+          });
+    }
+
+    if ( SetCollection ) Set.__proto__ = SetCollection;
+    Set.prototype = Object.create( SetCollection && SetCollection.prototype );
+    Set.prototype.constructor = Set;
+
+    Set.of = function of (/*...values*/) {
+      return this(arguments);
+    };
+
+    Set.fromKeys = function fromKeys (value) {
+      return this(KeyedCollection(value).keySeq());
+    };
+
+    Set.intersect = function intersect (sets) {
+      sets = Collection(sets).toArray();
+      return sets.length
+        ? SetPrototype.intersect.apply(Set(sets.pop()), sets)
+        : emptySet();
+    };
+
+    Set.union = function union (sets) {
+      sets = Collection(sets).toArray();
+      return sets.length
+        ? SetPrototype.union.apply(Set(sets.pop()), sets)
+        : emptySet();
+    };
+
+    Set.prototype.toString = function toString () {
+      return this.__toString('Set {', '}');
+    };
+
+    // @pragma Access
+
+    Set.prototype.has = function has (value) {
+      return this._map.has(value);
+    };
+
+    // @pragma Modification
+
+    Set.prototype.add = function add (value) {
+      return updateSet(this, this._map.set(value, value));
+    };
+
+    Set.prototype.remove = function remove (value) {
+      return updateSet(this, this._map.remove(value));
+    };
+
+    Set.prototype.clear = function clear () {
+      return updateSet(this, this._map.clear());
+    };
+
+    // @pragma Composition
+
+    Set.prototype.map = function map (mapper, context) {
+      var this$1$1 = this;
+
+      // keep track if the set is altered by the map function
+      var didChanges = false;
+
+      var newMap = updateSet(
+        this,
+        this._map.mapEntries(function (ref) {
+          var v = ref[1];
+
+          var mapped = mapper.call(context, v, v, this$1$1);
+
+          if (mapped !== v) {
+            didChanges = true;
+          }
+
+          return [mapped, mapped];
+        }, context)
+      );
+
+      return didChanges ? newMap : this;
+    };
+
+    Set.prototype.union = function union () {
+      var iters = [], len = arguments.length;
+      while ( len-- ) iters[ len ] = arguments[ len ];
+
+      iters = iters.filter(function (x) { return x.size !== 0; });
+      if (iters.length === 0) {
+        return this;
+      }
+      if (this.size === 0 && !this.__ownerID && iters.length === 1) {
+        return this.constructor(iters[0]);
+      }
+      return this.withMutations(function (set) {
+        for (var ii = 0; ii < iters.length; ii++) {
+          if (typeof iters[ii] === 'string') {
+            set.add(iters[ii]);
+          } else {
+            SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });
+          }
+        }
+      });
+    };
+
+    Set.prototype.intersect = function intersect () {
+      var iters = [], len = arguments.length;
+      while ( len-- ) iters[ len ] = arguments[ len ];
+
+      if (iters.length === 0) {
+        return this;
+      }
+      iters = iters.map(function (iter) { return SetCollection(iter); });
+      var toRemove = [];
+      this.forEach(function (value) {
+        if (!iters.every(function (iter) { return iter.includes(value); })) {
+          toRemove.push(value);
+        }
+      });
+      return this.withMutations(function (set) {
+        toRemove.forEach(function (value) {
+          set.remove(value);
+        });
+      });
+    };
+
+    Set.prototype.subtract = function subtract () {
+      var iters = [], len = arguments.length;
+      while ( len-- ) iters[ len ] = arguments[ len ];
+
+      if (iters.length === 0) {
+        return this;
+      }
+      iters = iters.map(function (iter) { return SetCollection(iter); });
+      var toRemove = [];
+      this.forEach(function (value) {
+        if (iters.some(function (iter) { return iter.includes(value); })) {
+          toRemove.push(value);
+        }
+      });
+      return this.withMutations(function (set) {
+        toRemove.forEach(function (value) {
+          set.remove(value);
+        });
+      });
+    };
+
+    Set.prototype.sort = function sort (comparator) {
+      // Late binding
+      return OrderedSet(sortFactory(this, comparator));
+    };
+
+    Set.prototype.sortBy = function sortBy (mapper, comparator) {
+      // Late binding
+      return OrderedSet(sortFactory(this, comparator, mapper));
+    };
+
+    Set.prototype.wasAltered = function wasAltered () {
+      return this._map.wasAltered();
+    };
+
+    Set.prototype.__iterate = function __iterate (fn, reverse) {
+      var this$1$1 = this;
+
+      return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse);
+    };
+
+    Set.prototype.__iterator = function __iterator (type, reverse) {
+      return this._map.__iterator(type, reverse);
+    };
+
+    Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+      if (ownerID === this.__ownerID) {
+        return this;
+      }
+      var newMap = this._map.__ensureOwner(ownerID);
+      if (!ownerID) {
+        if (this.size === 0) {
+          return this.__empty();
+        }
+        this.__ownerID = ownerID;
+        this._map = newMap;
+        return this;
+      }
+      return this.__make(newMap, ownerID);
+    };
+
+    return Set;
+  }(SetCollection));
+
+  Set.isSet = isSet;
+
+  var SetPrototype = Set.prototype;
+  SetPrototype[IS_SET_SYMBOL] = true;
+  SetPrototype[DELETE] = SetPrototype.remove;
+  SetPrototype.merge = SetPrototype.concat = SetPrototype.union;
+  SetPrototype.withMutations = withMutations;
+  SetPrototype.asImmutable = asImmutable;
+  SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;
+  SetPrototype['@@transducer/step'] = function (result, arr) {
+    return result.add(arr);
+  };
+  SetPrototype['@@transducer/result'] = function (obj) {
+    return obj.asImmutable();
+  };
+
+  SetPrototype.__empty = emptySet;
+  SetPrototype.__make = makeSet;
+
+  function updateSet(set, newMap) {
+    if (set.__ownerID) {
+      set.size = newMap.size;
+      set._map = newMap;
+      return set;
+    }
+    return newMap === set._map
+      ? set
+      : newMap.size === 0
+      ? set.__empty()
+      : set.__make(newMap);
+  }
+
+  function makeSet(map, ownerID) {
+    var set = Object.create(SetPrototype);
+    set.size = map ? map.size : 0;
+    set._map = map;
+    set.__ownerID = ownerID;
+    return set;
+  }
+
+  var EMPTY_SET;
+  function emptySet() {
+    return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
+  }
+
+  /**
+   * Returns a lazy seq of nums from start (inclusive) to end
+   * (exclusive), by step, where start defaults to 0, step to 1, and end to
+   * infinity. When start is equal to end, returns empty list.
+   */
+  var Range = /*@__PURE__*/(function (IndexedSeq) {
+    function Range(start, end, step) {
+      if (!(this instanceof Range)) {
+        return new Range(start, end, step);
+      }
+      invariant(step !== 0, 'Cannot step a Range by 0');
+      start = start || 0;
+      if (end === undefined) {
+        end = Infinity;
+      }
+      step = step === undefined ? 1 : Math.abs(step);
+      if (end < start) {
+        step = -step;
+      }
+      this._start = start;
+      this._end = end;
+      this._step = step;
+      this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
+      if (this.size === 0) {
+        if (EMPTY_RANGE) {
+          return EMPTY_RANGE;
+        }
+        EMPTY_RANGE = this;
+      }
+    }
+
+    if ( IndexedSeq ) Range.__proto__ = IndexedSeq;
+    Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+    Range.prototype.constructor = Range;
+
+    Range.prototype.toString = function toString () {
+      if (this.size === 0) {
+        return 'Range []';
+      }
+      return (
+        'Range [ ' +
+        this._start +
+        '...' +
+        this._end +
+        (this._step !== 1 ? ' by ' + this._step : '') +
+        ' ]'
+      );
+    };
+
+    Range.prototype.get = function get (index, notSetValue) {
+      return this.has(index)
+        ? this._start + wrapIndex(this, index) * this._step
+        : notSetValue;
+    };
+
+    Range.prototype.includes = function includes (searchValue) {
+      var possibleIndex = (searchValue - this._start) / this._step;
+      return (
+        possibleIndex >= 0 &&
+        possibleIndex < this.size &&
+        possibleIndex === Math.floor(possibleIndex)
+      );
+    };
+
+    Range.prototype.slice = function slice (begin, end) {
+      if (wholeSlice(begin, end, this.size)) {
+        return this;
+      }
+      begin = resolveBegin(begin, this.size);
+      end = resolveEnd(end, this.size);
+      if (end <= begin) {
+        return new Range(0, 0);
+      }
+      return new Range(
+        this.get(begin, this._end),
+        this.get(end, this._end),
+        this._step
+      );
+    };
+
+    Range.prototype.indexOf = function indexOf (searchValue) {
+      var offsetValue = searchValue - this._start;
+      if (offsetValue % this._step === 0) {
+        var index = offsetValue / this._step;
+        if (index >= 0 && index < this.size) {
+          return index;
+        }
+      }
+      return -1;
+    };
+
+    Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {
+      return this.indexOf(searchValue);
+    };
+
+    Range.prototype.__iterate = function __iterate (fn, reverse) {
+      var size = this.size;
+      var step = this._step;
+      var value = reverse ? this._start + (size - 1) * step : this._start;
+      var i = 0;
+      while (i !== size) {
+        if (fn(value, reverse ? size - ++i : i++, this) === false) {
+          break;
+        }
+        value += reverse ? -step : step;
+      }
+      return i;
+    };
+
+    Range.prototype.__iterator = function __iterator (type, reverse) {
+      var size = this.size;
+      var step = this._step;
+      var value = reverse ? this._start + (size - 1) * step : this._start;
+      var i = 0;
+      return new Iterator(function () {
+        if (i === size) {
+          return iteratorDone();
+        }
+        var v = value;
+        value += reverse ? -step : step;
+        return iteratorValue(type, reverse ? size - ++i : i++, v);
+      });
+    };
+
+    Range.prototype.equals = function equals (other) {
+      return other instanceof Range
+        ? this._start === other._start &&
+            this._end === other._end &&
+            this._step === other._step
+        : deepEqual(this, other);
+    };
+
+    return Range;
+  }(IndexedSeq));
+
+  var EMPTY_RANGE;
+
+  function getIn$1(collection, searchKeyPath, notSetValue) {
+    var keyPath = coerceKeyPath(searchKeyPath);
+    var i = 0;
+    while (i !== keyPath.length) {
+      collection = get(collection, keyPath[i++], NOT_SET);
+      if (collection === NOT_SET) {
+        return notSetValue;
+      }
+    }
+    return collection;
+  }
+
+  function getIn(searchKeyPath, notSetValue) {
+    return getIn$1(this, searchKeyPath, notSetValue);
+  }
+
+  function hasIn$1(collection, keyPath) {
+    return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;
+  }
+
+  function hasIn(searchKeyPath) {
+    return hasIn$1(this, searchKeyPath);
+  }
+
+  function toObject() {
+    assertNotInfinite(this.size);
+    var object = {};
+    this.__iterate(function (v, k) {
+      object[k] = v;
+    });
+    return object;
+  }
+
+  // Note: all of these methods are deprecated.
+  Collection.isIterable = isCollection;
+  Collection.isKeyed = isKeyed;
+  Collection.isIndexed = isIndexed;
+  Collection.isAssociative = isAssociative;
+  Collection.isOrdered = isOrdered;
+
+  Collection.Iterator = Iterator;
+
+  mixin(Collection, {
+    // ### Conversion to other types
+
+    toArray: function toArray() {
+      assertNotInfinite(this.size);
+      var array = new Array(this.size || 0);
+      var useTuples = isKeyed(this);
+      var i = 0;
+      this.__iterate(function (v, k) {
+        // Keyed collections produce an array of tuples.
+        array[i++] = useTuples ? [k, v] : v;
+      });
+      return array;
+    },
+
+    toIndexedSeq: function toIndexedSeq() {
+      return new ToIndexedSequence(this);
+    },
+
+    toJS: function toJS$1() {
+      return toJS(this);
+    },
+
+    toKeyedSeq: function toKeyedSeq() {
+      return new ToKeyedSequence(this, true);
+    },
+
+    toMap: function toMap() {
+      // Use Late Binding here to solve the circular dependency.
+      return Map(this.toKeyedSeq());
+    },
+
+    toObject: toObject,
+
+    toOrderedMap: function toOrderedMap() {
+      // Use Late Binding here to solve the circular dependency.
+      return OrderedMap(this.toKeyedSeq());
+    },
+
+    toOrderedSet: function toOrderedSet() {
+      // Use Late Binding here to solve the circular dependency.
+      return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
+    },
+
+    toSet: function toSet() {
+      // Use Late Binding here to solve the circular dependency.
+      return Set(isKeyed(this) ? this.valueSeq() : this);
+    },
+
+    toSetSeq: function toSetSeq() {
+      return new ToSetSequence(this);
+    },
+
+    toSeq: function toSeq() {
+      return isIndexed(this)
+        ? this.toIndexedSeq()
+        : isKeyed(this)
+        ? this.toKeyedSeq()
+        : this.toSetSeq();
+    },
+
+    toStack: function toStack() {
+      // Use Late Binding here to solve the circular dependency.
+      return Stack(isKeyed(this) ? this.valueSeq() : this);
+    },
+
+    toList: function toList() {
+      // Use Late Binding here to solve the circular dependency.
+      return List(isKeyed(this) ? this.valueSeq() : this);
+    },
+
+    // ### Common JavaScript methods and properties
+
+    toString: function toString() {
+      return '[Collection]';
+    },
+
+    __toString: function __toString(head, tail) {
+      if (this.size === 0) {
+        return head + tail;
+      }
+      return (
+        head +
+        ' ' +
+        this.toSeq().map(this.__toStringMapper).join(', ') +
+        ' ' +
+        tail
+      );
+    },
+
+    // ### ES6 Collection methods (ES6 Array and Map)
+
+    concat: function concat() {
+      var values = [], len = arguments.length;
+      while ( len-- ) values[ len ] = arguments[ len ];
+
+      return reify(this, concatFactory(this, values));
+    },
+
+    includes: function includes(searchValue) {
+      return this.some(function (value) { return is(value, searchValue); });
+    },
+
+    entries: function entries() {
+      return this.__iterator(ITERATE_ENTRIES);
+    },
+
+    every: function every(predicate, context) {
+      assertNotInfinite(this.size);
+      var returnValue = true;
+      this.__iterate(function (v, k, c) {
+        if (!predicate.call(context, v, k, c)) {
+          returnValue = false;
+          return false;
+        }
+      });
+      return returnValue;
+    },
+
+    filter: function filter(predicate, context) {
+      return reify(this, filterFactory(this, predicate, context, true));
+    },
+
+    partition: function partition(predicate, context) {
+      return partitionFactory(this, predicate, context);
+    },
+
+    find: function find(predicate, context, notSetValue) {
+      var entry = this.findEntry(predicate, context);
+      return entry ? entry[1] : notSetValue;
+    },
+
+    forEach: function forEach(sideEffect, context) {
+      assertNotInfinite(this.size);
+      return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
+    },
+
+    join: function join(separator) {
+      assertNotInfinite(this.size);
+      separator = separator !== undefined ? '' + separator : ',';
+      var joined = '';
+      var isFirst = true;
+      this.__iterate(function (v) {
+        isFirst ? (isFirst = false) : (joined += separator);
+        joined += v !== null && v !== undefined ? v.toString() : '';
+      });
+      return joined;
+    },
+
+    keys: function keys() {
+      return this.__iterator(ITERATE_KEYS);
+    },
+
+    map: function map(mapper, context) {
+      return reify(this, mapFactory(this, mapper, context));
+    },
+
+    reduce: function reduce$1(reducer, initialReduction, context) {
+      return reduce(
+        this,
+        reducer,
+        initialReduction,
+        context,
+        arguments.length < 2,
+        false
+      );
+    },
+
+    reduceRight: function reduceRight(reducer, initialReduction, context) {
+      return reduce(
+        this,
+        reducer,
+        initialReduction,
+        context,
+        arguments.length < 2,
+        true
+      );
+    },
+
+    reverse: function reverse() {
+      return reify(this, reverseFactory(this, true));
+    },
+
+    slice: function slice(begin, end) {
+      return reify(this, sliceFactory(this, begin, end, true));
+    },
+
+    some: function some(predicate, context) {
+      assertNotInfinite(this.size);
+      var returnValue = false;
+      this.__iterate(function (v, k, c) {
+        if (predicate.call(context, v, k, c)) {
+          returnValue = true;
+          return false;
+        }
+      });
+      return returnValue;
+    },
+
+    sort: function sort(comparator) {
+      return reify(this, sortFactory(this, comparator));
+    },
+
+    values: function values() {
+      return this.__iterator(ITERATE_VALUES);
+    },
+
+    // ### More sequential methods
+
+    butLast: function butLast() {
+      return this.slice(0, -1);
+    },
+
+    isEmpty: function isEmpty() {
+      return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });
+    },
+
+    count: function count(predicate, context) {
+      return ensureSize(
+        predicate ? this.toSeq().filter(predicate, context) : this
+      );
+    },
+
+    countBy: function countBy(grouper, context) {
+      return countByFactory(this, grouper, context);
+    },
+
+    equals: function equals(other) {
+      return deepEqual(this, other);
+    },
+
+    entrySeq: function entrySeq() {
+      var collection = this;
+      if (collection._cache) {
+        // We cache as an entries array, so we can just return the cache!
+        return new ArraySeq(collection._cache);
+      }
+      var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();
+      entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };
+      return entriesSequence;
+    },
+
+    filterNot: function filterNot(predicate, context) {
+      return this.filter(not(predicate), context);
+    },
+
+    findEntry: function findEntry(predicate, context, notSetValue) {
+      var found = notSetValue;
+      this.__iterate(function (v, k, c) {
+        if (predicate.call(context, v, k, c)) {
+          found = [k, v];
+          return false;
+        }
+      });
+      return found;
+    },
+
+    findKey: function findKey(predicate, context) {
+      var entry = this.findEntry(predicate, context);
+      return entry && entry[0];
+    },
+
+    findLast: function findLast(predicate, context, notSetValue) {
+      return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
+    },
+
+    findLastEntry: function findLastEntry(predicate, context, notSetValue) {
+      return this.toKeyedSeq()
+        .reverse()
+        .findEntry(predicate, context, notSetValue);
+    },
+
+    findLastKey: function findLastKey(predicate, context) {
+      return this.toKeyedSeq().reverse().findKey(predicate, context);
+    },
+
+    first: function first(notSetValue) {
+      return this.find(returnTrue, null, notSetValue);
+    },
+
+    flatMap: function flatMap(mapper, context) {
+      return reify(this, flatMapFactory(this, mapper, context));
+    },
+
+    flatten: function flatten(depth) {
+      return reify(this, flattenFactory(this, depth, true));
+    },
+
+    fromEntrySeq: function fromEntrySeq() {
+      return new FromEntriesSequence(this);
+    },
+
+    get: function get(searchKey, notSetValue) {
+      return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);
+    },
+
+    getIn: getIn,
+
+    groupBy: function groupBy(grouper, context) {
+      return groupByFactory(this, grouper, context);
+    },
+
+    has: function has(searchKey) {
+      return this.get(searchKey, NOT_SET) !== NOT_SET;
+    },
+
+    hasIn: hasIn,
+
+    isSubset: function isSubset(iter) {
+      iter = typeof iter.includes === 'function' ? iter : Collection(iter);
+      return this.every(function (value) { return iter.includes(value); });
+    },
+
+    isSuperset: function isSuperset(iter) {
+      iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);
+      return iter.isSubset(this);
+    },
+
+    keyOf: function keyOf(searchValue) {
+      return this.findKey(function (value) { return is(value, searchValue); });
+    },
+
+    keySeq: function keySeq() {
+      return this.toSeq().map(keyMapper).toIndexedSeq();
+    },
+
+    last: function last(notSetValue) {
+      return this.toSeq().reverse().first(notSetValue);
+    },
+
+    lastKeyOf: function lastKeyOf(searchValue) {
+      return this.toKeyedSeq().reverse().keyOf(searchValue);
+    },
+
+    max: function max(comparator) {
+      return maxFactory(this, comparator);
+    },
+
+    maxBy: function maxBy(mapper, comparator) {
+      return maxFactory(this, comparator, mapper);
+    },
+
+    min: function min(comparator) {
+      return maxFactory(
+        this,
+        comparator ? neg(comparator) : defaultNegComparator
+      );
+    },
+
+    minBy: function minBy(mapper, comparator) {
+      return maxFactory(
+        this,
+        comparator ? neg(comparator) : defaultNegComparator,
+        mapper
+      );
+    },
+
+    rest: function rest() {
+      return this.slice(1);
+    },
+
+    skip: function skip(amount) {
+      return amount === 0 ? this : this.slice(Math.max(0, amount));
+    },
+
+    skipLast: function skipLast(amount) {
+      return amount === 0 ? this : this.slice(0, -Math.max(0, amount));
+    },
+
+    skipWhile: function skipWhile(predicate, context) {
+      return reify(this, skipWhileFactory(this, predicate, context, true));
+    },
+
+    skipUntil: function skipUntil(predicate, context) {
+      return this.skipWhile(not(predicate), context);
+    },
+
+    sortBy: function sortBy(mapper, comparator) {
+      return reify(this, sortFactory(this, comparator, mapper));
+    },
+
+    take: function take(amount) {
+      return this.slice(0, Math.max(0, amount));
+    },
+
+    takeLast: function takeLast(amount) {
+      return this.slice(-Math.max(0, amount));
+    },
+
+    takeWhile: function takeWhile(predicate, context) {
+      return reify(this, takeWhileFactory(this, predicate, context));
+    },
+
+    takeUntil: function takeUntil(predicate, context) {
+      return this.takeWhile(not(predicate), context);
+    },
+
+    update: function update(fn) {
+      return fn(this);
+    },
+
+    valueSeq: function valueSeq() {
+      return this.toIndexedSeq();
+    },
+
+    // ### Hashable Object
+
+    hashCode: function hashCode() {
+      return this.__hash || (this.__hash = hashCollection(this));
+    },
+
+    // ### Internal
+
+    // abstract __iterate(fn, reverse)
+
+    // abstract __iterator(type, reverse)
+  });
+
+  var CollectionPrototype = Collection.prototype;
+  CollectionPrototype[IS_COLLECTION_SYMBOL] = true;
+  CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;
+  CollectionPrototype.toJSON = CollectionPrototype.toArray;
+  CollectionPrototype.__toStringMapper = quoteString;
+  CollectionPrototype.inspect = CollectionPrototype.toSource = function () {
+    return this.toString();
+  };
+  CollectionPrototype.chain = CollectionPrototype.flatMap;
+  CollectionPrototype.contains = CollectionPrototype.includes;
+
+  mixin(KeyedCollection, {
+    // ### More sequential methods
+
+    flip: function flip() {
+      return reify(this, flipFactory(this));
+    },
+
+    mapEntries: function mapEntries(mapper, context) {
+      var this$1$1 = this;
+
+      var iterations = 0;
+      return reify(
+        this,
+        this.toSeq()
+          .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); })
+          .fromEntrySeq()
+      );
+    },
+
+    mapKeys: function mapKeys(mapper, context) {
+      var this$1$1 = this;
+
+      return reify(
+        this,
+        this.toSeq()
+          .flip()
+          .map(function (k, v) { return mapper.call(context, k, v, this$1$1); })
+          .flip()
+      );
+    },
+  });
+
+  var KeyedCollectionPrototype = KeyedCollection.prototype;
+  KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;
+  KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;
+  KeyedCollectionPrototype.toJSON = toObject;
+  KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };
+
+  mixin(IndexedCollection, {
+    // ### Conversion to other types
+
+    toKeyedSeq: function toKeyedSeq() {
+      return new ToKeyedSequence(this, false);
+    },
+
+    // ### ES6 Collection methods (ES6 Array and Map)
+
+    filter: function filter(predicate, context) {
+      return reify(this, filterFactory(this, predicate, context, false));
+    },
+
+    findIndex: function findIndex(predicate, context) {
+      var entry = this.findEntry(predicate, context);
+      return entry ? entry[0] : -1;
+    },
+
+    indexOf: function indexOf(searchValue) {
+      var key = this.keyOf(searchValue);
+      return key === undefined ? -1 : key;
+    },
+
+    lastIndexOf: function lastIndexOf(searchValue) {
+      var key = this.lastKeyOf(searchValue);
+      return key === undefined ? -1 : key;
+    },
+
+    reverse: function reverse() {
+      return reify(this, reverseFactory(this, false));
+    },
+
+    slice: function slice(begin, end) {
+      return reify(this, sliceFactory(this, begin, end, false));
+    },
+
+    splice: function splice(index, removeNum /*, ...values*/) {
+      var numArgs = arguments.length;
+      removeNum = Math.max(removeNum || 0, 0);
+      if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
+        return this;
+      }
+      // If index is negative, it should resolve relative to the size of the
+      // collection. However size may be expensive to compute if not cached, so
+      // only call count() if the number is in fact negative.
+      index = resolveBegin(index, index < 0 ? this.count() : this.size);
+      var spliced = this.slice(0, index);
+      return reify(
+        this,
+        numArgs === 1
+          ? spliced
+          : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
+      );
+    },
+
+    // ### More collection methods
+
+    findLastIndex: function findLastIndex(predicate, context) {
+      var entry = this.findLastEntry(predicate, context);
+      return entry ? entry[0] : -1;
+    },
+
+    first: function first(notSetValue) {
+      return this.get(0, notSetValue);
+    },
+
+    flatten: function flatten(depth) {
+      return reify(this, flattenFactory(this, depth, false));
+    },
+
+    get: function get(index, notSetValue) {
+      index = wrapIndex(this, index);
+      return index < 0 ||
+        this.size === Infinity ||
+        (this.size !== undefined && index > this.size)
+        ? notSetValue
+        : this.find(function (_, key) { return key === index; }, undefined, notSetValue);
+    },
+
+    has: function has(index) {
+      index = wrapIndex(this, index);
+      return (
+        index >= 0 &&
+        (this.size !== undefined
+          ? this.size === Infinity || index < this.size
+          : this.indexOf(index) !== -1)
+      );
+    },
+
+    interpose: function interpose(separator) {
+      return reify(this, interposeFactory(this, separator));
+    },
+
+    interleave: function interleave(/*...collections*/) {
+      var collections = [this].concat(arrCopy(arguments));
+      var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);
+      var interleaved = zipped.flatten(true);
+      if (zipped.size) {
+        interleaved.size = zipped.size * collections.length;
+      }
+      return reify(this, interleaved);
+    },
+
+    keySeq: function keySeq() {
+      return Range(0, this.size);
+    },
+
+    last: function last(notSetValue) {
+      return this.get(-1, notSetValue);
+    },
+
+    skipWhile: function skipWhile(predicate, context) {
+      return reify(this, skipWhileFactory(this, predicate, context, false));
+    },
+
+    zip: function zip(/*, ...collections */) {
+      var collections = [this].concat(arrCopy(arguments));
+      return reify(this, zipWithFactory(this, defaultZipper, collections));
+    },
+
+    zipAll: function zipAll(/*, ...collections */) {
+      var collections = [this].concat(arrCopy(arguments));
+      return reify(this, zipWithFactory(this, defaultZipper, collections, true));
+    },
+
+    zipWith: function zipWith(zipper /*, ...collections */) {
+      var collections = arrCopy(arguments);
+      collections[0] = this;
+      return reify(this, zipWithFactory(this, zipper, collections));
+    },
+  });
+
+  var IndexedCollectionPrototype = IndexedCollection.prototype;
+  IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;
+  IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;
+
+  mixin(SetCollection, {
+    // ### ES6 Collection methods (ES6 Array and Map)
+
+    get: function get(value, notSetValue) {
+      return this.has(value) ? value : notSetValue;
+    },
+
+    includes: function includes(value) {
+      return this.has(value);
+    },
+
+    // ### More sequential methods
+
+    keySeq: function keySeq() {
+      return this.valueSeq();
+    },
+  });
+
+  var SetCollectionPrototype = SetCollection.prototype;
+  SetCollectionPrototype.has = CollectionPrototype.includes;
+  SetCollectionPrototype.contains = SetCollectionPrototype.includes;
+  SetCollectionPrototype.keys = SetCollectionPrototype.values;
+
+  // Mixin subclasses
+
+  mixin(KeyedSeq, KeyedCollectionPrototype);
+  mixin(IndexedSeq, IndexedCollectionPrototype);
+  mixin(SetSeq, SetCollectionPrototype);
+
+  // #pragma Helper functions
+
+  function reduce(collection, reducer, reduction, context, useFirst, reverse) {
+    assertNotInfinite(collection.size);
+    collection.__iterate(function (v, k, c) {
+      if (useFirst) {
+        useFirst = false;
+        reduction = v;
+      } else {
+        reduction = reducer.call(context, reduction, v, k, c);
+      }
+    }, reverse);
+    return reduction;
+  }
+
+  function keyMapper(v, k) {
+    return k;
+  }
+
+  function entryMapper(v, k) {
+    return [k, v];
+  }
+
+  function not(predicate) {
+    return function () {
+      return !predicate.apply(this, arguments);
+    };
+  }
+
+  function neg(predicate) {
+    return function () {
+      return -predicate.apply(this, arguments);
+    };
+  }
+
+  function defaultZipper() {
+    return arrCopy(arguments);
+  }
+
+  function defaultNegComparator(a, b) {
+    return a < b ? 1 : a > b ? -1 : 0;
+  }
+
+  function hashCollection(collection) {
+    if (collection.size === Infinity) {
+      return 0;
+    }
+    var ordered = isOrdered(collection);
+    var keyed = isKeyed(collection);
+    var h = ordered ? 1 : 0;
+    var size = collection.__iterate(
+      keyed
+        ? ordered
+          ? function (v, k) {
+              h = (31 * h + hashMerge(hash(v), hash(k))) | 0;
+            }
+          : function (v, k) {
+              h = (h + hashMerge(hash(v), hash(k))) | 0;
+            }
+        : ordered
+        ? function (v) {
+            h = (31 * h + hash(v)) | 0;
+          }
+        : function (v) {
+            h = (h + hash(v)) | 0;
+          }
+    );
+    return murmurHashOfSize(size, h);
+  }
+
+  function murmurHashOfSize(size, h) {
+    h = imul(h, 0xcc9e2d51);
+    h = imul((h << 15) | (h >>> -15), 0x1b873593);
+    h = imul((h << 13) | (h >>> -13), 5);
+    h = ((h + 0xe6546b64) | 0) ^ size;
+    h = imul(h ^ (h >>> 16), 0x85ebca6b);
+    h = imul(h ^ (h >>> 13), 0xc2b2ae35);
+    h = smi(h ^ (h >>> 16));
+    return h;
+  }
+
+  function hashMerge(a, b) {
+    return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int
+  }
+
+  var OrderedSet = /*@__PURE__*/(function (Set) {
+    function OrderedSet(value) {
+      return value === undefined || value === null
+        ? emptyOrderedSet()
+        : isOrderedSet(value)
+        ? value
+        : emptyOrderedSet().withMutations(function (set) {
+            var iter = SetCollection(value);
+            assertNotInfinite(iter.size);
+            iter.forEach(function (v) { return set.add(v); });
+          });
+    }
+
+    if ( Set ) OrderedSet.__proto__ = Set;
+    OrderedSet.prototype = Object.create( Set && Set.prototype );
+    OrderedSet.prototype.constructor = OrderedSet;
+
+    OrderedSet.of = function of (/*...values*/) {
+      return this(arguments);
+    };
+
+    OrderedSet.fromKeys = function fromKeys (value) {
+      return this(KeyedCollection(value).keySeq());
+    };
+
+    OrderedSet.prototype.toString = function toString () {
+      return this.__toString('OrderedSet {', '}');
+    };
+
+    return OrderedSet;
+  }(Set));
+
+  OrderedSet.isOrderedSet = isOrderedSet;
+
+  var OrderedSetPrototype = OrderedSet.prototype;
+  OrderedSetPrototype[IS_ORDERED_SYMBOL] = true;
+  OrderedSetPrototype.zip = IndexedCollectionPrototype.zip;
+  OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;
+  OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;
+
+  OrderedSetPrototype.__empty = emptyOrderedSet;
+  OrderedSetPrototype.__make = makeOrderedSet;
+
+  function makeOrderedSet(map, ownerID) {
+    var set = Object.create(OrderedSetPrototype);
+    set.size = map ? map.size : 0;
+    set._map = map;
+    set.__ownerID = ownerID;
+    return set;
+  }
+
+  var EMPTY_ORDERED_SET;
+  function emptyOrderedSet() {
+    return (
+      EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))
+    );
+  }
+
+  var PairSorting = {
+    LeftThenRight: -1,
+    RightThenLeft: +1,
+  };
+
+  function throwOnInvalidDefaultValues(defaultValues) {
+    if (isRecord(defaultValues)) {
+      throw new Error(
+        'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.'
+      );
+    }
+
+    if (isImmutable(defaultValues)) {
+      throw new Error(
+        'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.'
+      );
+    }
+
+    if (defaultValues === null || typeof defaultValues !== 'object') {
+      throw new Error(
+        'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.'
+      );
+    }
+  }
+
+  var Record = function Record(defaultValues, name) {
+    var hasInitialized;
+
+    throwOnInvalidDefaultValues(defaultValues);
+
+    var RecordType = function Record(values) {
+      var this$1$1 = this;
+
+      if (values instanceof RecordType) {
+        return values;
+      }
+      if (!(this instanceof RecordType)) {
+        return new RecordType(values);
+      }
+      if (!hasInitialized) {
+        hasInitialized = true;
+        var keys = Object.keys(defaultValues);
+        var indices = (RecordTypePrototype._indices = {});
+        // Deprecated: left to attempt not to break any external code which
+        // relies on a ._name property existing on record instances.
+        // Use Record.getDescriptiveName() instead
+        RecordTypePrototype._name = name;
+        RecordTypePrototype._keys = keys;
+        RecordTypePrototype._defaultValues = defaultValues;
+        for (var i = 0; i < keys.length; i++) {
+          var propName = keys[i];
+          indices[propName] = i;
+          if (RecordTypePrototype[propName]) {
+            /* eslint-disable no-console */
+            typeof console === 'object' &&
+              console.warn &&
+              console.warn(
+                'Cannot define ' +
+                  recordName(this) +
+                  ' with property "' +
+                  propName +
+                  '" since that property name is part of the Record API.'
+              );
+            /* eslint-enable no-console */
+          } else {
+            setProp(RecordTypePrototype, propName);
+          }
+        }
+      }
+      this.__ownerID = undefined;
+      this._values = List().withMutations(function (l) {
+        l.setSize(this$1$1._keys.length);
+        KeyedCollection(values).forEach(function (v, k) {
+          l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);
+        });
+      });
+      return this;
+    };
+
+    var RecordTypePrototype = (RecordType.prototype =
+      Object.create(RecordPrototype));
+    RecordTypePrototype.constructor = RecordType;
+
+    if (name) {
+      RecordType.displayName = name;
+    }
+
+    return RecordType;
+  };
+
+  Record.prototype.toString = function toString () {
+    var str = recordName(this) + ' { ';
+    var keys = this._keys;
+    var k;
+    for (var i = 0, l = keys.length; i !== l; i++) {
+      k = keys[i];
+      str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));
+    }
+    return str + ' }';
+  };
+
+  Record.prototype.equals = function equals (other) {
+    return (
+      this === other ||
+      (isRecord(other) && recordSeq(this).equals(recordSeq(other)))
+    );
+  };
+
+  Record.prototype.hashCode = function hashCode () {
+    return recordSeq(this).hashCode();
+  };
+
+  // @pragma Access
+
+  Record.prototype.has = function has (k) {
+    return this._indices.hasOwnProperty(k);
+  };
+
+  Record.prototype.get = function get (k, notSetValue) {
+    if (!this.has(k)) {
+      return notSetValue;
+    }
+    var index = this._indices[k];
+    var value = this._values.get(index);
+    return value === undefined ? this._defaultValues[k] : value;
+  };
+
+  // @pragma Modification
+
+  Record.prototype.set = function set (k, v) {
+    if (this.has(k)) {
+      var newValues = this._values.set(
+        this._indices[k],
+        v === this._defaultValues[k] ? undefined : v
+      );
+      if (newValues !== this._values && !this.__ownerID) {
+        return makeRecord(this, newValues);
+      }
+    }
+    return this;
+  };
+
+  Record.prototype.remove = function remove (k) {
+    return this.set(k);
+  };
+
+  Record.prototype.clear = function clear () {
+    var newValues = this._values.clear().setSize(this._keys.length);
+
+    return this.__ownerID ? this : makeRecord(this, newValues);
+  };
+
+  Record.prototype.wasAltered = function wasAltered () {
+    return this._values.wasAltered();
+  };
+
+  Record.prototype.toSeq = function toSeq () {
+    return recordSeq(this);
+  };
+
+  Record.prototype.toJS = function toJS$1 () {
+    return toJS(this);
+  };
+
+  Record.prototype.entries = function entries () {
+    return this.__iterator(ITERATE_ENTRIES);
+  };
+
+  Record.prototype.__iterator = function __iterator (type, reverse) {
+    return recordSeq(this).__iterator(type, reverse);
+  };
+
+  Record.prototype.__iterate = function __iterate (fn, reverse) {
+    return recordSeq(this).__iterate(fn, reverse);
+  };
+
+  Record.prototype.__ensureOwner = function __ensureOwner (ownerID) {
+    if (ownerID === this.__ownerID) {
+      return this;
+    }
+    var newValues = this._values.__ensureOwner(ownerID);
+    if (!ownerID) {
+      this.__ownerID = ownerID;
+      this._values = newValues;
+      return this;
+    }
+    return makeRecord(this, newValues, ownerID);
+  };
+
+  Record.isRecord = isRecord;
+  Record.getDescriptiveName = recordName;
+  var RecordPrototype = Record.prototype;
+  RecordPrototype[IS_RECORD_SYMBOL] = true;
+  RecordPrototype[DELETE] = RecordPrototype.remove;
+  RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;
+  RecordPrototype.getIn = getIn;
+  RecordPrototype.hasIn = CollectionPrototype.hasIn;
+  RecordPrototype.merge = merge$1;
+  RecordPrototype.mergeWith = mergeWith$1;
+  RecordPrototype.mergeIn = mergeIn;
+  RecordPrototype.mergeDeep = mergeDeep;
+  RecordPrototype.mergeDeepWith = mergeDeepWith;
+  RecordPrototype.mergeDeepIn = mergeDeepIn;
+  RecordPrototype.setIn = setIn;
+  RecordPrototype.update = update;
+  RecordPrototype.updateIn = updateIn;
+  RecordPrototype.withMutations = withMutations;
+  RecordPrototype.asMutable = asMutable;
+  RecordPrototype.asImmutable = asImmutable;
+  RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;
+  RecordPrototype.toJSON = RecordPrototype.toObject =
+    CollectionPrototype.toObject;
+  RecordPrototype.inspect = RecordPrototype.toSource = function () {
+    return this.toString();
+  };
+
+  function makeRecord(likeRecord, values, ownerID) {
+    var record = Object.create(Object.getPrototypeOf(likeRecord));
+    record._values = values;
+    record.__ownerID = ownerID;
+    return record;
+  }
+
+  function recordName(record) {
+    return record.constructor.displayName || record.constructor.name || 'Record';
+  }
+
+  function recordSeq(record) {
+    return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));
+  }
+
+  function setProp(prototype, name) {
+    try {
+      Object.defineProperty(prototype, name, {
+        get: function () {
+          return this.get(name);
+        },
+        set: function (value) {
+          invariant(this.__ownerID, 'Cannot set on an immutable record.');
+          this.set(name, value);
+        },
+      });
+    } catch (error) {
+      // Object.defineProperty failed. Probably IE8.
+    }
+  }
+
+  /**
+   * Returns a lazy Seq of `value` repeated `times` times. When `times` is
+   * undefined, returns an infinite sequence of `value`.
+   */
+  var Repeat = /*@__PURE__*/(function (IndexedSeq) {
+    function Repeat(value, times) {
+      if (!(this instanceof Repeat)) {
+        return new Repeat(value, times);
+      }
+      this._value = value;
+      this.size = times === undefined ? Infinity : Math.max(0, times);
+      if (this.size === 0) {
+        if (EMPTY_REPEAT) {
+          return EMPTY_REPEAT;
+        }
+        EMPTY_REPEAT = this;
+      }
+    }
+
+    if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq;
+    Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
+    Repeat.prototype.constructor = Repeat;
+
+    Repeat.prototype.toString = function toString () {
+      if (this.size === 0) {
+        return 'Repeat []';
+      }
+      return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
+    };
+
+    Repeat.prototype.get = function get (index, notSetValue) {
+      return this.has(index) ? this._value : notSetValue;
+    };
+
+    Repeat.prototype.includes = function includes (searchValue) {
+      return is(this._value, searchValue);
+    };
+
+    Repeat.prototype.slice = function slice (begin, end) {
+      var size = this.size;
+      return wholeSlice(begin, end, size)
+        ? this
+        : new Repeat(
+            this._value,
+            resolveEnd(end, size) - resolveBegin(begin, size)
+          );
+    };
+
+    Repeat.prototype.reverse = function reverse () {
+      return this;
+    };
+
+    Repeat.prototype.indexOf = function indexOf (searchValue) {
+      if (is(this._value, searchValue)) {
+        return 0;
+      }
+      return -1;
+    };
+
+    Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {
+      if (is(this._value, searchValue)) {
+        return this.size;
+      }
+      return -1;
+    };
+
+    Repeat.prototype.__iterate = function __iterate (fn, reverse) {
+      var size = this.size;
+      var i = 0;
+      while (i !== size) {
+        if (fn(this._value, reverse ? size - ++i : i++, this) === false) {
+          break;
+        }
+      }
+      return i;
+    };
+
+    Repeat.prototype.__iterator = function __iterator (type, reverse) {
+      var this$1$1 = this;
+
+      var size = this.size;
+      var i = 0;
+      return new Iterator(function () { return i === size
+          ? iteratorDone()
+          : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); }
+      );
+    };
+
+    Repeat.prototype.equals = function equals (other) {
+      return other instanceof Repeat
+        ? is(this._value, other._value)
+        : deepEqual(other);
+    };
+
+    return Repeat;
+  }(IndexedSeq));
+
+  var EMPTY_REPEAT;
+
+  function fromJS(value, converter) {
+    return fromJSWith(
+      [],
+      converter || defaultConverter,
+      value,
+      '',
+      converter && converter.length > 2 ? [] : undefined,
+      { '': value }
+    );
+  }
+
+  function fromJSWith(stack, converter, value, key, keyPath, parentValue) {
+    if (
+      typeof value !== 'string' &&
+      !isImmutable(value) &&
+      (isArrayLike(value) || hasIterator(value) || isPlainObject(value))
+    ) {
+      if (~stack.indexOf(value)) {
+        throw new TypeError('Cannot convert circular structure to Immutable');
+      }
+      stack.push(value);
+      keyPath && key !== '' && keyPath.push(key);
+      var converted = converter.call(
+        parentValue,
+        key,
+        Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }
+        ),
+        keyPath && keyPath.slice()
+      );
+      stack.pop();
+      keyPath && keyPath.pop();
+      return converted;
+    }
+    return value;
+  }
+
+  function defaultConverter(k, v) {
+    // Effectively the opposite of "Collection.toSeq()"
+    return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
+  }
+
+  var version = "4.3.4";
+
+  var Immutable = {
+    version: version,
+
+    Collection: Collection,
+    // Note: Iterable is deprecated
+    Iterable: Collection,
+
+    Seq: Seq,
+    Map: Map,
+    OrderedMap: OrderedMap,
+    List: List,
+    Stack: Stack,
+    Set: Set,
+    OrderedSet: OrderedSet,
+    PairSorting: PairSorting,
+
+    Record: Record,
+    Range: Range,
+    Repeat: Repeat,
+
+    is: is,
+    fromJS: fromJS,
+    hash: hash,
+
+    isImmutable: isImmutable,
+    isCollection: isCollection,
+    isKeyed: isKeyed,
+    isIndexed: isIndexed,
+    isAssociative: isAssociative,
+    isOrdered: isOrdered,
+    isValueObject: isValueObject,
+    isPlainObject: isPlainObject,
+    isSeq: isSeq,
+    isList: isList,
+    isMap: isMap,
+    isOrderedMap: isOrderedMap,
+    isStack: isStack,
+    isSet: isSet,
+    isOrderedSet: isOrderedSet,
+    isRecord: isRecord,
+
+    get: get,
+    getIn: getIn$1,
+    has: has,
+    hasIn: hasIn$1,
+    merge: merge,
+    mergeDeep: mergeDeep$1,
+    mergeWith: mergeWith,
+    mergeDeepWith: mergeDeepWith$1,
+    remove: remove,
+    removeIn: removeIn,
+    set: set,
+    setIn: setIn$1,
+    update: update$1,
+    updateIn: updateIn$1,
+  };
+
+  // Note: Iterable is deprecated
+  var Iterable = Collection;
+
+  exports.Collection = Collection;
+  exports.Iterable = Iterable;
+  exports.List = List;
+  exports.Map = Map;
+  exports.OrderedMap = OrderedMap;
+  exports.OrderedSet = OrderedSet;
+  exports.PairSorting = PairSorting;
+  exports.Range = Range;
+  exports.Record = Record;
+  exports.Repeat = Repeat;
+  exports.Seq = Seq;
+  exports.Set = Set;
+  exports.Stack = Stack;
+  exports.default = Immutable;
+  exports.fromJS = fromJS;
+  exports.get = get;
+  exports.getIn = getIn$1;
+  exports.has = has;
+  exports.hasIn = hasIn$1;
+  exports.hash = hash;
+  exports.is = is;
+  exports.isAssociative = isAssociative;
+  exports.isCollection = isCollection;
+  exports.isImmutable = isImmutable;
+  exports.isIndexed = isIndexed;
+  exports.isKeyed = isKeyed;
+  exports.isList = isList;
+  exports.isMap = isMap;
+  exports.isOrdered = isOrdered;
+  exports.isOrderedMap = isOrderedMap;
+  exports.isOrderedSet = isOrderedSet;
+  exports.isPlainObject = isPlainObject;
+  exports.isRecord = isRecord;
+  exports.isSeq = isSeq;
+  exports.isSet = isSet;
+  exports.isStack = isStack;
+  exports.isValueObject = isValueObject;
+  exports.merge = merge;
+  exports.mergeDeep = mergeDeep$1;
+  exports.mergeDeepWith = mergeDeepWith$1;
+  exports.mergeWith = mergeWith;
+  exports.remove = remove;
+  exports.removeIn = removeIn;
+  exports.set = set;
+  exports.setIn = setIn$1;
+  exports.update = update$1;
+  exports.updateIn = updateIn$1;
+  exports.version = version;
+
+  Object.defineProperty(exports, '__esModule', { value: true });
+
+})));

+ 2412 - 0
node_modules/immutable/dist/immutable.js.flow

@@ -0,0 +1,2412 @@
+/**
+ * This file provides type definitions for use with the Flow type checker.
+ *
+ * An important caveat when using these definitions is that the types for
+ * `Collection.Keyed`, `Collection.Indexed`, `Seq.Keyed`, and so on are stubs.
+ * When referring to those types, you can get the proper definitions by
+ * importing the types `KeyedCollection`, `IndexedCollection`, `KeyedSeq`, etc.
+ * For example,
+ *
+ *     import { Seq } from 'immutable'
+ *     import type { IndexedCollection, IndexedSeq } from 'immutable'
+ *
+ *     const someSeq: IndexedSeq<number> = Seq.Indexed.of(1, 2, 3)
+ *
+ *     function takesASeq<T, TS: IndexedCollection<T>>(iter: TS): TS {
+ *       return iter.butLast()
+ *     }
+ *
+ *     takesASeq(someSeq)
+ *
+ * @flow strict
+ */
+
+// Helper type that represents plain objects allowed as arguments to
+// some constructors and functions.
+type PlainObjInput<K, V> = { +[key: K]: V, __proto__: null };
+
+type K<T> = $Keys<T>;
+
+// Helper types to extract the "keys" and "values" use by the *In() methods.
+type $KeyOf<C> = $Call<
+  (<K>(?_Collection<K, mixed>) => K) &
+    (<T>(?$ReadOnlyArray<T>) => number) &
+    (<T>(?RecordInstance<T> | T) => $Keys<T>) &
+    (<T: Object>(T) => $Keys<T>),
+  C
+>;
+
+type $ValOf<C, K = $KeyOf<C>> = $Call<
+  (<V>(?_Collection<any, V>) => V) &
+    (<T>(?$ReadOnlyArray<T>) => T) &
+    (<T, K: $Keys<T>>(?RecordInstance<T> | T, K) => $ElementType<T, K>) &
+    (<T: Object>(T) => $Values<T>),
+  C,
+  K
+>;
+
+type $IterableOf<C> = $Call<
+  (<V: Array<any> | IndexedCollection<any> | SetCollection<any>>(
+    V
+  ) => Iterable<$ValOf<V>>) &
+    (<
+      V:
+        | KeyedCollection<any, any>
+        | RecordInstance<any>
+        | PlainObjInput<any, any>
+    >(
+      V
+    ) => Iterable<[$KeyOf<V>, $ValOf<V>]>),
+  C
+>;
+
+const PairSorting: $ReadOnly<{ LeftThenRight: number, RightThenLeft: number }> =
+  {
+    LeftThenRight: -1,
+    RightThenLeft: +1,
+  };
+
+type Comparator<T> = (left: T, right: T) => number;
+
+declare class _Collection<K, +V> implements ValueObject {
+  equals(other: mixed): boolean;
+  hashCode(): number;
+  get(key: K, ..._: []): V | void;
+  get<NSV>(key: K, notSetValue: NSV): V | NSV;
+  has(key: K): boolean;
+  includes(value: V): boolean;
+  contains(value: V): boolean;
+  first<NSV>(notSetValue?: NSV): V | NSV;
+  last<NSV>(notSetValue?: NSV): V | NSV;
+
+  hasIn(keyPath: Iterable<mixed>): boolean;
+
+  getIn(keyPath: [], notSetValue?: mixed): this;
+  getIn<NSV>(keyPath: [K], notSetValue: NSV): V | NSV;
+  getIn<NSV, K2: $KeyOf<V>>(
+    keyPath: [K, K2],
+    notSetValue: NSV
+  ): $ValOf<V, K2> | NSV;
+  getIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
+    keyPath: [K, K2, K3],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<V, K2>, K3> | NSV;
+  getIn<
+    NSV,
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV;
+  getIn<
+    NSV,
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV;
+
+  update<U>(updater: (value: this) => U): U;
+
+  toJS(): Array<any> | { [key: string]: mixed };
+  toJSON(): Array<V> | { [key: string]: V };
+  toArray(): Array<V> | Array<[K, V]>;
+  toObject(): { [key: string]: V };
+  toMap(): Map<K, V>;
+  toOrderedMap(): OrderedMap<K, V>;
+  toSet(): Set<V>;
+  toOrderedSet(): OrderedSet<V>;
+  toList(): List<V>;
+  toStack(): Stack<V>;
+  toSeq(): Seq<K, V>;
+  toKeyedSeq(): KeyedSeq<K, V>;
+  toIndexedSeq(): IndexedSeq<V>;
+  toSetSeq(): SetSeq<V>;
+
+  keys(): Iterator<K>;
+  values(): Iterator<V>;
+  entries(): Iterator<[K, V]>;
+
+  keySeq(): IndexedSeq<K>;
+  valueSeq(): IndexedSeq<V>;
+  entrySeq(): IndexedSeq<[K, V]>;
+
+  reverse(): this;
+  sort(comparator?: Comparator<V>): this;
+
+  sortBy<C>(
+    comparatorValueMapper: (value: V, key: K, iter: this) => C,
+    comparator?: Comparator<C>
+  ): this;
+
+  groupBy<G>(
+    grouper: (value: V, key: K, iter: this) => G,
+    context?: mixed
+  ): KeyedSeq<G, this>;
+
+  forEach(
+    sideEffect: (value: V, key: K, iter: this) => any,
+    context?: mixed
+  ): number;
+
+  slice(begin?: number, end?: number): this;
+  rest(): this;
+  butLast(): this;
+  skip(amount: number): this;
+  skipLast(amount: number): this;
+  skipWhile(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): this;
+  skipUntil(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): this;
+  take(amount: number): this;
+  takeLast(amount: number): this;
+  takeWhile(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): this;
+  takeUntil(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): this;
+
+  filterNot(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): this;
+
+  reduce<R>(
+    reducer: (reduction: R, value: V, key: K, iter: this) => R,
+    initialReduction: R,
+    context?: mixed
+  ): R;
+  reduce<R>(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R;
+
+  reduceRight<R>(
+    reducer: (reduction: R, value: V, key: K, iter: this) => R,
+    initialReduction: R,
+    context?: mixed
+  ): R;
+  reduceRight<R>(
+    reducer: (reduction: V | R, value: V, key: K, iter: this) => R
+  ): R;
+
+  every(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): boolean;
+  some(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): boolean;
+  join(separator?: string): string;
+  isEmpty(): boolean;
+  count(
+    predicate?: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): number;
+  countBy<G>(
+    grouper: (value: V, key: K, iter: this) => G,
+    context?: mixed
+  ): Map<G, number>;
+
+  find<NSV>(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed,
+    notSetValue?: NSV
+  ): V | NSV;
+  findLast<NSV>(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed,
+    notSetValue?: NSV
+  ): V | NSV;
+
+  findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void;
+  findLastEntry(
+    predicate: (value: V, key: K, iter: this) => mixed
+  ): [K, V] | void;
+
+  findKey(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): K | void;
+  findLastKey(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): K | void;
+
+  keyOf(searchValue: V): K | void;
+  lastKeyOf(searchValue: V): K | void;
+
+  max(comparator?: Comparator<V>): V;
+  maxBy<C>(
+    comparatorValueMapper: (value: V, key: K, iter: this) => C,
+    comparator?: Comparator<C>
+  ): V;
+  min(comparator?: Comparator<V>): V;
+  minBy<C>(
+    comparatorValueMapper: (value: V, key: K, iter: this) => C,
+    comparator?: Comparator<C>
+  ): V;
+
+  isSubset(iter: Iterable<V>): boolean;
+  isSuperset(iter: Iterable<V>): boolean;
+}
+
+declare function isImmutable(
+  maybeImmutable: mixed
+): boolean %checks(maybeImmutable instanceof Collection);
+declare function isCollection(
+  maybeCollection: mixed
+): boolean %checks(maybeCollection instanceof Collection);
+declare function isKeyed(
+  maybeKeyed: mixed
+): boolean %checks(maybeKeyed instanceof KeyedCollection);
+declare function isIndexed(
+  maybeIndexed: mixed
+): boolean %checks(maybeIndexed instanceof IndexedCollection);
+declare function isAssociative(
+  maybeAssociative: mixed
+): boolean %checks(maybeAssociative instanceof KeyedCollection ||
+  maybeAssociative instanceof IndexedCollection);
+declare function isOrdered(
+  maybeOrdered: mixed
+): boolean %checks(maybeOrdered instanceof IndexedCollection ||
+  maybeOrdered instanceof OrderedMap ||
+  maybeOrdered instanceof OrderedSet);
+declare function isValueObject(maybeValue: mixed): boolean;
+
+declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq);
+declare function isList(maybeList: any): boolean %checks(maybeList instanceof
+  List);
+declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map);
+declare function isOrderedMap(
+  maybeOrderedMap: any
+): boolean %checks(maybeOrderedMap instanceof OrderedMap);
+declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof
+  Stack);
+declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set);
+declare function isOrderedSet(
+  maybeOrderedSet: any
+): boolean %checks(maybeOrderedSet instanceof OrderedSet);
+declare function isRecord(
+  maybeRecord: any
+): boolean %checks(maybeRecord instanceof Record);
+
+declare interface ValueObject {
+  equals(other: mixed): boolean;
+  hashCode(): number;
+}
+
+declare class Collection<K, +V> extends _Collection<K, V> {
+  static Keyed: typeof KeyedCollection;
+  static Indexed: typeof IndexedCollection;
+  static Set: typeof SetCollection;
+
+  static isCollection: typeof isCollection;
+  static isKeyed: typeof isKeyed;
+  static isIndexed: typeof isIndexed;
+  static isAssociative: typeof isAssociative;
+  static isOrdered: typeof isOrdered;
+}
+
+declare class KeyedCollection<K, +V> extends Collection<K, V> {
+  static <K, V>(
+    values?: Iterable<[K, V]> | PlainObjInput<K, V>
+  ): KeyedCollection<K, V>;
+
+  toJS(): { [key: string]: mixed };
+  toJSON(): { [key: string]: V };
+  toArray(): Array<[K, V]>;
+  @@iterator(): Iterator<[K, V]>;
+  toSeq(): KeyedSeq<K, V>;
+  flip(): KeyedCollection<V, K>;
+
+  concat<KC, VC>(
+    ...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>
+  ): KeyedCollection<K | KC, V | VC>;
+
+  filter(predicate: typeof Boolean): KeyedCollection<K, $NonMaybeType<V>>;
+  filter(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): KeyedCollection<K, V>;
+
+  partition(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: V, key: K, iter: this) => M,
+    context?: mixed
+  ): KeyedCollection<K, M>;
+
+  mapKeys<M>(
+    mapper: (key: K, value: V, iter: this) => M,
+    context?: mixed
+  ): KeyedCollection<M, V>;
+
+  mapEntries<KM, VM>(
+    mapper: (entry: [K, V], index: number, iter: this) => [KM, VM],
+    context?: mixed
+  ): KeyedCollection<KM, VM>;
+
+  flatMap<KM, VM>(
+    mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+    context?: mixed
+  ): KeyedCollection<KM, VM>;
+
+  flatten(depth?: number): KeyedCollection<any, any>;
+  flatten(shallow?: boolean): KeyedCollection<any, any>;
+}
+
+Collection.Keyed = KeyedCollection;
+
+declare class IndexedCollection<+T> extends Collection<number, T> {
+  static <T>(iter?: Iterable<T>): IndexedCollection<T>;
+
+  toJS(): Array<mixed>;
+  toJSON(): Array<T>;
+  toArray(): Array<T>;
+  @@iterator(): Iterator<T>;
+  toSeq(): IndexedSeq<T>;
+  fromEntrySeq<K, V>(): KeyedSeq<K, V>;
+  interpose(separator: T): this;
+  interleave(...collections: Iterable<T>[]): this;
+  splice(index: number, removeNum: number, ...values: T[]): this;
+
+  zip<A>(a: Iterable<A>, ..._: []): IndexedCollection<[T, A]>;
+  zip<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): IndexedCollection<[T, A, B]>;
+  zip<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedCollection<[T, A, B, C]>;
+  zip<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedCollection<[T, A, B, C, D]>;
+  zip<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedCollection<[T, A, B, C, D, E]>;
+
+  zipAll<A>(a: Iterable<A>, ..._: []): IndexedCollection<[T | void, A | void]>;
+  zipAll<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): IndexedCollection<[T | void, A | void, B | void]>;
+  zipAll<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedCollection<[T | void, A | void, B | void, C | void]>;
+  zipAll<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>;
+  zipAll<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedCollection<
+    [T | void, A | void, B | void, C | void, D | void, E | void]
+  >;
+
+  zipWith<A, R>(
+    zipper: (value: T, a: A) => R,
+    a: Iterable<A>,
+    ..._: []
+  ): IndexedCollection<R>;
+  zipWith<A, B, R>(
+    zipper: (value: T, a: A, b: B) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): IndexedCollection<R>;
+  zipWith<A, B, C, R>(
+    zipper: (value: T, a: A, b: B, c: C) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedCollection<R>;
+  zipWith<A, B, C, D, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedCollection<R>;
+  zipWith<A, B, C, D, E, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedCollection<R>;
+
+  indexOf(searchValue: T): number;
+  lastIndexOf(searchValue: T): number;
+  findIndex(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): number;
+  findLastIndex(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): number;
+
+  concat<C>(...iters: Array<Iterable<C> | C>): IndexedCollection<T | C>;
+
+  filter(predicate: typeof Boolean): IndexedCollection<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): IndexedCollection<T>;
+
+  partition(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, index: number, iter: this) => M,
+    context?: mixed
+  ): IndexedCollection<M>;
+
+  flatMap<M>(
+    mapper: (value: T, index: number, iter: this) => Iterable<M>,
+    context?: mixed
+  ): IndexedCollection<M>;
+
+  flatten(depth?: number): IndexedCollection<any>;
+  flatten(shallow?: boolean): IndexedCollection<any>;
+}
+
+declare class SetCollection<+T> extends Collection<T, T> {
+  static <T>(iter?: Iterable<T>): SetCollection<T>;
+
+  toJS(): Array<mixed>;
+  toJSON(): Array<T>;
+  toArray(): Array<T>;
+  @@iterator(): Iterator<T>;
+  toSeq(): SetSeq<T>;
+
+  concat<U>(...collections: Iterable<U>[]): SetCollection<T | U>;
+
+  // `filter`, `map` and `flatMap` cannot be defined further up the hierarchy,
+  // because the implementation for `KeyedCollection` allows the value type to
+  // change without constraining the key type. That does not work for
+  // `SetCollection` - the value and key types *must* match.
+  filter(predicate: typeof Boolean): SetCollection<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): SetCollection<T>;
+
+  partition(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, value: T, iter: this) => M,
+    context?: mixed
+  ): SetCollection<M>;
+
+  flatMap<M>(
+    mapper: (value: T, value: T, iter: this) => Iterable<M>,
+    context?: mixed
+  ): SetCollection<M>;
+
+  flatten(depth?: number): SetCollection<any>;
+  flatten(shallow?: boolean): SetCollection<any>;
+}
+
+declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof
+  Seq);
+declare class Seq<K, +V> extends _Collection<K, V> {
+  static Keyed: typeof KeyedSeq;
+  static Indexed: typeof IndexedSeq;
+  static Set: typeof SetSeq;
+
+  static <K, V>(values: KeyedSeq<K, V>): KeyedSeq<K, V>;
+  static <T>(values: SetSeq<T>): SetSeq<K, V>;
+  static <T>(values: Iterable<T>): IndexedSeq<T>;
+  static <K, V>(values?: PlainObjInput<K, V>): KeyedSeq<K, V>;
+
+  static isSeq: typeof isSeq;
+
+  size: number | void;
+  cacheResult(): this;
+  toSeq(): this;
+}
+
+declare class KeyedSeq<K, +V> extends Seq<K, V> mixins KeyedCollection<K, V> {
+  static <K, V>(
+    values?: Iterable<[K, V]> | PlainObjInput<K, V>
+  ): KeyedSeq<K, V>;
+
+  // Override specialized return types
+  flip(): KeyedSeq<V, K>;
+
+  concat<KC, VC>(
+    ...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>
+  ): KeyedSeq<K | KC, V | VC>;
+
+  filter(predicate: typeof Boolean): KeyedSeq<K, $NonMaybeType<V>>;
+  filter(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): KeyedSeq<K, V>;
+
+  partition(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: V, key: K, iter: this) => M,
+    context?: mixed
+  ): KeyedSeq<K, M>;
+
+  mapKeys<M>(
+    mapper: (key: K, value: V, iter: this) => M,
+    context?: mixed
+  ): KeyedSeq<M, V>;
+
+  mapEntries<KM, VM>(
+    mapper: (entry: [K, V], index: number, iter: this) => [KM, VM],
+    context?: mixed
+  ): KeyedSeq<KM, VM>;
+
+  flatMap<KM, VM>(
+    mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+    context?: mixed
+  ): KeyedSeq<KM, VM>;
+
+  flatten(depth?: number): KeyedSeq<any, any>;
+  flatten(shallow?: boolean): KeyedSeq<any, any>;
+}
+
+declare class IndexedSeq<+T>
+  extends Seq<number, T>
+  mixins IndexedCollection<T>
+{
+  static <T>(values?: Iterable<T>): IndexedSeq<T>;
+
+  static of<T>(...values: T[]): IndexedSeq<T>;
+
+  // Override specialized return types
+
+  concat<C>(...iters: Array<Iterable<C> | C>): IndexedSeq<T | C>;
+
+  filter(predicate: typeof Boolean): IndexedSeq<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): IndexedSeq<T>;
+
+  partition(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, index: number, iter: this) => M,
+    context?: mixed
+  ): IndexedSeq<M>;
+
+  flatMap<M>(
+    mapper: (value: T, index: number, iter: this) => Iterable<M>,
+    context?: mixed
+  ): IndexedSeq<M>;
+
+  flatten(depth?: number): IndexedSeq<any>;
+  flatten(shallow?: boolean): IndexedSeq<any>;
+
+  zip<A>(a: Iterable<A>, ..._: []): IndexedSeq<[T, A]>;
+  zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): IndexedSeq<[T, A, B]>;
+  zip<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedSeq<[T, A, B, C]>;
+  zip<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedSeq<[T, A, B, C, D]>;
+  zip<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedSeq<[T, A, B, C, D, E]>;
+
+  zipAll<A>(a: Iterable<A>, ..._: []): IndexedSeq<[T | void, A | void]>;
+  zipAll<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): IndexedSeq<[T | void, A | void, B | void]>;
+  zipAll<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedSeq<[T | void, A | void, B | void, C | void]>;
+  zipAll<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void]>;
+  zipAll<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void, E | void]>;
+
+  zipWith<A, R>(
+    zipper: (value: T, a: A) => R,
+    a: Iterable<A>,
+    ..._: []
+  ): IndexedSeq<R>;
+  zipWith<A, B, R>(
+    zipper: (value: T, a: A, b: B) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): IndexedSeq<R>;
+  zipWith<A, B, C, R>(
+    zipper: (value: T, a: A, b: B, c: C) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): IndexedSeq<R>;
+  zipWith<A, B, C, D, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): IndexedSeq<R>;
+  zipWith<A, B, C, D, E, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): IndexedSeq<R>;
+}
+
+declare class SetSeq<+T> extends Seq<T, T> mixins SetCollection<T> {
+  static <T>(values?: Iterable<T>): SetSeq<T>;
+
+  static of<T>(...values: T[]): SetSeq<T>;
+
+  // Override specialized return types
+
+  concat<U>(...collections: Iterable<U>[]): SetSeq<T | U>;
+
+  filter(predicate: typeof Boolean): SetSeq<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): SetSeq<T>;
+
+  partition(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, value: T, iter: this) => M,
+    context?: mixed
+  ): SetSeq<M>;
+
+  flatMap<M>(
+    mapper: (value: T, value: T, iter: this) => Iterable<M>,
+    context?: mixed
+  ): SetSeq<M>;
+
+  flatten(depth?: number): SetSeq<any>;
+  flatten(shallow?: boolean): SetSeq<any>;
+}
+
+declare class UpdatableInCollection<K, +V> {
+  setIn<S>(keyPath: [], value: S): S;
+  setIn(keyPath: [K], value: V): this;
+  setIn<K2: $KeyOf<V>, S: $ValOf<V, K2>>(keyPath: [K, K2], value: S): this;
+  setIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, S: $ValOf<$ValOf<V, K2>, K3>>(
+    keyPath: [K, K2, K3],
+    value: S
+  ): this;
+  setIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    value: S
+  ): this;
+  setIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    value: S
+  ): this;
+
+  deleteIn(keyPath: []): void;
+  deleteIn(keyPath: [K]): this;
+  deleteIn<K2: $KeyOf<V>>(keyPath: [K, K2]): this;
+  deleteIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
+    keyPath: [K, K2, K3]
+  ): this;
+  deleteIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4]
+  ): this;
+  deleteIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5]
+  ): this;
+
+  removeIn(keyPath: []): void;
+  removeIn(keyPath: [K]): this;
+  removeIn<K2: $KeyOf<V>>(keyPath: [K, K2]): this;
+  removeIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
+    keyPath: [K, K2, K3]
+  ): this;
+  removeIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4]
+  ): this;
+  removeIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5]
+  ): this;
+
+  updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U;
+  updateIn<U>(keyPath: [], updater: (value: this) => U): U;
+  updateIn<NSV>(keyPath: [K], notSetValue: NSV, updater: (value: V) => V): this;
+  updateIn(keyPath: [K], updater: (value: V) => V): this;
+  updateIn<NSV, K2: $KeyOf<V>, S: $ValOf<V, K2>>(
+    keyPath: [K, K2],
+    notSetValue: NSV,
+    updater: (value: $ValOf<V, K2> | NSV) => S
+  ): this;
+  updateIn<K2: $KeyOf<V>, S: $ValOf<V, K2>>(
+    keyPath: [K, K2],
+    updater: (value: $ValOf<V, K2>) => S
+  ): this;
+  updateIn<
+    NSV,
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    S: $ValOf<$ValOf<V, K2>, K3>
+  >(
+    keyPath: [K, K2, K3],
+    notSetValue: NSV,
+    updater: (value: $ValOf<$ValOf<V, K2>, K3> | NSV) => S
+  ): this;
+  updateIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    S: $ValOf<$ValOf<V, K2>, K3>
+  >(
+    keyPath: [K, K2, K3],
+    updater: (value: $ValOf<$ValOf<V, K2>, K3>) => S
+  ): this;
+  updateIn<
+    NSV,
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    notSetValue: NSV,
+    updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV) => S
+  ): this;
+  updateIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>) => S
+  ): this;
+  updateIn<
+    NSV,
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    notSetValue: NSV,
+    updater: (
+      value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV
+    ) => S
+  ): this;
+  updateIn<
+    K2: $KeyOf<V>,
+    K3: $KeyOf<$ValOf<V, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>) => S
+  ): this;
+}
+
+declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof
+  List);
+declare class List<+T>
+  extends IndexedCollection<T>
+  mixins UpdatableInCollection<number, T>
+{
+  static (collection?: Iterable<T>): List<T>;
+
+  static of<T>(...values: T[]): List<T>;
+
+  static isList: typeof isList;
+
+  size: number;
+
+  set<U>(index: number, value: U): List<T | U>;
+  delete(index: number): this;
+  remove(index: number): this;
+  insert<U>(index: number, value: U): List<T | U>;
+  clear(): this;
+  push<U>(...values: U[]): List<T | U>;
+  pop(): this;
+  unshift<U>(...values: U[]): List<T | U>;
+  shift(): this;
+
+  update<U>(updater: (value: this) => U): U;
+  update<U>(index: number, updater: (value: T) => U): List<T | U>;
+  update<U>(
+    index: number,
+    notSetValue: U,
+    updater: (value: T) => U
+  ): List<T | U>;
+
+  merge<U>(...collections: Iterable<U>[]): List<T | U>;
+
+  setSize(size: number): this;
+
+  mergeIn(keyPath: Iterable<mixed>, ...collections: Iterable<mixed>[]): this;
+  mergeDeepIn(
+    keyPath: Iterable<mixed>,
+    ...collections: Iterable<mixed>[]
+  ): this;
+
+  withMutations(mutator: (mutable: this) => mixed): this;
+  asMutable(): this;
+  wasAltered(): boolean;
+  asImmutable(): this;
+
+  // Override specialized return types
+
+  concat<C>(...iters: Array<Iterable<C> | C>): List<T | C>;
+
+  filter(predicate: typeof Boolean): List<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): List<T>;
+
+  partition(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, index: number, iter: this) => M,
+    context?: mixed
+  ): List<M>;
+
+  flatMap<M>(
+    mapper: (value: T, index: number, iter: this) => Iterable<M>,
+    context?: mixed
+  ): List<M>;
+
+  flatten(depth?: number): List<any>;
+  flatten(shallow?: boolean): List<any>;
+
+  zip<A>(a: Iterable<A>, ..._: []): List<[T, A]>;
+  zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): List<[T, A, B]>;
+  zip<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): List<[T, A, B, C]>;
+  zip<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): List<[T, A, B, C, D]>;
+  zip<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): List<[T, A, B, C, D, E]>;
+
+  zipAll<A>(a: Iterable<A>, ..._: []): List<[T | void, A | void]>;
+  zipAll<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): List<[T | void, A | void, B | void]>;
+  zipAll<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): List<[T | void, A | void, B | void, C | void]>;
+  zipAll<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): List<[T | void, A | void, B | void, C | void, D | void]>;
+  zipAll<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): List<[T | void, A | void, B | void, C | void, D | void, E | void]>;
+
+  zipWith<A, R>(
+    zipper: (value: T, a: A) => R,
+    a: Iterable<A>,
+    ..._: []
+  ): List<R>;
+  zipWith<A, B, R>(
+    zipper: (value: T, a: A, b: B) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): List<R>;
+  zipWith<A, B, C, R>(
+    zipper: (value: T, a: A, b: B, c: C) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): List<R>;
+  zipWith<A, B, C, D, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): List<R>;
+  zipWith<A, B, C, D, E, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): List<R>;
+}
+
+declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof
+  Map);
+declare class Map<K, +V>
+  extends KeyedCollection<K, V>
+  mixins UpdatableInCollection<K, V>
+{
+  static <K, V>(values?: Iterable<[K, V]> | PlainObjInput<K, V>): Map<K, V>;
+
+  static isMap: typeof isMap;
+
+  size: number;
+
+  set<K_, V_>(key: K_, value: V_): Map<K | K_, V | V_>;
+  delete(key: K): this;
+  remove(key: K): this;
+  clear(): this;
+
+  deleteAll(keys: Iterable<K>): Map<K, V>;
+  removeAll(keys: Iterable<K>): Map<K, V>;
+
+  update<U>(updater: (value: this) => U): U;
+  update<V_>(key: K, updater: (value: V) => V_): Map<K, V | V_>;
+  update<V_>(
+    key: K,
+    notSetValue: V_,
+    updater: (value: V) => V_
+  ): Map<K, V | V_>;
+
+  merge<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): Map<K | K_, V | V_>;
+  concat<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): Map<K | K_, V | V_>;
+
+  mergeWith<K_, W, X>(
+    merger: (oldVal: V, newVal: W, key: K) => X,
+    ...collections: (Iterable<[K_, W]> | PlainObjInput<K_, W>)[]
+  ): Map<K | K_, V | W | X>;
+
+  mergeDeep<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): Map<K | K_, V | V_>;
+
+  mergeDeepWith<K_, V_>(
+    merger: (oldVal: any, newVal: any, key: any) => mixed,
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): Map<K | K_, V | V_>;
+
+  mergeIn(
+    keyPath: Iterable<mixed>,
+    ...collections: (Iterable<mixed> | PlainObjInput<mixed, mixed>)[]
+  ): this;
+  mergeDeepIn(
+    keyPath: Iterable<mixed>,
+    ...collections: (Iterable<mixed> | PlainObjInput<mixed, mixed>)[]
+  ): this;
+
+  withMutations(mutator: (mutable: this) => mixed): this;
+  asMutable(): this;
+  wasAltered(): boolean;
+  asImmutable(): this;
+
+  // Override specialized return types
+
+  flip(): Map<V, K>;
+
+  filter(predicate: typeof Boolean): Map<K, $NonMaybeType<V>>;
+  filter(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): Map<K, V>;
+
+  partition(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: V, key: K, iter: this) => M,
+    context?: mixed
+  ): Map<K, M>;
+
+  mapKeys<M>(
+    mapper: (key: K, value: V, iter: this) => M,
+    context?: mixed
+  ): Map<M, V>;
+
+  mapEntries<KM, VM>(
+    mapper: (entry: [K, V], index: number, iter: this) => [KM, VM],
+    context?: mixed
+  ): Map<KM, VM>;
+
+  flatMap<KM, VM>(
+    mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+    context?: mixed
+  ): Map<KM, VM>;
+
+  flatten(depth?: number): Map<any, any>;
+  flatten(shallow?: boolean): Map<any, any>;
+}
+
+declare function isOrderedMap(
+  maybeOrderedMap: mixed
+): boolean %checks(maybeOrderedMap instanceof OrderedMap);
+declare class OrderedMap<K, +V>
+  extends Map<K, V>
+  mixins UpdatableInCollection<K, V>
+{
+  static <K, V>(
+    values?: Iterable<[K, V]> | PlainObjInput<K, V>
+  ): OrderedMap<K, V>;
+
+  static isOrderedMap: typeof isOrderedMap;
+
+  size: number;
+
+  set<K_, V_>(key: K_, value: V_): OrderedMap<K | K_, V | V_>;
+  delete(key: K): this;
+  remove(key: K): this;
+  clear(): this;
+
+  update<U>(updater: (value: this) => U): U;
+  update<V_>(key: K, updater: (value: V) => V_): OrderedMap<K, V | V_>;
+  update<V_>(
+    key: K,
+    notSetValue: V_,
+    updater: (value: V) => V_
+  ): OrderedMap<K, V | V_>;
+
+  merge<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): OrderedMap<K | K_, V | V_>;
+  concat<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): OrderedMap<K | K_, V | V_>;
+
+  mergeWith<K_, W, X>(
+    merger: (oldVal: V, newVal: W, key: K) => X,
+    ...collections: (Iterable<[K_, W]> | PlainObjInput<K_, W>)[]
+  ): OrderedMap<K | K_, V | W | X>;
+
+  mergeDeep<K_, V_>(
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): OrderedMap<K | K_, V | V_>;
+
+  mergeDeepWith<K_, V_>(
+    merger: (oldVal: any, newVal: any, key: any) => mixed,
+    ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
+  ): OrderedMap<K | K_, V | V_>;
+
+  mergeIn(
+    keyPath: Iterable<mixed>,
+    ...collections: (Iterable<mixed> | PlainObjInput<mixed, mixed>)[]
+  ): this;
+  mergeDeepIn(
+    keyPath: Iterable<mixed>,
+    ...collections: (Iterable<mixed> | PlainObjInput<mixed, mixed>)[]
+  ): this;
+
+  withMutations(mutator: (mutable: this) => mixed): this;
+  asMutable(): this;
+  wasAltered(): boolean;
+  asImmutable(): this;
+
+  // Override specialized return types
+
+  flip(): OrderedMap<V, K>;
+
+  filter(predicate: typeof Boolean): OrderedMap<K, $NonMaybeType<V>>;
+  filter(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): OrderedMap<K, V>;
+
+  partition(
+    predicate: (value: V, key: K, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: V, key: K, iter: this) => M,
+    context?: mixed
+  ): OrderedMap<K, M>;
+
+  mapKeys<M>(
+    mapper: (key: K, value: V, iter: this) => M,
+    context?: mixed
+  ): OrderedMap<M, V>;
+
+  mapEntries<KM, VM>(
+    mapper: (entry: [K, V], index: number, iter: this) => [KM, VM],
+    context?: mixed
+  ): OrderedMap<KM, VM>;
+
+  flatMap<KM, VM>(
+    mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>,
+    context?: mixed
+  ): OrderedMap<KM, VM>;
+
+  flatten(depth?: number): OrderedMap<any, any>;
+  flatten(shallow?: boolean): OrderedMap<any, any>;
+}
+
+declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof
+  Set);
+declare class Set<+T> extends SetCollection<T> {
+  static <T>(values?: Iterable<T>): Set<T>;
+
+  static of<T>(...values: T[]): Set<T>;
+  static fromKeys<T>(
+    values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>
+  ): Set<T>;
+
+  static intersect(sets: Iterable<Iterable<T>>): Set<T>;
+  static union(sets: Iterable<Iterable<T>>): Set<T>;
+
+  static isSet: typeof isSet;
+
+  size: number;
+
+  add<U>(value: U): Set<T | U>;
+  delete(value: T): this;
+  remove(value: T): this;
+  clear(): this;
+  union<U>(...collections: Iterable<U>[]): Set<T | U>;
+  merge<U>(...collections: Iterable<U>[]): Set<T | U>;
+  concat<U>(...collections: Iterable<U>[]): Set<T | U>;
+  intersect<U>(...collections: Iterable<U>[]): Set<T & U>;
+  subtract(...collections: Iterable<mixed>[]): this;
+
+  withMutations(mutator: (mutable: this) => mixed): this;
+  asMutable(): this;
+  wasAltered(): boolean;
+  asImmutable(): this;
+
+  // Override specialized return types
+
+  filter(predicate: typeof Boolean): Set<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): Set<T>;
+
+  partition(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, value: T, iter: this) => M,
+    context?: mixed
+  ): Set<M>;
+
+  flatMap<M>(
+    mapper: (value: T, value: T, iter: this) => Iterable<M>,
+    context?: mixed
+  ): Set<M>;
+
+  flatten(depth?: number): Set<any>;
+  flatten(shallow?: boolean): Set<any>;
+}
+
+// Overrides except for `isOrderedSet` are for specialized return types
+declare function isOrderedSet(
+  maybeOrderedSet: mixed
+): boolean %checks(maybeOrderedSet instanceof OrderedSet);
+declare class OrderedSet<+T> extends Set<T> {
+  static <T>(values?: Iterable<T>): OrderedSet<T>;
+
+  static of<T>(...values: T[]): OrderedSet<T>;
+  static fromKeys<T>(
+    values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>
+  ): OrderedSet<T>;
+
+  static isOrderedSet: typeof isOrderedSet;
+
+  size: number;
+
+  add<U>(value: U): OrderedSet<T | U>;
+  union<U>(...collections: Iterable<U>[]): OrderedSet<T | U>;
+  merge<U>(...collections: Iterable<U>[]): OrderedSet<T | U>;
+  concat<U>(...collections: Iterable<U>[]): OrderedSet<T | U>;
+  intersect<U>(...collections: Iterable<U>[]): OrderedSet<T & U>;
+
+  filter(predicate: typeof Boolean): OrderedSet<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): OrderedSet<T>;
+
+  partition(
+    predicate: (value: T, value: T, iter: this) => mixed,
+    context?: mixed
+  ): [this, this];
+
+  map<M>(
+    mapper: (value: T, value: T, iter: this) => M,
+    context?: mixed
+  ): OrderedSet<M>;
+
+  flatMap<M>(
+    mapper: (value: T, value: T, iter: this) => Iterable<M>,
+    context?: mixed
+  ): OrderedSet<M>;
+
+  flatten(depth?: number): OrderedSet<any>;
+  flatten(shallow?: boolean): OrderedSet<any>;
+
+  zip<A>(a: Iterable<A>, ..._: []): OrderedSet<[T, A]>;
+  zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): OrderedSet<[T, A, B]>;
+  zip<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): OrderedSet<[T, A, B, C]>;
+  zip<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): OrderedSet<[T, A, B, C, D]>;
+  zip<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): OrderedSet<[T, A, B, C, D, E]>;
+
+  zipAll<A>(a: Iterable<A>, ..._: []): OrderedSet<[T | void, A | void]>;
+  zipAll<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): OrderedSet<[T | void, A | void, B | void]>;
+  zipAll<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): OrderedSet<[T | void, A | void, B | void, C | void]>;
+  zipAll<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): OrderedSet<[T | void, A | void, B | void, C | void, D | void]>;
+  zipAll<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): OrderedSet<[T | void, A | void, B | void, C | void, D | void, E | void]>;
+
+  zipWith<A, R>(
+    zipper: (value: T, a: A) => R,
+    a: Iterable<A>,
+    ..._: []
+  ): OrderedSet<R>;
+  zipWith<A, B, R>(
+    zipper: (value: T, a: A, b: B) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): OrderedSet<R>;
+  zipWith<A, B, C, R>(
+    zipper: (value: T, a: A, b: B, c: C) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): OrderedSet<R>;
+  zipWith<A, B, C, D, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): OrderedSet<R>;
+  zipWith<A, B, C, D, E, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): OrderedSet<R>;
+}
+
+declare function isStack(
+  maybeStack: mixed
+): boolean %checks(maybeStack instanceof Stack);
+declare class Stack<+T> extends IndexedCollection<T> {
+  static <T>(collection?: Iterable<T>): Stack<T>;
+
+  static isStack(maybeStack: mixed): boolean;
+  static of<T>(...values: T[]): Stack<T>;
+
+  static isStack: typeof isStack;
+
+  size: number;
+
+  peek(): T;
+  clear(): this;
+  unshift<U>(...values: U[]): Stack<T | U>;
+  unshiftAll<U>(iter: Iterable<U>): Stack<T | U>;
+  shift(): this;
+  push<U>(...values: U[]): Stack<T | U>;
+  pushAll<U>(iter: Iterable<U>): Stack<T | U>;
+  pop(): this;
+
+  withMutations(mutator: (mutable: this) => mixed): this;
+  asMutable(): this;
+  wasAltered(): boolean;
+  asImmutable(): this;
+
+  // Override specialized return types
+
+  concat<C>(...iters: Array<Iterable<C> | C>): Stack<T | C>;
+
+  filter(predicate: typeof Boolean): Stack<$NonMaybeType<T>>;
+  filter(
+    predicate: (value: T, index: number, iter: this) => mixed,
+    context?: mixed
+  ): Stack<T>;
+
+  map<M>(
+    mapper: (value: T, index: number, iter: this) => M,
+    context?: mixed
+  ): Stack<M>;
+
+  flatMap<M>(
+    mapper: (value: T, index: number, iter: this) => Iterable<M>,
+    context?: mixed
+  ): Stack<M>;
+
+  flatten(depth?: number): Stack<any>;
+  flatten(shallow?: boolean): Stack<any>;
+
+  zip<A>(a: Iterable<A>, ..._: []): Stack<[T, A]>;
+  zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): Stack<[T, A, B]>;
+  zip<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): Stack<[T, A, B, C]>;
+  zip<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): Stack<[T, A, B, C, D]>;
+  zip<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): Stack<[T, A, B, C, D, E]>;
+
+  zipAll<A>(a: Iterable<A>, ..._: []): Stack<[T | void, A | void]>;
+  zipAll<A, B>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): Stack<[T | void, A | void, B | void]>;
+  zipAll<A, B, C>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): Stack<[T | void, A | void, B | void, C | void]>;
+  zipAll<A, B, C, D>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): Stack<[T | void, A | void, B | void, C | void, D | void]>;
+  zipAll<A, B, C, D, E>(
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): Stack<[T | void, A | void, B | void, C | void, D | void, E | void]>;
+
+  zipWith<A, R>(
+    zipper: (value: T, a: A) => R,
+    a: Iterable<A>,
+    ..._: []
+  ): Stack<R>;
+  zipWith<A, B, R>(
+    zipper: (value: T, a: A, b: B) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    ..._: []
+  ): Stack<R>;
+  zipWith<A, B, C, R>(
+    zipper: (value: T, a: A, b: B, c: C) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    ..._: []
+  ): Stack<R>;
+  zipWith<A, B, C, D, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    ..._: []
+  ): Stack<R>;
+  zipWith<A, B, C, D, E, R>(
+    zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R,
+    a: Iterable<A>,
+    b: Iterable<B>,
+    c: Iterable<C>,
+    d: Iterable<D>,
+    e: Iterable<E>,
+    ..._: []
+  ): Stack<R>;
+}
+
+declare function Range(
+  start?: number,
+  end?: number,
+  step?: number
+): IndexedSeq<number>;
+declare function Repeat<T>(value: T, times?: number): IndexedSeq<T>;
+
+// The type of a Record factory function.
+type RecordFactory<Values: Object> = Class<RecordInstance<Values>>;
+
+// The type of runtime Record instances.
+type RecordOf<Values: Object> = RecordInstance<Values> & $ReadOnly<Values>;
+
+// The values of a Record instance.
+type _RecordValues<T, R: RecordInstance<T> | T> = R;
+type RecordValues<R> = _RecordValues<*, R>;
+
+declare function isRecord(
+  maybeRecord: any
+): boolean %checks(maybeRecord instanceof RecordInstance);
+declare class Record {
+  static <Values: Object>(spec: Values, name?: string): typeof RecordInstance;
+  constructor<Values: Object>(
+    spec: Values,
+    name?: string
+  ): typeof RecordInstance;
+
+  static isRecord: typeof isRecord;
+
+  static getDescriptiveName(record: RecordInstance<any>): string;
+}
+
+declare class RecordInstance<T: Object = Object> {
+  static (values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): RecordOf<T>;
+  // Note: a constructor can only create an instance of RecordInstance<T>,
+  // it's encouraged to not use `new` when creating Records.
+  constructor(values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): void;
+
+  size: number;
+
+  has(key: string): boolean;
+
+  get<K: $Keys<T>>(key: K, ..._: []): $ElementType<T, K>;
+  get<K: $Keys<T>, NSV>(key: K, notSetValue: NSV): $ElementType<T, K> | NSV;
+
+  hasIn(keyPath: Iterable<mixed>): boolean;
+
+  getIn(keyPath: [], notSetValue?: mixed): this & $ReadOnly<T>;
+  getIn<K: $Keys<T>>(keyPath: [K], notSetValue?: mixed): $ElementType<T, K>;
+  getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
+    keyPath: [K, K2],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<T, K>, K2> | NSV;
+  getIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
+  >(
+    keyPath: [K, K2, K3],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV;
+  getIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV;
+  getIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    notSetValue: NSV
+  ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV;
+
+  equals(other: any): boolean;
+  hashCode(): number;
+
+  set<K: $Keys<T>>(key: K, value: $ElementType<T, K>): this & $ReadOnly<T>;
+  update<K: $Keys<T>>(
+    key: K,
+    updater: (value: $ElementType<T, K>) => $ElementType<T, K>
+  ): this & $ReadOnly<T>;
+  merge(
+    ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
+  ): this & $ReadOnly<T>;
+  mergeDeep(
+    ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
+  ): this & $ReadOnly<T>;
+
+  mergeWith(
+    merger: (oldVal: $ValOf<T>, newVal: $ValOf<T>, key: $Keys<T>) => $ValOf<T>,
+    ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
+  ): this & $ReadOnly<T>;
+  mergeDeepWith(
+    merger: (oldVal: any, newVal: any, key: any) => any,
+    ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
+  ): this & $ReadOnly<T>;
+
+  delete<K: $Keys<T>>(key: K): this & $ReadOnly<T>;
+  remove<K: $Keys<T>>(key: K): this & $ReadOnly<T>;
+  clear(): this & $ReadOnly<T>;
+
+  setIn<S>(keyPath: [], value: S): S;
+  setIn<K: $Keys<T>, S: $ValOf<T, K>>(
+    keyPath: [K],
+    value: S
+  ): this & $ReadOnly<T>;
+  setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(
+    keyPath: [K, K2],
+    value: S
+  ): this & $ReadOnly<T>;
+  setIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
+  >(
+    keyPath: [K, K2, K3],
+    value: S
+  ): this & $ReadOnly<T>;
+  setIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    value: S
+  ): this & $ReadOnly<T>;
+  setIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    value: S
+  ): this & $ReadOnly<T>;
+
+  deleteIn(keyPath: []): void;
+  deleteIn<K: $Keys<T>>(keyPath: [K]): this & $ReadOnly<T>;
+  deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
+    keyPath: [K, K2]
+  ): this & $ReadOnly<T>;
+  deleteIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
+  >(
+    keyPath: [K, K2, K3]
+  ): this & $ReadOnly<T>;
+  deleteIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4]
+  ): this & $ReadOnly<T>;
+  deleteIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5]
+  ): this & $ReadOnly<T>;
+
+  removeIn(keyPath: []): void;
+  removeIn<K: $Keys<T>>(keyPath: [K]): this & $ReadOnly<T>;
+  removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
+    keyPath: [K, K2]
+  ): this & $ReadOnly<T>;
+  removeIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
+  >(
+    keyPath: [K, K2, K3]
+  ): this & $ReadOnly<T>;
+  removeIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
+  >(
+    keyPath: [K, K2, K3, K4]
+  ): this & $ReadOnly<T>;
+  removeIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
+  >(
+    keyPath: [K, K2, K3, K4, K5]
+  ): this & $ReadOnly<T>;
+
+  updateIn<U>(
+    keyPath: [],
+    notSetValue: mixed,
+    updater: (value: this & T) => U
+  ): U;
+  updateIn<U>(keyPath: [], updater: (value: this & T) => U): U;
+  updateIn<NSV, K: $Keys<T>, S: $ValOf<T, K>>(
+    keyPath: [K],
+    notSetValue: NSV,
+    updater: (value: $ValOf<T, K>) => S
+  ): this & $ReadOnly<T>;
+  updateIn<K: $Keys<T>, S: $ValOf<T, K>>(
+    keyPath: [K],
+    updater: (value: $ValOf<T, K>) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    S: $ValOf<$ValOf<T, K>, K2>
+  >(
+    keyPath: [K, K2],
+    notSetValue: NSV,
+    updater: (value: $ValOf<$ValOf<T, K>, K2> | NSV) => S
+  ): this & $ReadOnly<T>;
+  updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(
+    keyPath: [K, K2],
+    updater: (value: $ValOf<$ValOf<T, K>, K2>) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
+  >(
+    keyPath: [K, K2, K3],
+    notSetValue: NSV,
+    updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
+  >(
+    keyPath: [K, K2, K3],
+    updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    notSetValue: NSV,
+    updater: (
+      value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV
+    ) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
+  >(
+    keyPath: [K, K2, K3, K4],
+    updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    NSV,
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    notSetValue: NSV,
+    updater: (
+      value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV
+    ) => S
+  ): this & $ReadOnly<T>;
+  updateIn<
+    K: $Keys<T>,
+    K2: $KeyOf<$ValOf<T, K>>,
+    K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
+    K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
+    K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
+    S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
+  >(
+    keyPath: [K, K2, K3, K4, K5],
+    updater: (
+      value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
+    ) => S
+  ): this & $ReadOnly<T>;
+
+  mergeIn(
+    keyPath: Iterable<mixed>,
+    ...collections: Array<any>
+  ): this & $ReadOnly<T>;
+  mergeDeepIn(
+    keyPath: Iterable<mixed>,
+    ...collections: Array<any>
+  ): this & $ReadOnly<T>;
+
+  toSeq(): KeyedSeq<$Keys<T>, any>;
+
+  toJS(): { [key: $Keys<T>]: mixed };
+  toJSON(): T;
+  toObject(): T;
+
+  withMutations(mutator: (mutable: this & T) => mixed): this & $ReadOnly<T>;
+  asMutable(): this & $ReadOnly<T>;
+  wasAltered(): boolean;
+  asImmutable(): this & $ReadOnly<T>;
+
+  @@iterator(): Iterator<[$Keys<T>, $ValOf<T>]>;
+}
+
+declare function fromJS(
+  jsValue: mixed,
+  reviver?: (
+    key: string | number,
+    sequence: KeyedCollection<string, mixed> | IndexedCollection<mixed>,
+    path?: Array<string | number>
+  ) => mixed
+): Collection<mixed, mixed>;
+
+declare function is(first: mixed, second: mixed): boolean;
+declare function hash(value: mixed): number;
+
+declare function get<C: Object, K: $Keys<C>>(
+  collection: C,
+  key: K,
+  notSetValue: mixed
+): $ValOf<C, K>;
+declare function get<C, K: $KeyOf<C>, NSV>(
+  collection: C,
+  key: K,
+  notSetValue: NSV
+): $ValOf<C, K> | NSV;
+
+declare function has(collection: Object, key: mixed): boolean;
+declare function remove<C>(collection: C, key: $KeyOf<C>): C;
+declare function set<C, K: $KeyOf<C>, V: $ValOf<C, K>>(
+  collection: C,
+  key: K,
+  value: V
+): C;
+declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>, NSV>(
+  collection: C,
+  key: K,
+  notSetValue: NSV,
+  updater: ($ValOf<C, K> | NSV) => V
+): C;
+declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>>(
+  collection: C,
+  key: K,
+  updater: ($ValOf<C, K>) => V
+): C;
+
+declare function getIn<C>(collection: C, keyPath: [], notSetValue?: mixed): C;
+declare function getIn<C, K: $KeyOf<C>, NSV>(
+  collection: C,
+  keyPath: [K],
+  notSetValue: NSV
+): $ValOf<C, K> | NSV;
+declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, NSV>(
+  collection: C,
+  keyPath: [K, K2],
+  notSetValue: NSV
+): $ValOf<$ValOf<C, K>, K2> | NSV;
+declare function getIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3],
+  notSetValue: NSV
+): $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV;
+declare function getIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4],
+  notSetValue: NSV
+): $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV;
+declare function getIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4, K5],
+  notSetValue: NSV
+): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV;
+
+declare function hasIn(collection: Object, keyPath: Iterable<mixed>): boolean;
+
+declare function removeIn<C>(collection: C, keyPath: []): void;
+declare function removeIn<C, K: $KeyOf<C>>(collection: C, keyPath: [K]): C;
+declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>>(
+  collection: C,
+  keyPath: [K, K2]
+): C;
+declare function removeIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>
+>(
+  collection: C,
+  keyPath: [K, K2, K3]
+): C;
+declare function removeIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4]
+): C;
+declare function removeIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4, K5]
+): C;
+
+declare function setIn<S>(collection: Object, keyPath: [], value: S): S;
+declare function setIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(
+  collection: C,
+  keyPath: [K],
+  value: S
+): C;
+declare function setIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  S: $ValOf<$ValOf<C, K>, K2>
+>(
+  collection: C,
+  keyPath: [K, K2],
+  value: S
+): C;
+declare function setIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>
+>(
+  collection: C,
+  keyPath: [K, K2, K3],
+  value: S
+): C;
+declare function setIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4],
+  value: S
+): C;
+declare function setIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4, K5],
+  value: S
+): C;
+
+declare function updateIn<C, S>(
+  collection: C,
+  keyPath: [],
+  notSetValue: mixed,
+  updater: (value: C) => S
+): S;
+declare function updateIn<C, S>(
+  collection: C,
+  keyPath: [],
+  updater: (value: C) => S
+): S;
+declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>, NSV>(
+  collection: C,
+  keyPath: [K],
+  notSetValue: NSV,
+  updater: (value: $ValOf<C, K> | NSV) => S
+): C;
+declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(
+  collection: C,
+  keyPath: [K],
+  updater: (value: $ValOf<C, K>) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  S: $ValOf<$ValOf<C, K>, K2>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2],
+  notSetValue: NSV,
+  updater: (value: $ValOf<$ValOf<C, K>, K2> | NSV) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  S: $ValOf<$ValOf<C, K>, K2>
+>(
+  collection: C,
+  keyPath: [K, K2],
+  updater: (value: $ValOf<$ValOf<C, K>, K2>) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3],
+  notSetValue: NSV,
+  updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>
+>(
+  collection: C,
+  keyPath: [K, K2, K3],
+  updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4],
+  notSetValue: NSV,
+  updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4],
+  updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>,
+  NSV
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4, K5],
+  notSetValue: NSV,
+  updater: (
+    value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV
+  ) => S
+): C;
+declare function updateIn<
+  C,
+  K: $KeyOf<C>,
+  K2: $KeyOf<$ValOf<C, K>>,
+  K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
+  K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
+  K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
+  S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
+>(
+  collection: C,
+  keyPath: [K, K2, K3, K4, K5],
+  updater: (
+    value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
+  ) => S
+): C;
+
+declare function merge<C>(
+  collection: C,
+  ...collections: Array<
+    | $IterableOf<C>
+    | $Shape<RecordValues<C>>
+    | PlainObjInput<$KeyOf<C>, $ValOf<C>>
+  >
+): C;
+declare function mergeWith<C>(
+  merger: (oldVal: $ValOf<C>, newVal: $ValOf<C>, key: $KeyOf<C>) => $ValOf<C>,
+  collection: C,
+  ...collections: Array<
+    | $IterableOf<C>
+    | $Shape<RecordValues<C>>
+    | PlainObjInput<$KeyOf<C>, $ValOf<C>>
+  >
+): C;
+declare function mergeDeep<C>(
+  collection: C,
+  ...collections: Array<
+    | $IterableOf<C>
+    | $Shape<RecordValues<C>>
+    | PlainObjInput<$KeyOf<C>, $ValOf<C>>
+  >
+): C;
+declare function mergeDeepWith<C>(
+  merger: (oldVal: any, newVal: any, key: any) => mixed,
+  collection: C,
+  ...collections: Array<
+    | $IterableOf<C>
+    | $Shape<RecordValues<C>>
+    | PlainObjInput<$KeyOf<C>, $ValOf<C>>
+  >
+): C;
+
+export {
+  Collection,
+  Seq,
+  List,
+  Map,
+  OrderedMap,
+  OrderedSet,
+  Range,
+  Repeat,
+  Record,
+  Set,
+  Stack,
+  fromJS,
+  is,
+  hash,
+  isImmutable,
+  isCollection,
+  isKeyed,
+  isIndexed,
+  isAssociative,
+  isOrdered,
+  isRecord,
+  isValueObject,
+  get,
+  has,
+  remove,
+  set,
+  update,
+  getIn,
+  hasIn,
+  removeIn,
+  setIn,
+  updateIn,
+  merge,
+  mergeWith,
+  mergeDeep,
+  mergeDeepWith,
+};
+
+export default {
+  Collection,
+  Seq,
+
+  List,
+  Map,
+  OrderedMap,
+  OrderedSet,
+  PairSorting,
+  Range,
+  Repeat,
+  Record,
+  Set,
+  Stack,
+
+  fromJS,
+  is,
+  hash,
+
+  isImmutable,
+  isCollection,
+  isKeyed,
+  isIndexed,
+  isAssociative,
+  isOrdered,
+  isRecord,
+  isValueObject,
+
+  get,
+  has,
+  remove,
+  set,
+  update,
+  getIn,
+  hasIn,
+  removeIn,
+  setIn,
+  updateIn,
+  merge,
+  mergeWith,
+  mergeDeep,
+  mergeDeepWith,
+};
+
+export type {
+  Comparator,
+  KeyedCollection,
+  IndexedCollection,
+  SetCollection,
+  KeyedSeq,
+  IndexedSeq,
+  SetSeq,
+  RecordFactory,
+  RecordOf,
+  RecordInstance,
+  ValueObject,
+  $KeyOf,
+  $ValOf,
+};

File diff suppressed because it is too large
+ 23 - 0
node_modules/immutable/dist/immutable.min.js


+ 39 - 0
node_modules/immutable/package.json

@@ -0,0 +1,39 @@
+{
+  "name": "immutable",
+  "version": "4.3.4",
+  "description": "Immutable Data Collections",
+  "license": "MIT",
+  "homepage": "https://immutable-js.com",
+  "author": {
+    "name": "Lee Byron",
+    "url": "https://github.com/leebyron"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/immutable-js/immutable-js.git"
+  },
+  "bugs": {
+    "url": "https://github.com/immutable-js/immutable-js/issues"
+  },
+  "main": "dist/immutable.js",
+  "module": "dist/immutable.es.js",
+  "sideEffects": false,
+  "types": "dist/immutable.d.ts",
+  "files": [
+    "dist",
+    "README.md",
+    "LICENSE"
+  ],
+  "keywords": [
+    "immutable",
+    "persistent",
+    "lazy",
+    "data",
+    "datastructure",
+    "functional",
+    "collection",
+    "stateless",
+    "sequence",
+    "iteration"
+  ]
+}

+ 17 - 0
node_modules/is-binary-path/index.d.ts

@@ -0,0 +1,17 @@
+/**
+Check if a file path is a binary file.
+
+@example
+```
+import isBinaryPath = require('is-binary-path');
+
+isBinaryPath('source/unicorn.png');
+//=> true
+
+isBinaryPath('source/unicorn.txt');
+//=> false
+```
+*/
+declare function isBinaryPath(filePath: string): boolean;
+
+export = isBinaryPath;

+ 7 - 0
node_modules/is-binary-path/index.js

@@ -0,0 +1,7 @@
+'use strict';
+const path = require('path');
+const binaryExtensions = require('binary-extensions');
+
+const extensions = new Set(binaryExtensions);
+
+module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());

+ 9 - 0
node_modules/is-binary-path/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 40 - 0
node_modules/is-binary-path/package.json

@@ -0,0 +1,40 @@
+{
+	"name": "is-binary-path",
+	"version": "2.1.0",
+	"description": "Check if a file path is a binary file",
+	"license": "MIT",
+	"repository": "sindresorhus/is-binary-path",
+	"author": {
+		"name": "Sindre Sorhus",
+		"email": "sindresorhus@gmail.com",
+		"url": "sindresorhus.com"
+	},
+	"engines": {
+		"node": ">=8"
+	},
+	"scripts": {
+		"test": "xo && ava && tsd"
+	},
+	"files": [
+		"index.js",
+		"index.d.ts"
+	],
+	"keywords": [
+		"binary",
+		"extensions",
+		"extension",
+		"file",
+		"path",
+		"check",
+		"detect",
+		"is"
+	],
+	"dependencies": {
+		"binary-extensions": "^2.0.0"
+	},
+	"devDependencies": {
+		"ava": "^1.4.1",
+		"tsd": "^0.7.2",
+		"xo": "^0.24.0"
+	}
+}

+ 34 - 0
node_modules/is-binary-path/readme.md

@@ -0,0 +1,34 @@
+# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path)
+
+> Check if a file path is a binary file
+
+
+## Install
+
+```
+$ npm install is-binary-path
+```
+
+
+## Usage
+
+```js
+const isBinaryPath = require('is-binary-path');
+
+isBinaryPath('source/unicorn.png');
+//=> true
+
+isBinaryPath('source/unicorn.txt');
+//=> false
+```
+
+
+## Related
+
+- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
+- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com)

+ 21 - 0
node_modules/is-extglob/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2016, Jon Schlinkert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 107 - 0
node_modules/is-extglob/README.md

@@ -0,0 +1,107 @@
+# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob)
+
+> Returns true if a string has an extglob.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save is-extglob
+```
+
+## Usage
+
+```js
+var isExtglob = require('is-extglob');
+```
+
+**True**
+
+```js
+isExtglob('?(abc)');
+isExtglob('@(abc)');
+isExtglob('!(abc)');
+isExtglob('*(abc)');
+isExtglob('+(abc)');
+```
+
+**False**
+
+Escaped extglobs:
+
+```js
+isExtglob('\\?(abc)');
+isExtglob('\\@(abc)');
+isExtglob('\\!(abc)');
+isExtglob('\\*(abc)');
+isExtglob('\\+(abc)');
+```
+
+Everything else...
+
+```js
+isExtglob('foo.js');
+isExtglob('!foo.js');
+isExtglob('*.js');
+isExtglob('**/abc.js');
+isExtglob('abc/*.js');
+isExtglob('abc/(aaa|bbb).js');
+isExtglob('abc/[a-z].js');
+isExtglob('abc/{a,b}.js');
+isExtglob('abc/?.js');
+isExtglob('abc.js');
+isExtglob('abc/def/ghi.js');
+```
+
+## History
+
+**v2.0**
+
+Adds support for escaping. Escaped exglobs no longer return true.
+
+## About
+
+### Related projects
+
+* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.")
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
+* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._

+ 20 - 0
node_modules/is-extglob/index.js

@@ -0,0 +1,20 @@
+/*!
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
+ *
+ * Copyright (c) 2014-2016, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+module.exports = function isExtglob(str) {
+  if (typeof str !== 'string' || str === '') {
+    return false;
+  }
+
+  var match;
+  while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
+    if (match[2]) return true;
+    str = str.slice(match.index + match[0].length);
+  }
+
+  return false;
+};

+ 69 - 0
node_modules/is-extglob/package.json

@@ -0,0 +1,69 @@
+{
+  "name": "is-extglob",
+  "description": "Returns true if a string has an extglob.",
+  "version": "2.1.1",
+  "homepage": "https://github.com/jonschlinkert/is-extglob",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "repository": "jonschlinkert/is-extglob",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/is-extglob/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.10",
+    "mocha": "^3.0.2"
+  },
+  "keywords": [
+    "bash",
+    "braces",
+    "check",
+    "exec",
+    "expression",
+    "extglob",
+    "glob",
+    "globbing",
+    "globstar",
+    "is",
+    "match",
+    "matches",
+    "pattern",
+    "regex",
+    "regular",
+    "string",
+    "test"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "list": [
+        "has-glob",
+        "is-glob",
+        "micromatch"
+      ]
+    },
+    "reflinks": [
+      "verb",
+      "verb-generate-readme"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}

+ 21 - 0
node_modules/is-glob/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2017, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 206 - 0
node_modules/is-glob/README.md

@@ -0,0 +1,206 @@
+# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions)
+
+> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save is-glob
+```
+
+You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
+
+## Usage
+
+```js
+var isGlob = require('is-glob');
+```
+
+### Default behavior
+
+**True**
+
+Patterns that have glob characters or regex patterns will return `true`:
+
+```js
+isGlob('!foo.js');
+isGlob('*.js');
+isGlob('**/abc.js');
+isGlob('abc/*.js');
+isGlob('abc/(aaa|bbb).js');
+isGlob('abc/[a-z].js');
+isGlob('abc/{a,b}.js');
+//=> true
+```
+
+Extglobs
+
+```js
+isGlob('abc/@(a).js');
+isGlob('abc/!(a).js');
+isGlob('abc/+(a).js');
+isGlob('abc/*(a).js');
+isGlob('abc/?(a).js');
+//=> true
+```
+
+**False**
+
+Escaped globs or extglobs return `false`:
+
+```js
+isGlob('abc/\\@(a).js');
+isGlob('abc/\\!(a).js');
+isGlob('abc/\\+(a).js');
+isGlob('abc/\\*(a).js');
+isGlob('abc/\\?(a).js');
+isGlob('\\!foo.js');
+isGlob('\\*.js');
+isGlob('\\*\\*/abc.js');
+isGlob('abc/\\*.js');
+isGlob('abc/\\(aaa|bbb).js');
+isGlob('abc/\\[a-z].js');
+isGlob('abc/\\{a,b}.js');
+//=> false
+```
+
+Patterns that do not have glob patterns return `false`:
+
+```js
+isGlob('abc.js');
+isGlob('abc/def/ghi.js');
+isGlob('foo.js');
+isGlob('abc/@.js');
+isGlob('abc/+.js');
+isGlob('abc/?.js');
+isGlob();
+isGlob(null);
+//=> false
+```
+
+Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
+
+```js
+isGlob(['**/*.js']);
+isGlob(['foo.js']);
+//=> false
+```
+
+### Option strict
+
+When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that
+some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not.
+
+**True**
+
+Patterns that have glob characters or regex patterns will return `true`:
+
+```js
+isGlob('!foo.js', {strict: false});
+isGlob('*.js', {strict: false});
+isGlob('**/abc.js', {strict: false});
+isGlob('abc/*.js', {strict: false});
+isGlob('abc/(aaa|bbb).js', {strict: false});
+isGlob('abc/[a-z].js', {strict: false});
+isGlob('abc/{a,b}.js', {strict: false});
+//=> true
+```
+
+Extglobs
+
+```js
+isGlob('abc/@(a).js', {strict: false});
+isGlob('abc/!(a).js', {strict: false});
+isGlob('abc/+(a).js', {strict: false});
+isGlob('abc/*(a).js', {strict: false});
+isGlob('abc/?(a).js', {strict: false});
+//=> true
+```
+
+**False**
+
+Escaped globs or extglobs return `false`:
+
+```js
+isGlob('\\!foo.js', {strict: false});
+isGlob('\\*.js', {strict: false});
+isGlob('\\*\\*/abc.js', {strict: false});
+isGlob('abc/\\*.js', {strict: false});
+isGlob('abc/\\(aaa|bbb).js', {strict: false});
+isGlob('abc/\\[a-z].js', {strict: false});
+isGlob('abc/\\{a,b}.js', {strict: false});
+//=> false
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Related projects
+
+You might also be interested in these projects:
+
+* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")
+* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks")
+* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.")
+* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.")
+
+### Contributors
+
+| **Commits** | **Contributor** |  
+| --- | --- |  
+| 47 | [jonschlinkert](https://github.com/jonschlinkert) |  
+| 5  | [doowb](https://github.com/doowb) |  
+| 1  | [phated](https://github.com/phated) |  
+| 1  | [danhper](https://github.com/danhper) |  
+| 1  | [paulmillr](https://github.com/paulmillr) |  
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+### License
+
+Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._

+ 150 - 0
node_modules/is-glob/index.js

@@ -0,0 +1,150 @@
+/*!
+ * is-glob <https://github.com/jonschlinkert/is-glob>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+var isExtglob = require('is-extglob');
+var chars = { '{': '}', '(': ')', '[': ']'};
+var strictCheck = function(str) {
+  if (str[0] === '!') {
+    return true;
+  }
+  var index = 0;
+  var pipeIndex = -2;
+  var closeSquareIndex = -2;
+  var closeCurlyIndex = -2;
+  var closeParenIndex = -2;
+  var backSlashIndex = -2;
+  while (index < str.length) {
+    if (str[index] === '*') {
+      return true;
+    }
+
+    if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
+      return true;
+    }
+
+    if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
+      if (closeSquareIndex < index) {
+        closeSquareIndex = str.indexOf(']', index);
+      }
+      if (closeSquareIndex > index) {
+        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+          return true;
+        }
+        backSlashIndex = str.indexOf('\\', index);
+        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+          return true;
+        }
+      }
+    }
+
+    if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
+      closeCurlyIndex = str.indexOf('}', index);
+      if (closeCurlyIndex > index) {
+        backSlashIndex = str.indexOf('\\', index);
+        if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
+          return true;
+        }
+      }
+    }
+
+    if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
+      closeParenIndex = str.indexOf(')', index);
+      if (closeParenIndex > index) {
+        backSlashIndex = str.indexOf('\\', index);
+        if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+          return true;
+        }
+      }
+    }
+
+    if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
+      if (pipeIndex < index) {
+        pipeIndex = str.indexOf('|', index);
+      }
+      if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
+        closeParenIndex = str.indexOf(')', pipeIndex);
+        if (closeParenIndex > pipeIndex) {
+          backSlashIndex = str.indexOf('\\', pipeIndex);
+          if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+            return true;
+          }
+        }
+      }
+    }
+
+    if (str[index] === '\\') {
+      var open = str[index + 1];
+      index += 2;
+      var close = chars[open];
+
+      if (close) {
+        var n = str.indexOf(close, index);
+        if (n !== -1) {
+          index = n + 1;
+        }
+      }
+
+      if (str[index] === '!') {
+        return true;
+      }
+    } else {
+      index++;
+    }
+  }
+  return false;
+};
+
+var relaxedCheck = function(str) {
+  if (str[0] === '!') {
+    return true;
+  }
+  var index = 0;
+  while (index < str.length) {
+    if (/[*?{}()[\]]/.test(str[index])) {
+      return true;
+    }
+
+    if (str[index] === '\\') {
+      var open = str[index + 1];
+      index += 2;
+      var close = chars[open];
+
+      if (close) {
+        var n = str.indexOf(close, index);
+        if (n !== -1) {
+          index = n + 1;
+        }
+      }
+
+      if (str[index] === '!') {
+        return true;
+      }
+    } else {
+      index++;
+    }
+  }
+  return false;
+};
+
+module.exports = function isGlob(str, options) {
+  if (typeof str !== 'string' || str === '') {
+    return false;
+  }
+
+  if (isExtglob(str)) {
+    return true;
+  }
+
+  var check = strictCheck;
+
+  // optionally relax check
+  if (options && options.strict === false) {
+    check = relaxedCheck;
+  }
+
+  return check(str);
+};

+ 81 - 0
node_modules/is-glob/package.json

@@ -0,0 +1,81 @@
+{
+  "name": "is-glob",
+  "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
+  "version": "4.0.3",
+  "homepage": "https://github.com/micromatch/is-glob",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Brian Woodward (https://twitter.com/doowb)",
+    "Daniel Perez (https://tuvistavie.com)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)"
+  ],
+  "repository": "micromatch/is-glob",
+  "bugs": {
+    "url": "https://github.com/micromatch/is-glob/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha && node benchmark.js"
+  },
+  "dependencies": {
+    "is-extglob": "^2.1.1"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.10",
+    "mocha": "^3.0.2"
+  },
+  "keywords": [
+    "bash",
+    "braces",
+    "check",
+    "exec",
+    "expression",
+    "extglob",
+    "glob",
+    "globbing",
+    "globstar",
+    "is",
+    "match",
+    "matches",
+    "pattern",
+    "regex",
+    "regular",
+    "string",
+    "test"
+  ],
+  "verb": {
+    "layout": "default",
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "list": [
+        "assemble",
+        "base",
+        "update",
+        "verb"
+      ]
+    },
+    "reflinks": [
+      "assemble",
+      "bach",
+      "base",
+      "composer",
+      "gulp",
+      "has-glob",
+      "is-valid-glob",
+      "micromatch",
+      "npm",
+      "scaffold",
+      "verb",
+      "vinyl"
+    ]
+  }
+}

+ 21 - 0
node_modules/is-number/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-present, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 187 - 0
node_modules/is-number/README.md

@@ -0,0 +1,187 @@
+# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number)
+
+> Returns true if the value is a finite number.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save is-number
+```
+
+## Why is this needed?
+
+In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results:
+
+```js
+console.log(+[]); //=> 0
+console.log(+''); //=> 0
+console.log(+'   '); //=> 0
+console.log(typeof NaN); //=> 'number'
+```
+
+This library offers a performant way to smooth out edge cases like these.
+
+## Usage
+
+```js
+const isNumber = require('is-number');
+```
+
+See the [tests](./test.js) for more examples.
+
+### true
+
+```js
+isNumber(5e3);               // true
+isNumber(0xff);              // true
+isNumber(-1.1);              // true
+isNumber(0);                 // true
+isNumber(1);                 // true
+isNumber(1.1);               // true
+isNumber(10);                // true
+isNumber(10.10);             // true
+isNumber(100);               // true
+isNumber('-1.1');            // true
+isNumber('0');               // true
+isNumber('012');             // true
+isNumber('0xff');            // true
+isNumber('1');               // true
+isNumber('1.1');             // true
+isNumber('10');              // true
+isNumber('10.10');           // true
+isNumber('100');             // true
+isNumber('5e3');             // true
+isNumber(parseInt('012'));   // true
+isNumber(parseFloat('012')); // true
+```
+
+### False
+
+Everything else is false, as you would expect:
+
+```js
+isNumber(Infinity);          // false
+isNumber(NaN);               // false
+isNumber(null);              // false
+isNumber(undefined);         // false
+isNumber('');                // false
+isNumber('   ');             // false
+isNumber('foo');             // false
+isNumber([1]);               // false
+isNumber([]);                // false
+isNumber(function () {});    // false
+isNumber({});                // false
+```
+
+## Release history
+
+### 7.0.0
+
+* Refactor. Now uses `.isFinite` if it exists.
+* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number.
+
+### 6.0.0
+
+* Optimizations, thanks to @benaadams.
+
+### 5.0.0
+
+**Breaking changes**
+
+* removed support for `instanceof Number` and `instanceof String`
+
+## Benchmarks
+
+As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail.
+
+```
+# all
+v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled)
+v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled)
+parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled)
+fastest is 'v7.0'
+
+# string
+v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled)
+v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled)
+parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled)
+fastest is 'parseFloat,v7.0'
+
+# number
+v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled)
+v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled)
+parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled)
+fastest is 'v6.0'
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Related projects
+
+You might also be interested in these projects:
+
+* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
+* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive.  | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
+* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
+* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
+
+### Contributors
+
+| **Commits** | **Contributor** | 
+| --- | --- |
+| 49 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 5 | [charlike-old](https://github.com/charlike-old) |
+| 1 | [benaadams](https://github.com/benaadams) |
+| 1 | [realityking](https://github.com/realityking) |
+
+### Author
+
+**Jon Schlinkert**
+
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._

+ 18 - 0
node_modules/is-number/index.js

@@ -0,0 +1,18 @@
+/*!
+ * is-number <https://github.com/jonschlinkert/is-number>
+ *
+ * Copyright (c) 2014-present, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+module.exports = function(num) {
+  if (typeof num === 'number') {
+    return num - num === 0;
+  }
+  if (typeof num === 'string' && num.trim() !== '') {
+    return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
+  }
+  return false;
+};

+ 82 - 0
node_modules/is-number/package.json

@@ -0,0 +1,82 @@
+{
+  "name": "is-number",
+  "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.",
+  "version": "7.0.0",
+  "homepage": "https://github.com/jonschlinkert/is-number",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+    "Olsten Larck (https://i.am.charlike.online)",
+    "Rouven Weßling (www.rouvenwessling.de)"
+  ],
+  "repository": "jonschlinkert/is-number",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/is-number/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.12.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "devDependencies": {
+    "ansi": "^0.3.1",
+    "benchmark": "^2.1.4",
+    "gulp-format-md": "^1.0.0",
+    "mocha": "^3.5.3"
+  },
+  "keywords": [
+    "cast",
+    "check",
+    "coerce",
+    "coercion",
+    "finite",
+    "integer",
+    "is",
+    "isnan",
+    "is-nan",
+    "is-num",
+    "is-number",
+    "isnumber",
+    "isfinite",
+    "istype",
+    "kind",
+    "math",
+    "nan",
+    "num",
+    "number",
+    "numeric",
+    "parseFloat",
+    "parseInt",
+    "test",
+    "type",
+    "typeof",
+    "value"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "related": {
+      "list": [
+        "is-plain-object",
+        "is-primitive",
+        "isobject",
+        "kind-of"
+      ]
+    },
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}

+ 21 - 0
node_modules/normalize-path/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2018, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 127 - 0
node_modules/normalize-path/README.md

@@ -0,0 +1,127 @@
+# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
+
+> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save normalize-path
+```
+
+## Usage
+
+```js
+const normalize = require('normalize-path');
+
+console.log(normalize('\\foo\\bar\\baz\\')); 
+//=> '/foo/bar/baz'
+```
+
+**win32 namespaces**
+
+```js
+console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); 
+//=> '//?/UNC/Server01/user/docs/Letter.txt'
+
+console.log(normalize('\\\\.\\CdRomX')); 
+//=> '//./CdRomX'
+```
+
+**Consecutive slashes**
+
+Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash.
+
+```js
+console.log(normalize('.//foo//bar///////baz/')); 
+//=> './foo/bar/baz'
+```
+
+### Trailing slashes
+
+By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_:
+
+```js
+console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/'
+console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/'
+```
+
+## Release history
+
+### v3.0
+
+No breaking changes in this release.
+
+* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library.
+* a minor optimization was made to simplify how the trailing separator was handled
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Related projects
+
+Other useful path-related libraries:
+
+* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
+* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.")
+* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
+* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
+* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
+* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
+
+### Contributors
+
+| **Commits** | **Contributor** | 
+| --- | --- |
+| 35 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [phated](https://github.com/phated) |
+
+### Author
+
+**Jon Schlinkert**
+
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._

+ 35 - 0
node_modules/normalize-path/index.js

@@ -0,0 +1,35 @@
+/*!
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
+ *
+ * Copyright (c) 2014-2018, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+module.exports = function(path, stripTrailing) {
+  if (typeof path !== 'string') {
+    throw new TypeError('expected path to be a string');
+  }
+
+  if (path === '\\' || path === '/') return '/';
+
+  var len = path.length;
+  if (len <= 1) return path;
+
+  // ensure that win32 namespaces has two leading slashes, so that the path is
+  // handled properly by the win32 version of path.parse() after being normalized
+  // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
+  var prefix = '';
+  if (len > 4 && path[3] === '\\') {
+    var ch = path[2];
+    if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
+      path = path.slice(2);
+      prefix = '//';
+    }
+  }
+
+  var segs = path.split(/[/\\]+/);
+  if (stripTrailing !== false && segs[segs.length - 1] === '') {
+    segs.pop();
+  }
+  return prefix + segs.join('/');
+};

+ 77 - 0
node_modules/normalize-path/package.json

@@ -0,0 +1,77 @@
+{
+  "name": "normalize-path",
+  "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.",
+  "version": "3.0.0",
+  "homepage": "https://github.com/jonschlinkert/normalize-path",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Blaine Bublitz (https://twitter.com/BlaineBublitz)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)"
+  ],
+  "repository": "jonschlinkert/normalize-path",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/normalize-path/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^1.0.0",
+    "minimist": "^1.2.0",
+    "mocha": "^3.5.3"
+  },
+  "keywords": [
+    "absolute",
+    "backslash",
+    "delimiter",
+    "file",
+    "file-path",
+    "filepath",
+    "fix",
+    "forward",
+    "fp",
+    "fs",
+    "normalize",
+    "path",
+    "relative",
+    "separator",
+    "slash",
+    "slashes",
+    "trailing",
+    "unix",
+    "urix"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "description": "Other useful path-related libraries:",
+      "list": [
+        "contains-path",
+        "is-absolute",
+        "is-relative",
+        "parse-filepath",
+        "path-ends-with",
+        "path-ends-with",
+        "unixify"
+      ]
+    },
+    "lint": {
+      "reflinks": true
+    }
+  }
+}

+ 136 - 0
node_modules/picomatch/CHANGELOG.md

@@ -0,0 +1,136 @@
+# Release history
+
+**All notable changes to this project will be documented in this file.**
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+<details>
+  <summary><strong>Guiding Principles</strong></summary>
+
+- Changelogs are for humans, not machines.
+- There should be an entry for every single version.
+- The same types of changes should be grouped.
+- Versions and sections should be linkable.
+- The latest version comes first.
+- The release date of each versions is displayed.
+- Mention whether you follow Semantic Versioning.
+
+</details>
+
+<details>
+  <summary><strong>Types of changes</strong></summary>
+
+Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
+
+- `Added` for new features.
+- `Changed` for changes in existing functionality.
+- `Deprecated` for soon-to-be removed features.
+- `Removed` for now removed features.
+- `Fixed` for any bug fixes.
+- `Security` in case of vulnerabilities.
+
+</details>
+
+## 2.3.1 (2022-01-02)
+
+### Fixed
+
+* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)).
+
+### Changed
+
+* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)).
+
+## 2.3.0 (2021-05-21)
+
+### Fixed
+
+* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef))
+
+## 2.2.3 (2021-04-10)
+
+### Fixed
+
+* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)).
+* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)).
+
+## 2.2.2 (2020-03-21)
+
+### Fixed
+
+* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
+
+## 2.2.1 (2020-01-04)
+
+* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
+
+## 2.2.0 (2020-01-04)
+
+* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
+* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
+
+## 2.1.0 (2019-10-31)
+
+* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
+* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
+* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
+* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
+* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
+* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
+* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
+* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
+* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
+* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
+* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
+* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
+* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
+* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
+* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
+* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
+* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
+* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
+* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
+* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
+* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
+* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
+
+## 2.0.7 (2019-05-14)
+
+* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
+* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
+* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
+* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
+
+## 2.0.4 (2019-04-10)
+
+### Fixed
+
+- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
+- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
+
+## 2.0.0 (2019-04-10)
+
+### Added
+
+- Adds support for `options.onIgnore`. See the readme for details
+- Adds support for `options.onResult`. See the readme for details
+
+### Breaking changes
+
+- The unixify option was renamed to `windows`
+- caching and all related options and methods have been removed
+
+## 1.0.0 (2018-11-05)
+
+- adds `.onMatch` option
+- improvements to `.scan` method
+- numerous improvements and optimizations for matching and parsing
+- better windows path handling
+
+## 0.1.0 - 2017-04-13
+
+First release.
+
+
+[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog

+ 21 - 0
node_modules/picomatch/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017-present, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 708 - 0
node_modules/picomatch/README.md

@@ -0,0 +1,708 @@
+<h1 align="center">Picomatch</h1>
+
+<p align="center">
+<a href="https://npmjs.org/package/picomatch">
+<img src="https://img.shields.io/npm/v/picomatch.svg" alt="version">
+</a>
+<a href="https://github.com/micromatch/picomatch/actions?workflow=Tests">
+<img src="https://github.com/micromatch/picomatch/workflows/Tests/badge.svg" alt="test status">
+</a>
+<a href="https://coveralls.io/github/micromatch/picomatch">
+<img src="https://img.shields.io/coveralls/github/micromatch/picomatch/master.svg" alt="coverage status">
+</a>
+<a href="https://npmjs.org/package/picomatch">
+<img src="https://img.shields.io/npm/dm/picomatch.svg" alt="downloads">
+</a>
+</p>
+
+<br>
+<br>
+
+<p align="center">
+<strong>Blazing fast and accurate glob matcher written in JavaScript.</strong></br>
+<em>No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.</em>
+</p>
+
+<br>
+<br>
+
+## Why picomatch?
+
+* **Lightweight** - No dependencies
+* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
+* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
+* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
+* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
+* **Well tested** - Thousands of unit tests
+
+See the [library comparison](#library-comparisons) to other libraries.
+
+<br>
+<br>
+
+## Table of Contents
+
+<details><summary> Click to expand </summary>
+
+- [Install](#install)
+- [Usage](#usage)
+- [API](#api)
+  * [picomatch](#picomatch)
+  * [.test](#test)
+  * [.matchBase](#matchbase)
+  * [.isMatch](#ismatch)
+  * [.parse](#parse)
+  * [.scan](#scan)
+  * [.compileRe](#compilere)
+  * [.makeRe](#makere)
+  * [.toRegex](#toregex)
+- [Options](#options)
+  * [Picomatch options](#picomatch-options)
+  * [Scan Options](#scan-options)
+  * [Options Examples](#options-examples)
+- [Globbing features](#globbing-features)
+  * [Basic globbing](#basic-globbing)
+  * [Advanced globbing](#advanced-globbing)
+  * [Braces](#braces)
+  * [Matching special characters as literals](#matching-special-characters-as-literals)
+- [Library Comparisons](#library-comparisons)
+- [Benchmarks](#benchmarks)
+- [Philosophies](#philosophies)
+- [About](#about)
+  * [Author](#author)
+  * [License](#license)
+
+_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
+
+</details>
+
+<br>
+<br>
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+npm install --save picomatch
+```
+
+<br>
+
+## Usage
+
+The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
+
+```js
+const pm = require('picomatch');
+const isMatch = pm('*.js');
+
+console.log(isMatch('abcd')); //=> false
+console.log(isMatch('a.js')); //=> true
+console.log(isMatch('a.md')); //=> false
+console.log(isMatch('a/b.js')); //=> false
+```
+
+<br>
+
+## API
+
+### [picomatch](lib/picomatch.js#L32)
+
+Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
+
+**Params**
+
+* `globs` **{String|Array}**: One or more glob patterns.
+* `options` **{Object=}**
+* `returns` **{Function=}**: Returns a matcher function.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch(glob[, options]);
+
+const isMatch = picomatch('*.!(*a)');
+console.log(isMatch('a.a')); //=> false
+console.log(isMatch('a.b')); //=> true
+```
+
+### [.test](lib/picomatch.js#L117)
+
+Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
+
+**Params**
+
+* `input` **{String}**: String to test.
+* `regex` **{RegExp}**
+* `returns` **{Object}**: Returns an object with matching info.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.test(input, regex[, options]);
+
+console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
+// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
+```
+
+### [.matchBase](lib/picomatch.js#L161)
+
+Match the basename of a filepath.
+
+**Params**
+
+* `input` **{String}**: String to test.
+* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
+* `returns` **{Boolean}**
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.matchBase(input, glob[, options]);
+console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+```
+
+### [.isMatch](lib/picomatch.js#L183)
+
+Returns true if **any** of the given glob `patterns` match the specified `string`.
+
+**Params**
+
+* **{String|Array}**: str The string to test.
+* **{String|Array}**: patterns One or more glob patterns to use for matching.
+* **{Object}**: See available [options](#options).
+* `returns` **{Boolean}**: Returns true if any patterns match `str`
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.isMatch(string, patterns[, options]);
+
+console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
+console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
+```
+
+### [.parse](lib/picomatch.js#L199)
+
+Parse a glob pattern to create the source string for a regular expression.
+
+**Params**
+
+* `pattern` **{String}**
+* `options` **{Object}**
+* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const result = picomatch.parse(pattern[, options]);
+```
+
+### [.scan](lib/picomatch.js#L231)
+
+Scan a glob pattern to separate the pattern into segments.
+
+**Params**
+
+* `input` **{String}**: Glob pattern to scan.
+* `options` **{Object}**
+* `returns` **{Object}**: Returns an object with
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.scan(input[, options]);
+
+const result = picomatch.scan('!./foo/*.js');
+console.log(result);
+{ prefix: '!./',
+  input: '!./foo/*.js',
+  start: 3,
+  base: 'foo',
+  glob: '*.js',
+  isBrace: false,
+  isBracket: false,
+  isGlob: true,
+  isExtglob: false,
+  isGlobstar: false,
+  negated: true }
+```
+
+### [.compileRe](lib/picomatch.js#L245)
+
+Compile a regular expression from the `state` object returned by the
+[parse()](#parse) method.
+
+**Params**
+
+* `state` **{Object}**
+* `options` **{Object}**
+* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
+* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
+* `returns` **{RegExp}**
+
+### [.makeRe](lib/picomatch.js#L286)
+
+Create a regular expression from a parsed glob pattern.
+
+**Params**
+
+* `state` **{String}**: The object returned from the `.parse` method.
+* `options` **{Object}**
+* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
+* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
+* `returns` **{RegExp}**: Returns a regex created from the given pattern.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const state = picomatch.parse('*.js');
+// picomatch.compileRe(state[, options]);
+
+console.log(picomatch.compileRe(state));
+//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+```
+
+### [.toRegex](lib/picomatch.js#L321)
+
+Create a regular expression from the given regex source string.
+
+**Params**
+
+* `source` **{String}**: Regular expression source string.
+* `options` **{Object}**
+* `returns` **{RegExp}**
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.toRegex(source[, options]);
+
+const { output } = picomatch.parse('*.js');
+console.log(picomatch.toRegex(output));
+//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+```
+
+<br>
+
+## Options
+
+### Picomatch options
+
+The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
+
+| **Option** | **Type** | **Default value** | **Description** |
+| --- | --- | --- | --- |
+| `basename`            | `boolean`      | `false`     | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes.  For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
+| `bash`                | `boolean`      | `false`     | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
+| `capture`             | `boolean`      | `undefined` | Return regex matches in supporting methods. |
+| `contains`            | `boolean`      | `undefined` | Allows glob to match any part of the given string(s). |
+| `cwd`                 | `string`       | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
+| `debug`               | `boolean`      | `undefined` | Debug regular expressions when an error is thrown. |
+| `dot`                 | `boolean`      | `false`     | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
+| `expandRange`         | `function`     | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
+| `failglob`            | `boolean`      | `false`     | Throws an error if no matches are found. Based on the bash option of the same name. |
+| `fastpaths`           | `boolean`      | `true`      | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
+| `flags`               | `string`      | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
+| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
+| `ignore`              | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
+| `keepQuotes`          | `boolean`      | `false`     | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes.  |
+| `literalBrackets`     | `boolean`      | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
+| `matchBase`           | `boolean`      | `false`     | Alias for `basename` |
+| `maxLength`           | `boolean`      | `65536`     | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
+| `nobrace`             | `boolean`      | `false`     | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
+| `nobracket`           | `boolean`      | `undefined` | Disable matching with regex brackets. |
+| `nocase`              | `boolean`      | `false`     | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
+| `nodupes`             | `boolean`      | `true`      | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
+| `noext`               | `boolean`      | `false`     | Alias for `noextglob` |
+| `noextglob`           | `boolean`      | `false`     | Disable support for matching with extglobs (like `+(a\|b)`) |
+| `noglobstar`          | `boolean`      | `false`     | Disable support for matching nested directories with globstars (`**`) |
+| `nonegate`            | `boolean`      | `false`     | Disable support for negating with leading `!` |
+| `noquantifiers`       | `boolean`      | `false`     | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
+| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
+| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
+| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
+| `posix`               | `boolean`      | `false`     | Support POSIX character classes ("posix brackets"). |
+| `posixSlashes`        | `boolean`      | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
+| `prepend`             | `boolean`      | `undefined` | String to prepend to the generated regex used for matching. |
+| `regex`               | `boolean`      | `false`     | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
+| `strictBrackets`      | `boolean`      | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
+| `strictSlashes`       | `boolean`      | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
+| `unescape`            | `boolean`      | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
+| `unixify`             | `boolean`      | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
+
+picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error.
+
+### Scan Options
+
+In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
+
+| **Option** | **Type** | **Default value** | **Description** |
+| --- | --- | --- | --- |
+| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
+| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const result = picomatch.scan('!./foo/*.js', { tokens: true });
+console.log(result);
+// {
+//   prefix: '!./',
+//   input: '!./foo/*.js',
+//   start: 3,
+//   base: 'foo',
+//   glob: '*.js',
+//   isBrace: false,
+//   isBracket: false,
+//   isGlob: true,
+//   isExtglob: false,
+//   isGlobstar: false,
+//   negated: true,
+//   maxDepth: 2,
+//   tokens: [
+//     { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
+//     { value: 'foo', depth: 1, isGlob: false },
+//     { value: '*.js', depth: 1, isGlob: true }
+//   ],
+//   slashes: [ 2, 6 ],
+//   parts: [ 'foo', '*.js' ]
+// }
+```
+
+<br>
+
+### Options Examples
+
+#### options.expandRange
+
+**Type**: `function`
+
+**Default**: `undefined`
+
+Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
+
+**Example**
+
+The following example shows how to create a glob that matches a folder
+
+```js
+const fill = require('fill-range');
+const regex = pm.makeRe('foo/{01..25}/bar', {
+  expandRange(a, b) {
+    return `(${fill(a, b, { toRegex: true })})`;
+  }
+});
+
+console.log(regex);
+//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
+
+console.log(regex.test('foo/00/bar'))  // false
+console.log(regex.test('foo/01/bar'))  // true
+console.log(regex.test('foo/10/bar')) // true
+console.log(regex.test('foo/22/bar')) // true
+console.log(regex.test('foo/25/bar')) // true
+console.log(regex.test('foo/26/bar')) // false
+```
+
+#### options.format
+
+**Type**: `function`
+
+**Default**: `undefined`
+
+Custom function for formatting strings before they're matched.
+
+**Example**
+
+```js
+// strip leading './' from strings
+const format = str => str.replace(/^\.\//, '');
+const isMatch = picomatch('foo/*.js', { format });
+console.log(isMatch('./foo/bar.js')); //=> true
+```
+
+#### options.onMatch
+
+```js
+const onMatch = ({ glob, regex, input, output }) => {
+  console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onMatch });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+#### options.onIgnore
+
+```js
+const onIgnore = ({ glob, regex, input, output }) => {
+  console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+#### options.onResult
+
+```js
+const onResult = ({ glob, regex, input, output }) => {
+  console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onResult, ignore: 'f*' });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+<br>
+<br>
+
+## Globbing features
+
+* [Basic globbing](#basic-globbing) (Wildcard matching)
+* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
+
+### Basic globbing
+
+| **Character** | **Description** |
+| --- | --- |
+| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
+| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
+| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots.  |
+| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
+
+#### Matching behavior vs. Bash
+
+Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
+
+* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
+* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
+
+<br>
+
+### Advanced globbing
+
+* [extglobs](#extglobs)
+* [POSIX brackets](#posix-brackets)
+* [Braces](#brace-expansion)
+
+#### Extglobs
+
+| **Pattern** | **Description** |
+| --- | --- |
+| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
+| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
+| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
+| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
+| `!(pattern)` | Match _anything but_ `pattern` |
+
+**Examples**
+
+```js
+const pm = require('picomatch');
+
+// *(pattern) matches ZERO or more of "pattern"
+console.log(pm.isMatch('a', 'a*(z)')); // true
+console.log(pm.isMatch('az', 'a*(z)')); // true
+console.log(pm.isMatch('azzz', 'a*(z)')); // true
+
+// +(pattern) matches ONE or more of "pattern"
+console.log(pm.isMatch('a', 'a*(z)')); // true
+console.log(pm.isMatch('az', 'a*(z)')); // true
+console.log(pm.isMatch('azzz', 'a*(z)')); // true
+
+// supports multiple extglobs
+console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
+
+// supports nested extglobs
+console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
+```
+
+#### POSIX brackets
+
+POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
+
+**Enable POSIX bracket support**
+
+```js
+console.log(pm.makeRe('[[:word:]]+', { posix: true }));
+//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
+```
+
+**Supported POSIX classes**
+
+The following named POSIX bracket expressions are supported:
+
+* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
+* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
+* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
+* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
+* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
+* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
+* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
+* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
+* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
+* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
+* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
+* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
+* `[:word:]` -  Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
+* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
+
+See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
+
+### Braces
+
+Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
+
+### Matching special characters as literals
+
+If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
+
+**Special Characters**
+
+Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
+
+To match any of the following characters as literals: `$^*+?()[]
+
+Examples:
+
+```js
+console.log(pm.makeRe('foo/bar \\(1\\)'));
+console.log(pm.makeRe('foo/bar \\(1\\)'));
+```
+
+<br>
+<br>
+
+## Library Comparisons
+
+The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
+
+| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
+| --- | --- | --- | --- | --- | --- | --- | --- |
+| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
+| Advancing globbing        | ✔ | ✔ | ✔ | - | - | - | - |
+| Brace _matching_          | ✔ | ✔ | ✔ | - | - | ✔ | - |
+| Brace _expansion_         | ✔ | ✔ | - | - | - | ✔ | - |
+| Extglobs                  | partial | ✔ | ✔ | - | ✔ | - | - |
+| Posix brackets            | - | ✔ | ✔ | - | - | - | ✔ |
+| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
+| File system operations    | - | - | - | - | - | - | - |
+
+<br>
+<br>
+
+## Benchmarks
+
+Performance comparison of picomatch and minimatch.
+
+```
+# .makeRe star
+  picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
+  minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
+
+# .makeRe star; dot=true
+  picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
+  minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
+
+# .makeRe globstar
+  picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
+  minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
+
+# .makeRe globstars
+  picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
+  minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
+
+# .makeRe with leading star
+  picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
+  minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
+
+# .makeRe - basic braces
+  picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
+  minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
+```
+
+<br>
+<br>
+
+## Philosophies
+
+The goal of this library is to be blazing fast, without compromising on accuracy.
+
+**Accuracy**
+
+The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
+
+Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
+
+**Performance**
+
+Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
+
+<br>
+<br>
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+### License
+
+Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).

+ 3 - 0
node_modules/picomatch/index.js

@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./lib/picomatch');

+ 179 - 0
node_modules/picomatch/lib/constants.js

@@ -0,0 +1,179 @@
+'use strict';
+
+const path = require('path');
+const WIN_SLASH = '\\\\/';
+const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+
+/**
+ * Posix glob regex
+ */
+
+const DOT_LITERAL = '\\.';
+const PLUS_LITERAL = '\\+';
+const QMARK_LITERAL = '\\?';
+const SLASH_LITERAL = '\\/';
+const ONE_CHAR = '(?=.)';
+const QMARK = '[^/]';
+const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
+const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
+const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
+const NO_DOT = `(?!${DOT_LITERAL})`;
+const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
+const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
+const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
+const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
+const STAR = `${QMARK}*?`;
+
+const POSIX_CHARS = {
+  DOT_LITERAL,
+  PLUS_LITERAL,
+  QMARK_LITERAL,
+  SLASH_LITERAL,
+  ONE_CHAR,
+  QMARK,
+  END_ANCHOR,
+  DOTS_SLASH,
+  NO_DOT,
+  NO_DOTS,
+  NO_DOT_SLASH,
+  NO_DOTS_SLASH,
+  QMARK_NO_DOT,
+  STAR,
+  START_ANCHOR
+};
+
+/**
+ * Windows glob regex
+ */
+
+const WINDOWS_CHARS = {
+  ...POSIX_CHARS,
+
+  SLASH_LITERAL: `[${WIN_SLASH}]`,
+  QMARK: WIN_NO_SLASH,
+  STAR: `${WIN_NO_SLASH}*?`,
+  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
+  NO_DOT: `(?!${DOT_LITERAL})`,
+  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
+  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
+  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
+  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
+};
+
+/**
+ * POSIX Bracket Regex
+ */
+
+const POSIX_REGEX_SOURCE = {
+  alnum: 'a-zA-Z0-9',
+  alpha: 'a-zA-Z',
+  ascii: '\\x00-\\x7F',
+  blank: ' \\t',
+  cntrl: '\\x00-\\x1F\\x7F',
+  digit: '0-9',
+  graph: '\\x21-\\x7E',
+  lower: 'a-z',
+  print: '\\x20-\\x7E ',
+  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
+  space: ' \\t\\r\\n\\v\\f',
+  upper: 'A-Z',
+  word: 'A-Za-z0-9_',
+  xdigit: 'A-Fa-f0-9'
+};
+
+module.exports = {
+  MAX_LENGTH: 1024 * 64,
+  POSIX_REGEX_SOURCE,
+
+  // regular expressions
+  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
+  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
+  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
+  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
+  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
+  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
+
+  // Replace globs with equivalent patterns to reduce parsing time.
+  REPLACEMENTS: {
+    '***': '*',
+    '**/**': '**',
+    '**/**/**': '**'
+  },
+
+  // Digits
+  CHAR_0: 48, /* 0 */
+  CHAR_9: 57, /* 9 */
+
+  // Alphabet chars.
+  CHAR_UPPERCASE_A: 65, /* A */
+  CHAR_LOWERCASE_A: 97, /* a */
+  CHAR_UPPERCASE_Z: 90, /* Z */
+  CHAR_LOWERCASE_Z: 122, /* z */
+
+  CHAR_LEFT_PARENTHESES: 40, /* ( */
+  CHAR_RIGHT_PARENTHESES: 41, /* ) */
+
+  CHAR_ASTERISK: 42, /* * */
+
+  // Non-alphabetic chars.
+  CHAR_AMPERSAND: 38, /* & */
+  CHAR_AT: 64, /* @ */
+  CHAR_BACKWARD_SLASH: 92, /* \ */
+  CHAR_CARRIAGE_RETURN: 13, /* \r */
+  CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
+  CHAR_COLON: 58, /* : */
+  CHAR_COMMA: 44, /* , */
+  CHAR_DOT: 46, /* . */
+  CHAR_DOUBLE_QUOTE: 34, /* " */
+  CHAR_EQUAL: 61, /* = */
+  CHAR_EXCLAMATION_MARK: 33, /* ! */
+  CHAR_FORM_FEED: 12, /* \f */
+  CHAR_FORWARD_SLASH: 47, /* / */
+  CHAR_GRAVE_ACCENT: 96, /* ` */
+  CHAR_HASH: 35, /* # */
+  CHAR_HYPHEN_MINUS: 45, /* - */
+  CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
+  CHAR_LEFT_CURLY_BRACE: 123, /* { */
+  CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
+  CHAR_LINE_FEED: 10, /* \n */
+  CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
+  CHAR_PERCENT: 37, /* % */
+  CHAR_PLUS: 43, /* + */
+  CHAR_QUESTION_MARK: 63, /* ? */
+  CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
+  CHAR_RIGHT_CURLY_BRACE: 125, /* } */
+  CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
+  CHAR_SEMICOLON: 59, /* ; */
+  CHAR_SINGLE_QUOTE: 39, /* ' */
+  CHAR_SPACE: 32, /*   */
+  CHAR_TAB: 9, /* \t */
+  CHAR_UNDERSCORE: 95, /* _ */
+  CHAR_VERTICAL_LINE: 124, /* | */
+  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
+
+  SEP: path.sep,
+
+  /**
+   * Create EXTGLOB_CHARS
+   */
+
+  extglobChars(chars) {
+    return {
+      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
+      '?': { type: 'qmark', open: '(?:', close: ')?' },
+      '+': { type: 'plus', open: '(?:', close: ')+' },
+      '*': { type: 'star', open: '(?:', close: ')*' },
+      '@': { type: 'at', open: '(?:', close: ')' }
+    };
+  },
+
+  /**
+   * Create GLOB_CHARS
+   */
+
+  globChars(win32) {
+    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
+  }
+};

+ 1091 - 0
node_modules/picomatch/lib/parse.js

@@ -0,0 +1,1091 @@
+'use strict';
+
+const constants = require('./constants');
+const utils = require('./utils');
+
+/**
+ * Constants
+ */
+
+const {
+  MAX_LENGTH,
+  POSIX_REGEX_SOURCE,
+  REGEX_NON_SPECIAL_CHARS,
+  REGEX_SPECIAL_CHARS_BACKREF,
+  REPLACEMENTS
+} = constants;
+
+/**
+ * Helpers
+ */
+
+const expandRange = (args, options) => {
+  if (typeof options.expandRange === 'function') {
+    return options.expandRange(...args, options);
+  }
+
+  args.sort();
+  const value = `[${args.join('-')}]`;
+
+  try {
+    /* eslint-disable-next-line no-new */
+    new RegExp(value);
+  } catch (ex) {
+    return args.map(v => utils.escapeRegex(v)).join('..');
+  }
+
+  return value;
+};
+
+/**
+ * Create the message for a syntax error
+ */
+
+const syntaxError = (type, char) => {
+  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
+};
+
+/**
+ * Parse the given input string.
+ * @param {String} input
+ * @param {Object} options
+ * @return {Object}
+ */
+
+const parse = (input, options) => {
+  if (typeof input !== 'string') {
+    throw new TypeError('Expected a string');
+  }
+
+  input = REPLACEMENTS[input] || input;
+
+  const opts = { ...options };
+  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+
+  let len = input.length;
+  if (len > max) {
+    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+  }
+
+  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
+  const tokens = [bos];
+
+  const capture = opts.capture ? '' : '?:';
+  const win32 = utils.isWindows(options);
+
+  // create constants based on platform, for windows or posix
+  const PLATFORM_CHARS = constants.globChars(win32);
+  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
+
+  const {
+    DOT_LITERAL,
+    PLUS_LITERAL,
+    SLASH_LITERAL,
+    ONE_CHAR,
+    DOTS_SLASH,
+    NO_DOT,
+    NO_DOT_SLASH,
+    NO_DOTS_SLASH,
+    QMARK,
+    QMARK_NO_DOT,
+    STAR,
+    START_ANCHOR
+  } = PLATFORM_CHARS;
+
+  const globstar = opts => {
+    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+  };
+
+  const nodot = opts.dot ? '' : NO_DOT;
+  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
+  let star = opts.bash === true ? globstar(opts) : STAR;
+
+  if (opts.capture) {
+    star = `(${star})`;
+  }
+
+  // minimatch options support
+  if (typeof opts.noext === 'boolean') {
+    opts.noextglob = opts.noext;
+  }
+
+  const state = {
+    input,
+    index: -1,
+    start: 0,
+    dot: opts.dot === true,
+    consumed: '',
+    output: '',
+    prefix: '',
+    backtrack: false,
+    negated: false,
+    brackets: 0,
+    braces: 0,
+    parens: 0,
+    quotes: 0,
+    globstar: false,
+    tokens
+  };
+
+  input = utils.removePrefix(input, state);
+  len = input.length;
+
+  const extglobs = [];
+  const braces = [];
+  const stack = [];
+  let prev = bos;
+  let value;
+
+  /**
+   * Tokenizing helpers
+   */
+
+  const eos = () => state.index === len - 1;
+  const peek = state.peek = (n = 1) => input[state.index + n];
+  const advance = state.advance = () => input[++state.index] || '';
+  const remaining = () => input.slice(state.index + 1);
+  const consume = (value = '', num = 0) => {
+    state.consumed += value;
+    state.index += num;
+  };
+
+  const append = token => {
+    state.output += token.output != null ? token.output : token.value;
+    consume(token.value);
+  };
+
+  const negate = () => {
+    let count = 1;
+
+    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
+      advance();
+      state.start++;
+      count++;
+    }
+
+    if (count % 2 === 0) {
+      return false;
+    }
+
+    state.negated = true;
+    state.start++;
+    return true;
+  };
+
+  const increment = type => {
+    state[type]++;
+    stack.push(type);
+  };
+
+  const decrement = type => {
+    state[type]--;
+    stack.pop();
+  };
+
+  /**
+   * Push tokens onto the tokens array. This helper speeds up
+   * tokenizing by 1) helping us avoid backtracking as much as possible,
+   * and 2) helping us avoid creating extra tokens when consecutive
+   * characters are plain text. This improves performance and simplifies
+   * lookbehinds.
+   */
+
+  const push = tok => {
+    if (prev.type === 'globstar') {
+      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
+      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
+
+      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
+        state.output = state.output.slice(0, -prev.output.length);
+        prev.type = 'star';
+        prev.value = '*';
+        prev.output = star;
+        state.output += prev.output;
+      }
+    }
+
+    if (extglobs.length && tok.type !== 'paren') {
+      extglobs[extglobs.length - 1].inner += tok.value;
+    }
+
+    if (tok.value || tok.output) append(tok);
+    if (prev && prev.type === 'text' && tok.type === 'text') {
+      prev.value += tok.value;
+      prev.output = (prev.output || '') + tok.value;
+      return;
+    }
+
+    tok.prev = prev;
+    tokens.push(tok);
+    prev = tok;
+  };
+
+  const extglobOpen = (type, value) => {
+    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
+
+    token.prev = prev;
+    token.parens = state.parens;
+    token.output = state.output;
+    const output = (opts.capture ? '(' : '') + token.open;
+
+    increment('parens');
+    push({ type, value, output: state.output ? '' : ONE_CHAR });
+    push({ type: 'paren', extglob: true, value: advance(), output });
+    extglobs.push(token);
+  };
+
+  const extglobClose = token => {
+    let output = token.close + (opts.capture ? ')' : '');
+    let rest;
+
+    if (token.type === 'negate') {
+      let extglobStar = star;
+
+      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
+        extglobStar = globstar(opts);
+      }
+
+      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
+        output = token.close = `)$))${extglobStar}`;
+      }
+
+      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
+        // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
+        // In this case, we need to parse the string and use it in the output of the original pattern.
+        // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
+        //
+        // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
+        const expression = parse(rest, { ...options, fastpaths: false }).output;
+
+        output = token.close = `)${expression})${extglobStar})`;
+      }
+
+      if (token.prev.type === 'bos') {
+        state.negatedExtglob = true;
+      }
+    }
+
+    push({ type: 'paren', extglob: true, value, output });
+    decrement('parens');
+  };
+
+  /**
+   * Fast paths
+   */
+
+  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
+    let backslashes = false;
+
+    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
+      if (first === '\\') {
+        backslashes = true;
+        return m;
+      }
+
+      if (first === '?') {
+        if (esc) {
+          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
+        }
+        if (index === 0) {
+          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
+        }
+        return QMARK.repeat(chars.length);
+      }
+
+      if (first === '.') {
+        return DOT_LITERAL.repeat(chars.length);
+      }
+
+      if (first === '*') {
+        if (esc) {
+          return esc + first + (rest ? star : '');
+        }
+        return star;
+      }
+      return esc ? m : `\\${m}`;
+    });
+
+    if (backslashes === true) {
+      if (opts.unescape === true) {
+        output = output.replace(/\\/g, '');
+      } else {
+        output = output.replace(/\\+/g, m => {
+          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
+        });
+      }
+    }
+
+    if (output === input && opts.contains === true) {
+      state.output = input;
+      return state;
+    }
+
+    state.output = utils.wrapOutput(output, state, options);
+    return state;
+  }
+
+  /**
+   * Tokenize input until we reach end-of-string
+   */
+
+  while (!eos()) {
+    value = advance();
+
+    if (value === '\u0000') {
+      continue;
+    }
+
+    /**
+     * Escaped characters
+     */
+
+    if (value === '\\') {
+      const next = peek();
+
+      if (next === '/' && opts.bash !== true) {
+        continue;
+      }
+
+      if (next === '.' || next === ';') {
+        continue;
+      }
+
+      if (!next) {
+        value += '\\';
+        push({ type: 'text', value });
+        continue;
+      }
+
+      // collapse slashes to reduce potential for exploits
+      const match = /^\\+/.exec(remaining());
+      let slashes = 0;
+
+      if (match && match[0].length > 2) {
+        slashes = match[0].length;
+        state.index += slashes;
+        if (slashes % 2 !== 0) {
+          value += '\\';
+        }
+      }
+
+      if (opts.unescape === true) {
+        value = advance();
+      } else {
+        value += advance();
+      }
+
+      if (state.brackets === 0) {
+        push({ type: 'text', value });
+        continue;
+      }
+    }
+
+    /**
+     * If we're inside a regex character class, continue
+     * until we reach the closing bracket.
+     */
+
+    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
+      if (opts.posix !== false && value === ':') {
+        const inner = prev.value.slice(1);
+        if (inner.includes('[')) {
+          prev.posix = true;
+
+          if (inner.includes(':')) {
+            const idx = prev.value.lastIndexOf('[');
+            const pre = prev.value.slice(0, idx);
+            const rest = prev.value.slice(idx + 2);
+            const posix = POSIX_REGEX_SOURCE[rest];
+            if (posix) {
+              prev.value = pre + posix;
+              state.backtrack = true;
+              advance();
+
+              if (!bos.output && tokens.indexOf(prev) === 1) {
+                bos.output = ONE_CHAR;
+              }
+              continue;
+            }
+          }
+        }
+      }
+
+      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
+        value = `\\${value}`;
+      }
+
+      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
+        value = `\\${value}`;
+      }
+
+      if (opts.posix === true && value === '!' && prev.value === '[') {
+        value = '^';
+      }
+
+      prev.value += value;
+      append({ value });
+      continue;
+    }
+
+    /**
+     * If we're inside a quoted string, continue
+     * until we reach the closing double quote.
+     */
+
+    if (state.quotes === 1 && value !== '"') {
+      value = utils.escapeRegex(value);
+      prev.value += value;
+      append({ value });
+      continue;
+    }
+
+    /**
+     * Double quotes
+     */
+
+    if (value === '"') {
+      state.quotes = state.quotes === 1 ? 0 : 1;
+      if (opts.keepQuotes === true) {
+        push({ type: 'text', value });
+      }
+      continue;
+    }
+
+    /**
+     * Parentheses
+     */
+
+    if (value === '(') {
+      increment('parens');
+      push({ type: 'paren', value });
+      continue;
+    }
+
+    if (value === ')') {
+      if (state.parens === 0 && opts.strictBrackets === true) {
+        throw new SyntaxError(syntaxError('opening', '('));
+      }
+
+      const extglob = extglobs[extglobs.length - 1];
+      if (extglob && state.parens === extglob.parens + 1) {
+        extglobClose(extglobs.pop());
+        continue;
+      }
+
+      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
+      decrement('parens');
+      continue;
+    }
+
+    /**
+     * Square brackets
+     */
+
+    if (value === '[') {
+      if (opts.nobracket === true || !remaining().includes(']')) {
+        if (opts.nobracket !== true && opts.strictBrackets === true) {
+          throw new SyntaxError(syntaxError('closing', ']'));
+        }
+
+        value = `\\${value}`;
+      } else {
+        increment('brackets');
+      }
+
+      push({ type: 'bracket', value });
+      continue;
+    }
+
+    if (value === ']') {
+      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
+        push({ type: 'text', value, output: `\\${value}` });
+        continue;
+      }
+
+      if (state.brackets === 0) {
+        if (opts.strictBrackets === true) {
+          throw new SyntaxError(syntaxError('opening', '['));
+        }
+
+        push({ type: 'text', value, output: `\\${value}` });
+        continue;
+      }
+
+      decrement('brackets');
+
+      const prevValue = prev.value.slice(1);
+      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
+        value = `/${value}`;
+      }
+
+      prev.value += value;
+      append({ value });
+
+      // when literal brackets are explicitly disabled
+      // assume we should match with a regex character class
+      if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
+        continue;
+      }
+
+      const escaped = utils.escapeRegex(prev.value);
+      state.output = state.output.slice(0, -prev.value.length);
+
+      // when literal brackets are explicitly enabled
+      // assume we should escape the brackets to match literal characters
+      if (opts.literalBrackets === true) {
+        state.output += escaped;
+        prev.value = escaped;
+        continue;
+      }
+
+      // when the user specifies nothing, try to match both
+      prev.value = `(${capture}${escaped}|${prev.value})`;
+      state.output += prev.value;
+      continue;
+    }
+
+    /**
+     * Braces
+     */
+
+    if (value === '{' && opts.nobrace !== true) {
+      increment('braces');
+
+      const open = {
+        type: 'brace',
+        value,
+        output: '(',
+        outputIndex: state.output.length,
+        tokensIndex: state.tokens.length
+      };
+
+      braces.push(open);
+      push(open);
+      continue;
+    }
+
+    if (value === '}') {
+      const brace = braces[braces.length - 1];
+
+      if (opts.nobrace === true || !brace) {
+        push({ type: 'text', value, output: value });
+        continue;
+      }
+
+      let output = ')';
+
+      if (brace.dots === true) {
+        const arr = tokens.slice();
+        const range = [];
+
+        for (let i = arr.length - 1; i >= 0; i--) {
+          tokens.pop();
+          if (arr[i].type === 'brace') {
+            break;
+          }
+          if (arr[i].type !== 'dots') {
+            range.unshift(arr[i].value);
+          }
+        }
+
+        output = expandRange(range, opts);
+        state.backtrack = true;
+      }
+
+      if (brace.comma !== true && brace.dots !== true) {
+        const out = state.output.slice(0, brace.outputIndex);
+        const toks = state.tokens.slice(brace.tokensIndex);
+        brace.value = brace.output = '\\{';
+        value = output = '\\}';
+        state.output = out;
+        for (const t of toks) {
+          state.output += (t.output || t.value);
+        }
+      }
+
+      push({ type: 'brace', value, output });
+      decrement('braces');
+      braces.pop();
+      continue;
+    }
+
+    /**
+     * Pipes
+     */
+
+    if (value === '|') {
+      if (extglobs.length > 0) {
+        extglobs[extglobs.length - 1].conditions++;
+      }
+      push({ type: 'text', value });
+      continue;
+    }
+
+    /**
+     * Commas
+     */
+
+    if (value === ',') {
+      let output = value;
+
+      const brace = braces[braces.length - 1];
+      if (brace && stack[stack.length - 1] === 'braces') {
+        brace.comma = true;
+        output = '|';
+      }
+
+      push({ type: 'comma', value, output });
+      continue;
+    }
+
+    /**
+     * Slashes
+     */
+
+    if (value === '/') {
+      // if the beginning of the glob is "./", advance the start
+      // to the current index, and don't add the "./" characters
+      // to the state. This greatly simplifies lookbehinds when
+      // checking for BOS characters like "!" and "." (not "./")
+      if (prev.type === 'dot' && state.index === state.start + 1) {
+        state.start = state.index + 1;
+        state.consumed = '';
+        state.output = '';
+        tokens.pop();
+        prev = bos; // reset "prev" to the first token
+        continue;
+      }
+
+      push({ type: 'slash', value, output: SLASH_LITERAL });
+      continue;
+    }
+
+    /**
+     * Dots
+     */
+
+    if (value === '.') {
+      if (state.braces > 0 && prev.type === 'dot') {
+        if (prev.value === '.') prev.output = DOT_LITERAL;
+        const brace = braces[braces.length - 1];
+        prev.type = 'dots';
+        prev.output += value;
+        prev.value += value;
+        brace.dots = true;
+        continue;
+      }
+
+      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
+        push({ type: 'text', value, output: DOT_LITERAL });
+        continue;
+      }
+
+      push({ type: 'dot', value, output: DOT_LITERAL });
+      continue;
+    }
+
+    /**
+     * Question marks
+     */
+
+    if (value === '?') {
+      const isGroup = prev && prev.value === '(';
+      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+        extglobOpen('qmark', value);
+        continue;
+      }
+
+      if (prev && prev.type === 'paren') {
+        const next = peek();
+        let output = value;
+
+        if (next === '<' && !utils.supportsLookbehinds()) {
+          throw new Error('Node.js v10 or higher is required for regex lookbehinds');
+        }
+
+        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
+          output = `\\${value}`;
+        }
+
+        push({ type: 'text', value, output });
+        continue;
+      }
+
+      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
+        push({ type: 'qmark', value, output: QMARK_NO_DOT });
+        continue;
+      }
+
+      push({ type: 'qmark', value, output: QMARK });
+      continue;
+    }
+
+    /**
+     * Exclamation
+     */
+
+    if (value === '!') {
+      if (opts.noextglob !== true && peek() === '(') {
+        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
+          extglobOpen('negate', value);
+          continue;
+        }
+      }
+
+      if (opts.nonegate !== true && state.index === 0) {
+        negate();
+        continue;
+      }
+    }
+
+    /**
+     * Plus
+     */
+
+    if (value === '+') {
+      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+        extglobOpen('plus', value);
+        continue;
+      }
+
+      if ((prev && prev.value === '(') || opts.regex === false) {
+        push({ type: 'plus', value, output: PLUS_LITERAL });
+        continue;
+      }
+
+      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
+        push({ type: 'plus', value });
+        continue;
+      }
+
+      push({ type: 'plus', value: PLUS_LITERAL });
+      continue;
+    }
+
+    /**
+     * Plain text
+     */
+
+    if (value === '@') {
+      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+        push({ type: 'at', extglob: true, value, output: '' });
+        continue;
+      }
+
+      push({ type: 'text', value });
+      continue;
+    }
+
+    /**
+     * Plain text
+     */
+
+    if (value !== '*') {
+      if (value === '$' || value === '^') {
+        value = `\\${value}`;
+      }
+
+      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
+      if (match) {
+        value += match[0];
+        state.index += match[0].length;
+      }
+
+      push({ type: 'text', value });
+      continue;
+    }
+
+    /**
+     * Stars
+     */
+
+    if (prev && (prev.type === 'globstar' || prev.star === true)) {
+      prev.type = 'star';
+      prev.star = true;
+      prev.value += value;
+      prev.output = star;
+      state.backtrack = true;
+      state.globstar = true;
+      consume(value);
+      continue;
+    }
+
+    let rest = remaining();
+    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
+      extglobOpen('star', value);
+      continue;
+    }
+
+    if (prev.type === 'star') {
+      if (opts.noglobstar === true) {
+        consume(value);
+        continue;
+      }
+
+      const prior = prev.prev;
+      const before = prior.prev;
+      const isStart = prior.type === 'slash' || prior.type === 'bos';
+      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
+
+      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
+        push({ type: 'star', value, output: '' });
+        continue;
+      }
+
+      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
+      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
+      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
+        push({ type: 'star', value, output: '' });
+        continue;
+      }
+
+      // strip consecutive `/**/`
+      while (rest.slice(0, 3) === '/**') {
+        const after = input[state.index + 4];
+        if (after && after !== '/') {
+          break;
+        }
+        rest = rest.slice(3);
+        consume('/**', 3);
+      }
+
+      if (prior.type === 'bos' && eos()) {
+        prev.type = 'globstar';
+        prev.value += value;
+        prev.output = globstar(opts);
+        state.output = prev.output;
+        state.globstar = true;
+        consume(value);
+        continue;
+      }
+
+      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
+        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+        prior.output = `(?:${prior.output}`;
+
+        prev.type = 'globstar';
+        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
+        prev.value += value;
+        state.globstar = true;
+        state.output += prior.output + prev.output;
+        consume(value);
+        continue;
+      }
+
+      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
+        const end = rest[1] !== void 0 ? '|$' : '';
+
+        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+        prior.output = `(?:${prior.output}`;
+
+        prev.type = 'globstar';
+        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
+        prev.value += value;
+
+        state.output += prior.output + prev.output;
+        state.globstar = true;
+
+        consume(value + advance());
+
+        push({ type: 'slash', value: '/', output: '' });
+        continue;
+      }
+
+      if (prior.type === 'bos' && rest[0] === '/') {
+        prev.type = 'globstar';
+        prev.value += value;
+        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
+        state.output = prev.output;
+        state.globstar = true;
+        consume(value + advance());
+        push({ type: 'slash', value: '/', output: '' });
+        continue;
+      }
+
+      // remove single star from output
+      state.output = state.output.slice(0, -prev.output.length);
+
+      // reset previous token to globstar
+      prev.type = 'globstar';
+      prev.output = globstar(opts);
+      prev.value += value;
+
+      // reset output with globstar
+      state.output += prev.output;
+      state.globstar = true;
+      consume(value);
+      continue;
+    }
+
+    const token = { type: 'star', value, output: star };
+
+    if (opts.bash === true) {
+      token.output = '.*?';
+      if (prev.type === 'bos' || prev.type === 'slash') {
+        token.output = nodot + token.output;
+      }
+      push(token);
+      continue;
+    }
+
+    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
+      token.output = value;
+      push(token);
+      continue;
+    }
+
+    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
+      if (prev.type === 'dot') {
+        state.output += NO_DOT_SLASH;
+        prev.output += NO_DOT_SLASH;
+
+      } else if (opts.dot === true) {
+        state.output += NO_DOTS_SLASH;
+        prev.output += NO_DOTS_SLASH;
+
+      } else {
+        state.output += nodot;
+        prev.output += nodot;
+      }
+
+      if (peek() !== '*') {
+        state.output += ONE_CHAR;
+        prev.output += ONE_CHAR;
+      }
+    }
+
+    push(token);
+  }
+
+  while (state.brackets > 0) {
+    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
+    state.output = utils.escapeLast(state.output, '[');
+    decrement('brackets');
+  }
+
+  while (state.parens > 0) {
+    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
+    state.output = utils.escapeLast(state.output, '(');
+    decrement('parens');
+  }
+
+  while (state.braces > 0) {
+    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
+    state.output = utils.escapeLast(state.output, '{');
+    decrement('braces');
+  }
+
+  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
+    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
+  }
+
+  // rebuild the output if we had to backtrack at any point
+  if (state.backtrack === true) {
+    state.output = '';
+
+    for (const token of state.tokens) {
+      state.output += token.output != null ? token.output : token.value;
+
+      if (token.suffix) {
+        state.output += token.suffix;
+      }
+    }
+  }
+
+  return state;
+};
+
+/**
+ * Fast paths for creating regular expressions for common glob patterns.
+ * This can significantly speed up processing and has very little downside
+ * impact when none of the fast paths match.
+ */
+
+parse.fastpaths = (input, options) => {
+  const opts = { ...options };
+  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+  const len = input.length;
+  if (len > max) {
+    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+  }
+
+  input = REPLACEMENTS[input] || input;
+  const win32 = utils.isWindows(options);
+
+  // create constants based on platform, for windows or posix
+  const {
+    DOT_LITERAL,
+    SLASH_LITERAL,
+    ONE_CHAR,
+    DOTS_SLASH,
+    NO_DOT,
+    NO_DOTS,
+    NO_DOTS_SLASH,
+    STAR,
+    START_ANCHOR
+  } = constants.globChars(win32);
+
+  const nodot = opts.dot ? NO_DOTS : NO_DOT;
+  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
+  const capture = opts.capture ? '' : '?:';
+  const state = { negated: false, prefix: '' };
+  let star = opts.bash === true ? '.*?' : STAR;
+
+  if (opts.capture) {
+    star = `(${star})`;
+  }
+
+  const globstar = opts => {
+    if (opts.noglobstar === true) return star;
+    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+  };
+
+  const create = str => {
+    switch (str) {
+      case '*':
+        return `${nodot}${ONE_CHAR}${star}`;
+
+      case '.*':
+        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+      case '*.*':
+        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+      case '*/*':
+        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
+
+      case '**':
+        return nodot + globstar(opts);
+
+      case '**/*':
+        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
+
+      case '**/*.*':
+        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+      case '**/.*':
+        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+      default: {
+        const match = /^(.*?)\.(\w+)$/.exec(str);
+        if (!match) return;
+
+        const source = create(match[1]);
+        if (!source) return;
+
+        return source + DOT_LITERAL + match[2];
+      }
+    }
+  };
+
+  const output = utils.removePrefix(input, state);
+  let source = create(output);
+
+  if (source && opts.strictSlashes !== true) {
+    source += `${SLASH_LITERAL}?`;
+  }
+
+  return source;
+};
+
+module.exports = parse;

+ 342 - 0
node_modules/picomatch/lib/picomatch.js

@@ -0,0 +1,342 @@
+'use strict';
+
+const path = require('path');
+const scan = require('./scan');
+const parse = require('./parse');
+const utils = require('./utils');
+const constants = require('./constants');
+const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
+
+/**
+ * Creates a matcher function from one or more glob patterns. The
+ * returned function takes a string to match as its first argument,
+ * and returns true if the string is a match. The returned matcher
+ * function also takes a boolean as the second argument that, when true,
+ * returns an object with additional information.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch(glob[, options]);
+ *
+ * const isMatch = picomatch('*.!(*a)');
+ * console.log(isMatch('a.a')); //=> false
+ * console.log(isMatch('a.b')); //=> true
+ * ```
+ * @name picomatch
+ * @param {String|Array} `globs` One or more glob patterns.
+ * @param {Object=} `options`
+ * @return {Function=} Returns a matcher function.
+ * @api public
+ */
+
+const picomatch = (glob, options, returnState = false) => {
+  if (Array.isArray(glob)) {
+    const fns = glob.map(input => picomatch(input, options, returnState));
+    const arrayMatcher = str => {
+      for (const isMatch of fns) {
+        const state = isMatch(str);
+        if (state) return state;
+      }
+      return false;
+    };
+    return arrayMatcher;
+  }
+
+  const isState = isObject(glob) && glob.tokens && glob.input;
+
+  if (glob === '' || (typeof glob !== 'string' && !isState)) {
+    throw new TypeError('Expected pattern to be a non-empty string');
+  }
+
+  const opts = options || {};
+  const posix = utils.isWindows(options);
+  const regex = isState
+    ? picomatch.compileRe(glob, options)
+    : picomatch.makeRe(glob, options, false, true);
+
+  const state = regex.state;
+  delete regex.state;
+
+  let isIgnored = () => false;
+  if (opts.ignore) {
+    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
+    isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
+  }
+
+  const matcher = (input, returnObject = false) => {
+    const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
+    const result = { glob, state, regex, posix, input, output, match, isMatch };
+
+    if (typeof opts.onResult === 'function') {
+      opts.onResult(result);
+    }
+
+    if (isMatch === false) {
+      result.isMatch = false;
+      return returnObject ? result : false;
+    }
+
+    if (isIgnored(input)) {
+      if (typeof opts.onIgnore === 'function') {
+        opts.onIgnore(result);
+      }
+      result.isMatch = false;
+      return returnObject ? result : false;
+    }
+
+    if (typeof opts.onMatch === 'function') {
+      opts.onMatch(result);
+    }
+    return returnObject ? result : true;
+  };
+
+  if (returnState) {
+    matcher.state = state;
+  }
+
+  return matcher;
+};
+
+/**
+ * Test `input` with the given `regex`. This is used by the main
+ * `picomatch()` function to test the input string.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch.test(input, regex[, options]);
+ *
+ * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
+ * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
+ * ```
+ * @param {String} `input` String to test.
+ * @param {RegExp} `regex`
+ * @return {Object} Returns an object with matching info.
+ * @api public
+ */
+
+picomatch.test = (input, regex, options, { glob, posix } = {}) => {
+  if (typeof input !== 'string') {
+    throw new TypeError('Expected input to be a string');
+  }
+
+  if (input === '') {
+    return { isMatch: false, output: '' };
+  }
+
+  const opts = options || {};
+  const format = opts.format || (posix ? utils.toPosixSlashes : null);
+  let match = input === glob;
+  let output = (match && format) ? format(input) : input;
+
+  if (match === false) {
+    output = format ? format(input) : input;
+    match = output === glob;
+  }
+
+  if (match === false || opts.capture === true) {
+    if (opts.matchBase === true || opts.basename === true) {
+      match = picomatch.matchBase(input, regex, options, posix);
+    } else {
+      match = regex.exec(output);
+    }
+  }
+
+  return { isMatch: Boolean(match), match, output };
+};
+
+/**
+ * Match the basename of a filepath.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch.matchBase(input, glob[, options]);
+ * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+ * ```
+ * @param {String} `input` String to test.
+ * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
+ * @return {Boolean}
+ * @api public
+ */
+
+picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
+  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
+  return regex.test(path.basename(input));
+};
+
+/**
+ * Returns true if **any** of the given glob `patterns` match the specified `string`.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch.isMatch(string, patterns[, options]);
+ *
+ * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
+ * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
+ * ```
+ * @param {String|Array} str The string to test.
+ * @param {String|Array} patterns One or more glob patterns to use for matching.
+ * @param {Object} [options] See available [options](#options).
+ * @return {Boolean} Returns true if any patterns match `str`
+ * @api public
+ */
+
+picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+
+/**
+ * Parse a glob pattern to create the source string for a regular
+ * expression.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * const result = picomatch.parse(pattern[, options]);
+ * ```
+ * @param {String} `pattern`
+ * @param {Object} `options`
+ * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
+ * @api public
+ */
+
+picomatch.parse = (pattern, options) => {
+  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
+  return parse(pattern, { ...options, fastpaths: false });
+};
+
+/**
+ * Scan a glob pattern to separate the pattern into segments.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch.scan(input[, options]);
+ *
+ * const result = picomatch.scan('!./foo/*.js');
+ * console.log(result);
+ * { prefix: '!./',
+ *   input: '!./foo/*.js',
+ *   start: 3,
+ *   base: 'foo',
+ *   glob: '*.js',
+ *   isBrace: false,
+ *   isBracket: false,
+ *   isGlob: true,
+ *   isExtglob: false,
+ *   isGlobstar: false,
+ *   negated: true }
+ * ```
+ * @param {String} `input` Glob pattern to scan.
+ * @param {Object} `options`
+ * @return {Object} Returns an object with
+ * @api public
+ */
+
+picomatch.scan = (input, options) => scan(input, options);
+
+/**
+ * Compile a regular expression from the `state` object returned by the
+ * [parse()](#parse) method.
+ *
+ * @param {Object} `state`
+ * @param {Object} `options`
+ * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
+ * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
+ * @return {RegExp}
+ * @api public
+ */
+
+picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
+  if (returnOutput === true) {
+    return state.output;
+  }
+
+  const opts = options || {};
+  const prepend = opts.contains ? '' : '^';
+  const append = opts.contains ? '' : '$';
+
+  let source = `${prepend}(?:${state.output})${append}`;
+  if (state && state.negated === true) {
+    source = `^(?!${source}).*$`;
+  }
+
+  const regex = picomatch.toRegex(source, options);
+  if (returnState === true) {
+    regex.state = state;
+  }
+
+  return regex;
+};
+
+/**
+ * Create a regular expression from a parsed glob pattern.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * const state = picomatch.parse('*.js');
+ * // picomatch.compileRe(state[, options]);
+ *
+ * console.log(picomatch.compileRe(state));
+ * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+ * ```
+ * @param {String} `state` The object returned from the `.parse` method.
+ * @param {Object} `options`
+ * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
+ * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
+ * @return {RegExp} Returns a regex created from the given pattern.
+ * @api public
+ */
+
+picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
+  if (!input || typeof input !== 'string') {
+    throw new TypeError('Expected a non-empty string');
+  }
+
+  let parsed = { negated: false, fastpaths: true };
+
+  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
+    parsed.output = parse.fastpaths(input, options);
+  }
+
+  if (!parsed.output) {
+    parsed = parse(input, options);
+  }
+
+  return picomatch.compileRe(parsed, options, returnOutput, returnState);
+};
+
+/**
+ * Create a regular expression from the given regex source string.
+ *
+ * ```js
+ * const picomatch = require('picomatch');
+ * // picomatch.toRegex(source[, options]);
+ *
+ * const { output } = picomatch.parse('*.js');
+ * console.log(picomatch.toRegex(output));
+ * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+ * ```
+ * @param {String} `source` Regular expression source string.
+ * @param {Object} `options`
+ * @return {RegExp}
+ * @api public
+ */
+
+picomatch.toRegex = (source, options) => {
+  try {
+    const opts = options || {};
+    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
+  } catch (err) {
+    if (options && options.debug === true) throw err;
+    return /$^/;
+  }
+};
+
+/**
+ * Picomatch constants.
+ * @return {Object}
+ */
+
+picomatch.constants = constants;
+
+/**
+ * Expose "picomatch"
+ */
+
+module.exports = picomatch;

+ 391 - 0
node_modules/picomatch/lib/scan.js

@@ -0,0 +1,391 @@
+'use strict';
+
+const utils = require('./utils');
+const {
+  CHAR_ASTERISK,             /* * */
+  CHAR_AT,                   /* @ */
+  CHAR_BACKWARD_SLASH,       /* \ */
+  CHAR_COMMA,                /* , */
+  CHAR_DOT,                  /* . */
+  CHAR_EXCLAMATION_MARK,     /* ! */
+  CHAR_FORWARD_SLASH,        /* / */
+  CHAR_LEFT_CURLY_BRACE,     /* { */
+  CHAR_LEFT_PARENTHESES,     /* ( */
+  CHAR_LEFT_SQUARE_BRACKET,  /* [ */
+  CHAR_PLUS,                 /* + */
+  CHAR_QUESTION_MARK,        /* ? */
+  CHAR_RIGHT_CURLY_BRACE,    /* } */
+  CHAR_RIGHT_PARENTHESES,    /* ) */
+  CHAR_RIGHT_SQUARE_BRACKET  /* ] */
+} = require('./constants');
+
+const isPathSeparator = code => {
+  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
+};
+
+const depth = token => {
+  if (token.isPrefix !== true) {
+    token.depth = token.isGlobstar ? Infinity : 1;
+  }
+};
+
+/**
+ * Quickly scans a glob pattern and returns an object with a handful of
+ * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
+ * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
+ * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
+ *
+ * ```js
+ * const pm = require('picomatch');
+ * console.log(pm.scan('foo/bar/*.js'));
+ * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
+ * ```
+ * @param {String} `str`
+ * @param {Object} `options`
+ * @return {Object} Returns an object with tokens and regex source string.
+ * @api public
+ */
+
+const scan = (input, options) => {
+  const opts = options || {};
+
+  const length = input.length - 1;
+  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
+  const slashes = [];
+  const tokens = [];
+  const parts = [];
+
+  let str = input;
+  let index = -1;
+  let start = 0;
+  let lastIndex = 0;
+  let isBrace = false;
+  let isBracket = false;
+  let isGlob = false;
+  let isExtglob = false;
+  let isGlobstar = false;
+  let braceEscaped = false;
+  let backslashes = false;
+  let negated = false;
+  let negatedExtglob = false;
+  let finished = false;
+  let braces = 0;
+  let prev;
+  let code;
+  let token = { value: '', depth: 0, isGlob: false };
+
+  const eos = () => index >= length;
+  const peek = () => str.charCodeAt(index + 1);
+  const advance = () => {
+    prev = code;
+    return str.charCodeAt(++index);
+  };
+
+  while (index < length) {
+    code = advance();
+    let next;
+
+    if (code === CHAR_BACKWARD_SLASH) {
+      backslashes = token.backslashes = true;
+      code = advance();
+
+      if (code === CHAR_LEFT_CURLY_BRACE) {
+        braceEscaped = true;
+      }
+      continue;
+    }
+
+    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
+      braces++;
+
+      while (eos() !== true && (code = advance())) {
+        if (code === CHAR_BACKWARD_SLASH) {
+          backslashes = token.backslashes = true;
+          advance();
+          continue;
+        }
+
+        if (code === CHAR_LEFT_CURLY_BRACE) {
+          braces++;
+          continue;
+        }
+
+        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
+          isBrace = token.isBrace = true;
+          isGlob = token.isGlob = true;
+          finished = true;
+
+          if (scanToEnd === true) {
+            continue;
+          }
+
+          break;
+        }
+
+        if (braceEscaped !== true && code === CHAR_COMMA) {
+          isBrace = token.isBrace = true;
+          isGlob = token.isGlob = true;
+          finished = true;
+
+          if (scanToEnd === true) {
+            continue;
+          }
+
+          break;
+        }
+
+        if (code === CHAR_RIGHT_CURLY_BRACE) {
+          braces--;
+
+          if (braces === 0) {
+            braceEscaped = false;
+            isBrace = token.isBrace = true;
+            finished = true;
+            break;
+          }
+        }
+      }
+
+      if (scanToEnd === true) {
+        continue;
+      }
+
+      break;
+    }
+
+    if (code === CHAR_FORWARD_SLASH) {
+      slashes.push(index);
+      tokens.push(token);
+      token = { value: '', depth: 0, isGlob: false };
+
+      if (finished === true) continue;
+      if (prev === CHAR_DOT && index === (start + 1)) {
+        start += 2;
+        continue;
+      }
+
+      lastIndex = index + 1;
+      continue;
+    }
+
+    if (opts.noext !== true) {
+      const isExtglobChar = code === CHAR_PLUS
+        || code === CHAR_AT
+        || code === CHAR_ASTERISK
+        || code === CHAR_QUESTION_MARK
+        || code === CHAR_EXCLAMATION_MARK;
+
+      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
+        isGlob = token.isGlob = true;
+        isExtglob = token.isExtglob = true;
+        finished = true;
+        if (code === CHAR_EXCLAMATION_MARK && index === start) {
+          negatedExtglob = true;
+        }
+
+        if (scanToEnd === true) {
+          while (eos() !== true && (code = advance())) {
+            if (code === CHAR_BACKWARD_SLASH) {
+              backslashes = token.backslashes = true;
+              code = advance();
+              continue;
+            }
+
+            if (code === CHAR_RIGHT_PARENTHESES) {
+              isGlob = token.isGlob = true;
+              finished = true;
+              break;
+            }
+          }
+          continue;
+        }
+        break;
+      }
+    }
+
+    if (code === CHAR_ASTERISK) {
+      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
+      isGlob = token.isGlob = true;
+      finished = true;
+
+      if (scanToEnd === true) {
+        continue;
+      }
+      break;
+    }
+
+    if (code === CHAR_QUESTION_MARK) {
+      isGlob = token.isGlob = true;
+      finished = true;
+
+      if (scanToEnd === true) {
+        continue;
+      }
+      break;
+    }
+
+    if (code === CHAR_LEFT_SQUARE_BRACKET) {
+      while (eos() !== true && (next = advance())) {
+        if (next === CHAR_BACKWARD_SLASH) {
+          backslashes = token.backslashes = true;
+          advance();
+          continue;
+        }
+
+        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+          isBracket = token.isBracket = true;
+          isGlob = token.isGlob = true;
+          finished = true;
+          break;
+        }
+      }
+
+      if (scanToEnd === true) {
+        continue;
+      }
+
+      break;
+    }
+
+    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
+      negated = token.negated = true;
+      start++;
+      continue;
+    }
+
+    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
+      isGlob = token.isGlob = true;
+
+      if (scanToEnd === true) {
+        while (eos() !== true && (code = advance())) {
+          if (code === CHAR_LEFT_PARENTHESES) {
+            backslashes = token.backslashes = true;
+            code = advance();
+            continue;
+          }
+
+          if (code === CHAR_RIGHT_PARENTHESES) {
+            finished = true;
+            break;
+          }
+        }
+        continue;
+      }
+      break;
+    }
+
+    if (isGlob === true) {
+      finished = true;
+
+      if (scanToEnd === true) {
+        continue;
+      }
+
+      break;
+    }
+  }
+
+  if (opts.noext === true) {
+    isExtglob = false;
+    isGlob = false;
+  }
+
+  let base = str;
+  let prefix = '';
+  let glob = '';
+
+  if (start > 0) {
+    prefix = str.slice(0, start);
+    str = str.slice(start);
+    lastIndex -= start;
+  }
+
+  if (base && isGlob === true && lastIndex > 0) {
+    base = str.slice(0, lastIndex);
+    glob = str.slice(lastIndex);
+  } else if (isGlob === true) {
+    base = '';
+    glob = str;
+  } else {
+    base = str;
+  }
+
+  if (base && base !== '' && base !== '/' && base !== str) {
+    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
+      base = base.slice(0, -1);
+    }
+  }
+
+  if (opts.unescape === true) {
+    if (glob) glob = utils.removeBackslashes(glob);
+
+    if (base && backslashes === true) {
+      base = utils.removeBackslashes(base);
+    }
+  }
+
+  const state = {
+    prefix,
+    input,
+    start,
+    base,
+    glob,
+    isBrace,
+    isBracket,
+    isGlob,
+    isExtglob,
+    isGlobstar,
+    negated,
+    negatedExtglob
+  };
+
+  if (opts.tokens === true) {
+    state.maxDepth = 0;
+    if (!isPathSeparator(code)) {
+      tokens.push(token);
+    }
+    state.tokens = tokens;
+  }
+
+  if (opts.parts === true || opts.tokens === true) {
+    let prevIndex;
+
+    for (let idx = 0; idx < slashes.length; idx++) {
+      const n = prevIndex ? prevIndex + 1 : start;
+      const i = slashes[idx];
+      const value = input.slice(n, i);
+      if (opts.tokens) {
+        if (idx === 0 && start !== 0) {
+          tokens[idx].isPrefix = true;
+          tokens[idx].value = prefix;
+        } else {
+          tokens[idx].value = value;
+        }
+        depth(tokens[idx]);
+        state.maxDepth += tokens[idx].depth;
+      }
+      if (idx !== 0 || value !== '') {
+        parts.push(value);
+      }
+      prevIndex = i;
+    }
+
+    if (prevIndex && prevIndex + 1 < input.length) {
+      const value = input.slice(prevIndex + 1);
+      parts.push(value);
+
+      if (opts.tokens) {
+        tokens[tokens.length - 1].value = value;
+        depth(tokens[tokens.length - 1]);
+        state.maxDepth += tokens[tokens.length - 1].depth;
+      }
+    }
+
+    state.slashes = slashes;
+    state.parts = parts;
+  }
+
+  return state;
+};
+
+module.exports = scan;

+ 64 - 0
node_modules/picomatch/lib/utils.js

@@ -0,0 +1,64 @@
+'use strict';
+
+const path = require('path');
+const win32 = process.platform === 'win32';
+const {
+  REGEX_BACKSLASH,
+  REGEX_REMOVE_BACKSLASH,
+  REGEX_SPECIAL_CHARS,
+  REGEX_SPECIAL_CHARS_GLOBAL
+} = require('./constants');
+
+exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
+exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
+exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
+exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
+
+exports.removeBackslashes = str => {
+  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
+    return match === '\\' ? '' : match;
+  });
+};
+
+exports.supportsLookbehinds = () => {
+  const segs = process.version.slice(1).split('.').map(Number);
+  if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
+    return true;
+  }
+  return false;
+};
+
+exports.isWindows = options => {
+  if (options && typeof options.windows === 'boolean') {
+    return options.windows;
+  }
+  return win32 === true || path.sep === '\\';
+};
+
+exports.escapeLast = (input, char, lastIdx) => {
+  const idx = input.lastIndexOf(char, lastIdx);
+  if (idx === -1) return input;
+  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
+  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
+};
+
+exports.removePrefix = (input, state = {}) => {
+  let output = input;
+  if (output.startsWith('./')) {
+    output = output.slice(2);
+    state.prefix = './';
+  }
+  return output;
+};
+
+exports.wrapOutput = (input, state = {}, options = {}) => {
+  const prepend = options.contains ? '' : '^';
+  const append = options.contains ? '' : '$';
+
+  let output = `${prepend}(?:${input})${append}`;
+  if (state.negated === true) {
+    output = `(?:^(?!${output}).*$)`;
+  }
+  return output;
+};

+ 81 - 0
node_modules/picomatch/package.json

@@ -0,0 +1,81 @@
+{
+  "name": "picomatch",
+  "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
+  "version": "2.3.1",
+  "homepage": "https://github.com/micromatch/picomatch",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "funding": "https://github.com/sponsors/jonschlinkert",
+  "repository": "micromatch/picomatch",
+  "bugs": {
+    "url": "https://github.com/micromatch/picomatch/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js",
+    "lib"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=8.6"
+  },
+  "scripts": {
+    "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
+    "mocha": "mocha --reporter dot",
+    "test": "npm run lint && npm run mocha",
+    "test:ci": "npm run test:cover",
+    "test:cover": "nyc npm run mocha"
+  },
+  "devDependencies": {
+    "eslint": "^6.8.0",
+    "fill-range": "^7.0.1",
+    "gulp-format-md": "^2.0.0",
+    "mocha": "^6.2.2",
+    "nyc": "^15.0.0",
+    "time-require": "github:jonschlinkert/time-require"
+  },
+  "keywords": [
+    "glob",
+    "match",
+    "picomatch"
+  ],
+  "nyc": {
+    "reporter": [
+      "html",
+      "lcov",
+      "text-summary"
+    ]
+  },
+  "verb": {
+    "toc": {
+      "render": true,
+      "method": "preWrite",
+      "maxdepth": 3
+    },
+    "layout": "empty",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "lint": {
+      "reflinks": true
+    },
+    "related": {
+      "list": [
+        "braces",
+        "micromatch"
+      ]
+    },
+    "reflinks": [
+      "braces",
+      "expand-brackets",
+      "extglob",
+      "fill-range",
+      "micromatch",
+      "minimatch",
+      "nanomatch",
+      "picomatch"
+    ]
+  }
+}

+ 21 - 0
node_modules/readdirp/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 122 - 0
node_modules/readdirp/README.md

@@ -0,0 +1,122 @@
+# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp)
+
+Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
+
+
+```sh
+npm install readdirp
+```
+
+```javascript
+const readdirp = require('readdirp');
+
+// Use streams to achieve small RAM & CPU footprint.
+// 1) Streams example with for-await.
+for await (const entry of readdirp('.')) {
+  const {path} = entry;
+  console.log(`${JSON.stringify({path})}`);
+}
+
+// 2) Streams example, non for-await.
+// Print out all JS files along with their size within the current folder & subfolders.
+readdirp('.', {fileFilter: '*.js', alwaysStat: true})
+  .on('data', (entry) => {
+    const {path, stats: {size}} = entry;
+    console.log(`${JSON.stringify({path, size})}`);
+  })
+  // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted
+  .on('warn', error => console.error('non-fatal error', error))
+  .on('error', error => console.error('fatal error', error))
+  .on('end', () => console.log('done'));
+
+// 3) Promise example. More RAM and CPU than streams / for-await.
+const files = await readdirp.promise('.');
+console.log(files.map(file => file.path));
+
+// Other options.
+readdirp('test', {
+  fileFilter: '*.js',
+  directoryFilter: ['!.git', '!*modules']
+  // directoryFilter: (di) => di.basename.length === 9
+  type: 'files_directories',
+  depth: 1
+});
+```
+
+For more examples, check out `examples` directory.
+
+## API
+
+`const stream = readdirp(root[, options])` — **Stream API**
+
+- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo)
+- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`).
+- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir.
+- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user.
+- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed.
+- `on('end')` — we are done. Called when all entries were found and no more will be emitted.
+- `on('close')` — stream is destroyed via `stream.destroy()`.
+  Could be useful if you want to manually abort even on a non fatal error.
+  At that point the stream is no longer `readable` and no more entries, warning or errors are emitted
+- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html)
+  or the [stream-handbook](https://github.com/substack/stream-handbook)
+
+`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo).
+
+First argument is awalys `root`, path in which to start reading and recursing into subdirectories.
+
+### options
+
+- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings.
+    - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry
+    - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more
+        information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files.
+    - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown.
+        `['*.json', '*.js']` includes all JavaScript and Json files.
+        `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'.
+    - Directories that do not pass a filter will not be recursed into.
+- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
+- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
+- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
+- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
+- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
+
+### `EntryInfo`
+
+Has the following properties:
+
+- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root)
+- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found
+- `basename: 'react.js'`: name of the file/directory
+- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false`
+- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true`
+
+## Changelog
+
+- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
+  Before, it could have entered infinite loop.
+- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
+- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
+- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
+- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
+- 3.0 brings huge performance improvements and stream backpressure support.
+- Upgrading 2.x to 3.x:
+    - Signature changed from `readdirp(options)` to `readdirp(root, options)`
+    - Replaced callback API with promise API.
+    - Renamed `entryType` option to `type`
+    - Renamed `entryType: 'both'` to `'files_directories'`
+    - `EntryInfo`
+        - Renamed `stat` to `stats`
+            - Emitted only when `alwaysStat: true`
+            - `dirent` is emitted instead of `stats` by default with `alwaysStat: false`
+        - Renamed `name` to `basename`
+        - Removed `parentDir` and `fullParentDir` properties
+- Supported node.js versions:
+    - 3.x: node 8+
+    - 2.x: node 0.6+
+
+## License
+
+Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (<https://paulmillr.com>)
+
+MIT License, see [LICENSE](LICENSE) file.

+ 43 - 0
node_modules/readdirp/index.d.ts

@@ -0,0 +1,43 @@
+// TypeScript Version: 3.2
+
+/// <reference types="node" lib="esnext" />
+
+import * as fs from 'fs';
+import { Readable } from 'stream';
+
+declare namespace readdir {
+  interface EntryInfo {
+    path: string;
+    fullPath: string;
+    basename: string;
+    stats?: fs.Stats;
+    dirent?: fs.Dirent;
+  }
+
+  interface ReaddirpOptions {
+    root?: string;
+    fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);
+    directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean);
+    type?: 'files' | 'directories' | 'files_directories' | 'all';
+    lstat?: boolean;
+    depth?: number;
+    alwaysStat?: boolean;
+  }
+
+  interface ReaddirpStream extends Readable, AsyncIterable<EntryInfo> {
+    read(): EntryInfo;
+    [Symbol.asyncIterator](): AsyncIterableIterator<EntryInfo>;
+  }
+
+  function promise(
+    root: string,
+    options?: ReaddirpOptions
+  ): Promise<EntryInfo[]>;
+}
+
+declare function readdir(
+  root: string,
+  options?: readdir.ReaddirpOptions
+): readdir.ReaddirpStream;
+
+export = readdir;

Some files were not shown because too many files changed in this diff