@nuxt/devtools 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/chunks/module-main.mjs +667 -684
  2. package/dist/chunks/vscode.mjs +34 -35
  3. package/dist/cli.mjs +336 -5
  4. package/dist/client/200.html +2 -2
  5. package/dist/client/404.html +2 -2
  6. package/dist/client/__inspecting/index.html +2 -2
  7. package/dist/client/_nuxt/Badge.ec9e349b.js +1 -0
  8. package/dist/client/_nuxt/FilepathItem.vue.29183a21.js +1 -0
  9. package/dist/client/_nuxt/LaunchPage.vue.f4239533.js +1 -0
  10. package/dist/client/_nuxt/{welcome.db724adb.css → NButton.db724adb.css} +0 -0
  11. package/dist/client/_nuxt/NButton.vue.09cc4471.js +113 -0
  12. package/dist/client/_nuxt/NIcon.vue.701f4547.js +1 -0
  13. package/dist/client/_nuxt/NTextInput.vue.276e32b3.js +1 -0
  14. package/dist/client/_nuxt/NuxtLogo.9f2db884.js +1 -0
  15. package/dist/client/_nuxt/SectionBlock.8ff5d737.js +1 -0
  16. package/dist/client/_nuxt/Settings.vue.b55fa306.js +1 -0
  17. package/dist/client/_nuxt/{StateEditor.vue.0d8adb50.js → StateEditor.vue.ab9d7157.js} +1 -1
  18. package/dist/client/_nuxt/StateEditor.vue.d668b11c.js +1 -0
  19. package/dist/client/_nuxt/TabIcon.vue.6890c56a.js +1 -0
  20. package/dist/client/_nuxt/__inspecting.12d34e8c.js +1 -0
  21. package/dist/client/_nuxt/asyncData.c8345f31.js +1 -0
  22. package/dist/client/_nuxt/components.08e98322.js +1 -0
  23. package/dist/client/_nuxt/composables.8c342cc5.js +1 -0
  24. package/dist/client/_nuxt/context.d25709fd.js +1 -0
  25. package/dist/client/_nuxt/custom-_name_.89baf527.js +1 -0
  26. package/dist/client/_nuxt/default.975e4e70.js +1 -0
  27. package/dist/client/_nuxt/editor.f74d7351.js +1 -0
  28. package/dist/client/_nuxt/entry.d28dd037.js +5 -0
  29. package/dist/client/_nuxt/{entry.6e08c3bd.css → entry.e7b3d8fd.css} +1 -1
  30. package/dist/client/_nuxt/error-404.bdee7391.js +1 -0
  31. package/dist/client/_nuxt/error-500.c5180cef.js +1 -0
  32. package/dist/client/_nuxt/error-component.ae83d235.js +3 -0
  33. package/dist/client/_nuxt/hooks.8f89faa2.js +1 -0
  34. package/dist/client/_nuxt/imports.f7970750.js +1 -0
  35. package/dist/client/_nuxt/index.fe0907d3.js +1 -0
  36. package/dist/client/_nuxt/layouts.d5a3dabe.js +1 -0
  37. package/dist/client/_nuxt/middleware.5410fce5.js +1 -0
  38. package/dist/client/_nuxt/modules.6fc7bd71.js +1 -0
  39. package/dist/client/_nuxt/none.76eeebc3.js +1 -0
  40. package/dist/client/_nuxt/nuxt-link.3aeeed3f.js +1 -0
  41. package/dist/client/_nuxt/overview.e7e9880f.js +1 -0
  42. package/dist/client/_nuxt/pages.40900507.js +1 -0
  43. package/dist/client/_nuxt/payload.36dbfdde.js +1 -0
  44. package/dist/client/_nuxt/plugins.8195b406.js +1 -0
  45. package/dist/client/_nuxt/runtime-configs.7cc77728.js +1 -0
  46. package/dist/client/_nuxt/server-routes.ffdf17b0.js +1 -0
  47. package/dist/client/_nuxt/state.a5c5a841.js +1 -0
  48. package/dist/client/_nuxt/unocss-runtime.1fec3315.js +2 -0
  49. package/dist/client/_nuxt/{virtual-files.53d6f968.js → virtual-files.a26c8c69.js} +8 -8
  50. package/dist/client/index.html +2 -2
  51. package/dist/client/modules/components/index.html +2 -2
  52. package/dist/client/modules/hooks/index.html +2 -2
  53. package/dist/client/modules/imports/index.html +2 -2
  54. package/dist/client/modules/layouts/index.html +2 -2
  55. package/dist/client/modules/middleware/index.html +2 -2
  56. package/dist/client/modules/modules/index.html +2 -2
  57. package/dist/client/modules/overview/index.html +2 -2
  58. package/dist/client/modules/pages/index.html +2 -2
  59. package/dist/client/modules/payload/index.html +2 -2
  60. package/dist/client/modules/plugins/index.html +2 -2
  61. package/dist/client/modules/runtime-configs/index.html +2 -2
  62. package/dist/client/modules/server-routes/index.html +2 -2
  63. package/dist/client/modules/virtual-files/index.html +2 -2
  64. package/dist/module.json +1 -1
  65. package/dist/module.mjs +30 -6
  66. package/dist/shared/{devtools.b5fb0de8.mjs → devtools.28239661.mjs} +1 -1
  67. package/package.json +29 -28
  68. package/dist/client/_nuxt/Badge.e080ea4a.js +0 -1
  69. package/dist/client/_nuxt/ComponentItem.c17d2931.js +0 -1
  70. package/dist/client/_nuxt/ComponentItem.vue.3441f37f.js +0 -1
  71. package/dist/client/_nuxt/ComponentsGraph.4d50b4fe.js +0 -1
  72. package/dist/client/_nuxt/ComponentsGraph.vue.5b3b134e.js +0 -1
  73. package/dist/client/_nuxt/ComponentsList.ac84bcd1.js +0 -1
  74. package/dist/client/_nuxt/ComponentsList.vue.c704cf24.js +0 -1
  75. package/dist/client/_nuxt/ComposableItem.72806cd2.js +0 -1
  76. package/dist/client/_nuxt/ComposableItem.vue.90cd23bc.js +0 -1
  77. package/dist/client/_nuxt/ComposableTree.43de28f8.js +0 -1
  78. package/dist/client/_nuxt/ComposableTree.vue.808503d9.js +0 -1
  79. package/dist/client/_nuxt/CurrentRoute.e8d5b2cb.js +0 -1
  80. package/dist/client/_nuxt/Drawer.583a0aa3.js +0 -1
  81. package/dist/client/_nuxt/Drawer.vue.30b0fc28.js +0 -1
  82. package/dist/client/_nuxt/DrawerItem.e2effddf.js +0 -1
  83. package/dist/client/_nuxt/DrawerItem.vue.8cadb3c9.js +0 -1
  84. package/dist/client/_nuxt/FileIcon.68b82ecb.js +0 -1
  85. package/dist/client/_nuxt/FileIcon.vue.3bb914bc.js +0 -1
  86. package/dist/client/_nuxt/FilepathItem.8049add8.js +0 -1
  87. package/dist/client/_nuxt/FilepathItem.vue.811409e2.js +0 -1
  88. package/dist/client/_nuxt/HooksTable.59d897cb.js +0 -1
  89. package/dist/client/_nuxt/HooksTable.vue.6b9004ef.js +0 -1
  90. package/dist/client/_nuxt/IconTitle.f576cbf3.js +0 -1
  91. package/dist/client/_nuxt/IconTitle.vue.dfa8cbcf.js +0 -1
  92. package/dist/client/_nuxt/IframeView.13e136bd.js +0 -1
  93. package/dist/client/_nuxt/IframeView.vue.6843a7fa.js +0 -1
  94. package/dist/client/_nuxt/LaunchPage.e39fe420.js +0 -1
  95. package/dist/client/_nuxt/LaunchPage.vue.6be17436.js +0 -1
  96. package/dist/client/_nuxt/ModuleItem.8c304e21.js +0 -1
  97. package/dist/client/_nuxt/ModuleItem.vue.2d131549.js +0 -1
  98. package/dist/client/_nuxt/ModuleTreeNode.78ca9ece.js +0 -1
  99. package/dist/client/_nuxt/NButton.13233a1a.js +0 -1
  100. package/dist/client/_nuxt/NButton.vue.e86a98c0.js +0 -1
  101. package/dist/client/_nuxt/NCard.7a4e503f.js +0 -1
  102. package/dist/client/_nuxt/NCheckbox.2da82abb.js +0 -1
  103. package/dist/client/_nuxt/NCheckbox.vue.f058658a.js +0 -1
  104. package/dist/client/_nuxt/NDarkToggle.b7397b85.js +0 -1
  105. package/dist/client/_nuxt/NDarkToggle.vue.104b9df7.js +0 -1
  106. package/dist/client/_nuxt/NDialog.ff796c22.js +0 -7
  107. package/dist/client/_nuxt/NDropdown.6e99be47.js +0 -1
  108. package/dist/client/_nuxt/NIcon.62a6a6a2.js +0 -1
  109. package/dist/client/_nuxt/NIcon.vue.5c5f9ae0.js +0 -1
  110. package/dist/client/_nuxt/NLink.f8b21877.js +0 -1
  111. package/dist/client/_nuxt/NLink.vue.0f719ab9.js +0 -1
  112. package/dist/client/_nuxt/NRadio.8c217808.js +0 -1
  113. package/dist/client/_nuxt/NSwitch.ea9c119a.js +0 -1
  114. package/dist/client/_nuxt/NSwitch.vue.a7a200ce.js +0 -1
  115. package/dist/client/_nuxt/NTextInput.48fb0a25.js +0 -1
  116. package/dist/client/_nuxt/NTextInput.vue.5d4d2524.js +0 -1
  117. package/dist/client/_nuxt/NTip.d9c4666f.js +0 -1
  118. package/dist/client/_nuxt/Notification.287365de.js +0 -1
  119. package/dist/client/_nuxt/Notification.vue.dd7d98d5.js +0 -1
  120. package/dist/client/_nuxt/NuxtContentLogo.447522e5.js +0 -1
  121. package/dist/client/_nuxt/NuxtExampleLayout.06f6d250.js +0 -1
  122. package/dist/client/_nuxt/NuxtLogo.b27dc990.js +0 -1
  123. package/dist/client/_nuxt/PluginItem.6a55c130.js +0 -1
  124. package/dist/client/_nuxt/PluginItem.vue.6e1d1965.js +0 -1
  125. package/dist/client/_nuxt/RoutePathItem.b209a7cb.js +0 -1
  126. package/dist/client/_nuxt/RoutePathItem.vue.90d1f11a.js +0 -1
  127. package/dist/client/_nuxt/RoutesTable.ffa3adf9.js +0 -1
  128. package/dist/client/_nuxt/RoutesTable.vue.1bbafbda.js +0 -1
  129. package/dist/client/_nuxt/SectionBlock.2e26af4b.js +0 -1
  130. package/dist/client/_nuxt/Settings.a15dbb2e.js +0 -1
  131. package/dist/client/_nuxt/Settings.vue.f2a6e99c.js +0 -1
  132. package/dist/client/_nuxt/StateEditor.fd549a9f.js +0 -1
  133. package/dist/client/_nuxt/StateEditor.vue.ead0fa52.js +0 -1
  134. package/dist/client/_nuxt/StateGroup.bcb980bd.js +0 -1
  135. package/dist/client/_nuxt/StateGroup.vue.c133a773.js +0 -1
  136. package/dist/client/_nuxt/TabIcon.e55b5a67.js +0 -1
  137. package/dist/client/_nuxt/TabIcon.vue.adac3b56.js +0 -1
  138. package/dist/client/_nuxt/UnoIcon.3132b92a.js +0 -1
  139. package/dist/client/_nuxt/__inspecting.a43a7f80.js +0 -1
  140. package/dist/client/_nuxt/app.config.12fdda03.js +0 -1
  141. package/dist/client/_nuxt/asyncData.518fdb22.js +0 -1
  142. package/dist/client/_nuxt/client-only.f9d053f8.js +0 -4
  143. package/dist/client/_nuxt/client.210463dc.js +0 -1
  144. package/dist/client/_nuxt/color-mode-options.00c15dd1.js +0 -1
  145. package/dist/client/_nuxt/component.vue3.02eb71f6.js +0 -1
  146. package/dist/client/_nuxt/components.4f55e0db.js +0 -1
  147. package/dist/client/_nuxt/components.84a4af12.js +0 -1
  148. package/dist/client/_nuxt/components.client.e93eaead.js +0 -113
  149. package/dist/client/_nuxt/composables.2b96933d.js +0 -1
  150. package/dist/client/_nuxt/composables.59ebbb45.js +0 -1
  151. package/dist/client/_nuxt/context.c20dc632.js +0 -1
  152. package/dist/client/_nuxt/custom-_name_.2cdb4455.js +0 -1
  153. package/dist/client/_nuxt/default.585c2af8.js +0 -1
  154. package/dist/client/_nuxt/defu.5a7c1433.js +0 -1
  155. package/dist/client/_nuxt/dev-only.32de73cb.js +0 -1
  156. package/dist/client/_nuxt/editor.45ea8ca4.js +0 -1
  157. package/dist/client/_nuxt/entry.72ee2736.js +0 -1
  158. package/dist/client/_nuxt/error-404.bf8933d3.js +0 -1
  159. package/dist/client/_nuxt/error-500.fe852534.js +0 -1
  160. package/dist/client/_nuxt/error-component.0aa3c1f1.js +0 -3
  161. package/dist/client/_nuxt/error.ab352ad9.js +0 -1
  162. package/dist/client/_nuxt/hooks.da36eba4.js +0 -1
  163. package/dist/client/_nuxt/imports.05a63875.js +0 -1
  164. package/dist/client/_nuxt/index.bf1af76f.js +0 -1
  165. package/dist/client/_nuxt/index.d56af0a0.js +0 -1
  166. package/dist/client/_nuxt/index.e1377d3f.js +0 -1
  167. package/dist/client/_nuxt/index.e7819c37.js +0 -1
  168. package/dist/client/_nuxt/layout.f6e6e706.js +0 -1
  169. package/dist/client/_nuxt/layouts.ed44bf26.js +0 -1
  170. package/dist/client/_nuxt/middleware.42780100.js +0 -1
  171. package/dist/client/_nuxt/modules.58ec9d96.js +0 -1
  172. package/dist/client/_nuxt/none.a36fcb53.js +0 -1
  173. package/dist/client/_nuxt/nuxt-error-boundary.70c75848.js +0 -1
  174. package/dist/client/_nuxt/nuxt-link.ed65b9da.js +0 -1
  175. package/dist/client/_nuxt/nuxt-loading-indicator.366d3e52.js +0 -1
  176. package/dist/client/_nuxt/nuxt.21217109.js +0 -1
  177. package/dist/client/_nuxt/overview.c0a9db52.js +0 -1
  178. package/dist/client/_nuxt/page.fb94fd70.js +0 -1
  179. package/dist/client/_nuxt/pages.ca7b2f77.js +0 -1
  180. package/dist/client/_nuxt/payload.78a6e729.js +0 -1
  181. package/dist/client/_nuxt/plugins.48c9acc3.js +0 -1
  182. package/dist/client/_nuxt/router.96f0ba10.js +0 -1
  183. package/dist/client/_nuxt/rpc.2e6b297d.js +0 -1
  184. package/dist/client/_nuxt/runtime-configs.1c27e6f2.js +0 -1
  185. package/dist/client/_nuxt/runtime-core.esm-bundler.ad888d46.js +0 -1
  186. package/dist/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js +0 -1
  187. package/dist/client/_nuxt/server-placeholder.ba9b9f8a.js +0 -1
  188. package/dist/client/_nuxt/server-routes.de3e707e.js +0 -1
  189. package/dist/client/_nuxt/state.2c41a47c.js +0 -1
  190. package/dist/client/_nuxt/state.85e68c45.js +0 -1
  191. package/dist/client/_nuxt/storage.abd6f5f8.js +0 -1
  192. package/dist/client/_nuxt/unocss-runtime.1d429fd2.js +0 -2
  193. package/dist/client/_nuxt/utils.1c789938.js +0 -1
  194. package/dist/client/_nuxt/utils.8ee5a573.js +0 -5
  195. package/dist/client/_nuxt/welcome.11fc1574.js +0 -1
  196. package/dist/shared/devtools.38b2468f.mjs +0 -337
  197. package/dist/shared/devtools.cce722d0.mjs +0 -68
@@ -14,8 +14,8 @@ import require$$1 from 'http';
14
14
  import require$$0$4 from 'url';
15
15
  import * as qs from 'querystring';
16
16
  import require$$0$5 from 'tty';
17
- import { i as isInstalledGlobally } from '../shared/devtools.cce722d0.mjs';
18
- import { v as version } from '../shared/devtools.b5fb0de8.mjs';
17
+ import isInstalledGlobally from 'is-installed-globally';
18
+ import { v as version } from '../shared/devtools.28239661.mjs';
19
19
  import { createBirpcGroup } from 'birpc';
20
20
  import { resolvePreset } from 'unimport';
21
21
  import { join as join$1, dirname, resolve as resolve$1 } from 'pathe';
@@ -2289,7 +2289,7 @@ const { tokenChars: tokenChars$1 } = validationExports;
2289
2289
  * parameter value
2290
2290
  * @private
2291
2291
  */
2292
- function push(dest, name, elem) {
2292
+ function push$1(dest, name, elem) {
2293
2293
  if (dest[name] === undefined) dest[name] = [elem];
2294
2294
  else dest[name].push(elem);
2295
2295
  }
@@ -2333,7 +2333,7 @@ function parse$b(header) {
2333
2333
  if (end === -1) end = i;
2334
2334
  const name = header.slice(start, end);
2335
2335
  if (code === 0x2c) {
2336
- push(offers, name, params);
2336
+ push$1(offers, name, params);
2337
2337
  params = Object.create(null);
2338
2338
  } else {
2339
2339
  extensionName = name;
@@ -2354,9 +2354,9 @@ function parse$b(header) {
2354
2354
  }
2355
2355
 
2356
2356
  if (end === -1) end = i;
2357
- push(params, header.slice(start, end), true);
2357
+ push$1(params, header.slice(start, end), true);
2358
2358
  if (code === 0x2c) {
2359
- push(offers, extensionName, params);
2359
+ push$1(offers, extensionName, params);
2360
2360
  params = Object.create(null);
2361
2361
  extensionName = undefined;
2362
2362
  }
@@ -2409,9 +2409,9 @@ function parse$b(header) {
2409
2409
  value = value.replace(/\\/g, '');
2410
2410
  mustUnescape = false;
2411
2411
  }
2412
- push(params, paramName, value);
2412
+ push$1(params, paramName, value);
2413
2413
  if (code === 0x2c) {
2414
- push(offers, extensionName, params);
2414
+ push$1(offers, extensionName, params);
2415
2415
  params = Object.create(null);
2416
2416
  extensionName = undefined;
2417
2417
  }
@@ -2431,16 +2431,16 @@ function parse$b(header) {
2431
2431
  if (end === -1) end = i;
2432
2432
  const token = header.slice(start, end);
2433
2433
  if (extensionName === undefined) {
2434
- push(offers, token, params);
2434
+ push$1(offers, token, params);
2435
2435
  } else {
2436
2436
  if (paramName === undefined) {
2437
- push(params, token, true);
2437
+ push$1(params, token, true);
2438
2438
  } else if (mustUnescape) {
2439
- push(params, paramName, token.replace(/\\/g, ''));
2439
+ push$1(params, paramName, token.replace(/\\/g, ''));
2440
2440
  } else {
2441
- push(params, paramName, token);
2441
+ push$1(params, paramName, token);
2442
2442
  }
2443
- push(offers, extensionName, params);
2443
+ push$1(offers, extensionName, params);
2444
2444
  }
2445
2445
 
2446
2446
  return offers;
@@ -6085,782 +6085,765 @@ function requireIterator () {
6085
6085
  return iterator;
6086
6086
  }
6087
6087
 
6088
- var yallist;
6089
- var hasRequiredYallist;
6088
+ var yallist = Yallist$1;
6090
6089
 
6091
- function requireYallist () {
6092
- if (hasRequiredYallist) return yallist;
6093
- hasRequiredYallist = 1;
6094
- yallist = Yallist;
6090
+ Yallist$1.Node = Node;
6091
+ Yallist$1.create = Yallist$1;
6095
6092
 
6096
- Yallist.Node = Node;
6097
- Yallist.create = Yallist;
6093
+ function Yallist$1 (list) {
6094
+ var self = this;
6095
+ if (!(self instanceof Yallist$1)) {
6096
+ self = new Yallist$1();
6097
+ }
6098
6098
 
6099
- function Yallist (list) {
6100
- var self = this;
6101
- if (!(self instanceof Yallist)) {
6102
- self = new Yallist();
6103
- }
6099
+ self.tail = null;
6100
+ self.head = null;
6101
+ self.length = 0;
6104
6102
 
6105
- self.tail = null;
6106
- self.head = null;
6107
- self.length = 0;
6103
+ if (list && typeof list.forEach === 'function') {
6104
+ list.forEach(function (item) {
6105
+ self.push(item);
6106
+ });
6107
+ } else if (arguments.length > 0) {
6108
+ for (var i = 0, l = arguments.length; i < l; i++) {
6109
+ self.push(arguments[i]);
6110
+ }
6111
+ }
6108
6112
 
6109
- if (list && typeof list.forEach === 'function') {
6110
- list.forEach(function (item) {
6111
- self.push(item);
6112
- });
6113
- } else if (arguments.length > 0) {
6114
- for (var i = 0, l = arguments.length; i < l; i++) {
6115
- self.push(arguments[i]);
6116
- }
6117
- }
6113
+ return self
6114
+ }
6118
6115
 
6119
- return self
6120
- }
6116
+ Yallist$1.prototype.removeNode = function (node) {
6117
+ if (node.list !== this) {
6118
+ throw new Error('removing node which does not belong to this list')
6119
+ }
6121
6120
 
6122
- Yallist.prototype.removeNode = function (node) {
6123
- if (node.list !== this) {
6124
- throw new Error('removing node which does not belong to this list')
6125
- }
6121
+ var next = node.next;
6122
+ var prev = node.prev;
6126
6123
 
6127
- var next = node.next;
6128
- var prev = node.prev;
6124
+ if (next) {
6125
+ next.prev = prev;
6126
+ }
6129
6127
 
6130
- if (next) {
6131
- next.prev = prev;
6132
- }
6128
+ if (prev) {
6129
+ prev.next = next;
6130
+ }
6133
6131
 
6134
- if (prev) {
6135
- prev.next = next;
6136
- }
6132
+ if (node === this.head) {
6133
+ this.head = next;
6134
+ }
6135
+ if (node === this.tail) {
6136
+ this.tail = prev;
6137
+ }
6137
6138
 
6138
- if (node === this.head) {
6139
- this.head = next;
6140
- }
6141
- if (node === this.tail) {
6142
- this.tail = prev;
6143
- }
6139
+ node.list.length--;
6140
+ node.next = null;
6141
+ node.prev = null;
6142
+ node.list = null;
6144
6143
 
6145
- node.list.length--;
6146
- node.next = null;
6147
- node.prev = null;
6148
- node.list = null;
6144
+ return next
6145
+ };
6149
6146
 
6150
- return next
6151
- };
6147
+ Yallist$1.prototype.unshiftNode = function (node) {
6148
+ if (node === this.head) {
6149
+ return
6150
+ }
6152
6151
 
6153
- Yallist.prototype.unshiftNode = function (node) {
6154
- if (node === this.head) {
6155
- return
6156
- }
6152
+ if (node.list) {
6153
+ node.list.removeNode(node);
6154
+ }
6157
6155
 
6158
- if (node.list) {
6159
- node.list.removeNode(node);
6160
- }
6156
+ var head = this.head;
6157
+ node.list = this;
6158
+ node.next = head;
6159
+ if (head) {
6160
+ head.prev = node;
6161
+ }
6161
6162
 
6162
- var head = this.head;
6163
- node.list = this;
6164
- node.next = head;
6165
- if (head) {
6166
- head.prev = node;
6167
- }
6163
+ this.head = node;
6164
+ if (!this.tail) {
6165
+ this.tail = node;
6166
+ }
6167
+ this.length++;
6168
+ };
6168
6169
 
6169
- this.head = node;
6170
- if (!this.tail) {
6171
- this.tail = node;
6172
- }
6173
- this.length++;
6174
- };
6170
+ Yallist$1.prototype.pushNode = function (node) {
6171
+ if (node === this.tail) {
6172
+ return
6173
+ }
6175
6174
 
6176
- Yallist.prototype.pushNode = function (node) {
6177
- if (node === this.tail) {
6178
- return
6179
- }
6175
+ if (node.list) {
6176
+ node.list.removeNode(node);
6177
+ }
6180
6178
 
6181
- if (node.list) {
6182
- node.list.removeNode(node);
6183
- }
6179
+ var tail = this.tail;
6180
+ node.list = this;
6181
+ node.prev = tail;
6182
+ if (tail) {
6183
+ tail.next = node;
6184
+ }
6184
6185
 
6185
- var tail = this.tail;
6186
- node.list = this;
6187
- node.prev = tail;
6188
- if (tail) {
6189
- tail.next = node;
6190
- }
6186
+ this.tail = node;
6187
+ if (!this.head) {
6188
+ this.head = node;
6189
+ }
6190
+ this.length++;
6191
+ };
6191
6192
 
6192
- this.tail = node;
6193
- if (!this.head) {
6194
- this.head = node;
6195
- }
6196
- this.length++;
6197
- };
6193
+ Yallist$1.prototype.push = function () {
6194
+ for (var i = 0, l = arguments.length; i < l; i++) {
6195
+ push(this, arguments[i]);
6196
+ }
6197
+ return this.length
6198
+ };
6198
6199
 
6199
- Yallist.prototype.push = function () {
6200
- for (var i = 0, l = arguments.length; i < l; i++) {
6201
- push(this, arguments[i]);
6202
- }
6203
- return this.length
6204
- };
6200
+ Yallist$1.prototype.unshift = function () {
6201
+ for (var i = 0, l = arguments.length; i < l; i++) {
6202
+ unshift(this, arguments[i]);
6203
+ }
6204
+ return this.length
6205
+ };
6205
6206
 
6206
- Yallist.prototype.unshift = function () {
6207
- for (var i = 0, l = arguments.length; i < l; i++) {
6208
- unshift(this, arguments[i]);
6209
- }
6210
- return this.length
6211
- };
6207
+ Yallist$1.prototype.pop = function () {
6208
+ if (!this.tail) {
6209
+ return undefined
6210
+ }
6212
6211
 
6213
- Yallist.prototype.pop = function () {
6214
- if (!this.tail) {
6215
- return undefined
6216
- }
6212
+ var res = this.tail.value;
6213
+ this.tail = this.tail.prev;
6214
+ if (this.tail) {
6215
+ this.tail.next = null;
6216
+ } else {
6217
+ this.head = null;
6218
+ }
6219
+ this.length--;
6220
+ return res
6221
+ };
6217
6222
 
6218
- var res = this.tail.value;
6219
- this.tail = this.tail.prev;
6220
- if (this.tail) {
6221
- this.tail.next = null;
6222
- } else {
6223
- this.head = null;
6224
- }
6225
- this.length--;
6226
- return res
6227
- };
6223
+ Yallist$1.prototype.shift = function () {
6224
+ if (!this.head) {
6225
+ return undefined
6226
+ }
6228
6227
 
6229
- Yallist.prototype.shift = function () {
6230
- if (!this.head) {
6231
- return undefined
6232
- }
6228
+ var res = this.head.value;
6229
+ this.head = this.head.next;
6230
+ if (this.head) {
6231
+ this.head.prev = null;
6232
+ } else {
6233
+ this.tail = null;
6234
+ }
6235
+ this.length--;
6236
+ return res
6237
+ };
6233
6238
 
6234
- var res = this.head.value;
6235
- this.head = this.head.next;
6236
- if (this.head) {
6237
- this.head.prev = null;
6238
- } else {
6239
- this.tail = null;
6240
- }
6241
- this.length--;
6242
- return res
6243
- };
6239
+ Yallist$1.prototype.forEach = function (fn, thisp) {
6240
+ thisp = thisp || this;
6241
+ for (var walker = this.head, i = 0; walker !== null; i++) {
6242
+ fn.call(thisp, walker.value, i, this);
6243
+ walker = walker.next;
6244
+ }
6245
+ };
6244
6246
 
6245
- Yallist.prototype.forEach = function (fn, thisp) {
6246
- thisp = thisp || this;
6247
- for (var walker = this.head, i = 0; walker !== null; i++) {
6248
- fn.call(thisp, walker.value, i, this);
6249
- walker = walker.next;
6250
- }
6251
- };
6247
+ Yallist$1.prototype.forEachReverse = function (fn, thisp) {
6248
+ thisp = thisp || this;
6249
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
6250
+ fn.call(thisp, walker.value, i, this);
6251
+ walker = walker.prev;
6252
+ }
6253
+ };
6252
6254
 
6253
- Yallist.prototype.forEachReverse = function (fn, thisp) {
6254
- thisp = thisp || this;
6255
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
6256
- fn.call(thisp, walker.value, i, this);
6257
- walker = walker.prev;
6258
- }
6259
- };
6255
+ Yallist$1.prototype.get = function (n) {
6256
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
6257
+ // abort out of the list early if we hit a cycle
6258
+ walker = walker.next;
6259
+ }
6260
+ if (i === n && walker !== null) {
6261
+ return walker.value
6262
+ }
6263
+ };
6260
6264
 
6261
- Yallist.prototype.get = function (n) {
6262
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
6263
- // abort out of the list early if we hit a cycle
6264
- walker = walker.next;
6265
- }
6266
- if (i === n && walker !== null) {
6267
- return walker.value
6268
- }
6269
- };
6265
+ Yallist$1.prototype.getReverse = function (n) {
6266
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
6267
+ // abort out of the list early if we hit a cycle
6268
+ walker = walker.prev;
6269
+ }
6270
+ if (i === n && walker !== null) {
6271
+ return walker.value
6272
+ }
6273
+ };
6270
6274
 
6271
- Yallist.prototype.getReverse = function (n) {
6272
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
6273
- // abort out of the list early if we hit a cycle
6274
- walker = walker.prev;
6275
- }
6276
- if (i === n && walker !== null) {
6277
- return walker.value
6278
- }
6279
- };
6275
+ Yallist$1.prototype.map = function (fn, thisp) {
6276
+ thisp = thisp || this;
6277
+ var res = new Yallist$1();
6278
+ for (var walker = this.head; walker !== null;) {
6279
+ res.push(fn.call(thisp, walker.value, this));
6280
+ walker = walker.next;
6281
+ }
6282
+ return res
6283
+ };
6280
6284
 
6281
- Yallist.prototype.map = function (fn, thisp) {
6282
- thisp = thisp || this;
6283
- var res = new Yallist();
6284
- for (var walker = this.head; walker !== null;) {
6285
- res.push(fn.call(thisp, walker.value, this));
6286
- walker = walker.next;
6287
- }
6288
- return res
6289
- };
6285
+ Yallist$1.prototype.mapReverse = function (fn, thisp) {
6286
+ thisp = thisp || this;
6287
+ var res = new Yallist$1();
6288
+ for (var walker = this.tail; walker !== null;) {
6289
+ res.push(fn.call(thisp, walker.value, this));
6290
+ walker = walker.prev;
6291
+ }
6292
+ return res
6293
+ };
6290
6294
 
6291
- Yallist.prototype.mapReverse = function (fn, thisp) {
6292
- thisp = thisp || this;
6293
- var res = new Yallist();
6294
- for (var walker = this.tail; walker !== null;) {
6295
- res.push(fn.call(thisp, walker.value, this));
6296
- walker = walker.prev;
6297
- }
6298
- return res
6299
- };
6295
+ Yallist$1.prototype.reduce = function (fn, initial) {
6296
+ var acc;
6297
+ var walker = this.head;
6298
+ if (arguments.length > 1) {
6299
+ acc = initial;
6300
+ } else if (this.head) {
6301
+ walker = this.head.next;
6302
+ acc = this.head.value;
6303
+ } else {
6304
+ throw new TypeError('Reduce of empty list with no initial value')
6305
+ }
6300
6306
 
6301
- Yallist.prototype.reduce = function (fn, initial) {
6302
- var acc;
6303
- var walker = this.head;
6304
- if (arguments.length > 1) {
6305
- acc = initial;
6306
- } else if (this.head) {
6307
- walker = this.head.next;
6308
- acc = this.head.value;
6309
- } else {
6310
- throw new TypeError('Reduce of empty list with no initial value')
6311
- }
6307
+ for (var i = 0; walker !== null; i++) {
6308
+ acc = fn(acc, walker.value, i);
6309
+ walker = walker.next;
6310
+ }
6312
6311
 
6313
- for (var i = 0; walker !== null; i++) {
6314
- acc = fn(acc, walker.value, i);
6315
- walker = walker.next;
6316
- }
6312
+ return acc
6313
+ };
6317
6314
 
6318
- return acc
6319
- };
6315
+ Yallist$1.prototype.reduceReverse = function (fn, initial) {
6316
+ var acc;
6317
+ var walker = this.tail;
6318
+ if (arguments.length > 1) {
6319
+ acc = initial;
6320
+ } else if (this.tail) {
6321
+ walker = this.tail.prev;
6322
+ acc = this.tail.value;
6323
+ } else {
6324
+ throw new TypeError('Reduce of empty list with no initial value')
6325
+ }
6320
6326
 
6321
- Yallist.prototype.reduceReverse = function (fn, initial) {
6322
- var acc;
6323
- var walker = this.tail;
6324
- if (arguments.length > 1) {
6325
- acc = initial;
6326
- } else if (this.tail) {
6327
- walker = this.tail.prev;
6328
- acc = this.tail.value;
6329
- } else {
6330
- throw new TypeError('Reduce of empty list with no initial value')
6331
- }
6327
+ for (var i = this.length - 1; walker !== null; i--) {
6328
+ acc = fn(acc, walker.value, i);
6329
+ walker = walker.prev;
6330
+ }
6332
6331
 
6333
- for (var i = this.length - 1; walker !== null; i--) {
6334
- acc = fn(acc, walker.value, i);
6335
- walker = walker.prev;
6336
- }
6332
+ return acc
6333
+ };
6337
6334
 
6338
- return acc
6339
- };
6335
+ Yallist$1.prototype.toArray = function () {
6336
+ var arr = new Array(this.length);
6337
+ for (var i = 0, walker = this.head; walker !== null; i++) {
6338
+ arr[i] = walker.value;
6339
+ walker = walker.next;
6340
+ }
6341
+ return arr
6342
+ };
6340
6343
 
6341
- Yallist.prototype.toArray = function () {
6342
- var arr = new Array(this.length);
6343
- for (var i = 0, walker = this.head; walker !== null; i++) {
6344
- arr[i] = walker.value;
6345
- walker = walker.next;
6346
- }
6347
- return arr
6348
- };
6344
+ Yallist$1.prototype.toArrayReverse = function () {
6345
+ var arr = new Array(this.length);
6346
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
6347
+ arr[i] = walker.value;
6348
+ walker = walker.prev;
6349
+ }
6350
+ return arr
6351
+ };
6349
6352
 
6350
- Yallist.prototype.toArrayReverse = function () {
6351
- var arr = new Array(this.length);
6352
- for (var i = 0, walker = this.tail; walker !== null; i++) {
6353
- arr[i] = walker.value;
6354
- walker = walker.prev;
6355
- }
6356
- return arr
6357
- };
6353
+ Yallist$1.prototype.slice = function (from, to) {
6354
+ to = to || this.length;
6355
+ if (to < 0) {
6356
+ to += this.length;
6357
+ }
6358
+ from = from || 0;
6359
+ if (from < 0) {
6360
+ from += this.length;
6361
+ }
6362
+ var ret = new Yallist$1();
6363
+ if (to < from || to < 0) {
6364
+ return ret
6365
+ }
6366
+ if (from < 0) {
6367
+ from = 0;
6368
+ }
6369
+ if (to > this.length) {
6370
+ to = this.length;
6371
+ }
6372
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
6373
+ walker = walker.next;
6374
+ }
6375
+ for (; walker !== null && i < to; i++, walker = walker.next) {
6376
+ ret.push(walker.value);
6377
+ }
6378
+ return ret
6379
+ };
6358
6380
 
6359
- Yallist.prototype.slice = function (from, to) {
6360
- to = to || this.length;
6361
- if (to < 0) {
6362
- to += this.length;
6363
- }
6364
- from = from || 0;
6365
- if (from < 0) {
6366
- from += this.length;
6367
- }
6368
- var ret = new Yallist();
6369
- if (to < from || to < 0) {
6370
- return ret
6371
- }
6372
- if (from < 0) {
6373
- from = 0;
6374
- }
6375
- if (to > this.length) {
6376
- to = this.length;
6377
- }
6378
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
6379
- walker = walker.next;
6380
- }
6381
- for (; walker !== null && i < to; i++, walker = walker.next) {
6382
- ret.push(walker.value);
6383
- }
6384
- return ret
6385
- };
6381
+ Yallist$1.prototype.sliceReverse = function (from, to) {
6382
+ to = to || this.length;
6383
+ if (to < 0) {
6384
+ to += this.length;
6385
+ }
6386
+ from = from || 0;
6387
+ if (from < 0) {
6388
+ from += this.length;
6389
+ }
6390
+ var ret = new Yallist$1();
6391
+ if (to < from || to < 0) {
6392
+ return ret
6393
+ }
6394
+ if (from < 0) {
6395
+ from = 0;
6396
+ }
6397
+ if (to > this.length) {
6398
+ to = this.length;
6399
+ }
6400
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
6401
+ walker = walker.prev;
6402
+ }
6403
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
6404
+ ret.push(walker.value);
6405
+ }
6406
+ return ret
6407
+ };
6386
6408
 
6387
- Yallist.prototype.sliceReverse = function (from, to) {
6388
- to = to || this.length;
6389
- if (to < 0) {
6390
- to += this.length;
6391
- }
6392
- from = from || 0;
6393
- if (from < 0) {
6394
- from += this.length;
6395
- }
6396
- var ret = new Yallist();
6397
- if (to < from || to < 0) {
6398
- return ret
6399
- }
6400
- if (from < 0) {
6401
- from = 0;
6402
- }
6403
- if (to > this.length) {
6404
- to = this.length;
6405
- }
6406
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
6407
- walker = walker.prev;
6408
- }
6409
- for (; walker !== null && i > from; i--, walker = walker.prev) {
6410
- ret.push(walker.value);
6411
- }
6412
- return ret
6413
- };
6409
+ Yallist$1.prototype.splice = function (start, deleteCount, ...nodes) {
6410
+ if (start > this.length) {
6411
+ start = this.length - 1;
6412
+ }
6413
+ if (start < 0) {
6414
+ start = this.length + start;
6415
+ }
6414
6416
 
6415
- Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
6416
- if (start > this.length) {
6417
- start = this.length - 1;
6418
- }
6419
- if (start < 0) {
6420
- start = this.length + start;
6421
- }
6417
+ for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
6418
+ walker = walker.next;
6419
+ }
6422
6420
 
6423
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
6424
- walker = walker.next;
6425
- }
6421
+ var ret = [];
6422
+ for (var i = 0; walker && i < deleteCount; i++) {
6423
+ ret.push(walker.value);
6424
+ walker = this.removeNode(walker);
6425
+ }
6426
+ if (walker === null) {
6427
+ walker = this.tail;
6428
+ }
6426
6429
 
6427
- var ret = [];
6428
- for (var i = 0; walker && i < deleteCount; i++) {
6429
- ret.push(walker.value);
6430
- walker = this.removeNode(walker);
6431
- }
6432
- if (walker === null) {
6433
- walker = this.tail;
6434
- }
6430
+ if (walker !== this.head && walker !== this.tail) {
6431
+ walker = walker.prev;
6432
+ }
6435
6433
 
6436
- if (walker !== this.head && walker !== this.tail) {
6437
- walker = walker.prev;
6438
- }
6434
+ for (var i = 0; i < nodes.length; i++) {
6435
+ walker = insert(this, walker, nodes[i]);
6436
+ }
6437
+ return ret;
6438
+ };
6439
6439
 
6440
- for (var i = 0; i < nodes.length; i++) {
6441
- walker = insert(this, walker, nodes[i]);
6442
- }
6443
- return ret;
6444
- };
6440
+ Yallist$1.prototype.reverse = function () {
6441
+ var head = this.head;
6442
+ var tail = this.tail;
6443
+ for (var walker = head; walker !== null; walker = walker.prev) {
6444
+ var p = walker.prev;
6445
+ walker.prev = walker.next;
6446
+ walker.next = p;
6447
+ }
6448
+ this.head = tail;
6449
+ this.tail = head;
6450
+ return this
6451
+ };
6445
6452
 
6446
- Yallist.prototype.reverse = function () {
6447
- var head = this.head;
6448
- var tail = this.tail;
6449
- for (var walker = head; walker !== null; walker = walker.prev) {
6450
- var p = walker.prev;
6451
- walker.prev = walker.next;
6452
- walker.next = p;
6453
- }
6454
- this.head = tail;
6455
- this.tail = head;
6456
- return this
6457
- };
6453
+ function insert (self, node, value) {
6454
+ var inserted = node === self.head ?
6455
+ new Node(value, null, node, self) :
6456
+ new Node(value, node, node.next, self);
6458
6457
 
6459
- function insert (self, node, value) {
6460
- var inserted = node === self.head ?
6461
- new Node(value, null, node, self) :
6462
- new Node(value, node, node.next, self);
6458
+ if (inserted.next === null) {
6459
+ self.tail = inserted;
6460
+ }
6461
+ if (inserted.prev === null) {
6462
+ self.head = inserted;
6463
+ }
6463
6464
 
6464
- if (inserted.next === null) {
6465
- self.tail = inserted;
6466
- }
6467
- if (inserted.prev === null) {
6468
- self.head = inserted;
6469
- }
6465
+ self.length++;
6470
6466
 
6471
- self.length++;
6467
+ return inserted
6468
+ }
6472
6469
 
6473
- return inserted
6474
- }
6470
+ function push (self, item) {
6471
+ self.tail = new Node(item, self.tail, null, self);
6472
+ if (!self.head) {
6473
+ self.head = self.tail;
6474
+ }
6475
+ self.length++;
6476
+ }
6475
6477
 
6476
- function push (self, item) {
6477
- self.tail = new Node(item, self.tail, null, self);
6478
- if (!self.head) {
6479
- self.head = self.tail;
6480
- }
6481
- self.length++;
6482
- }
6478
+ function unshift (self, item) {
6479
+ self.head = new Node(item, null, self.head, self);
6480
+ if (!self.tail) {
6481
+ self.tail = self.head;
6482
+ }
6483
+ self.length++;
6484
+ }
6483
6485
 
6484
- function unshift (self, item) {
6485
- self.head = new Node(item, null, self.head, self);
6486
- if (!self.tail) {
6487
- self.tail = self.head;
6488
- }
6489
- self.length++;
6490
- }
6486
+ function Node (value, prev, next, list) {
6487
+ if (!(this instanceof Node)) {
6488
+ return new Node(value, prev, next, list)
6489
+ }
6491
6490
 
6492
- function Node (value, prev, next, list) {
6493
- if (!(this instanceof Node)) {
6494
- return new Node(value, prev, next, list)
6495
- }
6491
+ this.list = list;
6492
+ this.value = value;
6496
6493
 
6497
- this.list = list;
6498
- this.value = value;
6494
+ if (prev) {
6495
+ prev.next = this;
6496
+ this.prev = prev;
6497
+ } else {
6498
+ this.prev = null;
6499
+ }
6499
6500
 
6500
- if (prev) {
6501
- prev.next = this;
6502
- this.prev = prev;
6503
- } else {
6504
- this.prev = null;
6505
- }
6501
+ if (next) {
6502
+ next.prev = this;
6503
+ this.next = next;
6504
+ } else {
6505
+ this.next = null;
6506
+ }
6507
+ }
6506
6508
 
6507
- if (next) {
6508
- next.prev = this;
6509
- this.next = next;
6510
- } else {
6511
- this.next = null;
6512
- }
6513
- }
6509
+ try {
6510
+ // add if support for Symbol.iterator is present
6511
+ requireIterator()(Yallist$1);
6512
+ } catch (er) {}
6513
+
6514
+ // A linked list to keep track of recently-used-ness
6515
+ const Yallist = yallist;
6516
+
6517
+ const MAX = Symbol('max');
6518
+ const LENGTH = Symbol('length');
6519
+ const LENGTH_CALCULATOR = Symbol('lengthCalculator');
6520
+ const ALLOW_STALE = Symbol('allowStale');
6521
+ const MAX_AGE = Symbol('maxAge');
6522
+ const DISPOSE = Symbol('dispose');
6523
+ const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
6524
+ const LRU_LIST = Symbol('lruList');
6525
+ const CACHE = Symbol('cache');
6526
+ const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
6527
+
6528
+ const naiveLength = () => 1;
6529
+
6530
+ // lruList is a yallist where the head is the youngest
6531
+ // item, and the tail is the oldest. the list contains the Hit
6532
+ // objects as the entries.
6533
+ // Each Hit object has a reference to its Yallist.Node. This
6534
+ // never changes.
6535
+ //
6536
+ // cache is a Map (or PseudoMap) that matches the keys to
6537
+ // the Yallist.Node object.
6538
+ class LRUCache {
6539
+ constructor (options) {
6540
+ if (typeof options === 'number')
6541
+ options = { max: options };
6542
+
6543
+ if (!options)
6544
+ options = {};
6514
6545
 
6515
- try {
6516
- // add if support for Symbol.iterator is present
6517
- requireIterator()(Yallist);
6518
- } catch (er) {}
6519
- return yallist;
6520
- }
6546
+ if (options.max && (typeof options.max !== 'number' || options.max < 0))
6547
+ throw new TypeError('max must be a non-negative number')
6548
+ // Kind of weird to have a default max of Infinity, but oh well.
6549
+ this[MAX] = options.max || Infinity;
6521
6550
 
6522
- var lruCache;
6523
- var hasRequiredLruCache;
6524
-
6525
- function requireLruCache () {
6526
- if (hasRequiredLruCache) return lruCache;
6527
- hasRequiredLruCache = 1;
6528
-
6529
- // A linked list to keep track of recently-used-ness
6530
- const Yallist = requireYallist();
6531
-
6532
- const MAX = Symbol('max');
6533
- const LENGTH = Symbol('length');
6534
- const LENGTH_CALCULATOR = Symbol('lengthCalculator');
6535
- const ALLOW_STALE = Symbol('allowStale');
6536
- const MAX_AGE = Symbol('maxAge');
6537
- const DISPOSE = Symbol('dispose');
6538
- const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
6539
- const LRU_LIST = Symbol('lruList');
6540
- const CACHE = Symbol('cache');
6541
- const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
6542
-
6543
- const naiveLength = () => 1;
6544
-
6545
- // lruList is a yallist where the head is the youngest
6546
- // item, and the tail is the oldest. the list contains the Hit
6547
- // objects as the entries.
6548
- // Each Hit object has a reference to its Yallist.Node. This
6549
- // never changes.
6550
- //
6551
- // cache is a Map (or PseudoMap) that matches the keys to
6552
- // the Yallist.Node object.
6553
- class LRUCache {
6554
- constructor (options) {
6555
- if (typeof options === 'number')
6556
- options = { max: options };
6557
-
6558
- if (!options)
6559
- options = {};
6560
-
6561
- if (options.max && (typeof options.max !== 'number' || options.max < 0))
6562
- throw new TypeError('max must be a non-negative number')
6563
- // Kind of weird to have a default max of Infinity, but oh well.
6564
- this[MAX] = options.max || Infinity;
6565
-
6566
- const lc = options.length || naiveLength;
6567
- this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
6568
- this[ALLOW_STALE] = options.stale || false;
6569
- if (options.maxAge && typeof options.maxAge !== 'number')
6570
- throw new TypeError('maxAge must be a number')
6571
- this[MAX_AGE] = options.maxAge || 0;
6572
- this[DISPOSE] = options.dispose;
6573
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
6574
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
6575
- this.reset();
6576
- }
6551
+ const lc = options.length || naiveLength;
6552
+ this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
6553
+ this[ALLOW_STALE] = options.stale || false;
6554
+ if (options.maxAge && typeof options.maxAge !== 'number')
6555
+ throw new TypeError('maxAge must be a number')
6556
+ this[MAX_AGE] = options.maxAge || 0;
6557
+ this[DISPOSE] = options.dispose;
6558
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
6559
+ this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
6560
+ this.reset();
6561
+ }
6577
6562
 
6578
- // resize the cache when the max changes.
6579
- set max (mL) {
6580
- if (typeof mL !== 'number' || mL < 0)
6581
- throw new TypeError('max must be a non-negative number')
6563
+ // resize the cache when the max changes.
6564
+ set max (mL) {
6565
+ if (typeof mL !== 'number' || mL < 0)
6566
+ throw new TypeError('max must be a non-negative number')
6582
6567
 
6583
- this[MAX] = mL || Infinity;
6584
- trim(this);
6585
- }
6586
- get max () {
6587
- return this[MAX]
6588
- }
6568
+ this[MAX] = mL || Infinity;
6569
+ trim(this);
6570
+ }
6571
+ get max () {
6572
+ return this[MAX]
6573
+ }
6589
6574
 
6590
- set allowStale (allowStale) {
6591
- this[ALLOW_STALE] = !!allowStale;
6592
- }
6593
- get allowStale () {
6594
- return this[ALLOW_STALE]
6595
- }
6575
+ set allowStale (allowStale) {
6576
+ this[ALLOW_STALE] = !!allowStale;
6577
+ }
6578
+ get allowStale () {
6579
+ return this[ALLOW_STALE]
6580
+ }
6596
6581
 
6597
- set maxAge (mA) {
6598
- if (typeof mA !== 'number')
6599
- throw new TypeError('maxAge must be a non-negative number')
6582
+ set maxAge (mA) {
6583
+ if (typeof mA !== 'number')
6584
+ throw new TypeError('maxAge must be a non-negative number')
6600
6585
 
6601
- this[MAX_AGE] = mA;
6602
- trim(this);
6603
- }
6604
- get maxAge () {
6605
- return this[MAX_AGE]
6606
- }
6586
+ this[MAX_AGE] = mA;
6587
+ trim(this);
6588
+ }
6589
+ get maxAge () {
6590
+ return this[MAX_AGE]
6591
+ }
6607
6592
 
6608
- // resize the cache when the lengthCalculator changes.
6609
- set lengthCalculator (lC) {
6610
- if (typeof lC !== 'function')
6611
- lC = naiveLength;
6612
-
6613
- if (lC !== this[LENGTH_CALCULATOR]) {
6614
- this[LENGTH_CALCULATOR] = lC;
6615
- this[LENGTH] = 0;
6616
- this[LRU_LIST].forEach(hit => {
6617
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
6618
- this[LENGTH] += hit.length;
6619
- });
6620
- }
6621
- trim(this);
6622
- }
6623
- get lengthCalculator () { return this[LENGTH_CALCULATOR] }
6593
+ // resize the cache when the lengthCalculator changes.
6594
+ set lengthCalculator (lC) {
6595
+ if (typeof lC !== 'function')
6596
+ lC = naiveLength;
6624
6597
 
6625
- get length () { return this[LENGTH] }
6626
- get itemCount () { return this[LRU_LIST].length }
6598
+ if (lC !== this[LENGTH_CALCULATOR]) {
6599
+ this[LENGTH_CALCULATOR] = lC;
6600
+ this[LENGTH] = 0;
6601
+ this[LRU_LIST].forEach(hit => {
6602
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
6603
+ this[LENGTH] += hit.length;
6604
+ });
6605
+ }
6606
+ trim(this);
6607
+ }
6608
+ get lengthCalculator () { return this[LENGTH_CALCULATOR] }
6627
6609
 
6628
- rforEach (fn, thisp) {
6629
- thisp = thisp || this;
6630
- for (let walker = this[LRU_LIST].tail; walker !== null;) {
6631
- const prev = walker.prev;
6632
- forEachStep(this, fn, walker, thisp);
6633
- walker = prev;
6634
- }
6635
- }
6610
+ get length () { return this[LENGTH] }
6611
+ get itemCount () { return this[LRU_LIST].length }
6636
6612
 
6637
- forEach (fn, thisp) {
6638
- thisp = thisp || this;
6639
- for (let walker = this[LRU_LIST].head; walker !== null;) {
6640
- const next = walker.next;
6641
- forEachStep(this, fn, walker, thisp);
6642
- walker = next;
6643
- }
6644
- }
6613
+ rforEach (fn, thisp) {
6614
+ thisp = thisp || this;
6615
+ for (let walker = this[LRU_LIST].tail; walker !== null;) {
6616
+ const prev = walker.prev;
6617
+ forEachStep(this, fn, walker, thisp);
6618
+ walker = prev;
6619
+ }
6620
+ }
6645
6621
 
6646
- keys () {
6647
- return this[LRU_LIST].toArray().map(k => k.key)
6648
- }
6622
+ forEach (fn, thisp) {
6623
+ thisp = thisp || this;
6624
+ for (let walker = this[LRU_LIST].head; walker !== null;) {
6625
+ const next = walker.next;
6626
+ forEachStep(this, fn, walker, thisp);
6627
+ walker = next;
6628
+ }
6629
+ }
6649
6630
 
6650
- values () {
6651
- return this[LRU_LIST].toArray().map(k => k.value)
6652
- }
6631
+ keys () {
6632
+ return this[LRU_LIST].toArray().map(k => k.key)
6633
+ }
6653
6634
 
6654
- reset () {
6655
- if (this[DISPOSE] &&
6656
- this[LRU_LIST] &&
6657
- this[LRU_LIST].length) {
6658
- this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
6659
- }
6635
+ values () {
6636
+ return this[LRU_LIST].toArray().map(k => k.value)
6637
+ }
6660
6638
 
6661
- this[CACHE] = new Map(); // hash of items by key
6662
- this[LRU_LIST] = new Yallist(); // list of items in order of use recency
6663
- this[LENGTH] = 0; // length of items in the list
6664
- }
6639
+ reset () {
6640
+ if (this[DISPOSE] &&
6641
+ this[LRU_LIST] &&
6642
+ this[LRU_LIST].length) {
6643
+ this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
6644
+ }
6665
6645
 
6666
- dump () {
6667
- return this[LRU_LIST].map(hit =>
6668
- isStale(this, hit) ? false : {
6669
- k: hit.key,
6670
- v: hit.value,
6671
- e: hit.now + (hit.maxAge || 0)
6672
- }).toArray().filter(h => h)
6673
- }
6646
+ this[CACHE] = new Map(); // hash of items by key
6647
+ this[LRU_LIST] = new Yallist(); // list of items in order of use recency
6648
+ this[LENGTH] = 0; // length of items in the list
6649
+ }
6674
6650
 
6675
- dumpLru () {
6676
- return this[LRU_LIST]
6677
- }
6651
+ dump () {
6652
+ return this[LRU_LIST].map(hit =>
6653
+ isStale(this, hit) ? false : {
6654
+ k: hit.key,
6655
+ v: hit.value,
6656
+ e: hit.now + (hit.maxAge || 0)
6657
+ }).toArray().filter(h => h)
6658
+ }
6678
6659
 
6679
- set (key, value, maxAge) {
6680
- maxAge = maxAge || this[MAX_AGE];
6660
+ dumpLru () {
6661
+ return this[LRU_LIST]
6662
+ }
6681
6663
 
6682
- if (maxAge && typeof maxAge !== 'number')
6683
- throw new TypeError('maxAge must be a number')
6664
+ set (key, value, maxAge) {
6665
+ maxAge = maxAge || this[MAX_AGE];
6684
6666
 
6685
- const now = maxAge ? Date.now() : 0;
6686
- const len = this[LENGTH_CALCULATOR](value, key);
6667
+ if (maxAge && typeof maxAge !== 'number')
6668
+ throw new TypeError('maxAge must be a number')
6687
6669
 
6688
- if (this[CACHE].has(key)) {
6689
- if (len > this[MAX]) {
6690
- del(this, this[CACHE].get(key));
6691
- return false
6692
- }
6670
+ const now = maxAge ? Date.now() : 0;
6671
+ const len = this[LENGTH_CALCULATOR](value, key);
6693
6672
 
6694
- const node = this[CACHE].get(key);
6695
- const item = node.value;
6673
+ if (this[CACHE].has(key)) {
6674
+ if (len > this[MAX]) {
6675
+ del(this, this[CACHE].get(key));
6676
+ return false
6677
+ }
6696
6678
 
6697
- // dispose of the old one before overwriting
6698
- // split out into 2 ifs for better coverage tracking
6699
- if (this[DISPOSE]) {
6700
- if (!this[NO_DISPOSE_ON_SET])
6701
- this[DISPOSE](key, item.value);
6702
- }
6679
+ const node = this[CACHE].get(key);
6680
+ const item = node.value;
6703
6681
 
6704
- item.now = now;
6705
- item.maxAge = maxAge;
6706
- item.value = value;
6707
- this[LENGTH] += len - item.length;
6708
- item.length = len;
6709
- this.get(key);
6710
- trim(this);
6711
- return true
6712
- }
6682
+ // dispose of the old one before overwriting
6683
+ // split out into 2 ifs for better coverage tracking
6684
+ if (this[DISPOSE]) {
6685
+ if (!this[NO_DISPOSE_ON_SET])
6686
+ this[DISPOSE](key, item.value);
6687
+ }
6713
6688
 
6714
- const hit = new Entry(key, value, len, now, maxAge);
6689
+ item.now = now;
6690
+ item.maxAge = maxAge;
6691
+ item.value = value;
6692
+ this[LENGTH] += len - item.length;
6693
+ item.length = len;
6694
+ this.get(key);
6695
+ trim(this);
6696
+ return true
6697
+ }
6715
6698
 
6716
- // oversized objects fall out of cache automatically.
6717
- if (hit.length > this[MAX]) {
6718
- if (this[DISPOSE])
6719
- this[DISPOSE](key, value);
6699
+ const hit = new Entry(key, value, len, now, maxAge);
6720
6700
 
6721
- return false
6722
- }
6701
+ // oversized objects fall out of cache automatically.
6702
+ if (hit.length > this[MAX]) {
6703
+ if (this[DISPOSE])
6704
+ this[DISPOSE](key, value);
6723
6705
 
6724
- this[LENGTH] += hit.length;
6725
- this[LRU_LIST].unshift(hit);
6726
- this[CACHE].set(key, this[LRU_LIST].head);
6727
- trim(this);
6728
- return true
6729
- }
6706
+ return false
6707
+ }
6730
6708
 
6731
- has (key) {
6732
- if (!this[CACHE].has(key)) return false
6733
- const hit = this[CACHE].get(key).value;
6734
- return !isStale(this, hit)
6735
- }
6709
+ this[LENGTH] += hit.length;
6710
+ this[LRU_LIST].unshift(hit);
6711
+ this[CACHE].set(key, this[LRU_LIST].head);
6712
+ trim(this);
6713
+ return true
6714
+ }
6736
6715
 
6737
- get (key) {
6738
- return get(this, key, true)
6739
- }
6716
+ has (key) {
6717
+ if (!this[CACHE].has(key)) return false
6718
+ const hit = this[CACHE].get(key).value;
6719
+ return !isStale(this, hit)
6720
+ }
6740
6721
 
6741
- peek (key) {
6742
- return get(this, key, false)
6743
- }
6722
+ get (key) {
6723
+ return get(this, key, true)
6724
+ }
6744
6725
 
6745
- pop () {
6746
- const node = this[LRU_LIST].tail;
6747
- if (!node)
6748
- return null
6726
+ peek (key) {
6727
+ return get(this, key, false)
6728
+ }
6749
6729
 
6750
- del(this, node);
6751
- return node.value
6752
- }
6730
+ pop () {
6731
+ const node = this[LRU_LIST].tail;
6732
+ if (!node)
6733
+ return null
6753
6734
 
6754
- del (key) {
6755
- del(this, this[CACHE].get(key));
6756
- }
6735
+ del(this, node);
6736
+ return node.value
6737
+ }
6757
6738
 
6758
- load (arr) {
6759
- // reset the cache
6760
- this.reset();
6761
-
6762
- const now = Date.now();
6763
- // A previous serialized cache has the most recent items first
6764
- for (let l = arr.length - 1; l >= 0; l--) {
6765
- const hit = arr[l];
6766
- const expiresAt = hit.e || 0;
6767
- if (expiresAt === 0)
6768
- // the item was created without expiration in a non aged cache
6769
- this.set(hit.k, hit.v);
6770
- else {
6771
- const maxAge = expiresAt - now;
6772
- // dont add already expired items
6773
- if (maxAge > 0) {
6774
- this.set(hit.k, hit.v, maxAge);
6775
- }
6776
- }
6777
- }
6778
- }
6739
+ del (key) {
6740
+ del(this, this[CACHE].get(key));
6741
+ }
6779
6742
 
6780
- prune () {
6781
- this[CACHE].forEach((value, key) => get(this, key, false));
6782
- }
6783
- }
6743
+ load (arr) {
6744
+ // reset the cache
6745
+ this.reset();
6784
6746
 
6785
- const get = (self, key, doUse) => {
6786
- const node = self[CACHE].get(key);
6787
- if (node) {
6788
- const hit = node.value;
6789
- if (isStale(self, hit)) {
6790
- del(self, node);
6791
- if (!self[ALLOW_STALE])
6792
- return undefined
6793
- } else {
6794
- if (doUse) {
6795
- if (self[UPDATE_AGE_ON_GET])
6796
- node.value.now = Date.now();
6797
- self[LRU_LIST].unshiftNode(node);
6798
- }
6799
- }
6800
- return hit.value
6801
- }
6802
- };
6747
+ const now = Date.now();
6748
+ // A previous serialized cache has the most recent items first
6749
+ for (let l = arr.length - 1; l >= 0; l--) {
6750
+ const hit = arr[l];
6751
+ const expiresAt = hit.e || 0;
6752
+ if (expiresAt === 0)
6753
+ // the item was created without expiration in a non aged cache
6754
+ this.set(hit.k, hit.v);
6755
+ else {
6756
+ const maxAge = expiresAt - now;
6757
+ // dont add already expired items
6758
+ if (maxAge > 0) {
6759
+ this.set(hit.k, hit.v, maxAge);
6760
+ }
6761
+ }
6762
+ }
6763
+ }
6803
6764
 
6804
- const isStale = (self, hit) => {
6805
- if (!hit || (!hit.maxAge && !self[MAX_AGE]))
6806
- return false
6765
+ prune () {
6766
+ this[CACHE].forEach((value, key) => get(this, key, false));
6767
+ }
6768
+ }
6807
6769
 
6808
- const diff = Date.now() - hit.now;
6809
- return hit.maxAge ? diff > hit.maxAge
6810
- : self[MAX_AGE] && (diff > self[MAX_AGE])
6811
- };
6770
+ const get = (self, key, doUse) => {
6771
+ const node = self[CACHE].get(key);
6772
+ if (node) {
6773
+ const hit = node.value;
6774
+ if (isStale(self, hit)) {
6775
+ del(self, node);
6776
+ if (!self[ALLOW_STALE])
6777
+ return undefined
6778
+ } else {
6779
+ if (doUse) {
6780
+ if (self[UPDATE_AGE_ON_GET])
6781
+ node.value.now = Date.now();
6782
+ self[LRU_LIST].unshiftNode(node);
6783
+ }
6784
+ }
6785
+ return hit.value
6786
+ }
6787
+ };
6812
6788
 
6813
- const trim = self => {
6814
- if (self[LENGTH] > self[MAX]) {
6815
- for (let walker = self[LRU_LIST].tail;
6816
- self[LENGTH] > self[MAX] && walker !== null;) {
6817
- // We know that we're about to delete this one, and also
6818
- // what the next least recently used key will be, so just
6819
- // go ahead and set it now.
6820
- const prev = walker.prev;
6821
- del(self, walker);
6822
- walker = prev;
6823
- }
6824
- }
6825
- };
6789
+ const isStale = (self, hit) => {
6790
+ if (!hit || (!hit.maxAge && !self[MAX_AGE]))
6791
+ return false
6826
6792
 
6827
- const del = (self, node) => {
6828
- if (node) {
6829
- const hit = node.value;
6830
- if (self[DISPOSE])
6831
- self[DISPOSE](hit.key, hit.value);
6793
+ const diff = Date.now() - hit.now;
6794
+ return hit.maxAge ? diff > hit.maxAge
6795
+ : self[MAX_AGE] && (diff > self[MAX_AGE])
6796
+ };
6832
6797
 
6833
- self[LENGTH] -= hit.length;
6834
- self[CACHE].delete(hit.key);
6835
- self[LRU_LIST].removeNode(node);
6836
- }
6837
- };
6798
+ const trim = self => {
6799
+ if (self[LENGTH] > self[MAX]) {
6800
+ for (let walker = self[LRU_LIST].tail;
6801
+ self[LENGTH] > self[MAX] && walker !== null;) {
6802
+ // We know that we're about to delete this one, and also
6803
+ // what the next least recently used key will be, so just
6804
+ // go ahead and set it now.
6805
+ const prev = walker.prev;
6806
+ del(self, walker);
6807
+ walker = prev;
6808
+ }
6809
+ }
6810
+ };
6838
6811
 
6839
- class Entry {
6840
- constructor (key, value, length, now, maxAge) {
6841
- this.key = key;
6842
- this.value = value;
6843
- this.length = length;
6844
- this.now = now;
6845
- this.maxAge = maxAge || 0;
6846
- }
6847
- }
6812
+ const del = (self, node) => {
6813
+ if (node) {
6814
+ const hit = node.value;
6815
+ if (self[DISPOSE])
6816
+ self[DISPOSE](hit.key, hit.value);
6848
6817
 
6849
- const forEachStep = (self, fn, node, thisp) => {
6850
- let hit = node.value;
6851
- if (isStale(self, hit)) {
6852
- del(self, node);
6853
- if (!self[ALLOW_STALE])
6854
- hit = undefined;
6855
- }
6856
- if (hit)
6857
- fn.call(thisp, hit.value, hit.key, self);
6858
- };
6818
+ self[LENGTH] -= hit.length;
6819
+ self[CACHE].delete(hit.key);
6820
+ self[LRU_LIST].removeNode(node);
6821
+ }
6822
+ };
6859
6823
 
6860
- lruCache = LRUCache;
6861
- return lruCache;
6824
+ class Entry {
6825
+ constructor (key, value, length, now, maxAge) {
6826
+ this.key = key;
6827
+ this.value = value;
6828
+ this.length = length;
6829
+ this.now = now;
6830
+ this.maxAge = maxAge || 0;
6831
+ }
6862
6832
  }
6863
6833
 
6834
+ const forEachStep = (self, fn, node, thisp) => {
6835
+ let hit = node.value;
6836
+ if (isStale(self, hit)) {
6837
+ del(self, node);
6838
+ if (!self[ALLOW_STALE])
6839
+ hit = undefined;
6840
+ }
6841
+ if (hit)
6842
+ fn.call(thisp, hit.value, hit.key, self);
6843
+ };
6844
+
6845
+ var lruCache = LRUCache;
6846
+
6864
6847
  var range;
6865
6848
  var hasRequiredRange;
6866
6849
 
@@ -7061,7 +7044,7 @@ function requireRange () {
7061
7044
  }
7062
7045
  range = Range;
7063
7046
 
7064
- const LRU = requireLruCache();
7047
+ const LRU = lruCache;
7065
7048
  const cache = new LRU({ max: 1000 });
7066
7049
 
7067
7050
  const parseOptions = parseOptions_1;