eoapi-cdk 5.4.1 → 6.0.1

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 (1276) hide show
  1. package/.jsii +360 -831
  2. package/CHANGELOG.md +19 -0
  3. package/lib/bastion-host/index.js +1 -1
  4. package/lib/{bootstrapper/runtime → database/bootstrapper_runtime}/Dockerfile +5 -3
  5. package/lib/database/index.d.ts +34 -5
  6. package/lib/database/index.js +66 -12
  7. package/lib/index.d.ts +1 -1
  8. package/lib/index.js +2 -2
  9. package/lib/ingestor-api/index.d.ts +15 -43
  10. package/lib/ingestor-api/index.js +40 -28
  11. package/lib/ingestor-api/runtime/Dockerfile +16 -0
  12. package/lib/ingestor-api/runtime/requirements.txt +2 -2
  13. package/lib/ingestor-api/runtime/src/handler.py +1 -1
  14. package/lib/ingestor-api/runtime/src/main.py +8 -0
  15. package/lib/stac-api/index.d.ts +10 -24
  16. package/lib/stac-api/index.js +24 -28
  17. package/lib/stac-api/runtime/Dockerfile +13 -0
  18. package/lib/stac-api/runtime/requirements.txt +0 -1
  19. package/lib/stac-browser/index.js +1 -1
  20. package/lib/tipg-api/index.d.ts +9 -23
  21. package/lib/tipg-api/index.js +22 -18
  22. package/lib/tipg-api/runtime/Dockerfile +17 -0
  23. package/lib/tipg-api/runtime/src/handler.py +1 -1
  24. package/lib/titiler-pgstac-api/index.d.ts +6 -39
  25. package/lib/titiler-pgstac-api/index.js +20 -18
  26. package/lib/titiler-pgstac-api/runtime/Dockerfile +19 -0
  27. package/lib/titiler-pgstac-api/runtime/requirements.txt +1 -2
  28. package/lib/titiler-pgstac-api/runtime/src/handler.py +1 -1
  29. package/lib/utils/index.d.ts +2 -0
  30. package/lib/utils/index.js +3 -0
  31. package/node_modules/@gulp-sourcemaps/map-sources/LICENSE +21 -0
  32. package/node_modules/@gulp-sourcemaps/map-sources/README.md +52 -0
  33. package/node_modules/@gulp-sourcemaps/map-sources/index.js +30 -0
  34. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/LICENSE +21 -0
  35. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/README.md +92 -0
  36. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/index.js +19 -0
  37. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/package.json +78 -0
  38. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/LICENSE.md +9 -0
  39. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/README.md +134 -0
  40. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/package.json +33 -0
  41. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/through2.js +96 -0
  42. package/node_modules/@gulp-sourcemaps/map-sources/package.json +47 -0
  43. package/node_modules/acorn/.npmignore +10 -0
  44. package/node_modules/acorn/AUTHORS +62 -0
  45. package/node_modules/acorn/CHANGELOG.md +286 -0
  46. package/node_modules/acorn/LICENSE +19 -0
  47. package/node_modules/acorn/README.md +409 -0
  48. package/node_modules/acorn/bin/acorn +67 -0
  49. package/node_modules/acorn/dist/.keep +0 -0
  50. package/node_modules/acorn/dist/acorn.es.js +3401 -0
  51. package/node_modules/acorn/dist/acorn.js +3433 -0
  52. package/node_modules/acorn/dist/acorn_loose.es.js +1364 -0
  53. package/node_modules/acorn/dist/acorn_loose.js +1374 -0
  54. package/node_modules/acorn/dist/walk.es.js +342 -0
  55. package/node_modules/acorn/dist/walk.js +360 -0
  56. package/node_modules/acorn/package.json +46 -0
  57. package/node_modules/acorn/src/bin/acorn.js +60 -0
  58. package/node_modules/acorn/src/expression.js +819 -0
  59. package/node_modules/acorn/src/identifier.js +81 -0
  60. package/node_modules/acorn/src/index.js +77 -0
  61. package/node_modules/acorn/src/location.js +26 -0
  62. package/node_modules/acorn/src/locutil.js +42 -0
  63. package/node_modules/acorn/src/loose/expression.js +562 -0
  64. package/node_modules/acorn/src/loose/index.js +48 -0
  65. package/node_modules/acorn/src/loose/parseutil.js +1 -0
  66. package/node_modules/acorn/src/loose/state.js +161 -0
  67. package/node_modules/acorn/src/loose/statement.js +450 -0
  68. package/node_modules/acorn/src/loose/tokenize.js +108 -0
  69. package/node_modules/acorn/src/lval.js +219 -0
  70. package/node_modules/acorn/src/node.js +50 -0
  71. package/node_modules/acorn/src/options.js +128 -0
  72. package/node_modules/acorn/src/parseutil.js +128 -0
  73. package/node_modules/acorn/src/state.js +111 -0
  74. package/node_modules/acorn/src/statement.js +744 -0
  75. package/node_modules/acorn/src/tokencontext.js +110 -0
  76. package/node_modules/acorn/src/tokenize.js +686 -0
  77. package/node_modules/acorn/src/tokentype.js +147 -0
  78. package/node_modules/acorn/src/util.js +9 -0
  79. package/node_modules/acorn/src/walk/index.js +342 -0
  80. package/node_modules/acorn/src/whitespace.js +13 -0
  81. package/node_modules/arr-diff/LICENSE +21 -0
  82. package/node_modules/arr-diff/README.md +74 -0
  83. package/node_modules/arr-diff/index.js +58 -0
  84. package/node_modules/arr-diff/package.json +49 -0
  85. package/node_modules/arr-flatten/LICENSE +21 -0
  86. package/node_modules/arr-flatten/README.md +86 -0
  87. package/node_modules/arr-flatten/index.js +22 -0
  88. package/node_modules/arr-flatten/package.json +76 -0
  89. package/node_modules/array-unique/LICENSE +21 -0
  90. package/node_modules/array-unique/README.md +51 -0
  91. package/node_modules/array-unique/index.js +28 -0
  92. package/node_modules/array-unique/package.json +37 -0
  93. package/node_modules/atob/LICENSE +230 -0
  94. package/node_modules/atob/LICENSE.DOCS +319 -0
  95. package/node_modules/atob/README.md +49 -0
  96. package/node_modules/atob/bin/atob.js +6 -0
  97. package/node_modules/atob/bower.json +24 -0
  98. package/node_modules/atob/browser-atob.js +44 -0
  99. package/node_modules/atob/node-atob.js +7 -0
  100. package/node_modules/atob/package.json +24 -0
  101. package/node_modules/atob/test.js +18 -0
  102. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  103. package/node_modules/balanced-match/LICENSE.md +21 -0
  104. package/node_modules/balanced-match/README.md +97 -0
  105. package/node_modules/balanced-match/index.js +62 -0
  106. package/node_modules/balanced-match/package.json +48 -0
  107. package/node_modules/brace-expansion/LICENSE +21 -0
  108. package/node_modules/brace-expansion/README.md +129 -0
  109. package/node_modules/brace-expansion/index.js +201 -0
  110. package/node_modules/brace-expansion/package.json +47 -0
  111. package/node_modules/clone-stats/LICENSE.md +21 -0
  112. package/node_modules/clone-stats/README.md +17 -0
  113. package/node_modules/clone-stats/index.js +13 -0
  114. package/node_modules/clone-stats/package.json +31 -0
  115. package/node_modules/clone-stats/test.js +36 -0
  116. package/node_modules/code-point-at/index.js +32 -0
  117. package/node_modules/code-point-at/license +21 -0
  118. package/node_modules/code-point-at/package.json +38 -0
  119. package/node_modules/code-point-at/readme.md +32 -0
  120. package/node_modules/concat-map/.travis.yml +4 -0
  121. package/node_modules/concat-map/LICENSE +18 -0
  122. package/node_modules/concat-map/README.markdown +62 -0
  123. package/node_modules/concat-map/example/map.js +6 -0
  124. package/node_modules/concat-map/index.js +13 -0
  125. package/node_modules/concat-map/package.json +43 -0
  126. package/node_modules/concat-map/test/map.js +39 -0
  127. package/node_modules/convert-source-map/LICENSE +23 -0
  128. package/node_modules/convert-source-map/README.md +123 -0
  129. package/node_modules/convert-source-map/index.js +179 -0
  130. package/node_modules/convert-source-map/package.json +41 -0
  131. package/node_modules/core-util-is/LICENSE +19 -0
  132. package/node_modules/core-util-is/README.md +3 -0
  133. package/node_modules/core-util-is/lib/util.js +107 -0
  134. package/node_modules/core-util-is/package.json +38 -0
  135. package/node_modules/css/History.md +75 -0
  136. package/node_modules/css/LICENSE +9 -0
  137. package/node_modules/css/Readme.md +314 -0
  138. package/node_modules/css/index.js +2 -0
  139. package/node_modules/css/lib/parse/index.js +603 -0
  140. package/node_modules/css/lib/stringify/compiler.js +50 -0
  141. package/node_modules/css/lib/stringify/compress.js +199 -0
  142. package/node_modules/css/lib/stringify/identity.js +254 -0
  143. package/node_modules/css/lib/stringify/index.js +47 -0
  144. package/node_modules/css/lib/stringify/source-map-support.js +126 -0
  145. package/node_modules/css/package.json +39 -0
  146. package/node_modules/debug-fabulous/LICENSE +21 -0
  147. package/node_modules/debug-fabulous/README.md +29 -0
  148. package/node_modules/debug-fabulous/index.js +11 -0
  149. package/node_modules/debug-fabulous/node_modules/debug/.coveralls.yml +1 -0
  150. package/node_modules/debug-fabulous/node_modules/debug/.eslintrc +11 -0
  151. package/node_modules/debug-fabulous/node_modules/debug/.npmignore +9 -0
  152. package/node_modules/debug-fabulous/node_modules/debug/.travis.yml +14 -0
  153. package/node_modules/debug-fabulous/node_modules/debug/CHANGELOG.md +362 -0
  154. package/node_modules/debug-fabulous/node_modules/debug/LICENSE +19 -0
  155. package/node_modules/debug-fabulous/node_modules/debug/Makefile +50 -0
  156. package/node_modules/debug-fabulous/node_modules/debug/README.md +312 -0
  157. package/node_modules/debug-fabulous/node_modules/debug/component.json +19 -0
  158. package/node_modules/debug-fabulous/node_modules/debug/karma.conf.js +70 -0
  159. package/node_modules/debug-fabulous/node_modules/debug/node.js +1 -0
  160. package/node_modules/debug-fabulous/node_modules/debug/package.json +49 -0
  161. package/node_modules/debug-fabulous/node_modules/debug/src/browser.js +185 -0
  162. package/node_modules/debug-fabulous/node_modules/debug/src/debug.js +202 -0
  163. package/node_modules/debug-fabulous/node_modules/debug/src/index.js +10 -0
  164. package/node_modules/debug-fabulous/node_modules/debug/src/inspector-log.js +15 -0
  165. package/node_modules/debug-fabulous/node_modules/debug/src/node.js +248 -0
  166. package/node_modules/debug-fabulous/node_modules/ms/index.js +152 -0
  167. package/node_modules/debug-fabulous/node_modules/ms/license.md +21 -0
  168. package/node_modules/debug-fabulous/node_modules/ms/package.json +37 -0
  169. package/node_modules/debug-fabulous/node_modules/ms/readme.md +51 -0
  170. package/node_modules/debug-fabulous/node_modules/object-assign/index.js +83 -0
  171. package/node_modules/debug-fabulous/node_modules/object-assign/license +21 -0
  172. package/node_modules/debug-fabulous/node_modules/object-assign/package.json +42 -0
  173. package/node_modules/debug-fabulous/node_modules/object-assign/readme.md +56 -0
  174. package/node_modules/debug-fabulous/package.json +32 -0
  175. package/node_modules/debug-fabulous/src/lazy-debug.js +9 -0
  176. package/node_modules/debug-fabulous/src/lazy-eval.js +50 -0
  177. package/node_modules/decode-uri-component/index.js +94 -0
  178. package/node_modules/decode-uri-component/license +9 -0
  179. package/node_modules/decode-uri-component/package.json +37 -0
  180. package/node_modules/decode-uri-component/readme.md +83 -0
  181. package/node_modules/detect-newline/index.js +24 -0
  182. package/node_modules/detect-newline/license +21 -0
  183. package/node_modules/detect-newline/package.json +37 -0
  184. package/node_modules/detect-newline/readme.md +42 -0
  185. package/node_modules/duplexify/.travis.yml +6 -0
  186. package/node_modules/duplexify/LICENSE +21 -0
  187. package/node_modules/duplexify/README.md +97 -0
  188. package/node_modules/duplexify/example.js +21 -0
  189. package/node_modules/duplexify/index.js +234 -0
  190. package/node_modules/duplexify/package.json +39 -0
  191. package/node_modules/duplexify/test.js +295 -0
  192. package/node_modules/end-of-stream/LICENSE +21 -0
  193. package/node_modules/end-of-stream/README.md +54 -0
  194. package/node_modules/end-of-stream/index.js +94 -0
  195. package/node_modules/end-of-stream/package.json +37 -0
  196. package/node_modules/error-ex/LICENSE +21 -0
  197. package/node_modules/error-ex/README.md +144 -0
  198. package/node_modules/error-ex/index.js +141 -0
  199. package/node_modules/error-ex/package.json +46 -0
  200. package/node_modules/expand-brackets/LICENSE +21 -0
  201. package/node_modules/expand-brackets/README.md +107 -0
  202. package/node_modules/expand-brackets/index.js +163 -0
  203. package/node_modules/expand-brackets/package.json +62 -0
  204. package/node_modules/expand-range/LICENSE +24 -0
  205. package/node_modules/expand-range/README.md +145 -0
  206. package/node_modules/expand-range/index.js +43 -0
  207. package/node_modules/expand-range/node_modules/fill-range/LICENSE +21 -0
  208. package/node_modules/expand-range/node_modules/fill-range/README.md +317 -0
  209. package/node_modules/expand-range/node_modules/fill-range/index.js +408 -0
  210. package/node_modules/expand-range/node_modules/fill-range/package.json +78 -0
  211. package/node_modules/expand-range/node_modules/is-number/LICENSE +21 -0
  212. package/node_modules/expand-range/node_modules/is-number/README.md +103 -0
  213. package/node_modules/expand-range/node_modules/is-number/index.js +19 -0
  214. package/node_modules/expand-range/node_modules/is-number/package.json +59 -0
  215. package/node_modules/expand-range/node_modules/kind-of/LICENSE +21 -0
  216. package/node_modules/expand-range/node_modules/kind-of/README.md +261 -0
  217. package/node_modules/expand-range/node_modules/kind-of/index.js +116 -0
  218. package/node_modules/expand-range/node_modules/kind-of/package.json +90 -0
  219. package/node_modules/expand-range/package.json +73 -0
  220. package/node_modules/extend/.editorconfig +20 -0
  221. package/node_modules/extend/.eslintrc +17 -0
  222. package/node_modules/extend/.jscs.json +175 -0
  223. package/node_modules/extend/.travis.yml +230 -0
  224. package/node_modules/extend/CHANGELOG.md +83 -0
  225. package/node_modules/extend/LICENSE +23 -0
  226. package/node_modules/extend/README.md +81 -0
  227. package/node_modules/extend/component.json +32 -0
  228. package/node_modules/extend/index.js +117 -0
  229. package/node_modules/extend/package.json +42 -0
  230. package/node_modules/extend-shallow/LICENSE +21 -0
  231. package/node_modules/extend-shallow/README.md +61 -0
  232. package/node_modules/extend-shallow/index.js +33 -0
  233. package/node_modules/extend-shallow/package.json +56 -0
  234. package/node_modules/extglob/LICENSE +21 -0
  235. package/node_modules/extglob/README.md +88 -0
  236. package/node_modules/extglob/index.js +178 -0
  237. package/node_modules/extglob/node_modules/is-extglob/LICENSE +21 -0
  238. package/node_modules/extglob/node_modules/is-extglob/README.md +75 -0
  239. package/node_modules/extglob/node_modules/is-extglob/index.js +11 -0
  240. package/node_modules/extglob/node_modules/is-extglob/package.json +48 -0
  241. package/node_modules/extglob/package.json +60 -0
  242. package/node_modules/filename-regex/LICENSE +21 -0
  243. package/node_modules/filename-regex/README.md +63 -0
  244. package/node_modules/filename-regex/index.js +10 -0
  245. package/node_modules/filename-regex/package.json +50 -0
  246. package/node_modules/first-chunk-stream/index.js +93 -0
  247. package/node_modules/first-chunk-stream/package.json +36 -0
  248. package/node_modules/first-chunk-stream/readme.md +62 -0
  249. package/node_modules/for-in/LICENSE +21 -0
  250. package/node_modules/for-in/README.md +85 -0
  251. package/node_modules/for-in/index.js +16 -0
  252. package/node_modules/for-in/package.json +68 -0
  253. package/node_modules/for-own/LICENSE +21 -0
  254. package/node_modules/for-own/README.md +85 -0
  255. package/node_modules/for-own/index.js +19 -0
  256. package/node_modules/for-own/package.json +70 -0
  257. package/node_modules/function-bind/.editorconfig +20 -0
  258. package/node_modules/function-bind/.eslintrc +15 -0
  259. package/node_modules/function-bind/.jscs.json +176 -0
  260. package/node_modules/function-bind/.npmignore +22 -0
  261. package/node_modules/function-bind/.travis.yml +168 -0
  262. package/node_modules/function-bind/LICENSE +20 -0
  263. package/node_modules/function-bind/README.md +48 -0
  264. package/node_modules/function-bind/implementation.js +52 -0
  265. package/node_modules/function-bind/index.js +5 -0
  266. package/node_modules/function-bind/package.json +63 -0
  267. package/node_modules/function-bind/test/.eslintrc +9 -0
  268. package/node_modules/function-bind/test/index.js +252 -0
  269. package/node_modules/glob-base/LICENSE +21 -0
  270. package/node_modules/glob-base/README.md +158 -0
  271. package/node_modules/glob-base/index.js +51 -0
  272. package/node_modules/glob-base/node_modules/glob-parent/.npmignore +4 -0
  273. package/node_modules/glob-base/node_modules/glob-parent/.travis.yml +8 -0
  274. package/node_modules/glob-base/node_modules/glob-parent/LICENSE +15 -0
  275. package/node_modules/glob-base/node_modules/glob-parent/README.md +43 -0
  276. package/node_modules/glob-base/node_modules/glob-parent/index.js +10 -0
  277. package/node_modules/glob-base/node_modules/glob-parent/package.json +35 -0
  278. package/node_modules/glob-base/node_modules/glob-parent/test.js +28 -0
  279. package/node_modules/glob-base/node_modules/is-extglob/LICENSE +21 -0
  280. package/node_modules/glob-base/node_modules/is-extglob/README.md +75 -0
  281. package/node_modules/glob-base/node_modules/is-extglob/index.js +11 -0
  282. package/node_modules/glob-base/node_modules/is-extglob/package.json +48 -0
  283. package/node_modules/glob-base/node_modules/is-glob/LICENSE +21 -0
  284. package/node_modules/glob-base/node_modules/is-glob/README.md +105 -0
  285. package/node_modules/glob-base/node_modules/is-glob/index.js +14 -0
  286. package/node_modules/glob-base/node_modules/is-glob/package.json +60 -0
  287. package/node_modules/glob-base/package.json +52 -0
  288. package/node_modules/glob-stream/LICENSE +21 -0
  289. package/node_modules/glob-stream/README.md +95 -0
  290. package/node_modules/glob-stream/index.js +209 -0
  291. package/node_modules/glob-stream/node_modules/braces/LICENSE +21 -0
  292. package/node_modules/glob-stream/node_modules/braces/README.md +248 -0
  293. package/node_modules/glob-stream/node_modules/braces/index.js +399 -0
  294. package/node_modules/glob-stream/node_modules/braces/package.json +83 -0
  295. package/node_modules/glob-stream/node_modules/glob/LICENSE +15 -0
  296. package/node_modules/glob-stream/node_modules/glob/README.md +377 -0
  297. package/node_modules/glob-stream/node_modules/glob/common.js +245 -0
  298. package/node_modules/glob-stream/node_modules/glob/glob.js +752 -0
  299. package/node_modules/glob-stream/node_modules/glob/package.json +42 -0
  300. package/node_modules/glob-stream/node_modules/glob/sync.js +460 -0
  301. package/node_modules/glob-stream/node_modules/glob-parent/LICENSE +15 -0
  302. package/node_modules/glob-stream/node_modules/glob-parent/README.md +109 -0
  303. package/node_modules/glob-stream/node_modules/glob-parent/index.js +24 -0
  304. package/node_modules/glob-stream/node_modules/glob-parent/package.json +42 -0
  305. package/node_modules/glob-stream/node_modules/is-glob/LICENSE +21 -0
  306. package/node_modules/glob-stream/node_modules/is-glob/README.md +142 -0
  307. package/node_modules/glob-stream/node_modules/is-glob/index.js +25 -0
  308. package/node_modules/glob-stream/node_modules/is-glob/package.json +80 -0
  309. package/node_modules/glob-stream/node_modules/isarray/README.md +54 -0
  310. package/node_modules/glob-stream/node_modules/isarray/build/build.js +209 -0
  311. package/node_modules/glob-stream/node_modules/isarray/component.json +19 -0
  312. package/node_modules/glob-stream/node_modules/isarray/index.js +3 -0
  313. package/node_modules/glob-stream/node_modules/isarray/package.json +25 -0
  314. package/node_modules/glob-stream/node_modules/kind-of/LICENSE +21 -0
  315. package/node_modules/glob-stream/node_modules/kind-of/README.md +261 -0
  316. package/node_modules/glob-stream/node_modules/kind-of/index.js +116 -0
  317. package/node_modules/glob-stream/node_modules/kind-of/package.json +90 -0
  318. package/node_modules/glob-stream/node_modules/micromatch/LICENSE +21 -0
  319. package/node_modules/glob-stream/node_modules/micromatch/README.md +689 -0
  320. package/node_modules/glob-stream/node_modules/micromatch/index.js +431 -0
  321. package/node_modules/glob-stream/node_modules/micromatch/lib/chars.js +67 -0
  322. package/node_modules/glob-stream/node_modules/micromatch/lib/expand.js +304 -0
  323. package/node_modules/glob-stream/node_modules/micromatch/lib/glob.js +193 -0
  324. package/node_modules/glob-stream/node_modules/micromatch/lib/utils.js +149 -0
  325. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/LICENSE +21 -0
  326. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/README.md +75 -0
  327. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/index.js +11 -0
  328. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/package.json +48 -0
  329. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/LICENSE +21 -0
  330. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/README.md +105 -0
  331. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/index.js +14 -0
  332. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/package.json +60 -0
  333. package/node_modules/glob-stream/node_modules/micromatch/package.json +114 -0
  334. package/node_modules/glob-stream/node_modules/normalize-path/LICENSE +21 -0
  335. package/node_modules/glob-stream/node_modules/normalize-path/README.md +92 -0
  336. package/node_modules/glob-stream/node_modules/normalize-path/index.js +19 -0
  337. package/node_modules/glob-stream/node_modules/normalize-path/package.json +78 -0
  338. package/node_modules/glob-stream/node_modules/readable-stream/.npmignore +5 -0
  339. package/node_modules/glob-stream/node_modules/readable-stream/LICENSE +18 -0
  340. package/node_modules/glob-stream/node_modules/readable-stream/README.md +15 -0
  341. package/node_modules/glob-stream/node_modules/readable-stream/duplex.js +1 -0
  342. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
  343. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
  344. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js +982 -0
  345. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js +210 -0
  346. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js +386 -0
  347. package/node_modules/glob-stream/node_modules/readable-stream/package.json +32 -0
  348. package/node_modules/glob-stream/node_modules/readable-stream/passthrough.js +1 -0
  349. package/node_modules/glob-stream/node_modules/readable-stream/readable.js +11 -0
  350. package/node_modules/glob-stream/node_modules/readable-stream/transform.js +1 -0
  351. package/node_modules/glob-stream/node_modules/readable-stream/writable.js +1 -0
  352. package/node_modules/glob-stream/node_modules/string_decoder/.npmignore +2 -0
  353. package/node_modules/glob-stream/node_modules/string_decoder/LICENSE +20 -0
  354. package/node_modules/glob-stream/node_modules/string_decoder/README.md +7 -0
  355. package/node_modules/glob-stream/node_modules/string_decoder/index.js +221 -0
  356. package/node_modules/glob-stream/node_modules/string_decoder/package.json +25 -0
  357. package/node_modules/glob-stream/node_modules/through2/.npmignore +3 -0
  358. package/node_modules/glob-stream/node_modules/through2/LICENSE +39 -0
  359. package/node_modules/glob-stream/node_modules/through2/README.md +132 -0
  360. package/node_modules/glob-stream/node_modules/through2/package.json +31 -0
  361. package/node_modules/glob-stream/node_modules/through2/through2.js +96 -0
  362. package/node_modules/glob-stream/package.json +51 -0
  363. package/node_modules/graceful-fs/LICENSE +15 -0
  364. package/node_modules/graceful-fs/README.md +143 -0
  365. package/node_modules/graceful-fs/clone.js +23 -0
  366. package/node_modules/graceful-fs/graceful-fs.js +448 -0
  367. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  368. package/node_modules/graceful-fs/package.json +50 -0
  369. package/node_modules/graceful-fs/polyfills.js +355 -0
  370. package/node_modules/gulp-sourcemaps/LICENSE.md +15 -0
  371. package/node_modules/gulp-sourcemaps/README.md +395 -0
  372. package/node_modules/gulp-sourcemaps/index.js +7 -0
  373. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/index.js +17 -0
  374. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/license +21 -0
  375. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/package.json +42 -0
  376. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/readme.md +39 -0
  377. package/node_modules/gulp-sourcemaps/node_modules/through2/LICENSE.md +9 -0
  378. package/node_modules/gulp-sourcemaps/node_modules/through2/README.md +134 -0
  379. package/node_modules/gulp-sourcemaps/node_modules/through2/package.json +33 -0
  380. package/node_modules/gulp-sourcemaps/node_modules/through2/through2.js +96 -0
  381. package/node_modules/gulp-sourcemaps/package.json +64 -0
  382. package/node_modules/gulp-sourcemaps/src/init/index.internals.js +122 -0
  383. package/node_modules/gulp-sourcemaps/src/init/index.js +141 -0
  384. package/node_modules/gulp-sourcemaps/src/utils.js +81 -0
  385. package/node_modules/gulp-sourcemaps/src/write/index.internals.js +181 -0
  386. package/node_modules/gulp-sourcemaps/src/write/index.js +71 -0
  387. package/node_modules/has/LICENSE-MIT +22 -0
  388. package/node_modules/has/README.md +18 -0
  389. package/node_modules/has/package.json +48 -0
  390. package/node_modules/has/src/index.js +5 -0
  391. package/node_modules/has/test/index.js +10 -0
  392. package/node_modules/has-ansi/index.js +4 -0
  393. package/node_modules/has-ansi/license +21 -0
  394. package/node_modules/has-ansi/node_modules/ansi-regex/index.js +4 -0
  395. package/node_modules/has-ansi/node_modules/ansi-regex/license +21 -0
  396. package/node_modules/has-ansi/node_modules/ansi-regex/package.json +64 -0
  397. package/node_modules/has-ansi/node_modules/ansi-regex/readme.md +39 -0
  398. package/node_modules/has-ansi/package.json +55 -0
  399. package/node_modules/has-ansi/readme.md +36 -0
  400. package/node_modules/hosted-git-info/CHANGELOG.md +151 -0
  401. package/node_modules/hosted-git-info/LICENSE +13 -0
  402. package/node_modules/hosted-git-info/README.md +133 -0
  403. package/node_modules/hosted-git-info/git-host-info.js +79 -0
  404. package/node_modules/hosted-git-info/git-host.js +156 -0
  405. package/node_modules/hosted-git-info/index.js +148 -0
  406. package/node_modules/hosted-git-info/package.json +40 -0
  407. package/node_modules/inflight/LICENSE +15 -0
  408. package/node_modules/inflight/README.md +37 -0
  409. package/node_modules/inflight/inflight.js +54 -0
  410. package/node_modules/inflight/package.json +29 -0
  411. package/node_modules/inherits/LICENSE +16 -0
  412. package/node_modules/inherits/README.md +42 -0
  413. package/node_modules/inherits/inherits.js +9 -0
  414. package/node_modules/inherits/inherits_browser.js +27 -0
  415. package/node_modules/inherits/package.json +29 -0
  416. package/node_modules/invert-kv/index.js +15 -0
  417. package/node_modules/invert-kv/package.json +33 -0
  418. package/node_modules/invert-kv/readme.md +25 -0
  419. package/node_modules/is-arrayish/.editorconfig +18 -0
  420. package/node_modules/is-arrayish/.istanbul.yml +4 -0
  421. package/node_modules/is-arrayish/.npmignore +5 -0
  422. package/node_modules/is-arrayish/.travis.yml +17 -0
  423. package/node_modules/is-arrayish/LICENSE +21 -0
  424. package/node_modules/is-arrayish/README.md +16 -0
  425. package/node_modules/is-arrayish/index.js +10 -0
  426. package/node_modules/is-arrayish/package.json +34 -0
  427. package/node_modules/is-buffer/LICENSE +21 -0
  428. package/node_modules/is-buffer/README.md +53 -0
  429. package/node_modules/is-buffer/index.js +21 -0
  430. package/node_modules/is-buffer/package.json +51 -0
  431. package/node_modules/is-buffer/test/basic.js +24 -0
  432. package/node_modules/is-core-module/.eslintrc +18 -0
  433. package/node_modules/is-core-module/.nycrc +9 -0
  434. package/node_modules/is-core-module/CHANGELOG.md +151 -0
  435. package/node_modules/is-core-module/LICENSE +20 -0
  436. package/node_modules/is-core-module/README.md +40 -0
  437. package/node_modules/is-core-module/core.json +155 -0
  438. package/node_modules/is-core-module/index.js +69 -0
  439. package/node_modules/is-core-module/package.json +72 -0
  440. package/node_modules/is-core-module/test/index.js +133 -0
  441. package/node_modules/is-dotfile/LICENSE +21 -0
  442. package/node_modules/is-dotfile/README.md +95 -0
  443. package/node_modules/is-dotfile/index.js +14 -0
  444. package/node_modules/is-dotfile/package.json +69 -0
  445. package/node_modules/is-equal-shallow/LICENSE +21 -0
  446. package/node_modules/is-equal-shallow/README.md +90 -0
  447. package/node_modules/is-equal-shallow/index.js +27 -0
  448. package/node_modules/is-equal-shallow/package.json +54 -0
  449. package/node_modules/is-extendable/LICENSE +21 -0
  450. package/node_modules/is-extendable/README.md +72 -0
  451. package/node_modules/is-extendable/index.js +13 -0
  452. package/node_modules/is-extendable/package.json +51 -0
  453. package/node_modules/is-extglob/LICENSE +21 -0
  454. package/node_modules/is-extglob/README.md +107 -0
  455. package/node_modules/is-extglob/index.js +20 -0
  456. package/node_modules/is-extglob/package.json +69 -0
  457. package/node_modules/is-posix-bracket/LICENSE +21 -0
  458. package/node_modules/is-posix-bracket/README.md +88 -0
  459. package/node_modules/is-posix-bracket/index.js +10 -0
  460. package/node_modules/is-posix-bracket/package.json +64 -0
  461. package/node_modules/is-primitive/LICENSE +21 -0
  462. package/node_modules/is-primitive/README.md +57 -0
  463. package/node_modules/is-primitive/index.js +13 -0
  464. package/node_modules/is-primitive/package.json +46 -0
  465. package/node_modules/is-utf8/LICENSE +9 -0
  466. package/node_modules/is-utf8/README.md +16 -0
  467. package/node_modules/is-utf8/is-utf8.js +76 -0
  468. package/node_modules/is-utf8/package.json +19 -0
  469. package/node_modules/is-valid-glob/LICENSE +21 -0
  470. package/node_modules/is-valid-glob/README.md +88 -0
  471. package/node_modules/is-valid-glob/index.js +21 -0
  472. package/node_modules/is-valid-glob/package.json +51 -0
  473. package/node_modules/isarray/.npmignore +1 -0
  474. package/node_modules/isarray/.travis.yml +4 -0
  475. package/node_modules/isarray/Makefile +6 -0
  476. package/node_modules/isarray/README.md +60 -0
  477. package/node_modules/isarray/component.json +19 -0
  478. package/node_modules/isarray/index.js +5 -0
  479. package/node_modules/isarray/package.json +45 -0
  480. package/node_modules/isarray/test.js +20 -0
  481. package/node_modules/isobject/LICENSE +21 -0
  482. package/node_modules/isobject/README.md +112 -0
  483. package/node_modules/isobject/index.js +14 -0
  484. package/node_modules/isobject/package.json +67 -0
  485. package/node_modules/json-stable-stringify-without-jsonify/.npmignore +1 -0
  486. package/node_modules/json-stable-stringify-without-jsonify/.travis.yml +4 -0
  487. package/node_modules/json-stable-stringify-without-jsonify/LICENSE +18 -0
  488. package/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js +7 -0
  489. package/node_modules/json-stable-stringify-without-jsonify/example/nested.js +3 -0
  490. package/node_modules/json-stable-stringify-without-jsonify/example/str.js +3 -0
  491. package/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js +7 -0
  492. package/node_modules/json-stable-stringify-without-jsonify/index.js +82 -0
  493. package/node_modules/json-stable-stringify-without-jsonify/package.json +43 -0
  494. package/node_modules/json-stable-stringify-without-jsonify/readme.markdown +132 -0
  495. package/node_modules/json-stable-stringify-without-jsonify/test/cmp.js +11 -0
  496. package/node_modules/json-stable-stringify-without-jsonify/test/nested.js +42 -0
  497. package/node_modules/json-stable-stringify-without-jsonify/test/replacer.js +74 -0
  498. package/node_modules/json-stable-stringify-without-jsonify/test/space.js +59 -0
  499. package/node_modules/json-stable-stringify-without-jsonify/test/str.js +32 -0
  500. package/node_modules/json-stable-stringify-without-jsonify/test/to-json.js +20 -0
  501. package/node_modules/kind-of/CHANGELOG.md +160 -0
  502. package/node_modules/kind-of/LICENSE +21 -0
  503. package/node_modules/kind-of/README.md +367 -0
  504. package/node_modules/kind-of/index.js +129 -0
  505. package/node_modules/kind-of/package.json +88 -0
  506. package/node_modules/lazy-debug-legacy/.npmignore +4 -0
  507. package/node_modules/lazy-debug-legacy/LICENSE.md +21 -0
  508. package/node_modules/lazy-debug-legacy/README.md +40 -0
  509. package/node_modules/lazy-debug-legacy/package.json +74 -0
  510. package/node_modules/lazy-debug-legacy/src/functions.js +116 -0
  511. package/node_modules/lazy-debug-legacy/src/index.js +30 -0
  512. package/node_modules/lazystream/LICENSE +23 -0
  513. package/node_modules/lazystream/README.md +114 -0
  514. package/node_modules/lazystream/lib/lazystream.js +54 -0
  515. package/node_modules/lazystream/package.json +46 -0
  516. package/node_modules/lazystream/test/data.md +13 -0
  517. package/node_modules/lazystream/test/fs_test.js +69 -0
  518. package/node_modules/lazystream/test/helper.js +39 -0
  519. package/node_modules/lazystream/test/pipe_test.js +36 -0
  520. package/node_modules/lazystream/test/readable_test.js +90 -0
  521. package/node_modules/lazystream/test/writable_test.js +59 -0
  522. package/node_modules/lcid/index.js +22 -0
  523. package/node_modules/lcid/lcid.json +203 -0
  524. package/node_modules/lcid/license +21 -0
  525. package/node_modules/lcid/package.json +46 -0
  526. package/node_modules/lcid/readme.md +35 -0
  527. package/node_modules/lodash._reinterpolate/LICENSE.txt +22 -0
  528. package/node_modules/lodash._reinterpolate/README.md +20 -0
  529. package/node_modules/lodash._reinterpolate/index.js +13 -0
  530. package/node_modules/lodash._reinterpolate/package.json +18 -0
  531. package/node_modules/lodash.assign/LICENSE +47 -0
  532. package/node_modules/lodash.assign/README.md +18 -0
  533. package/node_modules/lodash.assign/index.js +637 -0
  534. package/node_modules/lodash.assign/package.json +17 -0
  535. package/node_modules/lodash.assigninwith/LICENSE +47 -0
  536. package/node_modules/lodash.assigninwith/README.md +18 -0
  537. package/node_modules/lodash.assigninwith/index.js +624 -0
  538. package/node_modules/lodash.assigninwith/package.json +17 -0
  539. package/node_modules/lodash.isequal/LICENSE +47 -0
  540. package/node_modules/lodash.isequal/README.md +18 -0
  541. package/node_modules/lodash.isequal/index.js +1848 -0
  542. package/node_modules/lodash.isequal/package.json +16 -0
  543. package/node_modules/lodash.keys/LICENSE +47 -0
  544. package/node_modules/lodash.keys/README.md +18 -0
  545. package/node_modules/lodash.keys/index.js +401 -0
  546. package/node_modules/lodash.keys/package.json +17 -0
  547. package/node_modules/lodash.rest/LICENSE +47 -0
  548. package/node_modules/lodash.rest/README.md +18 -0
  549. package/node_modules/lodash.rest/index.js +323 -0
  550. package/node_modules/lodash.rest/package.json +17 -0
  551. package/node_modules/lodash.template/LICENSE +47 -0
  552. package/node_modules/lodash.template/README.md +18 -0
  553. package/node_modules/lodash.template/index.js +657 -0
  554. package/node_modules/lodash.template/package.json +25 -0
  555. package/node_modules/lodash.templatesettings/LICENSE +47 -0
  556. package/node_modules/lodash.templatesettings/README.md +18 -0
  557. package/node_modules/lodash.templatesettings/index.js +382 -0
  558. package/node_modules/lodash.templatesettings/package.json +19 -0
  559. package/node_modules/lodash.tostring/LICENSE +47 -0
  560. package/node_modules/lodash.tostring/README.md +18 -0
  561. package/node_modules/lodash.tostring/index.js +137 -0
  562. package/node_modules/lodash.tostring/package.json +17 -0
  563. package/node_modules/map-stream/.npmignore +3 -0
  564. package/node_modules/map-stream/.travis.yml +4 -0
  565. package/node_modules/map-stream/LICENCE +24 -0
  566. package/node_modules/map-stream/examples/pretty.js +26 -0
  567. package/node_modules/map-stream/index.js +145 -0
  568. package/node_modules/map-stream/package/.npmignore +3 -0
  569. package/node_modules/map-stream/package/.travis.yml +4 -0
  570. package/node_modules/map-stream/package/LICENCE +22 -0
  571. package/node_modules/map-stream/package/examples/pretty.js +26 -0
  572. package/node_modules/map-stream/package/index.js +145 -0
  573. package/node_modules/map-stream/package/package.json +24 -0
  574. package/node_modules/map-stream/package/readme.markdown +37 -0
  575. package/node_modules/map-stream/package/test/simple-map.asynct.js +318 -0
  576. package/node_modules/map-stream/package.json +24 -0
  577. package/node_modules/map-stream/readme.markdown +37 -0
  578. package/node_modules/map-stream/test/simple-map.asynct.js +318 -0
  579. package/node_modules/math-random/.travis.yml +6 -0
  580. package/node_modules/math-random/browser.js +17 -0
  581. package/node_modules/math-random/node.js +13 -0
  582. package/node_modules/math-random/package.json +16 -0
  583. package/node_modules/math-random/readme.md +26 -0
  584. package/node_modules/math-random/test.js +21 -0
  585. package/node_modules/minimatch/LICENSE +15 -0
  586. package/node_modules/minimatch/README.md +230 -0
  587. package/node_modules/minimatch/minimatch.js +947 -0
  588. package/node_modules/minimatch/package.json +33 -0
  589. package/node_modules/minimist/.travis.yml +8 -0
  590. package/node_modules/minimist/LICENSE +18 -0
  591. package/node_modules/minimist/example/parse.js +2 -0
  592. package/node_modules/minimist/index.js +249 -0
  593. package/node_modules/minimist/package.json +45 -0
  594. package/node_modules/minimist/readme.markdown +98 -0
  595. package/node_modules/minimist/test/all_bool.js +32 -0
  596. package/node_modules/minimist/test/bool.js +178 -0
  597. package/node_modules/minimist/test/dash.js +31 -0
  598. package/node_modules/minimist/test/default_bool.js +35 -0
  599. package/node_modules/minimist/test/dotted.js +22 -0
  600. package/node_modules/minimist/test/kv_short.js +16 -0
  601. package/node_modules/minimist/test/long.js +31 -0
  602. package/node_modules/minimist/test/num.js +36 -0
  603. package/node_modules/minimist/test/parse.js +197 -0
  604. package/node_modules/minimist/test/parse_modified.js +9 -0
  605. package/node_modules/minimist/test/proto.js +60 -0
  606. package/node_modules/minimist/test/short.js +67 -0
  607. package/node_modules/minimist/test/stop_early.js +15 -0
  608. package/node_modules/minimist/test/unknown.js +102 -0
  609. package/node_modules/minimist/test/whitespace.js +8 -0
  610. package/node_modules/mkdirp/LICENSE +21 -0
  611. package/node_modules/mkdirp/bin/cmd.js +33 -0
  612. package/node_modules/mkdirp/bin/usage.txt +12 -0
  613. package/node_modules/mkdirp/index.js +102 -0
  614. package/node_modules/mkdirp/package.json +33 -0
  615. package/node_modules/mkdirp/readme.markdown +100 -0
  616. package/node_modules/module/.npmignore +1 -0
  617. package/node_modules/module/LICENSE +21 -0
  618. package/node_modules/module/README.md +35 -0
  619. package/node_modules/module/dist/cli.js +57 -0
  620. package/node_modules/module/dist/index.js +61 -0
  621. package/node_modules/module/node_modules/ansi-regex/index.js +4 -0
  622. package/node_modules/module/node_modules/ansi-regex/license +21 -0
  623. package/node_modules/module/node_modules/ansi-regex/package.json +64 -0
  624. package/node_modules/module/node_modules/ansi-regex/readme.md +39 -0
  625. package/node_modules/module/node_modules/ansi-styles/index.js +65 -0
  626. package/node_modules/module/node_modules/ansi-styles/license +21 -0
  627. package/node_modules/module/node_modules/ansi-styles/package.json +50 -0
  628. package/node_modules/module/node_modules/ansi-styles/readme.md +86 -0
  629. package/node_modules/module/node_modules/camelcase/index.js +56 -0
  630. package/node_modules/module/node_modules/camelcase/license +21 -0
  631. package/node_modules/module/node_modules/camelcase/package.json +39 -0
  632. package/node_modules/module/node_modules/camelcase/readme.md +57 -0
  633. package/node_modules/module/node_modules/chalk/index.js +116 -0
  634. package/node_modules/module/node_modules/chalk/license +21 -0
  635. package/node_modules/module/node_modules/chalk/package.json +70 -0
  636. package/node_modules/module/node_modules/chalk/readme.md +213 -0
  637. package/node_modules/module/node_modules/cliui/CHANGELOG.md +15 -0
  638. package/node_modules/module/node_modules/cliui/LICENSE.txt +14 -0
  639. package/node_modules/module/node_modules/cliui/README.md +110 -0
  640. package/node_modules/module/node_modules/cliui/index.js +316 -0
  641. package/node_modules/module/node_modules/cliui/package.json +64 -0
  642. package/node_modules/module/node_modules/concat-stream/LICENSE +24 -0
  643. package/node_modules/module/node_modules/concat-stream/index.js +136 -0
  644. package/node_modules/module/node_modules/concat-stream/package.json +54 -0
  645. package/node_modules/module/node_modules/concat-stream/readme.md +100 -0
  646. package/node_modules/module/node_modules/decamelize/index.js +13 -0
  647. package/node_modules/module/node_modules/decamelize/license +21 -0
  648. package/node_modules/module/node_modules/decamelize/package.json +38 -0
  649. package/node_modules/module/node_modules/decamelize/readme.md +48 -0
  650. package/node_modules/module/node_modules/escape-string-regexp/index.js +11 -0
  651. package/node_modules/module/node_modules/escape-string-regexp/license +21 -0
  652. package/node_modules/module/node_modules/escape-string-regexp/package.json +41 -0
  653. package/node_modules/module/node_modules/escape-string-regexp/readme.md +27 -0
  654. package/node_modules/module/node_modules/find-up/index.js +53 -0
  655. package/node_modules/module/node_modules/find-up/license +21 -0
  656. package/node_modules/module/node_modules/find-up/package.json +51 -0
  657. package/node_modules/module/node_modules/find-up/readme.md +72 -0
  658. package/node_modules/module/node_modules/is-fullwidth-code-point/index.js +46 -0
  659. package/node_modules/module/node_modules/is-fullwidth-code-point/license +21 -0
  660. package/node_modules/module/node_modules/is-fullwidth-code-point/package.json +45 -0
  661. package/node_modules/module/node_modules/is-fullwidth-code-point/readme.md +39 -0
  662. package/node_modules/module/node_modules/load-json-file/index.js +21 -0
  663. package/node_modules/module/node_modules/load-json-file/license +21 -0
  664. package/node_modules/module/node_modules/load-json-file/package.json +46 -0
  665. package/node_modules/module/node_modules/load-json-file/readme.md +45 -0
  666. package/node_modules/module/node_modules/parse-json/index.js +35 -0
  667. package/node_modules/module/node_modules/parse-json/license +21 -0
  668. package/node_modules/module/node_modules/parse-json/package.json +46 -0
  669. package/node_modules/module/node_modules/parse-json/readme.md +83 -0
  670. package/node_modules/module/node_modules/parse-json/vendor/parse.js +752 -0
  671. package/node_modules/module/node_modules/parse-json/vendor/unicode.js +71 -0
  672. package/node_modules/module/node_modules/path-exists/index.js +24 -0
  673. package/node_modules/module/node_modules/path-exists/license +21 -0
  674. package/node_modules/module/node_modules/path-exists/package.json +40 -0
  675. package/node_modules/module/node_modules/path-exists/readme.md +45 -0
  676. package/node_modules/module/node_modules/path-type/index.js +29 -0
  677. package/node_modules/module/node_modules/path-type/license +21 -0
  678. package/node_modules/module/node_modules/path-type/package.json +52 -0
  679. package/node_modules/module/node_modules/path-type/readme.md +42 -0
  680. package/node_modules/module/node_modules/pify/index.js +68 -0
  681. package/node_modules/module/node_modules/pify/license +21 -0
  682. package/node_modules/module/node_modules/pify/package.json +48 -0
  683. package/node_modules/module/node_modules/pify/readme.md +119 -0
  684. package/node_modules/module/node_modules/pkg-conf/index.js +62 -0
  685. package/node_modules/module/node_modules/pkg-conf/license +21 -0
  686. package/node_modules/module/node_modules/pkg-conf/package.json +51 -0
  687. package/node_modules/module/node_modules/pkg-conf/readme.md +86 -0
  688. package/node_modules/module/node_modules/process-nextick-args/.travis.yml +12 -0
  689. package/node_modules/module/node_modules/process-nextick-args/index.js +43 -0
  690. package/node_modules/module/node_modules/process-nextick-args/license.md +19 -0
  691. package/node_modules/module/node_modules/process-nextick-args/package.json +22 -0
  692. package/node_modules/module/node_modules/process-nextick-args/readme.md +18 -0
  693. package/node_modules/module/node_modules/process-nextick-args/test.js +24 -0
  694. package/node_modules/module/node_modules/read-pkg/index.js +48 -0
  695. package/node_modules/module/node_modules/read-pkg/license +21 -0
  696. package/node_modules/module/node_modules/read-pkg/package.json +42 -0
  697. package/node_modules/module/node_modules/read-pkg/readme.md +79 -0
  698. package/node_modules/module/node_modules/read-pkg-up/index.js +31 -0
  699. package/node_modules/module/node_modules/read-pkg-up/license +21 -0
  700. package/node_modules/module/node_modules/read-pkg-up/package.json +59 -0
  701. package/node_modules/module/node_modules/read-pkg-up/readme.md +79 -0
  702. package/node_modules/module/node_modules/readable-stream/.npmignore +5 -0
  703. package/node_modules/module/node_modules/readable-stream/.travis.yml +52 -0
  704. package/node_modules/module/node_modules/readable-stream/.zuul.yml +1 -0
  705. package/node_modules/module/node_modules/readable-stream/LICENSE +18 -0
  706. package/node_modules/module/node_modules/readable-stream/README.md +36 -0
  707. package/node_modules/module/node_modules/readable-stream/doc/stream.markdown +1760 -0
  708. package/node_modules/module/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  709. package/node_modules/module/node_modules/readable-stream/duplex.js +1 -0
  710. package/node_modules/module/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
  711. package/node_modules/module/node_modules/readable-stream/lib/_stream_passthrough.js +26 -0
  712. package/node_modules/module/node_modules/readable-stream/lib/_stream_readable.js +880 -0
  713. package/node_modules/module/node_modules/readable-stream/lib/_stream_transform.js +180 -0
  714. package/node_modules/module/node_modules/readable-stream/lib/_stream_writable.js +516 -0
  715. package/node_modules/module/node_modules/readable-stream/package.json +37 -0
  716. package/node_modules/module/node_modules/readable-stream/passthrough.js +1 -0
  717. package/node_modules/module/node_modules/readable-stream/readable.js +12 -0
  718. package/node_modules/module/node_modules/readable-stream/transform.js +1 -0
  719. package/node_modules/module/node_modules/readable-stream/writable.js +1 -0
  720. package/node_modules/module/node_modules/string-width/index.js +37 -0
  721. package/node_modules/module/node_modules/string-width/license +21 -0
  722. package/node_modules/module/node_modules/string-width/package.json +56 -0
  723. package/node_modules/module/node_modules/string-width/readme.md +42 -0
  724. package/node_modules/module/node_modules/string_decoder/.npmignore +2 -0
  725. package/node_modules/module/node_modules/string_decoder/LICENSE +20 -0
  726. package/node_modules/module/node_modules/string_decoder/README.md +7 -0
  727. package/node_modules/module/node_modules/string_decoder/index.js +221 -0
  728. package/node_modules/module/node_modules/string_decoder/package.json +25 -0
  729. package/node_modules/module/node_modules/strip-ansi/index.js +6 -0
  730. package/node_modules/module/node_modules/strip-ansi/license +21 -0
  731. package/node_modules/module/node_modules/strip-ansi/package.json +57 -0
  732. package/node_modules/module/node_modules/strip-ansi/readme.md +33 -0
  733. package/node_modules/module/node_modules/strip-bom/index.js +17 -0
  734. package/node_modules/module/node_modules/strip-bom/license +21 -0
  735. package/node_modules/module/node_modules/strip-bom/package.json +42 -0
  736. package/node_modules/module/node_modules/strip-bom/readme.md +39 -0
  737. package/node_modules/module/node_modules/supports-color/index.js +50 -0
  738. package/node_modules/module/node_modules/supports-color/license +21 -0
  739. package/node_modules/module/node_modules/supports-color/package.json +49 -0
  740. package/node_modules/module/node_modules/supports-color/readme.md +36 -0
  741. package/node_modules/module/node_modules/wrap-ansi/index.js +168 -0
  742. package/node_modules/module/node_modules/wrap-ansi/license +21 -0
  743. package/node_modules/module/node_modules/wrap-ansi/package.json +68 -0
  744. package/node_modules/module/node_modules/wrap-ansi/readme.md +73 -0
  745. package/node_modules/module/node_modules/y18n/CHANGELOG.md +6 -0
  746. package/node_modules/module/node_modules/y18n/LICENSE +13 -0
  747. package/node_modules/module/node_modules/y18n/README.md +91 -0
  748. package/node_modules/module/node_modules/y18n/index.js +172 -0
  749. package/node_modules/module/node_modules/y18n/package.json +37 -0
  750. package/node_modules/module/node_modules/yargs/CHANGELOG.md +589 -0
  751. package/node_modules/module/node_modules/yargs/LICENSE +22 -0
  752. package/node_modules/module/node_modules/yargs/README.md +1482 -0
  753. package/node_modules/module/node_modules/yargs/completion.sh.hbs +28 -0
  754. package/node_modules/module/node_modules/yargs/index.js +31 -0
  755. package/node_modules/module/node_modules/yargs/lib/command.js +151 -0
  756. package/node_modules/module/node_modules/yargs/lib/completion.js +99 -0
  757. package/node_modules/module/node_modules/yargs/lib/obj-filter.js +10 -0
  758. package/node_modules/module/node_modules/yargs/lib/usage.js +405 -0
  759. package/node_modules/module/node_modules/yargs/lib/validation.js +279 -0
  760. package/node_modules/module/node_modules/yargs/locales/de.json +37 -0
  761. package/node_modules/module/node_modules/yargs/locales/en.json +37 -0
  762. package/node_modules/module/node_modules/yargs/locales/es.json +37 -0
  763. package/node_modules/module/node_modules/yargs/locales/fr.json +37 -0
  764. package/node_modules/module/node_modules/yargs/locales/id.json +38 -0
  765. package/node_modules/module/node_modules/yargs/locales/it.json +37 -0
  766. package/node_modules/module/node_modules/yargs/locales/ja.json +37 -0
  767. package/node_modules/module/node_modules/yargs/locales/ko.json +37 -0
  768. package/node_modules/module/node_modules/yargs/locales/nb.json +37 -0
  769. package/node_modules/module/node_modules/yargs/locales/pirate.json +12 -0
  770. package/node_modules/module/node_modules/yargs/locales/pl.json +37 -0
  771. package/node_modules/module/node_modules/yargs/locales/pt.json +37 -0
  772. package/node_modules/module/node_modules/yargs/locales/pt_BR.json +37 -0
  773. package/node_modules/module/node_modules/yargs/locales/tr.json +37 -0
  774. package/node_modules/module/node_modules/yargs/locales/zh.json +37 -0
  775. package/node_modules/module/node_modules/yargs/package.json +72 -0
  776. package/node_modules/module/node_modules/yargs/yargs.js +730 -0
  777. package/node_modules/module/node_modules/yargs-parser/CHANGELOG.md +40 -0
  778. package/node_modules/module/node_modules/yargs-parser/LICENSE.txt +14 -0
  779. package/node_modules/module/node_modules/yargs-parser/README.md +209 -0
  780. package/node_modules/module/node_modules/yargs-parser/index.js +689 -0
  781. package/node_modules/module/node_modules/yargs-parser/lib/tokenize-arg-string.js +34 -0
  782. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/index.js +56 -0
  783. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/license +21 -0
  784. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/package.json +39 -0
  785. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/readme.md +57 -0
  786. package/node_modules/module/node_modules/yargs-parser/package.json +44 -0
  787. package/node_modules/module/package.json +51 -0
  788. package/node_modules/module/templates/README.md +3 -0
  789. package/node_modules/module/templates/cli.js +6 -0
  790. package/node_modules/module/templates/gitignore +2 -0
  791. package/node_modules/module/templates/index.js +5 -0
  792. package/node_modules/module/templates/package.json +9 -0
  793. package/node_modules/normalize-package-data/AUTHORS +4 -0
  794. package/node_modules/normalize-package-data/LICENSE +30 -0
  795. package/node_modules/normalize-package-data/README.md +106 -0
  796. package/node_modules/normalize-package-data/lib/extract_description.js +14 -0
  797. package/node_modules/normalize-package-data/lib/fixer.js +418 -0
  798. package/node_modules/normalize-package-data/lib/make_warning.js +23 -0
  799. package/node_modules/normalize-package-data/lib/normalize.js +39 -0
  800. package/node_modules/normalize-package-data/lib/safe_format.js +9 -0
  801. package/node_modules/normalize-package-data/lib/typos.json +25 -0
  802. package/node_modules/normalize-package-data/lib/warning_messages.json +30 -0
  803. package/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md +39 -0
  804. package/node_modules/normalize-package-data/node_modules/semver/LICENSE +15 -0
  805. package/node_modules/normalize-package-data/node_modules/semver/README.md +412 -0
  806. package/node_modules/normalize-package-data/node_modules/semver/bin/semver +160 -0
  807. package/node_modules/normalize-package-data/node_modules/semver/package.json +28 -0
  808. package/node_modules/normalize-package-data/node_modules/semver/range.bnf +16 -0
  809. package/node_modules/normalize-package-data/node_modules/semver/semver.js +1483 -0
  810. package/node_modules/normalize-package-data/package.json +31 -0
  811. package/node_modules/number-is-nan/index.js +4 -0
  812. package/node_modules/number-is-nan/license +21 -0
  813. package/node_modules/number-is-nan/package.json +35 -0
  814. package/node_modules/number-is-nan/readme.md +28 -0
  815. package/node_modules/object-assign/index.js +90 -0
  816. package/node_modules/object-assign/license +21 -0
  817. package/node_modules/object-assign/package.json +42 -0
  818. package/node_modules/object-assign/readme.md +61 -0
  819. package/node_modules/object.omit/LICENSE +21 -0
  820. package/node_modules/object.omit/README.md +118 -0
  821. package/node_modules/object.omit/index.js +40 -0
  822. package/node_modules/object.omit/package.json +67 -0
  823. package/node_modules/once/LICENSE +15 -0
  824. package/node_modules/once/README.md +79 -0
  825. package/node_modules/once/once.js +42 -0
  826. package/node_modules/once/package.json +33 -0
  827. package/node_modules/ordered-read-streams/LICENSE +20 -0
  828. package/node_modules/ordered-read-streams/README.md +65 -0
  829. package/node_modules/ordered-read-streams/index.js +81 -0
  830. package/node_modules/ordered-read-streams/node_modules/is-stream/index.js +21 -0
  831. package/node_modules/ordered-read-streams/node_modules/is-stream/license +21 -0
  832. package/node_modules/ordered-read-streams/node_modules/is-stream/package.json +38 -0
  833. package/node_modules/ordered-read-streams/node_modules/is-stream/readme.md +42 -0
  834. package/node_modules/ordered-read-streams/package.json +25 -0
  835. package/node_modules/os-homedir/index.js +24 -0
  836. package/node_modules/os-homedir/license +21 -0
  837. package/node_modules/os-homedir/package.json +41 -0
  838. package/node_modules/os-homedir/readme.md +31 -0
  839. package/node_modules/os-locale/index.js +127 -0
  840. package/node_modules/os-locale/license +21 -0
  841. package/node_modules/os-locale/package.json +43 -0
  842. package/node_modules/os-locale/readme.md +47 -0
  843. package/node_modules/parse-glob/LICENSE +21 -0
  844. package/node_modules/parse-glob/README.md +115 -0
  845. package/node_modules/parse-glob/index.js +156 -0
  846. package/node_modules/parse-glob/node_modules/is-extglob/LICENSE +21 -0
  847. package/node_modules/parse-glob/node_modules/is-extglob/README.md +75 -0
  848. package/node_modules/parse-glob/node_modules/is-extglob/index.js +11 -0
  849. package/node_modules/parse-glob/node_modules/is-extglob/package.json +48 -0
  850. package/node_modules/parse-glob/node_modules/is-glob/LICENSE +21 -0
  851. package/node_modules/parse-glob/node_modules/is-glob/README.md +105 -0
  852. package/node_modules/parse-glob/node_modules/is-glob/index.js +14 -0
  853. package/node_modules/parse-glob/node_modules/is-glob/package.json +60 -0
  854. package/node_modules/parse-glob/package.json +62 -0
  855. package/node_modules/path-dirname/index.js +143 -0
  856. package/node_modules/path-dirname/license +22 -0
  857. package/node_modules/path-dirname/package.json +29 -0
  858. package/node_modules/path-dirname/readme.md +53 -0
  859. package/node_modules/path-is-absolute/index.js +20 -0
  860. package/node_modules/path-is-absolute/license +21 -0
  861. package/node_modules/path-is-absolute/package.json +43 -0
  862. package/node_modules/path-is-absolute/readme.md +59 -0
  863. package/node_modules/path-parse/LICENSE +21 -0
  864. package/node_modules/path-parse/README.md +42 -0
  865. package/node_modules/path-parse/index.js +75 -0
  866. package/node_modules/path-parse/package.json +33 -0
  867. package/node_modules/pinkie/index.js +292 -0
  868. package/node_modules/pinkie/license +21 -0
  869. package/node_modules/pinkie/package.json +36 -0
  870. package/node_modules/pinkie/readme.md +83 -0
  871. package/node_modules/pinkie-promise/index.js +3 -0
  872. package/node_modules/pinkie-promise/license +21 -0
  873. package/node_modules/pinkie-promise/package.json +35 -0
  874. package/node_modules/pinkie-promise/readme.md +28 -0
  875. package/node_modules/preserve/.gitattributes +14 -0
  876. package/node_modules/preserve/.jshintrc +24 -0
  877. package/node_modules/preserve/.npmignore +53 -0
  878. package/node_modules/preserve/.travis.yml +3 -0
  879. package/node_modules/preserve/.verb.md +59 -0
  880. package/node_modules/preserve/LICENSE +24 -0
  881. package/node_modules/preserve/README.md +90 -0
  882. package/node_modules/preserve/index.js +54 -0
  883. package/node_modules/preserve/package.json +48 -0
  884. package/node_modules/preserve/test.js +48 -0
  885. package/node_modules/process-nextick-args/index.js +45 -0
  886. package/node_modules/process-nextick-args/license.md +19 -0
  887. package/node_modules/process-nextick-args/package.json +25 -0
  888. package/node_modules/process-nextick-args/readme.md +18 -0
  889. package/node_modules/randomatic/LICENSE +21 -0
  890. package/node_modules/randomatic/README.md +193 -0
  891. package/node_modules/randomatic/index.js +95 -0
  892. package/node_modules/randomatic/node_modules/is-number/LICENSE +21 -0
  893. package/node_modules/randomatic/node_modules/is-number/README.md +135 -0
  894. package/node_modules/randomatic/node_modules/is-number/index.js +21 -0
  895. package/node_modules/randomatic/node_modules/is-number/package.json +76 -0
  896. package/node_modules/randomatic/package.json +80 -0
  897. package/node_modules/readable-stream/.travis.yml +34 -0
  898. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  899. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  900. package/node_modules/readable-stream/LICENSE +47 -0
  901. package/node_modules/readable-stream/README.md +58 -0
  902. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  903. package/node_modules/readable-stream/duplex-browser.js +1 -0
  904. package/node_modules/readable-stream/duplex.js +1 -0
  905. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  906. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  907. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  908. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  909. package/node_modules/readable-stream/lib/_stream_writable.js +687 -0
  910. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +79 -0
  911. package/node_modules/readable-stream/lib/internal/streams/destroy.js +74 -0
  912. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  913. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  914. package/node_modules/readable-stream/package.json +52 -0
  915. package/node_modules/readable-stream/passthrough.js +1 -0
  916. package/node_modules/readable-stream/readable-browser.js +7 -0
  917. package/node_modules/readable-stream/readable.js +19 -0
  918. package/node_modules/readable-stream/transform.js +1 -0
  919. package/node_modules/readable-stream/writable-browser.js +1 -0
  920. package/node_modules/readable-stream/writable.js +8 -0
  921. package/node_modules/regex-cache/LICENSE +21 -0
  922. package/node_modules/regex-cache/README.md +166 -0
  923. package/node_modules/regex-cache/index.js +68 -0
  924. package/node_modules/regex-cache/package.json +64 -0
  925. package/node_modules/remove-trailing-separator/history.md +17 -0
  926. package/node_modules/remove-trailing-separator/index.js +17 -0
  927. package/node_modules/remove-trailing-separator/license +3 -0
  928. package/node_modules/remove-trailing-separator/package.json +37 -0
  929. package/node_modules/remove-trailing-separator/readme.md +51 -0
  930. package/node_modules/repeat-element/LICENSE +21 -0
  931. package/node_modules/repeat-element/README.md +99 -0
  932. package/node_modules/repeat-element/index.js +22 -0
  933. package/node_modules/repeat-element/package.json +49 -0
  934. package/node_modules/repeat-string/LICENSE +21 -0
  935. package/node_modules/repeat-string/README.md +136 -0
  936. package/node_modules/repeat-string/index.js +70 -0
  937. package/node_modules/repeat-string/package.json +77 -0
  938. package/node_modules/replace-ext/.npmignore +6 -0
  939. package/node_modules/replace-ext/.travis.yml +8 -0
  940. package/node_modules/replace-ext/LICENSE +20 -0
  941. package/node_modules/replace-ext/README.md +44 -0
  942. package/node_modules/replace-ext/index.js +9 -0
  943. package/node_modules/replace-ext/package.json +35 -0
  944. package/node_modules/replace-ext/test/main.js +51 -0
  945. package/node_modules/require-main-filename/.npmignore +3 -0
  946. package/node_modules/require-main-filename/.travis.yml +8 -0
  947. package/node_modules/require-main-filename/LICENSE.txt +14 -0
  948. package/node_modules/require-main-filename/README.md +26 -0
  949. package/node_modules/require-main-filename/index.js +18 -0
  950. package/node_modules/require-main-filename/package.json +30 -0
  951. package/node_modules/require-main-filename/test.js +36 -0
  952. package/node_modules/resolve/.editorconfig +37 -0
  953. package/node_modules/resolve/.eslintrc +65 -0
  954. package/node_modules/resolve/.github/FUNDING.yml +12 -0
  955. package/node_modules/resolve/LICENSE +21 -0
  956. package/node_modules/resolve/SECURITY.md +3 -0
  957. package/node_modules/resolve/async.js +3 -0
  958. package/node_modules/resolve/bin/resolve +50 -0
  959. package/node_modules/resolve/example/async.js +5 -0
  960. package/node_modules/resolve/example/sync.js +3 -0
  961. package/node_modules/resolve/index.js +6 -0
  962. package/node_modules/resolve/lib/async.js +329 -0
  963. package/node_modules/resolve/lib/caller.js +8 -0
  964. package/node_modules/resolve/lib/core.js +52 -0
  965. package/node_modules/resolve/lib/core.json +153 -0
  966. package/node_modules/resolve/lib/homedir.js +24 -0
  967. package/node_modules/resolve/lib/is-core.js +5 -0
  968. package/node_modules/resolve/lib/node-modules-paths.js +42 -0
  969. package/node_modules/resolve/lib/normalize-options.js +10 -0
  970. package/node_modules/resolve/lib/sync.js +208 -0
  971. package/node_modules/resolve/package.json +71 -0
  972. package/node_modules/resolve/readme.markdown +301 -0
  973. package/node_modules/resolve/sync.js +3 -0
  974. package/node_modules/resolve/test/core.js +88 -0
  975. package/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  976. package/node_modules/resolve/test/dotdot/index.js +1 -0
  977. package/node_modules/resolve/test/dotdot.js +29 -0
  978. package/node_modules/resolve/test/faulty_basedir.js +29 -0
  979. package/node_modules/resolve/test/filter.js +34 -0
  980. package/node_modules/resolve/test/filter_sync.js +33 -0
  981. package/node_modules/resolve/test/home_paths.js +127 -0
  982. package/node_modules/resolve/test/home_paths_sync.js +114 -0
  983. package/node_modules/resolve/test/mock.js +315 -0
  984. package/node_modules/resolve/test/mock_sync.js +214 -0
  985. package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  986. package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  987. package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  988. package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  989. package/node_modules/resolve/test/module_dir.js +56 -0
  990. package/node_modules/resolve/test/node-modules-paths.js +143 -0
  991. package/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  992. package/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  993. package/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  994. package/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  995. package/node_modules/resolve/test/node_path.js +70 -0
  996. package/node_modules/resolve/test/nonstring.js +9 -0
  997. package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  998. package/node_modules/resolve/test/pathfilter.js +75 -0
  999. package/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  1000. package/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  1001. package/node_modules/resolve/test/precedence/aaa.js +1 -0
  1002. package/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  1003. package/node_modules/resolve/test/precedence/bbb.js +1 -0
  1004. package/node_modules/resolve/test/precedence.js +23 -0
  1005. package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  1006. package/node_modules/resolve/test/resolver/baz/package.json +4 -0
  1007. package/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  1008. package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  1009. package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  1010. package/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  1011. package/node_modules/resolve/test/resolver/cup.coffee +1 -0
  1012. package/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  1013. package/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  1014. package/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  1015. package/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  1016. package/node_modules/resolve/test/resolver/false_main/index.js +0 -0
  1017. package/node_modules/resolve/test/resolver/false_main/package.json +4 -0
  1018. package/node_modules/resolve/test/resolver/foo.js +1 -0
  1019. package/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  1020. package/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  1021. package/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  1022. package/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
  1023. package/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
  1024. package/node_modules/resolve/test/resolver/mug.coffee +0 -0
  1025. package/node_modules/resolve/test/resolver/mug.js +0 -0
  1026. package/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  1027. package/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  1028. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  1029. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  1030. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  1031. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  1032. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
  1033. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
  1034. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
  1035. package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  1036. package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  1037. package/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  1038. package/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  1039. package/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  1040. package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  1041. package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  1042. package/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
  1043. package/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
  1044. package/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  1045. package/node_modules/resolve/test/resolver.js +595 -0
  1046. package/node_modules/resolve/test/resolver_sync.js +726 -0
  1047. package/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  1048. package/node_modules/resolve/test/shadowed_core.js +54 -0
  1049. package/node_modules/resolve/test/subdirs.js +13 -0
  1050. package/node_modules/resolve/test/symlinks.js +176 -0
  1051. package/node_modules/resolve-url/.jshintrc +44 -0
  1052. package/node_modules/resolve-url/LICENSE +21 -0
  1053. package/node_modules/resolve-url/bower.json +15 -0
  1054. package/node_modules/resolve-url/changelog.md +15 -0
  1055. package/node_modules/resolve-url/component.json +15 -0
  1056. package/node_modules/resolve-url/package.json +34 -0
  1057. package/node_modules/resolve-url/readme.md +83 -0
  1058. package/node_modules/resolve-url/resolve-url.js +47 -0
  1059. package/node_modules/resolve-url/test/resolve-url.js +70 -0
  1060. package/node_modules/safe-buffer/LICENSE +21 -0
  1061. package/node_modules/safe-buffer/README.md +584 -0
  1062. package/node_modules/safe-buffer/index.d.ts +187 -0
  1063. package/node_modules/safe-buffer/index.js +62 -0
  1064. package/node_modules/safe-buffer/package.json +37 -0
  1065. package/node_modules/source-map/CHANGELOG.md +301 -0
  1066. package/node_modules/source-map/LICENSE +28 -0
  1067. package/node_modules/source-map/README.md +742 -0
  1068. package/node_modules/source-map/dist/source-map.debug.js +3234 -0
  1069. package/node_modules/source-map/dist/source-map.js +3233 -0
  1070. package/node_modules/source-map/dist/source-map.min.js +2 -0
  1071. package/node_modules/source-map/dist/source-map.min.js.map +1 -0
  1072. package/node_modules/source-map/lib/array-set.js +121 -0
  1073. package/node_modules/source-map/lib/base64-vlq.js +140 -0
  1074. package/node_modules/source-map/lib/base64.js +67 -0
  1075. package/node_modules/source-map/lib/binary-search.js +111 -0
  1076. package/node_modules/source-map/lib/mapping-list.js +79 -0
  1077. package/node_modules/source-map/lib/quick-sort.js +114 -0
  1078. package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  1079. package/node_modules/source-map/lib/source-map-generator.js +425 -0
  1080. package/node_modules/source-map/lib/source-node.js +413 -0
  1081. package/node_modules/source-map/lib/util.js +488 -0
  1082. package/node_modules/source-map/package.json +73 -0
  1083. package/node_modules/source-map/source-map.d.ts +98 -0
  1084. package/node_modules/source-map/source-map.js +8 -0
  1085. package/node_modules/source-map-resolve/LICENSE +22 -0
  1086. package/node_modules/source-map-resolve/changelog.md +108 -0
  1087. package/node_modules/source-map-resolve/lib/decode-uri-component.js +8 -0
  1088. package/node_modules/source-map-resolve/lib/resolve-url.js +9 -0
  1089. package/node_modules/source-map-resolve/lib/source-map-resolve-node.js +342 -0
  1090. package/node_modules/source-map-resolve/package.json +47 -0
  1091. package/node_modules/source-map-resolve/readme.md +231 -0
  1092. package/node_modules/source-map-resolve/source-map-resolve.js +348 -0
  1093. package/node_modules/source-map-url/LICENSE +21 -0
  1094. package/node_modules/source-map-url/changelog.md +57 -0
  1095. package/node_modules/source-map-url/package.json +39 -0
  1096. package/node_modules/source-map-url/readme.md +97 -0
  1097. package/node_modules/source-map-url/source-map-url.js +57 -0
  1098. package/node_modules/spdx-correct/LICENSE +202 -0
  1099. package/node_modules/spdx-correct/README.md +14 -0
  1100. package/node_modules/spdx-correct/index.js +364 -0
  1101. package/node_modules/spdx-correct/package.json +39 -0
  1102. package/node_modules/spdx-exceptions/README.md +36 -0
  1103. package/node_modules/spdx-exceptions/index.json +40 -0
  1104. package/node_modules/spdx-exceptions/package.json +17 -0
  1105. package/node_modules/spdx-expression-parse/AUTHORS +4 -0
  1106. package/node_modules/spdx-expression-parse/LICENSE +22 -0
  1107. package/node_modules/spdx-expression-parse/README.md +91 -0
  1108. package/node_modules/spdx-expression-parse/index.js +8 -0
  1109. package/node_modules/spdx-expression-parse/package.json +39 -0
  1110. package/node_modules/spdx-expression-parse/parse.js +138 -0
  1111. package/node_modules/spdx-expression-parse/scan.js +131 -0
  1112. package/node_modules/spdx-license-ids/README.md +52 -0
  1113. package/node_modules/spdx-license-ids/deprecated.json +27 -0
  1114. package/node_modules/spdx-license-ids/index.json +467 -0
  1115. package/node_modules/spdx-license-ids/package.json +39 -0
  1116. package/node_modules/stream-shift/.travis.yml +6 -0
  1117. package/node_modules/stream-shift/LICENSE +21 -0
  1118. package/node_modules/stream-shift/README.md +25 -0
  1119. package/node_modules/stream-shift/index.js +20 -0
  1120. package/node_modules/stream-shift/package.json +25 -0
  1121. package/node_modules/stream-shift/test.js +48 -0
  1122. package/node_modules/string_decoder/.travis.yml +50 -0
  1123. package/node_modules/string_decoder/LICENSE +48 -0
  1124. package/node_modules/string_decoder/README.md +47 -0
  1125. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  1126. package/node_modules/string_decoder/package.json +31 -0
  1127. package/node_modules/strip-bom-stream/index.js +10 -0
  1128. package/node_modules/strip-bom-stream/license +21 -0
  1129. package/node_modules/strip-bom-stream/node_modules/strip-bom/index.js +17 -0
  1130. package/node_modules/strip-bom-stream/node_modules/strip-bom/license +21 -0
  1131. package/node_modules/strip-bom-stream/node_modules/strip-bom/package.json +42 -0
  1132. package/node_modules/strip-bom-stream/node_modules/strip-bom/readme.md +39 -0
  1133. package/node_modules/strip-bom-stream/package.json +44 -0
  1134. package/node_modules/strip-bom-stream/readme.md +39 -0
  1135. package/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
  1136. package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
  1137. package/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
  1138. package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
  1139. package/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
  1140. package/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
  1141. package/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
  1142. package/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
  1143. package/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
  1144. package/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
  1145. package/node_modules/symbol/LICENSE +373 -0
  1146. package/node_modules/symbol/README.md +19 -0
  1147. package/node_modules/symbol/index.js +55 -0
  1148. package/node_modules/symbol/package.json +20 -0
  1149. package/node_modules/through2-filter/README.md +79 -0
  1150. package/node_modules/through2-filter/index.js +46 -0
  1151. package/node_modules/through2-filter/node_modules/through2/LICENSE.md +9 -0
  1152. package/node_modules/through2-filter/node_modules/through2/README.md +134 -0
  1153. package/node_modules/through2-filter/node_modules/through2/package.json +33 -0
  1154. package/node_modules/through2-filter/node_modules/through2/through2.js +96 -0
  1155. package/node_modules/through2-filter/package.json +48 -0
  1156. package/node_modules/tildify/index.js +9 -0
  1157. package/node_modules/tildify/license +21 -0
  1158. package/node_modules/tildify/package.json +41 -0
  1159. package/node_modules/tildify/readme.md +30 -0
  1160. package/node_modules/to-absolute-glob/LICENSE +21 -0
  1161. package/node_modules/to-absolute-glob/index.js +28 -0
  1162. package/node_modules/to-absolute-glob/package.json +41 -0
  1163. package/node_modules/to-absolute-glob/readme.md +134 -0
  1164. package/node_modules/typedarray/.travis.yml +4 -0
  1165. package/node_modules/typedarray/LICENSE +35 -0
  1166. package/node_modules/typedarray/example/tarray.js +4 -0
  1167. package/node_modules/typedarray/index.js +630 -0
  1168. package/node_modules/typedarray/package.json +55 -0
  1169. package/node_modules/typedarray/readme.markdown +61 -0
  1170. package/node_modules/typedarray/test/server/undef_globals.js +19 -0
  1171. package/node_modules/typedarray/test/tarray.js +10 -0
  1172. package/node_modules/unique-stream/LICENSE +20 -0
  1173. package/node_modules/unique-stream/README.md +134 -0
  1174. package/node_modules/unique-stream/index.js +48 -0
  1175. package/node_modules/unique-stream/node_modules/through2/LICENSE.md +9 -0
  1176. package/node_modules/unique-stream/node_modules/through2/README.md +134 -0
  1177. package/node_modules/unique-stream/node_modules/through2/package.json +33 -0
  1178. package/node_modules/unique-stream/node_modules/through2/through2.js +96 -0
  1179. package/node_modules/unique-stream/node_modules/through2-filter/LICENSE +9 -0
  1180. package/node_modules/unique-stream/node_modules/through2-filter/README.md +79 -0
  1181. package/node_modules/unique-stream/node_modules/through2-filter/index.js +50 -0
  1182. package/node_modules/unique-stream/node_modules/through2-filter/package.json +48 -0
  1183. package/node_modules/unique-stream/package.json +32 -0
  1184. package/node_modules/urix/.jshintrc +42 -0
  1185. package/node_modules/urix/LICENSE +21 -0
  1186. package/node_modules/urix/index.js +17 -0
  1187. package/node_modules/urix/package.json +25 -0
  1188. package/node_modules/urix/readme.md +46 -0
  1189. package/node_modules/urix/test/index.js +43 -0
  1190. package/node_modules/util-deprecate/History.md +16 -0
  1191. package/node_modules/util-deprecate/LICENSE +24 -0
  1192. package/node_modules/util-deprecate/README.md +53 -0
  1193. package/node_modules/util-deprecate/browser.js +67 -0
  1194. package/node_modules/util-deprecate/node.js +6 -0
  1195. package/node_modules/util-deprecate/package.json +27 -0
  1196. package/node_modules/vali-date/index.js +4 -0
  1197. package/node_modules/vali-date/license +21 -0
  1198. package/node_modules/vali-date/package.json +34 -0
  1199. package/node_modules/vali-date/readme.md +44 -0
  1200. package/node_modules/validate-npm-package-license/LICENSE +202 -0
  1201. package/node_modules/validate-npm-package-license/README.md +113 -0
  1202. package/node_modules/validate-npm-package-license/index.js +86 -0
  1203. package/node_modules/validate-npm-package-license/package.json +28 -0
  1204. package/node_modules/vinyl/CHANGELOG.md +163 -0
  1205. package/node_modules/vinyl/LICENSE +20 -0
  1206. package/node_modules/vinyl/README.md +265 -0
  1207. package/node_modules/vinyl/index.js +270 -0
  1208. package/node_modules/vinyl/lib/cloneBuffer.js +7 -0
  1209. package/node_modules/vinyl/lib/inspectStream.js +15 -0
  1210. package/node_modules/vinyl/lib/isBuffer.js +1 -0
  1211. package/node_modules/vinyl/lib/isNull.js +3 -0
  1212. package/node_modules/vinyl/lib/isStream.js +5 -0
  1213. package/node_modules/vinyl/node_modules/clone/.npmignore +4 -0
  1214. package/node_modules/vinyl/node_modules/clone/LICENSE +18 -0
  1215. package/node_modules/vinyl/node_modules/clone/README.md +126 -0
  1216. package/node_modules/vinyl/node_modules/clone/clone.iml +10 -0
  1217. package/node_modules/vinyl/node_modules/clone/clone.js +166 -0
  1218. package/node_modules/vinyl/node_modules/clone/package.json +51 -0
  1219. package/node_modules/vinyl/package.json +44 -0
  1220. package/node_modules/vinyl-fs/CHANGELOG.md +369 -0
  1221. package/node_modules/vinyl-fs/LICENSE +20 -0
  1222. package/node_modules/vinyl-fs/README.md +293 -0
  1223. package/node_modules/vinyl-fs/index.js +7 -0
  1224. package/node_modules/vinyl-fs/lib/dest/index.js +54 -0
  1225. package/node_modules/vinyl-fs/lib/dest/writeContents/index.js +59 -0
  1226. package/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js +26 -0
  1227. package/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js +53 -0
  1228. package/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js +57 -0
  1229. package/node_modules/vinyl-fs/lib/dest/writeContents/writeSymbolicLink.js +20 -0
  1230. package/node_modules/vinyl-fs/lib/fileOperations.js +206 -0
  1231. package/node_modules/vinyl-fs/lib/filterSince.js +16 -0
  1232. package/node_modules/vinyl-fs/lib/prepareWrite.js +69 -0
  1233. package/node_modules/vinyl-fs/lib/sink.js +53 -0
  1234. package/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js +22 -0
  1235. package/node_modules/vinyl-fs/lib/src/getContents/index.js +31 -0
  1236. package/node_modules/vinyl-fs/lib/src/getContents/readDir.js +8 -0
  1237. package/node_modules/vinyl-fs/lib/src/getContents/readSymbolicLink.js +18 -0
  1238. package/node_modules/vinyl-fs/lib/src/getContents/streamFile.js +26 -0
  1239. package/node_modules/vinyl-fs/lib/src/index.js +62 -0
  1240. package/node_modules/vinyl-fs/lib/src/wrapWithVinylFile.js +51 -0
  1241. package/node_modules/vinyl-fs/lib/symlink/index.js +30 -0
  1242. package/node_modules/vinyl-fs/node_modules/merge-stream/LICENSE +21 -0
  1243. package/node_modules/vinyl-fs/node_modules/merge-stream/README.md +55 -0
  1244. package/node_modules/vinyl-fs/node_modules/merge-stream/index.js +41 -0
  1245. package/node_modules/vinyl-fs/node_modules/merge-stream/package.json +21 -0
  1246. package/node_modules/vinyl-fs/node_modules/strip-bom/index.js +17 -0
  1247. package/node_modules/vinyl-fs/node_modules/strip-bom/license +21 -0
  1248. package/node_modules/vinyl-fs/node_modules/strip-bom/package.json +42 -0
  1249. package/node_modules/vinyl-fs/node_modules/strip-bom/readme.md +39 -0
  1250. package/node_modules/vinyl-fs/node_modules/through2/LICENSE.md +9 -0
  1251. package/node_modules/vinyl-fs/node_modules/through2/README.md +134 -0
  1252. package/node_modules/vinyl-fs/node_modules/through2/package.json +33 -0
  1253. package/node_modules/vinyl-fs/node_modules/through2/through2.js +96 -0
  1254. package/node_modules/vinyl-fs/package.json +61 -0
  1255. package/node_modules/window-size/LICENSE +21 -0
  1256. package/node_modules/window-size/README.md +45 -0
  1257. package/node_modules/window-size/cli.js +30 -0
  1258. package/node_modules/window-size/index.js +32 -0
  1259. package/node_modules/window-size/package.json +48 -0
  1260. package/node_modules/wrappy/LICENSE +15 -0
  1261. package/node_modules/wrappy/README.md +36 -0
  1262. package/node_modules/wrappy/package.json +29 -0
  1263. package/node_modules/wrappy/wrappy.js +33 -0
  1264. package/node_modules/xtend/.jshintrc +30 -0
  1265. package/node_modules/xtend/LICENSE +20 -0
  1266. package/node_modules/xtend/README.md +32 -0
  1267. package/node_modules/xtend/immutable.js +19 -0
  1268. package/node_modules/xtend/mutable.js +17 -0
  1269. package/node_modules/xtend/package.json +55 -0
  1270. package/node_modules/xtend/test.js +103 -0
  1271. package/package.json +8 -4
  1272. package/tsconfig.tsbuildinfo +1276 -741
  1273. package/lib/bootstrapper/index.d.ts +0 -57
  1274. package/lib/bootstrapper/index.js +0 -73
  1275. package/lib/tipg-api/runtime/requirements.txt +0 -2
  1276. /package/lib/{bootstrapper/runtime → database/bootstrapper_runtime}/handler.py +0 -0
@@ -0,0 +1,3433 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (factory((global.acorn = global.acorn || {})));
5
+ }(this, (function (exports) { 'use strict';
6
+
7
+ // Reserved word lists for various dialects of the language
8
+
9
+ var reservedWords = {
10
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
11
+ 5: "class enum extends super const export import",
12
+ 6: "enum",
13
+ strict: "implements interface let package private protected public static yield",
14
+ strictBind: "eval arguments"
15
+ }
16
+
17
+ // And the keywords
18
+
19
+ var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
20
+
21
+ var keywords = {
22
+ 5: ecma5AndLessKeywords,
23
+ 6: ecma5AndLessKeywords + " const class extends export import super"
24
+ }
25
+
26
+ // ## Character categories
27
+
28
+ // Big ugly regular expressions that match characters in the
29
+ // whitespace, identifier, and identifier-start categories. These
30
+ // are only applied when a character is found to actually have a
31
+ // code point above 128.
32
+ // Generated by `bin/generate-identifier-regex.js`.
33
+
34
+ var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
35
+ var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
36
+
37
+ var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
38
+ var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]")
39
+
40
+ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null
41
+
42
+ // These are a run-length and offset encoded representation of the
43
+ // >0xffff code points that are a valid part of identifiers. The
44
+ // offset starts at 0x10000, and each pair of numbers represents an
45
+ // offset to the next range, and then a size of the range. They were
46
+ // generated by bin/generate-identifier-regex.js
47
+ var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541]
48
+ var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]
49
+
50
+ // This has a complexity linear to the value of the code. The
51
+ // assumption is that looking up astral identifier characters is
52
+ // rare.
53
+ function isInAstralSet(code, set) {
54
+ var pos = 0x10000
55
+ for (var i = 0; i < set.length; i += 2) {
56
+ pos += set[i]
57
+ if (pos > code) return false
58
+ pos += set[i + 1]
59
+ if (pos >= code) return true
60
+ }
61
+ }
62
+
63
+ // Test whether a given character code starts an identifier.
64
+
65
+ function isIdentifierStart(code, astral) {
66
+ if (code < 65) return code === 36
67
+ if (code < 91) return true
68
+ if (code < 97) return code === 95
69
+ if (code < 123) return true
70
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
71
+ if (astral === false) return false
72
+ return isInAstralSet(code, astralIdentifierStartCodes)
73
+ }
74
+
75
+ // Test whether a given character is part of an identifier.
76
+
77
+ function isIdentifierChar(code, astral) {
78
+ if (code < 48) return code === 36
79
+ if (code < 58) return true
80
+ if (code < 65) return false
81
+ if (code < 91) return true
82
+ if (code < 97) return code === 95
83
+ if (code < 123) return true
84
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
85
+ if (astral === false) return false
86
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
87
+ }
88
+
89
+ // ## Token types
90
+
91
+ // The assignment of fine-grained, information-carrying type objects
92
+ // allows the tokenizer to store the information it has about a
93
+ // token in a way that is very cheap for the parser to look up.
94
+
95
+ // All token type variables start with an underscore, to make them
96
+ // easy to recognize.
97
+
98
+ // The `beforeExpr` property is used to disambiguate between regular
99
+ // expressions and divisions. It is set on all token types that can
100
+ // be followed by an expression (thus, a slash after them would be a
101
+ // regular expression).
102
+ //
103
+ // The `startsExpr` property is used to check if the token ends a
104
+ // `yield` expression. It is set on all token types that either can
105
+ // directly start an expression (like a quotation mark) or can
106
+ // continue an expression (like the body of a string).
107
+ //
108
+ // `isLoop` marks a keyword as starting a loop, which is important
109
+ // to know when parsing a label, in order to allow or disallow
110
+ // continue jumps to that label.
111
+
112
+ var TokenType = function TokenType(label, conf) {
113
+ if ( conf === void 0 ) conf = {};
114
+
115
+ this.label = label
116
+ this.keyword = conf.keyword
117
+ this.beforeExpr = !!conf.beforeExpr
118
+ this.startsExpr = !!conf.startsExpr
119
+ this.isLoop = !!conf.isLoop
120
+ this.isAssign = !!conf.isAssign
121
+ this.prefix = !!conf.prefix
122
+ this.postfix = !!conf.postfix
123
+ this.binop = conf.binop || null
124
+ this.updateContext = null
125
+ };
126
+
127
+ function binop(name, prec) {
128
+ return new TokenType(name, {beforeExpr: true, binop: prec})
129
+ }
130
+ var beforeExpr = {beforeExpr: true};
131
+ var startsExpr = {startsExpr: true};
132
+ // Map keyword names to token types.
133
+
134
+ var keywordTypes = {}
135
+
136
+ // Succinct definitions of keyword token types
137
+ function kw(name, options) {
138
+ if ( options === void 0 ) options = {};
139
+
140
+ options.keyword = name
141
+ return keywordTypes[name] = new TokenType(name, options)
142
+ }
143
+
144
+ var tt = {
145
+ num: new TokenType("num", startsExpr),
146
+ regexp: new TokenType("regexp", startsExpr),
147
+ string: new TokenType("string", startsExpr),
148
+ name: new TokenType("name", startsExpr),
149
+ eof: new TokenType("eof"),
150
+
151
+ // Punctuation token types.
152
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
153
+ bracketR: new TokenType("]"),
154
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
155
+ braceR: new TokenType("}"),
156
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
157
+ parenR: new TokenType(")"),
158
+ comma: new TokenType(",", beforeExpr),
159
+ semi: new TokenType(";", beforeExpr),
160
+ colon: new TokenType(":", beforeExpr),
161
+ dot: new TokenType("."),
162
+ question: new TokenType("?", beforeExpr),
163
+ arrow: new TokenType("=>", beforeExpr),
164
+ template: new TokenType("template"),
165
+ ellipsis: new TokenType("...", beforeExpr),
166
+ backQuote: new TokenType("`", startsExpr),
167
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
168
+
169
+ // Operators. These carry several kinds of properties to help the
170
+ // parser use them properly (the presence of these properties is
171
+ // what categorizes them as operators).
172
+ //
173
+ // `binop`, when present, specifies that this operator is a binary
174
+ // operator, and will refer to its precedence.
175
+ //
176
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
177
+ // unary operator.
178
+ //
179
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
180
+ // binary operators with a very low precedence, that should result
181
+ // in AssignmentExpression nodes.
182
+
183
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
184
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
185
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
186
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
187
+ logicalOR: binop("||", 1),
188
+ logicalAND: binop("&&", 2),
189
+ bitwiseOR: binop("|", 3),
190
+ bitwiseXOR: binop("^", 4),
191
+ bitwiseAND: binop("&", 5),
192
+ equality: binop("==/!=", 6),
193
+ relational: binop("</>", 7),
194
+ bitShift: binop("<</>>", 8),
195
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
196
+ modulo: binop("%", 10),
197
+ star: binop("*", 10),
198
+ slash: binop("/", 10),
199
+ starstar: new TokenType("**", {beforeExpr: true}),
200
+
201
+ // Keyword token types.
202
+ _break: kw("break"),
203
+ _case: kw("case", beforeExpr),
204
+ _catch: kw("catch"),
205
+ _continue: kw("continue"),
206
+ _debugger: kw("debugger"),
207
+ _default: kw("default", beforeExpr),
208
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
209
+ _else: kw("else", beforeExpr),
210
+ _finally: kw("finally"),
211
+ _for: kw("for", {isLoop: true}),
212
+ _function: kw("function", startsExpr),
213
+ _if: kw("if"),
214
+ _return: kw("return", beforeExpr),
215
+ _switch: kw("switch"),
216
+ _throw: kw("throw", beforeExpr),
217
+ _try: kw("try"),
218
+ _var: kw("var"),
219
+ _const: kw("const"),
220
+ _while: kw("while", {isLoop: true}),
221
+ _with: kw("with"),
222
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
223
+ _this: kw("this", startsExpr),
224
+ _super: kw("super", startsExpr),
225
+ _class: kw("class"),
226
+ _extends: kw("extends", beforeExpr),
227
+ _export: kw("export"),
228
+ _import: kw("import"),
229
+ _null: kw("null", startsExpr),
230
+ _true: kw("true", startsExpr),
231
+ _false: kw("false", startsExpr),
232
+ _in: kw("in", {beforeExpr: true, binop: 7}),
233
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
234
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
235
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
236
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
237
+ }
238
+
239
+ // Matches a whole line break (where CRLF is considered a single
240
+ // line break). Used to count lines.
241
+
242
+ var lineBreak = /\r\n?|\n|\u2028|\u2029/
243
+ var lineBreakG = new RegExp(lineBreak.source, "g")
244
+
245
+ function isNewLine(code) {
246
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
247
+ }
248
+
249
+ var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
250
+
251
+ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
252
+
253
+ function isArray(obj) {
254
+ return Object.prototype.toString.call(obj) === "[object Array]"
255
+ }
256
+
257
+ // Checks if an object has a property.
258
+
259
+ function has(obj, propName) {
260
+ return Object.prototype.hasOwnProperty.call(obj, propName)
261
+ }
262
+
263
+ // These are used when `options.locations` is on, for the
264
+ // `startLoc` and `endLoc` properties.
265
+
266
+ var Position = function Position(line, col) {
267
+ this.line = line
268
+ this.column = col
269
+ };
270
+
271
+ Position.prototype.offset = function offset (n) {
272
+ return new Position(this.line, this.column + n)
273
+ };
274
+
275
+ var SourceLocation = function SourceLocation(p, start, end) {
276
+ this.start = start
277
+ this.end = end
278
+ if (p.sourceFile !== null) this.source = p.sourceFile
279
+ };
280
+
281
+ // The `getLineInfo` function is mostly useful when the
282
+ // `locations` option is off (for performance reasons) and you
283
+ // want to find the line/column position for a given character
284
+ // offset. `input` should be the code string that the offset refers
285
+ // into.
286
+
287
+ function getLineInfo(input, offset) {
288
+ for (var line = 1, cur = 0;;) {
289
+ lineBreakG.lastIndex = cur
290
+ var match = lineBreakG.exec(input)
291
+ if (match && match.index < offset) {
292
+ ++line
293
+ cur = match.index + match[0].length
294
+ } else {
295
+ return new Position(line, offset - cur)
296
+ }
297
+ }
298
+ }
299
+
300
+ // A second optional argument can be given to further configure
301
+ // the parser process. These options are recognized:
302
+
303
+ var defaultOptions = {
304
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
305
+ // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
306
+ // for strict mode, the set of reserved words, and support for
307
+ // new syntax features. The default is 7.
308
+ ecmaVersion: 7,
309
+ // `sourceType` indicates the mode the code should be parsed in.
310
+ // Can be either `"script"` or `"module"`. This influences global
311
+ // strict mode and parsing of `import` and `export` declarations.
312
+ sourceType: "script",
313
+ // `onInsertedSemicolon` can be a callback that will be called
314
+ // when a semicolon is automatically inserted. It will be passed
315
+ // th position of the comma as an offset, and if `locations` is
316
+ // enabled, it is given the location as a `{line, column}` object
317
+ // as second argument.
318
+ onInsertedSemicolon: null,
319
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
320
+ // trailing commas.
321
+ onTrailingComma: null,
322
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
323
+ // Set `allowReserved` to a boolean value to explicitly turn this on
324
+ // an off. When this option has the value "never", reserved words
325
+ // and keywords can also not be used as property names.
326
+ allowReserved: null,
327
+ // When enabled, a return at the top level is not considered an
328
+ // error.
329
+ allowReturnOutsideFunction: false,
330
+ // When enabled, import/export statements are not constrained to
331
+ // appearing at the top of the program.
332
+ allowImportExportEverywhere: false,
333
+ // When enabled, hashbang directive in the beginning of file
334
+ // is allowed and treated as a line comment.
335
+ allowHashBang: false,
336
+ // When `locations` is on, `loc` properties holding objects with
337
+ // `start` and `end` properties in `{line, column}` form (with
338
+ // line being 1-based and column 0-based) will be attached to the
339
+ // nodes.
340
+ locations: false,
341
+ // A function can be passed as `onToken` option, which will
342
+ // cause Acorn to call that function with object in the same
343
+ // format as tokens returned from `tokenizer().getToken()`. Note
344
+ // that you are not allowed to call the parser from the
345
+ // callback—that will corrupt its internal state.
346
+ onToken: null,
347
+ // A function can be passed as `onComment` option, which will
348
+ // cause Acorn to call that function with `(block, text, start,
349
+ // end)` parameters whenever a comment is skipped. `block` is a
350
+ // boolean indicating whether this is a block (`/* */`) comment,
351
+ // `text` is the content of the comment, and `start` and `end` are
352
+ // character offsets that denote the start and end of the comment.
353
+ // When the `locations` option is on, two more parameters are
354
+ // passed, the full `{line, column}` locations of the start and
355
+ // end of the comments. Note that you are not allowed to call the
356
+ // parser from the callback—that will corrupt its internal state.
357
+ onComment: null,
358
+ // Nodes have their start and end characters offsets recorded in
359
+ // `start` and `end` properties (directly on the node, rather than
360
+ // the `loc` object, which holds line/column data. To also add a
361
+ // [semi-standardized][range] `range` property holding a `[start,
362
+ // end]` array with the same numbers, set the `ranges` option to
363
+ // `true`.
364
+ //
365
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
366
+ ranges: false,
367
+ // It is possible to parse multiple files into a single AST by
368
+ // passing the tree produced by parsing the first file as
369
+ // `program` option in subsequent parses. This will add the
370
+ // toplevel forms of the parsed file to the `Program` (top) node
371
+ // of an existing parse tree.
372
+ program: null,
373
+ // When `locations` is on, you can pass this to record the source
374
+ // file in every node's `loc` object.
375
+ sourceFile: null,
376
+ // This value, if given, is stored in every node, whether
377
+ // `locations` is on or off.
378
+ directSourceFile: null,
379
+ // When enabled, parenthesized expressions are represented by
380
+ // (non-standard) ParenthesizedExpression nodes
381
+ preserveParens: false,
382
+ plugins: {}
383
+ }
384
+
385
+ // Interpret and default an options object
386
+
387
+ function getOptions(opts) {
388
+ var options = {}
389
+
390
+ for (var opt in defaultOptions)
391
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
392
+
393
+ if (options.ecmaVersion >= 2015)
394
+ options.ecmaVersion -= 2009
395
+
396
+ if (options.allowReserved == null)
397
+ options.allowReserved = options.ecmaVersion < 5
398
+
399
+ if (isArray(options.onToken)) {
400
+ var tokens = options.onToken
401
+ options.onToken = function (token) { return tokens.push(token); }
402
+ }
403
+ if (isArray(options.onComment))
404
+ options.onComment = pushComment(options, options.onComment)
405
+
406
+ return options
407
+ }
408
+
409
+ function pushComment(options, array) {
410
+ return function (block, text, start, end, startLoc, endLoc) {
411
+ var comment = {
412
+ type: block ? 'Block' : 'Line',
413
+ value: text,
414
+ start: start,
415
+ end: end
416
+ }
417
+ if (options.locations)
418
+ comment.loc = new SourceLocation(this, startLoc, endLoc)
419
+ if (options.ranges)
420
+ comment.range = [start, end]
421
+ array.push(comment)
422
+ }
423
+ }
424
+
425
+ // Registered plugins
426
+ var plugins = {}
427
+
428
+ function keywordRegexp(words) {
429
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
430
+ }
431
+
432
+ var Parser = function Parser(options, input, startPos) {
433
+ this.options = options = getOptions(options)
434
+ this.sourceFile = options.sourceFile
435
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
436
+ var reserved = ""
437
+ if (!options.allowReserved) {
438
+ for (var v = options.ecmaVersion;; v--)
439
+ if (reserved = reservedWords[v]) break
440
+ if (options.sourceType == "module") reserved += " await"
441
+ }
442
+ this.reservedWords = keywordRegexp(reserved)
443
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
444
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
445
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind)
446
+ this.input = String(input)
447
+
448
+ // Used to signal to callers of `readWord1` whether the word
449
+ // contained any escape sequences. This is needed because words with
450
+ // escape sequences must not be interpreted as keywords.
451
+ this.containsEsc = false
452
+
453
+ // Load plugins
454
+ this.loadPlugins(options.plugins)
455
+
456
+ // Set up token state
457
+
458
+ // The current position of the tokenizer in the input.
459
+ if (startPos) {
460
+ this.pos = startPos
461
+ this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1
462
+ this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
463
+ } else {
464
+ this.pos = this.lineStart = 0
465
+ this.curLine = 1
466
+ }
467
+
468
+ // Properties of the current token:
469
+ // Its type
470
+ this.type = tt.eof
471
+ // For tokens that include more information than their type, the value
472
+ this.value = null
473
+ // Its start and end offset
474
+ this.start = this.end = this.pos
475
+ // And, if locations are used, the {line, column} object
476
+ // corresponding to those offsets
477
+ this.startLoc = this.endLoc = this.curPosition()
478
+
479
+ // Position information for the previous token
480
+ this.lastTokEndLoc = this.lastTokStartLoc = null
481
+ this.lastTokStart = this.lastTokEnd = this.pos
482
+
483
+ // The context stack is used to superficially track syntactic
484
+ // context to predict whether a regular expression is allowed in a
485
+ // given position.
486
+ this.context = this.initialContext()
487
+ this.exprAllowed = true
488
+
489
+ // Figure out if it's a module code.
490
+ this.inModule = options.sourceType === "module"
491
+ this.strict = this.inModule || this.strictDirective(this.pos)
492
+
493
+ // Used to signify the start of a potential arrow function
494
+ this.potentialArrowAt = -1
495
+
496
+ // Flags to track whether we are in a function, a generator, an async function.
497
+ this.inFunction = this.inGenerator = this.inAsync = false
498
+ // Positions to delayed-check that yield/await does not exist in default parameters.
499
+ this.yieldPos = this.awaitPos = 0
500
+ // Labels in scope.
501
+ this.labels = []
502
+
503
+ // If enabled, skip leading hashbang line.
504
+ if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!')
505
+ this.skipLineComment(2)
506
+ };
507
+
508
+ // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them
509
+ Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) };
510
+ Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) };
511
+
512
+ Parser.prototype.extend = function extend (name, f) {
513
+ this[name] = f(this[name])
514
+ };
515
+
516
+ Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
517
+ var this$1 = this;
518
+
519
+ for (var name in pluginConfigs) {
520
+ var plugin = plugins[name]
521
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
522
+ plugin(this$1, pluginConfigs[name])
523
+ }
524
+ };
525
+
526
+ Parser.prototype.parse = function parse () {
527
+ var node = this.options.program || this.startNode()
528
+ this.nextToken()
529
+ return this.parseTopLevel(node)
530
+ };
531
+
532
+ var pp = Parser.prototype
533
+
534
+ // ## Parser utilities
535
+
536
+ var literal = /^(?:'((?:[^\']|\.)*)'|"((?:[^\"]|\.)*)"|;)/
537
+ pp.strictDirective = function(start) {
538
+ var this$1 = this;
539
+
540
+ for (;;) {
541
+ skipWhiteSpace.lastIndex = start
542
+ start += skipWhiteSpace.exec(this$1.input)[0].length
543
+ var match = literal.exec(this$1.input.slice(start))
544
+ if (!match) return false
545
+ if ((match[1] || match[2]) == "use strict") return true
546
+ start += match[0].length
547
+ }
548
+ }
549
+
550
+ // Predicate that tests whether the next token is of the given
551
+ // type, and if yes, consumes it as a side effect.
552
+
553
+ pp.eat = function(type) {
554
+ if (this.type === type) {
555
+ this.next()
556
+ return true
557
+ } else {
558
+ return false
559
+ }
560
+ }
561
+
562
+ // Tests whether parsed token is a contextual keyword.
563
+
564
+ pp.isContextual = function(name) {
565
+ return this.type === tt.name && this.value === name
566
+ }
567
+
568
+ // Consumes contextual keyword if possible.
569
+
570
+ pp.eatContextual = function(name) {
571
+ return this.value === name && this.eat(tt.name)
572
+ }
573
+
574
+ // Asserts that following token is given contextual keyword.
575
+
576
+ pp.expectContextual = function(name) {
577
+ if (!this.eatContextual(name)) this.unexpected()
578
+ }
579
+
580
+ // Test whether a semicolon can be inserted at the current position.
581
+
582
+ pp.canInsertSemicolon = function() {
583
+ return this.type === tt.eof ||
584
+ this.type === tt.braceR ||
585
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
586
+ }
587
+
588
+ pp.insertSemicolon = function() {
589
+ if (this.canInsertSemicolon()) {
590
+ if (this.options.onInsertedSemicolon)
591
+ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
592
+ return true
593
+ }
594
+ }
595
+
596
+ // Consume a semicolon, or, failing that, see if we are allowed to
597
+ // pretend that there is a semicolon at this position.
598
+
599
+ pp.semicolon = function() {
600
+ if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
601
+ }
602
+
603
+ pp.afterTrailingComma = function(tokType, notNext) {
604
+ if (this.type == tokType) {
605
+ if (this.options.onTrailingComma)
606
+ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
607
+ if (!notNext)
608
+ this.next()
609
+ return true
610
+ }
611
+ }
612
+
613
+ // Expect a token of a given type. If found, consume it, otherwise,
614
+ // raise an unexpected token error.
615
+
616
+ pp.expect = function(type) {
617
+ this.eat(type) || this.unexpected()
618
+ }
619
+
620
+ // Raise an unexpected token error.
621
+
622
+ pp.unexpected = function(pos) {
623
+ this.raise(pos != null ? pos : this.start, "Unexpected token")
624
+ }
625
+
626
+ var DestructuringErrors = function DestructuringErrors() {
627
+ this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = -1
628
+ };
629
+
630
+ pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
631
+ if (!refDestructuringErrors) return
632
+ if (refDestructuringErrors.trailingComma > -1)
633
+ this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element")
634
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind
635
+ if (parens > -1) this.raiseRecoverable(parens, "Parenthesized pattern")
636
+ }
637
+
638
+ pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
639
+ var pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1
640
+ if (!andThrow) return pos >= 0
641
+ if (pos > -1) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
642
+ }
643
+
644
+ pp.checkYieldAwaitInDefaultParams = function() {
645
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
646
+ this.raise(this.yieldPos, "Yield expression cannot be a default value")
647
+ if (this.awaitPos)
648
+ this.raise(this.awaitPos, "Await expression cannot be a default value")
649
+ }
650
+
651
+ pp.isSimpleAssignTarget = function(expr) {
652
+ if (expr.type === "ParenthesizedExpression")
653
+ return this.isSimpleAssignTarget(expr.expression)
654
+ return expr.type === "Identifier" || expr.type === "MemberExpression"
655
+ }
656
+
657
+ var pp$1 = Parser.prototype
658
+
659
+ // ### Statement parsing
660
+
661
+ // Parse a program. Initializes the parser, reads any number of
662
+ // statements, and wraps them in a Program node. Optionally takes a
663
+ // `program` argument. If present, the statements will be appended
664
+ // to its body instead of creating a new node.
665
+
666
+ pp$1.parseTopLevel = function(node) {
667
+ var this$1 = this;
668
+
669
+ var exports = {}
670
+ if (!node.body) node.body = []
671
+ while (this.type !== tt.eof) {
672
+ var stmt = this$1.parseStatement(true, true, exports)
673
+ node.body.push(stmt)
674
+ }
675
+ this.next()
676
+ if (this.options.ecmaVersion >= 6) {
677
+ node.sourceType = this.options.sourceType
678
+ }
679
+ return this.finishNode(node, "Program")
680
+ }
681
+
682
+ var loopLabel = {kind: "loop"};
683
+ var switchLabel = {kind: "switch"};
684
+ pp$1.isLet = function() {
685
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
686
+ skipWhiteSpace.lastIndex = this.pos
687
+ var skip = skipWhiteSpace.exec(this.input)
688
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
689
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
690
+ if (isIdentifierStart(nextCh, true)) {
691
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
692
+ var ident = this.input.slice(next, pos)
693
+ if (!this.isKeyword(ident)) return true
694
+ }
695
+ return false
696
+ }
697
+
698
+ // check 'async [no LineTerminator here] function'
699
+ // - 'async /*foo*/ function' is OK.
700
+ // - 'async /*\n*/ function' is invalid.
701
+ pp$1.isAsyncFunction = function() {
702
+ if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
703
+ return false
704
+
705
+ skipWhiteSpace.lastIndex = this.pos
706
+ var skip = skipWhiteSpace.exec(this.input)
707
+ var next = this.pos + skip[0].length
708
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
709
+ this.input.slice(next, next + 8) === "function" &&
710
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
711
+ }
712
+
713
+ // Parse a single statement.
714
+ //
715
+ // If expecting a statement and finding a slash operator, parse a
716
+ // regular expression literal. This is to handle cases like
717
+ // `if (foo) /blah/.exec(foo)`, where looking at the previous token
718
+ // does not help.
719
+
720
+ pp$1.parseStatement = function(declaration, topLevel, exports) {
721
+ var starttype = this.type, node = this.startNode(), kind
722
+
723
+ if (this.isLet()) {
724
+ starttype = tt._var
725
+ kind = "let"
726
+ }
727
+
728
+ // Most types of statements are recognized by the keyword they
729
+ // start with. Many are trivial to parse, some require a bit of
730
+ // complexity.
731
+
732
+ switch (starttype) {
733
+ case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
734
+ case tt._debugger: return this.parseDebuggerStatement(node)
735
+ case tt._do: return this.parseDoStatement(node)
736
+ case tt._for: return this.parseForStatement(node)
737
+ case tt._function:
738
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
739
+ return this.parseFunctionStatement(node, false)
740
+ case tt._class:
741
+ if (!declaration) this.unexpected()
742
+ return this.parseClass(node, true)
743
+ case tt._if: return this.parseIfStatement(node)
744
+ case tt._return: return this.parseReturnStatement(node)
745
+ case tt._switch: return this.parseSwitchStatement(node)
746
+ case tt._throw: return this.parseThrowStatement(node)
747
+ case tt._try: return this.parseTryStatement(node)
748
+ case tt._const: case tt._var:
749
+ kind = kind || this.value
750
+ if (!declaration && kind != "var") this.unexpected()
751
+ return this.parseVarStatement(node, kind)
752
+ case tt._while: return this.parseWhileStatement(node)
753
+ case tt._with: return this.parseWithStatement(node)
754
+ case tt.braceL: return this.parseBlock()
755
+ case tt.semi: return this.parseEmptyStatement(node)
756
+ case tt._export:
757
+ case tt._import:
758
+ if (!this.options.allowImportExportEverywhere) {
759
+ if (!topLevel)
760
+ this.raise(this.start, "'import' and 'export' may only appear at the top level")
761
+ if (!this.inModule)
762
+ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
763
+ }
764
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
765
+
766
+ // If the statement does not start with a statement keyword or a
767
+ // brace, it's an ExpressionStatement or LabeledStatement. We
768
+ // simply start parsing an expression, and afterwards, if the
769
+ // next token is a colon and the expression was a simple
770
+ // Identifier node, we switch to interpreting it as a label.
771
+ default:
772
+ if (this.isAsyncFunction() && declaration) {
773
+ this.next()
774
+ return this.parseFunctionStatement(node, true)
775
+ }
776
+
777
+ var maybeName = this.value, expr = this.parseExpression()
778
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
779
+ return this.parseLabeledStatement(node, maybeName, expr)
780
+ else return this.parseExpressionStatement(node, expr)
781
+ }
782
+ }
783
+
784
+ pp$1.parseBreakContinueStatement = function(node, keyword) {
785
+ var this$1 = this;
786
+
787
+ var isBreak = keyword == "break"
788
+ this.next()
789
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
790
+ else if (this.type !== tt.name) this.unexpected()
791
+ else {
792
+ node.label = this.parseIdent()
793
+ this.semicolon()
794
+ }
795
+
796
+ // Verify that there is an actual destination to break or
797
+ // continue to.
798
+ for (var i = 0; i < this.labels.length; ++i) {
799
+ var lab = this$1.labels[i]
800
+ if (node.label == null || lab.name === node.label.name) {
801
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break
802
+ if (node.label && isBreak) break
803
+ }
804
+ }
805
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
806
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
807
+ }
808
+
809
+ pp$1.parseDebuggerStatement = function(node) {
810
+ this.next()
811
+ this.semicolon()
812
+ return this.finishNode(node, "DebuggerStatement")
813
+ }
814
+
815
+ pp$1.parseDoStatement = function(node) {
816
+ this.next()
817
+ this.labels.push(loopLabel)
818
+ node.body = this.parseStatement(false)
819
+ this.labels.pop()
820
+ this.expect(tt._while)
821
+ node.test = this.parseParenExpression()
822
+ if (this.options.ecmaVersion >= 6)
823
+ this.eat(tt.semi)
824
+ else
825
+ this.semicolon()
826
+ return this.finishNode(node, "DoWhileStatement")
827
+ }
828
+
829
+ // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
830
+ // loop is non-trivial. Basically, we have to parse the init `var`
831
+ // statement or expression, disallowing the `in` operator (see
832
+ // the second parameter to `parseExpression`), and then check
833
+ // whether the next token is `in` or `of`. When there is no init
834
+ // part (semicolon immediately after the opening parenthesis), it
835
+ // is a regular `for` loop.
836
+
837
+ pp$1.parseForStatement = function(node) {
838
+ this.next()
839
+ this.labels.push(loopLabel)
840
+ this.expect(tt.parenL)
841
+ if (this.type === tt.semi) return this.parseFor(node, null)
842
+ var isLet = this.isLet()
843
+ if (this.type === tt._var || this.type === tt._const || isLet) {
844
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
845
+ this.next()
846
+ this.parseVar(init$1, true, kind)
847
+ this.finishNode(init$1, "VariableDeclaration")
848
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
849
+ !(kind !== "var" && init$1.declarations[0].init))
850
+ return this.parseForIn(node, init$1)
851
+ return this.parseFor(node, init$1)
852
+ }
853
+ var refDestructuringErrors = new DestructuringErrors
854
+ var init = this.parseExpression(true, refDestructuringErrors)
855
+ if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
856
+ this.toAssignable(init)
857
+ this.checkLVal(init)
858
+ this.checkPatternErrors(refDestructuringErrors, true)
859
+ return this.parseForIn(node, init)
860
+ } else {
861
+ this.checkExpressionErrors(refDestructuringErrors, true)
862
+ }
863
+ return this.parseFor(node, init)
864
+ }
865
+
866
+ pp$1.parseFunctionStatement = function(node, isAsync) {
867
+ this.next()
868
+ return this.parseFunction(node, true, false, isAsync)
869
+ }
870
+
871
+ pp$1.isFunction = function() {
872
+ return this.type === tt._function || this.isAsyncFunction()
873
+ }
874
+
875
+ pp$1.parseIfStatement = function(node) {
876
+ this.next()
877
+ node.test = this.parseParenExpression()
878
+ // allow function declarations in branches, but only in non-strict mode
879
+ node.consequent = this.parseStatement(!this.strict && this.isFunction())
880
+ node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
881
+ return this.finishNode(node, "IfStatement")
882
+ }
883
+
884
+ pp$1.parseReturnStatement = function(node) {
885
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction)
886
+ this.raise(this.start, "'return' outside of function")
887
+ this.next()
888
+
889
+ // In `return` (and `break`/`continue`), the keywords with
890
+ // optional arguments, we eagerly look for a semicolon or the
891
+ // possibility to insert one.
892
+
893
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
894
+ else { node.argument = this.parseExpression(); this.semicolon() }
895
+ return this.finishNode(node, "ReturnStatement")
896
+ }
897
+
898
+ pp$1.parseSwitchStatement = function(node) {
899
+ var this$1 = this;
900
+
901
+ this.next()
902
+ node.discriminant = this.parseParenExpression()
903
+ node.cases = []
904
+ this.expect(tt.braceL)
905
+ this.labels.push(switchLabel)
906
+
907
+ // Statements under must be grouped (by label) in SwitchCase
908
+ // nodes. `cur` is used to keep the node that we are currently
909
+ // adding statements to.
910
+
911
+ for (var cur, sawDefault = false; this.type != tt.braceR;) {
912
+ if (this$1.type === tt._case || this$1.type === tt._default) {
913
+ var isCase = this$1.type === tt._case
914
+ if (cur) this$1.finishNode(cur, "SwitchCase")
915
+ node.cases.push(cur = this$1.startNode())
916
+ cur.consequent = []
917
+ this$1.next()
918
+ if (isCase) {
919
+ cur.test = this$1.parseExpression()
920
+ } else {
921
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
922
+ sawDefault = true
923
+ cur.test = null
924
+ }
925
+ this$1.expect(tt.colon)
926
+ } else {
927
+ if (!cur) this$1.unexpected()
928
+ cur.consequent.push(this$1.parseStatement(true))
929
+ }
930
+ }
931
+ if (cur) this.finishNode(cur, "SwitchCase")
932
+ this.next() // Closing brace
933
+ this.labels.pop()
934
+ return this.finishNode(node, "SwitchStatement")
935
+ }
936
+
937
+ pp$1.parseThrowStatement = function(node) {
938
+ this.next()
939
+ if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
940
+ this.raise(this.lastTokEnd, "Illegal newline after throw")
941
+ node.argument = this.parseExpression()
942
+ this.semicolon()
943
+ return this.finishNode(node, "ThrowStatement")
944
+ }
945
+
946
+ // Reused empty array added for node fields that are always empty.
947
+
948
+ var empty = []
949
+
950
+ pp$1.parseTryStatement = function(node) {
951
+ this.next()
952
+ node.block = this.parseBlock()
953
+ node.handler = null
954
+ if (this.type === tt._catch) {
955
+ var clause = this.startNode()
956
+ this.next()
957
+ this.expect(tt.parenL)
958
+ clause.param = this.parseBindingAtom()
959
+ this.checkLVal(clause.param, true)
960
+ this.expect(tt.parenR)
961
+ clause.body = this.parseBlock()
962
+ node.handler = this.finishNode(clause, "CatchClause")
963
+ }
964
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
965
+ if (!node.handler && !node.finalizer)
966
+ this.raise(node.start, "Missing catch or finally clause")
967
+ return this.finishNode(node, "TryStatement")
968
+ }
969
+
970
+ pp$1.parseVarStatement = function(node, kind) {
971
+ this.next()
972
+ this.parseVar(node, false, kind)
973
+ this.semicolon()
974
+ return this.finishNode(node, "VariableDeclaration")
975
+ }
976
+
977
+ pp$1.parseWhileStatement = function(node) {
978
+ this.next()
979
+ node.test = this.parseParenExpression()
980
+ this.labels.push(loopLabel)
981
+ node.body = this.parseStatement(false)
982
+ this.labels.pop()
983
+ return this.finishNode(node, "WhileStatement")
984
+ }
985
+
986
+ pp$1.parseWithStatement = function(node) {
987
+ if (this.strict) this.raise(this.start, "'with' in strict mode")
988
+ this.next()
989
+ node.object = this.parseParenExpression()
990
+ node.body = this.parseStatement(false)
991
+ return this.finishNode(node, "WithStatement")
992
+ }
993
+
994
+ pp$1.parseEmptyStatement = function(node) {
995
+ this.next()
996
+ return this.finishNode(node, "EmptyStatement")
997
+ }
998
+
999
+ pp$1.parseLabeledStatement = function(node, maybeName, expr) {
1000
+ var this$1 = this;
1001
+
1002
+ for (var i = 0; i < this.labels.length; ++i)
1003
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
1004
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
1005
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
1006
+ var label = this$1.labels[i$1]
1007
+ if (label.statementStart == node.start) {
1008
+ label.statementStart = this$1.start
1009
+ label.kind = kind
1010
+ } else break
1011
+ }
1012
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start})
1013
+ node.body = this.parseStatement(true)
1014
+ if (node.body.type == "ClassDeclaration" ||
1015
+ node.body.type == "VariableDeclaration" && (this.strict || node.body.kind != "var") ||
1016
+ node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator))
1017
+ this.raiseRecoverable(node.body.start, "Invalid labeled declaration")
1018
+ this.labels.pop()
1019
+ node.label = expr
1020
+ return this.finishNode(node, "LabeledStatement")
1021
+ }
1022
+
1023
+ pp$1.parseExpressionStatement = function(node, expr) {
1024
+ node.expression = expr
1025
+ this.semicolon()
1026
+ return this.finishNode(node, "ExpressionStatement")
1027
+ }
1028
+
1029
+ // Parse a semicolon-enclosed block of statements, handling `"use
1030
+ // strict"` declarations when `allowStrict` is true (used for
1031
+ // function bodies).
1032
+
1033
+ pp$1.parseBlock = function() {
1034
+ var this$1 = this;
1035
+
1036
+ var node = this.startNode()
1037
+ node.body = []
1038
+ this.expect(tt.braceL)
1039
+ while (!this.eat(tt.braceR)) {
1040
+ var stmt = this$1.parseStatement(true)
1041
+ node.body.push(stmt)
1042
+ }
1043
+ return this.finishNode(node, "BlockStatement")
1044
+ }
1045
+
1046
+ // Parse a regular `for` loop. The disambiguation code in
1047
+ // `parseStatement` will already have parsed the init statement or
1048
+ // expression.
1049
+
1050
+ pp$1.parseFor = function(node, init) {
1051
+ node.init = init
1052
+ this.expect(tt.semi)
1053
+ node.test = this.type === tt.semi ? null : this.parseExpression()
1054
+ this.expect(tt.semi)
1055
+ node.update = this.type === tt.parenR ? null : this.parseExpression()
1056
+ this.expect(tt.parenR)
1057
+ node.body = this.parseStatement(false)
1058
+ this.labels.pop()
1059
+ return this.finishNode(node, "ForStatement")
1060
+ }
1061
+
1062
+ // Parse a `for`/`in` and `for`/`of` loop, which are almost
1063
+ // same from parser's perspective.
1064
+
1065
+ pp$1.parseForIn = function(node, init) {
1066
+ var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
1067
+ this.next()
1068
+ node.left = init
1069
+ node.right = this.parseExpression()
1070
+ this.expect(tt.parenR)
1071
+ node.body = this.parseStatement(false)
1072
+ this.labels.pop()
1073
+ return this.finishNode(node, type)
1074
+ }
1075
+
1076
+ // Parse a list of variable declarations.
1077
+
1078
+ pp$1.parseVar = function(node, isFor, kind) {
1079
+ var this$1 = this;
1080
+
1081
+ node.declarations = []
1082
+ node.kind = kind
1083
+ for (;;) {
1084
+ var decl = this$1.startNode()
1085
+ this$1.parseVarId(decl)
1086
+ if (this$1.eat(tt.eq)) {
1087
+ decl.init = this$1.parseMaybeAssign(isFor)
1088
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
1089
+ this$1.unexpected()
1090
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
1091
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
1092
+ } else {
1093
+ decl.init = null
1094
+ }
1095
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
1096
+ if (!this$1.eat(tt.comma)) break
1097
+ }
1098
+ return node
1099
+ }
1100
+
1101
+ pp$1.parseVarId = function(decl) {
1102
+ decl.id = this.parseBindingAtom()
1103
+ this.checkLVal(decl.id, true)
1104
+ }
1105
+
1106
+ // Parse a function declaration or literal (depending on the
1107
+ // `isStatement` parameter).
1108
+
1109
+ pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
1110
+ this.initFunction(node)
1111
+ if (this.options.ecmaVersion >= 6 && !isAsync)
1112
+ node.generator = this.eat(tt.star)
1113
+ if (this.options.ecmaVersion >= 8)
1114
+ node.async = !!isAsync
1115
+
1116
+ if (isStatement == null)
1117
+ isStatement = this.type == tt.name
1118
+ if (isStatement)
1119
+ node.id = this.parseIdent()
1120
+
1121
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
1122
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
1123
+ this.inGenerator = node.generator
1124
+ this.inAsync = node.async
1125
+ this.yieldPos = 0
1126
+ this.awaitPos = 0
1127
+ this.inFunction = true
1128
+
1129
+ if (!isStatement && this.type === tt.name)
1130
+ node.id = this.parseIdent()
1131
+ this.parseFunctionParams(node)
1132
+ this.parseFunctionBody(node, allowExpressionBody)
1133
+
1134
+ this.inGenerator = oldInGen
1135
+ this.inAsync = oldInAsync
1136
+ this.yieldPos = oldYieldPos
1137
+ this.awaitPos = oldAwaitPos
1138
+ this.inFunction = oldInFunc
1139
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
1140
+ }
1141
+
1142
+ pp$1.parseFunctionParams = function(node) {
1143
+ this.expect(tt.parenL)
1144
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
1145
+ this.checkYieldAwaitInDefaultParams()
1146
+ }
1147
+
1148
+ // Parse a class declaration or literal (depending on the
1149
+ // `isStatement` parameter).
1150
+
1151
+ pp$1.parseClass = function(node, isStatement) {
1152
+ var this$1 = this;
1153
+
1154
+ this.next()
1155
+ if (isStatement == null) isStatement = this.type === tt.name
1156
+ this.parseClassId(node, isStatement)
1157
+ this.parseClassSuper(node)
1158
+ var classBody = this.startNode()
1159
+ var hadConstructor = false
1160
+ classBody.body = []
1161
+ this.expect(tt.braceL)
1162
+ while (!this.eat(tt.braceR)) {
1163
+ if (this$1.eat(tt.semi)) continue
1164
+ var method = this$1.startNode()
1165
+ var isGenerator = this$1.eat(tt.star)
1166
+ var isAsync = false
1167
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
1168
+ this$1.parsePropertyName(method)
1169
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
1170
+ if (method.static) {
1171
+ if (isGenerator) this$1.unexpected()
1172
+ isGenerator = this$1.eat(tt.star)
1173
+ this$1.parsePropertyName(method)
1174
+ }
1175
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
1176
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== tt.parenL &&
1177
+ !this$1.canInsertSemicolon()) {
1178
+ isAsync = true
1179
+ this$1.parsePropertyName(method)
1180
+ }
1181
+ method.kind = "method"
1182
+ var isGetSet = false
1183
+ if (!method.computed) {
1184
+ var key = method.key;
1185
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
1186
+ isGetSet = true
1187
+ method.kind = key.name
1188
+ key = this$1.parsePropertyName(method)
1189
+ }
1190
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
1191
+ key.type === "Literal" && key.value === "constructor")) {
1192
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
1193
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
1194
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
1195
+ if (isAsync) this$1.raise(key.start, "Constructor can't be an async method")
1196
+ method.kind = "constructor"
1197
+ hadConstructor = true
1198
+ }
1199
+ }
1200
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync)
1201
+ if (isGetSet) {
1202
+ var paramCount = method.kind === "get" ? 0 : 1
1203
+ if (method.value.params.length !== paramCount) {
1204
+ var start = method.value.start
1205
+ if (method.kind === "get")
1206
+ this$1.raiseRecoverable(start, "getter should have no params")
1207
+ else
1208
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
1209
+ } else {
1210
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
1211
+ this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params")
1212
+ }
1213
+ }
1214
+ }
1215
+ node.body = this.finishNode(classBody, "ClassBody")
1216
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
1217
+ }
1218
+
1219
+ pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
1220
+ method.value = this.parseMethod(isGenerator, isAsync)
1221
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
1222
+ }
1223
+
1224
+ pp$1.parseClassId = function(node, isStatement) {
1225
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
1226
+ }
1227
+
1228
+ pp$1.parseClassSuper = function(node) {
1229
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
1230
+ }
1231
+
1232
+ // Parses module export declaration.
1233
+
1234
+ pp$1.parseExport = function(node, exports) {
1235
+ var this$1 = this;
1236
+
1237
+ this.next()
1238
+ // export * from '...'
1239
+ if (this.eat(tt.star)) {
1240
+ this.expectContextual("from")
1241
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1242
+ this.semicolon()
1243
+ return this.finishNode(node, "ExportAllDeclaration")
1244
+ }
1245
+ if (this.eat(tt._default)) { // export default ...
1246
+ this.checkExport(exports, "default", this.lastTokStart)
1247
+ var isAsync
1248
+ if (this.type === tt._function || (isAsync = this.isAsyncFunction())) {
1249
+ var fNode = this.startNode()
1250
+ this.next()
1251
+ if (isAsync) this.next()
1252
+ node.declaration = this.parseFunction(fNode, null, false, isAsync)
1253
+ } else if (this.type === tt._class) {
1254
+ var cNode = this.startNode()
1255
+ node.declaration = this.parseClass(cNode, null)
1256
+ } else {
1257
+ node.declaration = this.parseMaybeAssign()
1258
+ this.semicolon()
1259
+ }
1260
+ return this.finishNode(node, "ExportDefaultDeclaration")
1261
+ }
1262
+ // export var|const|let|function|class ...
1263
+ if (this.shouldParseExportStatement()) {
1264
+ node.declaration = this.parseStatement(true)
1265
+ if (node.declaration.type === "VariableDeclaration")
1266
+ this.checkVariableExport(exports, node.declaration.declarations)
1267
+ else
1268
+ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)
1269
+ node.specifiers = []
1270
+ node.source = null
1271
+ } else { // export { x, y as z } [from '...']
1272
+ node.declaration = null
1273
+ node.specifiers = this.parseExportSpecifiers(exports)
1274
+ if (this.eatContextual("from")) {
1275
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1276
+ } else {
1277
+ // check for keywords used as local names
1278
+ for (var i = 0; i < node.specifiers.length; i++) {
1279
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
1280
+ this$1.unexpected(node.specifiers[i].local.start)
1281
+ }
1282
+ }
1283
+
1284
+ node.source = null
1285
+ }
1286
+ this.semicolon()
1287
+ }
1288
+ return this.finishNode(node, "ExportNamedDeclaration")
1289
+ }
1290
+
1291
+ pp$1.checkExport = function(exports, name, pos) {
1292
+ if (!exports) return
1293
+ if (Object.prototype.hasOwnProperty.call(exports, name))
1294
+ this.raiseRecoverable(pos, "Duplicate export '" + name + "'")
1295
+ exports[name] = true
1296
+ }
1297
+
1298
+ pp$1.checkPatternExport = function(exports, pat) {
1299
+ var this$1 = this;
1300
+
1301
+ var type = pat.type
1302
+ if (type == "Identifier")
1303
+ this.checkExport(exports, pat.name, pat.start)
1304
+ else if (type == "ObjectPattern")
1305
+ for (var i = 0; i < pat.properties.length; ++i)
1306
+ this$1.checkPatternExport(exports, pat.properties[i].value)
1307
+ else if (type == "ArrayPattern")
1308
+ for (var i$1 = 0; i$1 < pat.elements.length; ++i$1) {
1309
+ var elt = pat.elements[i$1]
1310
+ if (elt) this$1.checkPatternExport(exports, elt)
1311
+ }
1312
+ else if (type == "AssignmentPattern")
1313
+ this.checkPatternExport(exports, pat.left)
1314
+ else if (type == "ParenthesizedExpression")
1315
+ this.checkPatternExport(exports, pat.expression)
1316
+ }
1317
+
1318
+ pp$1.checkVariableExport = function(exports, decls) {
1319
+ var this$1 = this;
1320
+
1321
+ if (!exports) return
1322
+ for (var i = 0; i < decls.length; i++)
1323
+ this$1.checkPatternExport(exports, decls[i].id)
1324
+ }
1325
+
1326
+ pp$1.shouldParseExportStatement = function() {
1327
+ return this.type.keyword === "var"
1328
+ || this.type.keyword === "const"
1329
+ || this.type.keyword === "class"
1330
+ || this.type.keyword === "function"
1331
+ || this.isLet()
1332
+ || this.isAsyncFunction()
1333
+ }
1334
+
1335
+ // Parses a comma-separated list of module exports.
1336
+
1337
+ pp$1.parseExportSpecifiers = function(exports) {
1338
+ var this$1 = this;
1339
+
1340
+ var nodes = [], first = true
1341
+ // export { x, y as z } [from '...']
1342
+ this.expect(tt.braceL)
1343
+ while (!this.eat(tt.braceR)) {
1344
+ if (!first) {
1345
+ this$1.expect(tt.comma)
1346
+ if (this$1.afterTrailingComma(tt.braceR)) break
1347
+ } else first = false
1348
+
1349
+ var node = this$1.startNode()
1350
+ node.local = this$1.parseIdent(true)
1351
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
1352
+ this$1.checkExport(exports, node.exported.name, node.exported.start)
1353
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
1354
+ }
1355
+ return nodes
1356
+ }
1357
+
1358
+ // Parses import declaration.
1359
+
1360
+ pp$1.parseImport = function(node) {
1361
+ this.next()
1362
+ // import '...'
1363
+ if (this.type === tt.string) {
1364
+ node.specifiers = empty
1365
+ node.source = this.parseExprAtom()
1366
+ } else {
1367
+ node.specifiers = this.parseImportSpecifiers()
1368
+ this.expectContextual("from")
1369
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1370
+ }
1371
+ this.semicolon()
1372
+ return this.finishNode(node, "ImportDeclaration")
1373
+ }
1374
+
1375
+ // Parses a comma-separated list of module imports.
1376
+
1377
+ pp$1.parseImportSpecifiers = function() {
1378
+ var this$1 = this;
1379
+
1380
+ var nodes = [], first = true
1381
+ if (this.type === tt.name) {
1382
+ // import defaultObj, { x, y as z } from '...'
1383
+ var node = this.startNode()
1384
+ node.local = this.parseIdent()
1385
+ this.checkLVal(node.local, true)
1386
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
1387
+ if (!this.eat(tt.comma)) return nodes
1388
+ }
1389
+ if (this.type === tt.star) {
1390
+ var node$1 = this.startNode()
1391
+ this.next()
1392
+ this.expectContextual("as")
1393
+ node$1.local = this.parseIdent()
1394
+ this.checkLVal(node$1.local, true)
1395
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
1396
+ return nodes
1397
+ }
1398
+ this.expect(tt.braceL)
1399
+ while (!this.eat(tt.braceR)) {
1400
+ if (!first) {
1401
+ this$1.expect(tt.comma)
1402
+ if (this$1.afterTrailingComma(tt.braceR)) break
1403
+ } else first = false
1404
+
1405
+ var node$2 = this$1.startNode()
1406
+ node$2.imported = this$1.parseIdent(true)
1407
+ if (this$1.eatContextual("as")) {
1408
+ node$2.local = this$1.parseIdent()
1409
+ } else {
1410
+ node$2.local = node$2.imported
1411
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
1412
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raiseRecoverable(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
1413
+ }
1414
+ this$1.checkLVal(node$2.local, true)
1415
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
1416
+ }
1417
+ return nodes
1418
+ }
1419
+
1420
+ var pp$2 = Parser.prototype
1421
+
1422
+ // Convert existing expression atom to assignable pattern
1423
+ // if possible.
1424
+
1425
+ pp$2.toAssignable = function(node, isBinding) {
1426
+ var this$1 = this;
1427
+
1428
+ if (this.options.ecmaVersion >= 6 && node) {
1429
+ switch (node.type) {
1430
+ case "Identifier":
1431
+ if (this.inAsync && node.name === "await")
1432
+ this.raise(node.start, "Can not use 'await' as identifier inside an async function")
1433
+ break
1434
+
1435
+ case "ObjectPattern":
1436
+ case "ArrayPattern":
1437
+ break
1438
+
1439
+ case "ObjectExpression":
1440
+ node.type = "ObjectPattern"
1441
+ for (var i = 0; i < node.properties.length; i++) {
1442
+ var prop = node.properties[i]
1443
+ if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
1444
+ this$1.toAssignable(prop.value, isBinding)
1445
+ }
1446
+ break
1447
+
1448
+ case "ArrayExpression":
1449
+ node.type = "ArrayPattern"
1450
+ this.toAssignableList(node.elements, isBinding)
1451
+ break
1452
+
1453
+ case "AssignmentExpression":
1454
+ if (node.operator === "=") {
1455
+ node.type = "AssignmentPattern"
1456
+ delete node.operator
1457
+ this.toAssignable(node.left, isBinding)
1458
+ // falls through to AssignmentPattern
1459
+ } else {
1460
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
1461
+ break
1462
+ }
1463
+
1464
+ case "AssignmentPattern":
1465
+ break
1466
+
1467
+ case "ParenthesizedExpression":
1468
+ node.expression = this.toAssignable(node.expression, isBinding)
1469
+ break
1470
+
1471
+ case "MemberExpression":
1472
+ if (!isBinding) break
1473
+
1474
+ default:
1475
+ this.raise(node.start, "Assigning to rvalue")
1476
+ }
1477
+ }
1478
+ return node
1479
+ }
1480
+
1481
+ // Convert list of expression atoms to binding list.
1482
+
1483
+ pp$2.toAssignableList = function(exprList, isBinding) {
1484
+ var this$1 = this;
1485
+
1486
+ var end = exprList.length
1487
+ if (end) {
1488
+ var last = exprList[end - 1]
1489
+ if (last && last.type == "RestElement") {
1490
+ --end
1491
+ } else if (last && last.type == "SpreadElement") {
1492
+ last.type = "RestElement"
1493
+ var arg = last.argument
1494
+ this.toAssignable(arg, isBinding)
1495
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
1496
+ this.unexpected(arg.start)
1497
+ --end
1498
+ }
1499
+
1500
+ if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
1501
+ this.unexpected(last.argument.start)
1502
+ }
1503
+ for (var i = 0; i < end; i++) {
1504
+ var elt = exprList[i]
1505
+ if (elt) this$1.toAssignable(elt, isBinding)
1506
+ }
1507
+ return exprList
1508
+ }
1509
+
1510
+ // Parses spread element.
1511
+
1512
+ pp$2.parseSpread = function(refDestructuringErrors) {
1513
+ var node = this.startNode()
1514
+ this.next()
1515
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
1516
+ return this.finishNode(node, "SpreadElement")
1517
+ }
1518
+
1519
+ pp$2.parseRest = function(allowNonIdent) {
1520
+ var node = this.startNode()
1521
+ this.next()
1522
+
1523
+ // RestElement inside of a function parameter must be an identifier
1524
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
1525
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
1526
+
1527
+ return this.finishNode(node, "RestElement")
1528
+ }
1529
+
1530
+ // Parses lvalue (assignable) atom.
1531
+
1532
+ pp$2.parseBindingAtom = function() {
1533
+ if (this.options.ecmaVersion < 6) return this.parseIdent()
1534
+ switch (this.type) {
1535
+ case tt.name:
1536
+ return this.parseIdent()
1537
+
1538
+ case tt.bracketL:
1539
+ var node = this.startNode()
1540
+ this.next()
1541
+ node.elements = this.parseBindingList(tt.bracketR, true, true)
1542
+ return this.finishNode(node, "ArrayPattern")
1543
+
1544
+ case tt.braceL:
1545
+ return this.parseObj(true)
1546
+
1547
+ default:
1548
+ this.unexpected()
1549
+ }
1550
+ }
1551
+
1552
+ pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
1553
+ var this$1 = this;
1554
+
1555
+ var elts = [], first = true
1556
+ while (!this.eat(close)) {
1557
+ if (first) first = false
1558
+ else this$1.expect(tt.comma)
1559
+ if (allowEmpty && this$1.type === tt.comma) {
1560
+ elts.push(null)
1561
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
1562
+ break
1563
+ } else if (this$1.type === tt.ellipsis) {
1564
+ var rest = this$1.parseRest(allowNonIdent)
1565
+ this$1.parseBindingListItem(rest)
1566
+ elts.push(rest)
1567
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
1568
+ this$1.expect(close)
1569
+ break
1570
+ } else {
1571
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
1572
+ this$1.parseBindingListItem(elem)
1573
+ elts.push(elem)
1574
+ }
1575
+ }
1576
+ return elts
1577
+ }
1578
+
1579
+ pp$2.parseBindingListItem = function(param) {
1580
+ return param
1581
+ }
1582
+
1583
+ // Parses assignment pattern around given atom if possible.
1584
+
1585
+ pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
1586
+ left = left || this.parseBindingAtom()
1587
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left
1588
+ var node = this.startNodeAt(startPos, startLoc)
1589
+ node.left = left
1590
+ node.right = this.parseMaybeAssign()
1591
+ return this.finishNode(node, "AssignmentPattern")
1592
+ }
1593
+
1594
+ // Verify that a node is an lval — something that can be assigned
1595
+ // to.
1596
+
1597
+ pp$2.checkLVal = function(expr, isBinding, checkClashes) {
1598
+ var this$1 = this;
1599
+
1600
+ switch (expr.type) {
1601
+ case "Identifier":
1602
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
1603
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
1604
+ if (checkClashes) {
1605
+ if (has(checkClashes, expr.name))
1606
+ this.raiseRecoverable(expr.start, "Argument name clash")
1607
+ checkClashes[expr.name] = true
1608
+ }
1609
+ break
1610
+
1611
+ case "MemberExpression":
1612
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
1613
+ break
1614
+
1615
+ case "ObjectPattern":
1616
+ for (var i = 0; i < expr.properties.length; i++)
1617
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
1618
+ break
1619
+
1620
+ case "ArrayPattern":
1621
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
1622
+ var elem = expr.elements[i$1]
1623
+ if (elem) this$1.checkLVal(elem, isBinding, checkClashes)
1624
+ }
1625
+ break
1626
+
1627
+ case "AssignmentPattern":
1628
+ this.checkLVal(expr.left, isBinding, checkClashes)
1629
+ break
1630
+
1631
+ case "RestElement":
1632
+ this.checkLVal(expr.argument, isBinding, checkClashes)
1633
+ break
1634
+
1635
+ case "ParenthesizedExpression":
1636
+ this.checkLVal(expr.expression, isBinding, checkClashes)
1637
+ break
1638
+
1639
+ default:
1640
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
1641
+ }
1642
+ }
1643
+
1644
+ // A recursive descent parser operates by defining functions for all
1645
+ // syntactic elements, and recursively calling those, each function
1646
+ // advancing the input stream and returning an AST node. Precedence
1647
+ // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
1648
+ // instead of `(!x)[1]` is handled by the fact that the parser
1649
+ // function that parses unary prefix operators is called first, and
1650
+ // in turn calls the function that parses `[]` subscripts — that
1651
+ // way, it'll receive the node for `x[1]` already parsed, and wraps
1652
+ // *that* in the unary operator node.
1653
+ //
1654
+ // Acorn uses an [operator precedence parser][opp] to handle binary
1655
+ // operator precedence, because it is much more compact than using
1656
+ // the technique outlined above, which uses different, nesting
1657
+ // functions to specify precedence, for all of the ten binary
1658
+ // precedence levels that JavaScript defines.
1659
+ //
1660
+ // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
1661
+
1662
+ var pp$3 = Parser.prototype
1663
+
1664
+ // Check if property name clashes with already added.
1665
+ // Object/class getters and setters are not allowed to clash —
1666
+ // either with each other or with an init property — and in
1667
+ // strict mode, init properties are also not allowed to be repeated.
1668
+
1669
+ pp$3.checkPropClash = function(prop, propHash) {
1670
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
1671
+ return
1672
+ var key = prop.key;
1673
+ var name
1674
+ switch (key.type) {
1675
+ case "Identifier": name = key.name; break
1676
+ case "Literal": name = String(key.value); break
1677
+ default: return
1678
+ }
1679
+ var kind = prop.kind;
1680
+ if (this.options.ecmaVersion >= 6) {
1681
+ if (name === "__proto__" && kind === "init") {
1682
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
1683
+ propHash.proto = true
1684
+ }
1685
+ return
1686
+ }
1687
+ name = "$" + name
1688
+ var other = propHash[name]
1689
+ if (other) {
1690
+ var isGetSet = kind !== "init"
1691
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
1692
+ this.raiseRecoverable(key.start, "Redefinition of property")
1693
+ } else {
1694
+ other = propHash[name] = {
1695
+ init: false,
1696
+ get: false,
1697
+ set: false
1698
+ }
1699
+ }
1700
+ other[kind] = true
1701
+ }
1702
+
1703
+ // ### Expression parsing
1704
+
1705
+ // These nest, from the most general expression type at the top to
1706
+ // 'atomic', nondivisible expression types at the bottom. Most of
1707
+ // the functions will simply let the function(s) below them parse,
1708
+ // and, *if* the syntactic construct they handle is present, wrap
1709
+ // the AST node that the inner parser gave them in another node.
1710
+
1711
+ // Parse a full expression. The optional arguments are used to
1712
+ // forbid the `in` operator (in for loops initalization expressions)
1713
+ // and provide reference for storing '=' operator inside shorthand
1714
+ // property assignment in contexts where both object expression
1715
+ // and object pattern might appear (so it's possible to raise
1716
+ // delayed syntax error at correct position).
1717
+
1718
+ pp$3.parseExpression = function(noIn, refDestructuringErrors) {
1719
+ var this$1 = this;
1720
+
1721
+ var startPos = this.start, startLoc = this.startLoc
1722
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
1723
+ if (this.type === tt.comma) {
1724
+ var node = this.startNodeAt(startPos, startLoc)
1725
+ node.expressions = [expr]
1726
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
1727
+ return this.finishNode(node, "SequenceExpression")
1728
+ }
1729
+ return expr
1730
+ }
1731
+
1732
+ // Parse an assignment expression. This includes applications of
1733
+ // operators like `+=`.
1734
+
1735
+ pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
1736
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
1737
+
1738
+ var ownDestructuringErrors = false, oldParenAssign = -1
1739
+ if (refDestructuringErrors) {
1740
+ oldParenAssign = refDestructuringErrors.parenthesizedAssign
1741
+ refDestructuringErrors.parenthesizedAssign = -1
1742
+ } else {
1743
+ refDestructuringErrors = new DestructuringErrors
1744
+ ownDestructuringErrors = true
1745
+ }
1746
+
1747
+ var startPos = this.start, startLoc = this.startLoc
1748
+ if (this.type == tt.parenL || this.type == tt.name)
1749
+ this.potentialArrowAt = this.start
1750
+ var left = this.parseMaybeConditional(noIn, refDestructuringErrors)
1751
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
1752
+ if (this.type.isAssign) {
1753
+ this.checkPatternErrors(refDestructuringErrors, true)
1754
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
1755
+ var node = this.startNodeAt(startPos, startLoc)
1756
+ node.operator = this.value
1757
+ node.left = this.type === tt.eq ? this.toAssignable(left) : left
1758
+ refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly
1759
+ this.checkLVal(left)
1760
+ this.next()
1761
+ node.right = this.parseMaybeAssign(noIn)
1762
+ return this.finishNode(node, "AssignmentExpression")
1763
+ } else {
1764
+ if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
1765
+ }
1766
+ if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign
1767
+ return left
1768
+ }
1769
+
1770
+ // Parse a ternary conditional (`?:`) operator.
1771
+
1772
+ pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) {
1773
+ var startPos = this.start, startLoc = this.startLoc
1774
+ var expr = this.parseExprOps(noIn, refDestructuringErrors)
1775
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1776
+ if (this.eat(tt.question)) {
1777
+ var node = this.startNodeAt(startPos, startLoc)
1778
+ node.test = expr
1779
+ node.consequent = this.parseMaybeAssign()
1780
+ this.expect(tt.colon)
1781
+ node.alternate = this.parseMaybeAssign(noIn)
1782
+ return this.finishNode(node, "ConditionalExpression")
1783
+ }
1784
+ return expr
1785
+ }
1786
+
1787
+ // Start the precedence parser.
1788
+
1789
+ pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
1790
+ var startPos = this.start, startLoc = this.startLoc
1791
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
1792
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1793
+ return this.parseExprOp(expr, startPos, startLoc, -1, noIn)
1794
+ }
1795
+
1796
+ // Parse binary operators with the operator precedence parsing
1797
+ // algorithm. `left` is the left-hand side of the operator.
1798
+ // `minPrec` provides context that allows the function to stop and
1799
+ // defer further parser to one of its callers when it encounters an
1800
+ // operator that has a lower precedence than the set it is parsing.
1801
+
1802
+ pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
1803
+ var prec = this.type.binop
1804
+ if (prec != null && (!noIn || this.type !== tt._in)) {
1805
+ if (prec > minPrec) {
1806
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
1807
+ var op = this.value
1808
+ this.next()
1809
+ var startPos = this.start, startLoc = this.startLoc
1810
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
1811
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
1812
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
1813
+ }
1814
+ }
1815
+ return left
1816
+ }
1817
+
1818
+ pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
1819
+ var node = this.startNodeAt(startPos, startLoc)
1820
+ node.left = left
1821
+ node.operator = op
1822
+ node.right = right
1823
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
1824
+ }
1825
+
1826
+ // Parse unary operators, both prefix and postfix.
1827
+
1828
+ pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
1829
+ var this$1 = this;
1830
+
1831
+ var startPos = this.start, startLoc = this.startLoc, expr
1832
+ if (this.inAsync && this.isContextual("await")) {
1833
+ expr = this.parseAwait(refDestructuringErrors)
1834
+ sawUnary = true
1835
+ } else if (this.type.prefix) {
1836
+ var node = this.startNode(), update = this.type === tt.incDec
1837
+ node.operator = this.value
1838
+ node.prefix = true
1839
+ this.next()
1840
+ node.argument = this.parseMaybeUnary(null, true)
1841
+ this.checkExpressionErrors(refDestructuringErrors, true)
1842
+ if (update) this.checkLVal(node.argument)
1843
+ else if (this.strict && node.operator === "delete" &&
1844
+ node.argument.type === "Identifier")
1845
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
1846
+ else sawUnary = true
1847
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
1848
+ } else {
1849
+ expr = this.parseExprSubscripts(refDestructuringErrors)
1850
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1851
+ while (this.type.postfix && !this.canInsertSemicolon()) {
1852
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
1853
+ node$1.operator = this$1.value
1854
+ node$1.prefix = false
1855
+ node$1.argument = expr
1856
+ this$1.checkLVal(expr)
1857
+ this$1.next()
1858
+ expr = this$1.finishNode(node$1, "UpdateExpression")
1859
+ }
1860
+ }
1861
+
1862
+ if (!sawUnary && this.eat(tt.starstar))
1863
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
1864
+ else
1865
+ return expr
1866
+ }
1867
+
1868
+ // Parse call, dot, and `[]`-subscript expressions.
1869
+
1870
+ pp$3.parseExprSubscripts = function(refDestructuringErrors) {
1871
+ var startPos = this.start, startLoc = this.startLoc
1872
+ var expr = this.parseExprAtom(refDestructuringErrors)
1873
+ var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"
1874
+ if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr
1875
+ var result = this.parseSubscripts(expr, startPos, startLoc)
1876
+ if (refDestructuringErrors && result.type === "MemberExpression") {
1877
+ if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1
1878
+ if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1
1879
+ }
1880
+ return result
1881
+ }
1882
+
1883
+ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
1884
+ var this$1 = this;
1885
+
1886
+ var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
1887
+ this.lastTokEnd == base.end && !this.canInsertSemicolon()
1888
+ for (var computed;;) {
1889
+ if ((computed = this$1.eat(tt.bracketL)) || this$1.eat(tt.dot)) {
1890
+ var node = this$1.startNodeAt(startPos, startLoc)
1891
+ node.object = base
1892
+ node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true)
1893
+ node.computed = !!computed
1894
+ if (computed) this$1.expect(tt.bracketR)
1895
+ base = this$1.finishNode(node, "MemberExpression")
1896
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
1897
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos
1898
+ this$1.yieldPos = 0
1899
+ this$1.awaitPos = 0
1900
+ var exprList = this$1.parseExprList(tt.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors)
1901
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(tt.arrow)) {
1902
+ this$1.checkPatternErrors(refDestructuringErrors, false)
1903
+ this$1.checkYieldAwaitInDefaultParams()
1904
+ this$1.yieldPos = oldYieldPos
1905
+ this$1.awaitPos = oldAwaitPos
1906
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
1907
+ }
1908
+ this$1.checkExpressionErrors(refDestructuringErrors, true)
1909
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos
1910
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos
1911
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
1912
+ node$1.callee = base
1913
+ node$1.arguments = exprList
1914
+ base = this$1.finishNode(node$1, "CallExpression")
1915
+ } else if (this$1.type === tt.backQuote) {
1916
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
1917
+ node$2.tag = base
1918
+ node$2.quasi = this$1.parseTemplate()
1919
+ base = this$1.finishNode(node$2, "TaggedTemplateExpression")
1920
+ } else {
1921
+ return base
1922
+ }
1923
+ }
1924
+ }
1925
+
1926
+ // Parse an atomic expression — either a single token that is an
1927
+ // expression, an expression started by a keyword like `function` or
1928
+ // `new`, or an expression wrapped in punctuation like `()`, `[]`,
1929
+ // or `{}`.
1930
+
1931
+ pp$3.parseExprAtom = function(refDestructuringErrors) {
1932
+ var node, canBeArrow = this.potentialArrowAt == this.start
1933
+ switch (this.type) {
1934
+ case tt._super:
1935
+ if (!this.inFunction)
1936
+ this.raise(this.start, "'super' outside of function or class")
1937
+
1938
+ case tt._this:
1939
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
1940
+ node = this.startNode()
1941
+ this.next()
1942
+ return this.finishNode(node, type)
1943
+
1944
+ case tt.name:
1945
+ var startPos = this.start, startLoc = this.startLoc
1946
+ var id = this.parseIdent(this.type !== tt.name)
1947
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function))
1948
+ return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true)
1949
+ if (canBeArrow && !this.canInsertSemicolon()) {
1950
+ if (this.eat(tt.arrow))
1951
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)
1952
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) {
1953
+ id = this.parseIdent()
1954
+ if (this.canInsertSemicolon() || !this.eat(tt.arrow))
1955
+ this.unexpected()
1956
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
1957
+ }
1958
+ }
1959
+ return id
1960
+
1961
+ case tt.regexp:
1962
+ var value = this.value
1963
+ node = this.parseLiteral(value.value)
1964
+ node.regex = {pattern: value.pattern, flags: value.flags}
1965
+ return node
1966
+
1967
+ case tt.num: case tt.string:
1968
+ return this.parseLiteral(this.value)
1969
+
1970
+ case tt._null: case tt._true: case tt._false:
1971
+ node = this.startNode()
1972
+ node.value = this.type === tt._null ? null : this.type === tt._true
1973
+ node.raw = this.type.keyword
1974
+ this.next()
1975
+ return this.finishNode(node, "Literal")
1976
+
1977
+ case tt.parenL:
1978
+ var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow)
1979
+ if (refDestructuringErrors) {
1980
+ if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
1981
+ refDestructuringErrors.parenthesizedAssign = start
1982
+ if (refDestructuringErrors.parenthesizedBind < 0)
1983
+ refDestructuringErrors.parenthesizedBind = start
1984
+ }
1985
+ return expr
1986
+
1987
+ case tt.bracketL:
1988
+ node = this.startNode()
1989
+ this.next()
1990
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
1991
+ return this.finishNode(node, "ArrayExpression")
1992
+
1993
+ case tt.braceL:
1994
+ return this.parseObj(false, refDestructuringErrors)
1995
+
1996
+ case tt._function:
1997
+ node = this.startNode()
1998
+ this.next()
1999
+ return this.parseFunction(node, false)
2000
+
2001
+ case tt._class:
2002
+ return this.parseClass(this.startNode(), false)
2003
+
2004
+ case tt._new:
2005
+ return this.parseNew()
2006
+
2007
+ case tt.backQuote:
2008
+ return this.parseTemplate()
2009
+
2010
+ default:
2011
+ this.unexpected()
2012
+ }
2013
+ }
2014
+
2015
+ pp$3.parseLiteral = function(value) {
2016
+ var node = this.startNode()
2017
+ node.value = value
2018
+ node.raw = this.input.slice(this.start, this.end)
2019
+ this.next()
2020
+ return this.finishNode(node, "Literal")
2021
+ }
2022
+
2023
+ pp$3.parseParenExpression = function() {
2024
+ this.expect(tt.parenL)
2025
+ var val = this.parseExpression()
2026
+ this.expect(tt.parenR)
2027
+ return val
2028
+ }
2029
+
2030
+ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
2031
+ var this$1 = this;
2032
+
2033
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
2034
+ if (this.options.ecmaVersion >= 6) {
2035
+ this.next()
2036
+
2037
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
2038
+ var exprList = [], first = true, lastIsComma = false
2039
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart
2040
+ this.yieldPos = 0
2041
+ this.awaitPos = 0
2042
+ while (this.type !== tt.parenR) {
2043
+ first ? first = false : this$1.expect(tt.comma)
2044
+ if (allowTrailingComma && this$1.afterTrailingComma(tt.parenR, true)) {
2045
+ lastIsComma = true
2046
+ break
2047
+ } else if (this$1.type === tt.ellipsis) {
2048
+ spreadStart = this$1.start
2049
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
2050
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
2051
+ break
2052
+ } else {
2053
+ if (this$1.type === tt.parenL && !innerParenStart) {
2054
+ innerParenStart = this$1.start
2055
+ }
2056
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
2057
+ }
2058
+ }
2059
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
2060
+ this.expect(tt.parenR)
2061
+
2062
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
2063
+ this.checkPatternErrors(refDestructuringErrors, false)
2064
+ this.checkYieldAwaitInDefaultParams()
2065
+ if (innerParenStart) this.unexpected(innerParenStart)
2066
+ this.yieldPos = oldYieldPos
2067
+ this.awaitPos = oldAwaitPos
2068
+ return this.parseParenArrowList(startPos, startLoc, exprList)
2069
+ }
2070
+
2071
+ if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
2072
+ if (spreadStart) this.unexpected(spreadStart)
2073
+ this.checkExpressionErrors(refDestructuringErrors, true)
2074
+ this.yieldPos = oldYieldPos || this.yieldPos
2075
+ this.awaitPos = oldAwaitPos || this.awaitPos
2076
+
2077
+ if (exprList.length > 1) {
2078
+ val = this.startNodeAt(innerStartPos, innerStartLoc)
2079
+ val.expressions = exprList
2080
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
2081
+ } else {
2082
+ val = exprList[0]
2083
+ }
2084
+ } else {
2085
+ val = this.parseParenExpression()
2086
+ }
2087
+
2088
+ if (this.options.preserveParens) {
2089
+ var par = this.startNodeAt(startPos, startLoc)
2090
+ par.expression = val
2091
+ return this.finishNode(par, "ParenthesizedExpression")
2092
+ } else {
2093
+ return val
2094
+ }
2095
+ }
2096
+
2097
+ pp$3.parseParenItem = function(item) {
2098
+ return item
2099
+ }
2100
+
2101
+ pp$3.parseParenArrowList = function(startPos, startLoc, exprList) {
2102
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
2103
+ }
2104
+
2105
+ // New's precedence is slightly tricky. It must allow its argument to
2106
+ // be a `[]` or dot subscript expression, but not a call — at least,
2107
+ // not without wrapping it in parentheses. Thus, it uses the noCalls
2108
+ // argument to parseSubscripts to prevent it from consuming the
2109
+ // argument list.
2110
+
2111
+ var empty$1 = []
2112
+
2113
+ pp$3.parseNew = function() {
2114
+ var node = this.startNode()
2115
+ var meta = this.parseIdent(true)
2116
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
2117
+ node.meta = meta
2118
+ node.property = this.parseIdent(true)
2119
+ if (node.property.name !== "target")
2120
+ this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
2121
+ if (!this.inFunction)
2122
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
2123
+ return this.finishNode(node, "MetaProperty")
2124
+ }
2125
+ var startPos = this.start, startLoc = this.startLoc
2126
+ node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
2127
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
2128
+ else node.arguments = empty$1
2129
+ return this.finishNode(node, "NewExpression")
2130
+ }
2131
+
2132
+ // Parse template expression.
2133
+
2134
+ pp$3.parseTemplateElement = function() {
2135
+ var elem = this.startNode()
2136
+ elem.value = {
2137
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
2138
+ cooked: this.value
2139
+ }
2140
+ this.next()
2141
+ elem.tail = this.type === tt.backQuote
2142
+ return this.finishNode(elem, "TemplateElement")
2143
+ }
2144
+
2145
+ pp$3.parseTemplate = function() {
2146
+ var this$1 = this;
2147
+
2148
+ var node = this.startNode()
2149
+ this.next()
2150
+ node.expressions = []
2151
+ var curElt = this.parseTemplateElement()
2152
+ node.quasis = [curElt]
2153
+ while (!curElt.tail) {
2154
+ this$1.expect(tt.dollarBraceL)
2155
+ node.expressions.push(this$1.parseExpression())
2156
+ this$1.expect(tt.braceR)
2157
+ node.quasis.push(curElt = this$1.parseTemplateElement())
2158
+ }
2159
+ this.next()
2160
+ return this.finishNode(node, "TemplateLiteral")
2161
+ }
2162
+
2163
+ // Parse an object literal or binding pattern.
2164
+
2165
+ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
2166
+ var this$1 = this;
2167
+
2168
+ var node = this.startNode(), first = true, propHash = {}
2169
+ node.properties = []
2170
+ this.next()
2171
+ while (!this.eat(tt.braceR)) {
2172
+ if (!first) {
2173
+ this$1.expect(tt.comma)
2174
+ if (this$1.afterTrailingComma(tt.braceR)) break
2175
+ } else first = false
2176
+
2177
+ var prop = this$1.startNode(), isGenerator, isAsync, startPos, startLoc
2178
+ if (this$1.options.ecmaVersion >= 6) {
2179
+ prop.method = false
2180
+ prop.shorthand = false
2181
+ if (isPattern || refDestructuringErrors) {
2182
+ startPos = this$1.start
2183
+ startLoc = this$1.startLoc
2184
+ }
2185
+ if (!isPattern)
2186
+ isGenerator = this$1.eat(tt.star)
2187
+ }
2188
+ this$1.parsePropertyName(prop)
2189
+ if (!isPattern && this$1.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
2190
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.type !== tt.parenL &&
2191
+ this$1.type !== tt.colon && !this$1.canInsertSemicolon()) {
2192
+ isAsync = true
2193
+ this$1.parsePropertyName(prop, refDestructuringErrors)
2194
+ } else {
2195
+ isAsync = false
2196
+ }
2197
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors)
2198
+ this$1.checkPropClash(prop, propHash)
2199
+ node.properties.push(this$1.finishNode(prop, "Property"))
2200
+ }
2201
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
2202
+ }
2203
+
2204
+ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
2205
+ if ((isGenerator || isAsync) && this.type === tt.colon)
2206
+ this.unexpected()
2207
+
2208
+ if (this.eat(tt.colon)) {
2209
+ prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
2210
+ prop.kind = "init"
2211
+ } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
2212
+ if (isPattern) this.unexpected()
2213
+ prop.kind = "init"
2214
+ prop.method = true
2215
+ prop.value = this.parseMethod(isGenerator, isAsync)
2216
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
2217
+ (prop.key.name === "get" || prop.key.name === "set") &&
2218
+ (this.type != tt.comma && this.type != tt.braceR)) {
2219
+ if (isGenerator || isAsync || isPattern) this.unexpected()
2220
+ prop.kind = prop.key.name
2221
+ this.parsePropertyName(prop)
2222
+ prop.value = this.parseMethod(false)
2223
+ var paramCount = prop.kind === "get" ? 0 : 1
2224
+ if (prop.value.params.length !== paramCount) {
2225
+ var start = prop.value.start
2226
+ if (prop.kind === "get")
2227
+ this.raiseRecoverable(start, "getter should have no params")
2228
+ else
2229
+ this.raiseRecoverable(start, "setter should have exactly one param")
2230
+ } else {
2231
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
2232
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
2233
+ }
2234
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
2235
+ if (this.keywords.test(prop.key.name) ||
2236
+ (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
2237
+ (this.inGenerator && prop.key.name == "yield") ||
2238
+ (this.inAsync && prop.key.name == "await"))
2239
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
2240
+ prop.kind = "init"
2241
+ if (isPattern) {
2242
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
2243
+ } else if (this.type === tt.eq && refDestructuringErrors) {
2244
+ if (refDestructuringErrors.shorthandAssign < 0)
2245
+ refDestructuringErrors.shorthandAssign = this.start
2246
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
2247
+ } else {
2248
+ prop.value = prop.key
2249
+ }
2250
+ prop.shorthand = true
2251
+ } else this.unexpected()
2252
+ }
2253
+
2254
+ pp$3.parsePropertyName = function(prop) {
2255
+ if (this.options.ecmaVersion >= 6) {
2256
+ if (this.eat(tt.bracketL)) {
2257
+ prop.computed = true
2258
+ prop.key = this.parseMaybeAssign()
2259
+ this.expect(tt.bracketR)
2260
+ return prop.key
2261
+ } else {
2262
+ prop.computed = false
2263
+ }
2264
+ }
2265
+ return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)
2266
+ }
2267
+
2268
+ // Initialize empty function node.
2269
+
2270
+ pp$3.initFunction = function(node) {
2271
+ node.id = null
2272
+ if (this.options.ecmaVersion >= 6) {
2273
+ node.generator = false
2274
+ node.expression = false
2275
+ }
2276
+ if (this.options.ecmaVersion >= 8)
2277
+ node.async = false
2278
+ }
2279
+
2280
+ // Parse object or class method.
2281
+
2282
+ pp$3.parseMethod = function(isGenerator, isAsync) {
2283
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync,
2284
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
2285
+
2286
+ this.initFunction(node)
2287
+ if (this.options.ecmaVersion >= 6)
2288
+ node.generator = isGenerator
2289
+ if (this.options.ecmaVersion >= 8)
2290
+ node.async = !!isAsync
2291
+
2292
+ this.inGenerator = node.generator
2293
+ this.inAsync = node.async
2294
+ this.yieldPos = 0
2295
+ this.awaitPos = 0
2296
+ this.inFunction = true
2297
+
2298
+ this.expect(tt.parenL)
2299
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
2300
+ this.checkYieldAwaitInDefaultParams()
2301
+ this.parseFunctionBody(node, false)
2302
+
2303
+ this.inGenerator = oldInGen
2304
+ this.inAsync = oldInAsync
2305
+ this.yieldPos = oldYieldPos
2306
+ this.awaitPos = oldAwaitPos
2307
+ this.inFunction = oldInFunc
2308
+ return this.finishNode(node, "FunctionExpression")
2309
+ }
2310
+
2311
+ // Parse arrow function expression with given parameters.
2312
+
2313
+ pp$3.parseArrowExpression = function(node, params, isAsync) {
2314
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
2315
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
2316
+
2317
+ this.initFunction(node)
2318
+ if (this.options.ecmaVersion >= 8)
2319
+ node.async = !!isAsync
2320
+
2321
+ this.inGenerator = false
2322
+ this.inAsync = node.async
2323
+ this.yieldPos = 0
2324
+ this.awaitPos = 0
2325
+ this.inFunction = true
2326
+
2327
+ node.params = this.toAssignableList(params, true)
2328
+ this.parseFunctionBody(node, true)
2329
+
2330
+ this.inGenerator = oldInGen
2331
+ this.inAsync = oldInAsync
2332
+ this.yieldPos = oldYieldPos
2333
+ this.awaitPos = oldAwaitPos
2334
+ this.inFunction = oldInFunc
2335
+ return this.finishNode(node, "ArrowFunctionExpression")
2336
+ }
2337
+
2338
+ // Parse function body and check parameters.
2339
+
2340
+ pp$3.parseFunctionBody = function(node, isArrowFunction) {
2341
+ var isExpression = isArrowFunction && this.type !== tt.braceL
2342
+ var oldStrict = this.strict, useStrict = false
2343
+
2344
+ if (isExpression) {
2345
+ node.body = this.parseMaybeAssign()
2346
+ node.expression = true
2347
+ } else {
2348
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params)
2349
+ if (!oldStrict || nonSimple) {
2350
+ useStrict = this.strictDirective(this.end)
2351
+ // If this is a strict mode function, verify that argument names
2352
+ // are not repeated, and it does not try to bind the words `eval`
2353
+ // or `arguments`.
2354
+ if (useStrict && nonSimple)
2355
+ this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list")
2356
+ }
2357
+ // Start a new scope with regard to labels and the `inFunction`
2358
+ // flag (restore them to their old value afterwards).
2359
+ var oldLabels = this.labels
2360
+ this.labels = []
2361
+ if (useStrict) this.strict = true
2362
+ node.body = this.parseBlock(true)
2363
+ node.expression = false
2364
+ this.labels = oldLabels
2365
+ }
2366
+
2367
+ if (oldStrict || useStrict) {
2368
+ this.strict = true
2369
+ if (node.id)
2370
+ this.checkLVal(node.id, true)
2371
+ this.checkParams(node)
2372
+ this.strict = oldStrict
2373
+ } else if (isArrowFunction || !this.isSimpleParamList(node.params)) {
2374
+ this.checkParams(node)
2375
+ }
2376
+ }
2377
+
2378
+ pp$3.isSimpleParamList = function(params) {
2379
+ for (var i = 0; i < params.length; i++)
2380
+ if (params[i].type !== "Identifier") return false
2381
+ return true
2382
+ }
2383
+
2384
+ // Checks function params for various disallowed patterns such as using "eval"
2385
+ // or "arguments" and duplicate parameters.
2386
+
2387
+ pp$3.checkParams = function(node) {
2388
+ var this$1 = this;
2389
+
2390
+ var nameHash = {}
2391
+ for (var i = 0; i < node.params.length; i++) this$1.checkLVal(node.params[i], true, nameHash)
2392
+ }
2393
+
2394
+ // Parses a comma-separated list of expressions, and returns them as
2395
+ // an array. `close` is the token type that ends the list, and
2396
+ // `allowEmpty` can be turned on to allow subsequent commas with
2397
+ // nothing in between them to be parsed as `null` (which is needed
2398
+ // for array literals).
2399
+
2400
+ pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
2401
+ var this$1 = this;
2402
+
2403
+ var elts = [], first = true
2404
+ while (!this.eat(close)) {
2405
+ if (!first) {
2406
+ this$1.expect(tt.comma)
2407
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
2408
+ } else first = false
2409
+
2410
+ var elt
2411
+ if (allowEmpty && this$1.type === tt.comma)
2412
+ elt = null
2413
+ else if (this$1.type === tt.ellipsis) {
2414
+ elt = this$1.parseSpread(refDestructuringErrors)
2415
+ if (refDestructuringErrors && this$1.type === tt.comma && refDestructuringErrors.trailingComma < 0)
2416
+ refDestructuringErrors.trailingComma = this$1.start
2417
+ } else {
2418
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
2419
+ }
2420
+ elts.push(elt)
2421
+ }
2422
+ return elts
2423
+ }
2424
+
2425
+ // Parse the next token as an identifier. If `liberal` is true (used
2426
+ // when parsing properties), it will also convert keywords into
2427
+ // identifiers.
2428
+
2429
+ pp$3.parseIdent = function(liberal) {
2430
+ var node = this.startNode()
2431
+ if (liberal && this.options.allowReserved == "never") liberal = false
2432
+ if (this.type === tt.name) {
2433
+ if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) &&
2434
+ (this.options.ecmaVersion >= 6 ||
2435
+ this.input.slice(this.start, this.end).indexOf("\\") == -1))
2436
+ this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
2437
+ if (this.inGenerator && this.value === "yield")
2438
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
2439
+ if (this.inAsync && this.value === "await")
2440
+ this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function")
2441
+ node.name = this.value
2442
+ } else if (liberal && this.type.keyword) {
2443
+ node.name = this.type.keyword
2444
+ } else {
2445
+ this.unexpected()
2446
+ }
2447
+ this.next()
2448
+ return this.finishNode(node, "Identifier")
2449
+ }
2450
+
2451
+ // Parses yield expression inside generator.
2452
+
2453
+ pp$3.parseYield = function() {
2454
+ if (!this.yieldPos) this.yieldPos = this.start
2455
+
2456
+ var node = this.startNode()
2457
+ this.next()
2458
+ if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
2459
+ node.delegate = false
2460
+ node.argument = null
2461
+ } else {
2462
+ node.delegate = this.eat(tt.star)
2463
+ node.argument = this.parseMaybeAssign()
2464
+ }
2465
+ return this.finishNode(node, "YieldExpression")
2466
+ }
2467
+
2468
+ pp$3.parseAwait = function() {
2469
+ if (!this.awaitPos) this.awaitPos = this.start
2470
+
2471
+ var node = this.startNode()
2472
+ this.next()
2473
+ node.argument = this.parseMaybeUnary(null, true)
2474
+ return this.finishNode(node, "AwaitExpression")
2475
+ }
2476
+
2477
+ var pp$4 = Parser.prototype
2478
+
2479
+ // This function is used to raise exceptions on parse errors. It
2480
+ // takes an offset integer (into the current `input`) to indicate
2481
+ // the location of the error, attaches the position to the end
2482
+ // of the error message, and then raises a `SyntaxError` with that
2483
+ // message.
2484
+
2485
+ pp$4.raise = function(pos, message) {
2486
+ var loc = getLineInfo(this.input, pos)
2487
+ message += " (" + loc.line + ":" + loc.column + ")"
2488
+ var err = new SyntaxError(message)
2489
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
2490
+ throw err
2491
+ }
2492
+
2493
+ pp$4.raiseRecoverable = pp$4.raise
2494
+
2495
+ pp$4.curPosition = function() {
2496
+ if (this.options.locations) {
2497
+ return new Position(this.curLine, this.pos - this.lineStart)
2498
+ }
2499
+ }
2500
+
2501
+ var Node = function Node(parser, pos, loc) {
2502
+ this.type = ""
2503
+ this.start = pos
2504
+ this.end = 0
2505
+ if (parser.options.locations)
2506
+ this.loc = new SourceLocation(parser, loc)
2507
+ if (parser.options.directSourceFile)
2508
+ this.sourceFile = parser.options.directSourceFile
2509
+ if (parser.options.ranges)
2510
+ this.range = [pos, 0]
2511
+ };
2512
+
2513
+ // Start an AST node, attaching a start offset.
2514
+
2515
+ var pp$5 = Parser.prototype
2516
+
2517
+ pp$5.startNode = function() {
2518
+ return new Node(this, this.start, this.startLoc)
2519
+ }
2520
+
2521
+ pp$5.startNodeAt = function(pos, loc) {
2522
+ return new Node(this, pos, loc)
2523
+ }
2524
+
2525
+ // Finish an AST node, adding `type` and `end` properties.
2526
+
2527
+ function finishNodeAt(node, type, pos, loc) {
2528
+ node.type = type
2529
+ node.end = pos
2530
+ if (this.options.locations)
2531
+ node.loc.end = loc
2532
+ if (this.options.ranges)
2533
+ node.range[1] = pos
2534
+ return node
2535
+ }
2536
+
2537
+ pp$5.finishNode = function(node, type) {
2538
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
2539
+ }
2540
+
2541
+ // Finish node at given position
2542
+
2543
+ pp$5.finishNodeAt = function(node, type, pos, loc) {
2544
+ return finishNodeAt.call(this, node, type, pos, loc)
2545
+ }
2546
+
2547
+ // The algorithm used to determine whether a regexp can appear at a
2548
+ // given point in the program is loosely based on sweet.js' approach.
2549
+ // See https://github.com/mozilla/sweet.js/wiki/design
2550
+
2551
+ var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
2552
+ this.token = token
2553
+ this.isExpr = !!isExpr
2554
+ this.preserveSpace = !!preserveSpace
2555
+ this.override = override
2556
+ };
2557
+
2558
+ var types = {
2559
+ b_stat: new TokContext("{", false),
2560
+ b_expr: new TokContext("{", true),
2561
+ b_tmpl: new TokContext("${", true),
2562
+ p_stat: new TokContext("(", false),
2563
+ p_expr: new TokContext("(", true),
2564
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }),
2565
+ f_expr: new TokContext("function", true)
2566
+ }
2567
+
2568
+ var pp$6 = Parser.prototype
2569
+
2570
+ pp$6.initialContext = function() {
2571
+ return [types.b_stat]
2572
+ }
2573
+
2574
+ pp$6.braceIsBlock = function(prevType) {
2575
+ if (prevType === tt.colon) {
2576
+ var parent = this.curContext()
2577
+ if (parent === types.b_stat || parent === types.b_expr)
2578
+ return !parent.isExpr
2579
+ }
2580
+ if (prevType === tt._return)
2581
+ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
2582
+ if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR)
2583
+ return true
2584
+ if (prevType == tt.braceL)
2585
+ return this.curContext() === types.b_stat
2586
+ return !this.exprAllowed
2587
+ }
2588
+
2589
+ pp$6.updateContext = function(prevType) {
2590
+ var update, type = this.type
2591
+ if (type.keyword && prevType == tt.dot)
2592
+ this.exprAllowed = false
2593
+ else if (update = type.updateContext)
2594
+ update.call(this, prevType)
2595
+ else
2596
+ this.exprAllowed = type.beforeExpr
2597
+ }
2598
+
2599
+ // Token-specific context update code
2600
+
2601
+ tt.parenR.updateContext = tt.braceR.updateContext = function() {
2602
+ if (this.context.length == 1) {
2603
+ this.exprAllowed = true
2604
+ return
2605
+ }
2606
+ var out = this.context.pop()
2607
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
2608
+ this.context.pop()
2609
+ this.exprAllowed = false
2610
+ } else if (out === types.b_tmpl) {
2611
+ this.exprAllowed = true
2612
+ } else {
2613
+ this.exprAllowed = !out.isExpr
2614
+ }
2615
+ }
2616
+
2617
+ tt.braceL.updateContext = function(prevType) {
2618
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
2619
+ this.exprAllowed = true
2620
+ }
2621
+
2622
+ tt.dollarBraceL.updateContext = function() {
2623
+ this.context.push(types.b_tmpl)
2624
+ this.exprAllowed = true
2625
+ }
2626
+
2627
+ tt.parenL.updateContext = function(prevType) {
2628
+ var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
2629
+ this.context.push(statementParens ? types.p_stat : types.p_expr)
2630
+ this.exprAllowed = true
2631
+ }
2632
+
2633
+ tt.incDec.updateContext = function() {
2634
+ // tokExprAllowed stays unchanged
2635
+ }
2636
+
2637
+ tt._function.updateContext = function(prevType) {
2638
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
2639
+ !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))
2640
+ this.context.push(types.f_expr)
2641
+ this.exprAllowed = false
2642
+ }
2643
+
2644
+ tt.backQuote.updateContext = function() {
2645
+ if (this.curContext() === types.q_tmpl)
2646
+ this.context.pop()
2647
+ else
2648
+ this.context.push(types.q_tmpl)
2649
+ this.exprAllowed = false
2650
+ }
2651
+
2652
+ // Object type used to represent tokens. Note that normally, tokens
2653
+ // simply exist as properties on the parser object. This is only
2654
+ // used for the onToken callback and the external tokenizer.
2655
+
2656
+ var Token = function Token(p) {
2657
+ this.type = p.type
2658
+ this.value = p.value
2659
+ this.start = p.start
2660
+ this.end = p.end
2661
+ if (p.options.locations)
2662
+ this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
2663
+ if (p.options.ranges)
2664
+ this.range = [p.start, p.end]
2665
+ };
2666
+
2667
+ // ## Tokenizer
2668
+
2669
+ var pp$7 = Parser.prototype
2670
+
2671
+ // Are we running under Rhino?
2672
+ var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"
2673
+
2674
+ // Move to the next token
2675
+
2676
+ pp$7.next = function() {
2677
+ if (this.options.onToken)
2678
+ this.options.onToken(new Token(this))
2679
+
2680
+ this.lastTokEnd = this.end
2681
+ this.lastTokStart = this.start
2682
+ this.lastTokEndLoc = this.endLoc
2683
+ this.lastTokStartLoc = this.startLoc
2684
+ this.nextToken()
2685
+ }
2686
+
2687
+ pp$7.getToken = function() {
2688
+ this.next()
2689
+ return new Token(this)
2690
+ }
2691
+
2692
+ // If we're in an ES6 environment, make parsers iterable
2693
+ if (typeof Symbol !== "undefined")
2694
+ pp$7[Symbol.iterator] = function () {
2695
+ var self = this
2696
+ return {next: function () {
2697
+ var token = self.getToken()
2698
+ return {
2699
+ done: token.type === tt.eof,
2700
+ value: token
2701
+ }
2702
+ }}
2703
+ }
2704
+
2705
+ // Toggle strict mode. Re-reads the next number or string to please
2706
+ // pedantic tests (`"use strict"; 010;` should fail).
2707
+
2708
+ pp$7.curContext = function() {
2709
+ return this.context[this.context.length - 1]
2710
+ }
2711
+
2712
+ // Read a single token, updating the parser object's token-related
2713
+ // properties.
2714
+
2715
+ pp$7.nextToken = function() {
2716
+ var curContext = this.curContext()
2717
+ if (!curContext || !curContext.preserveSpace) this.skipSpace()
2718
+
2719
+ this.start = this.pos
2720
+ if (this.options.locations) this.startLoc = this.curPosition()
2721
+ if (this.pos >= this.input.length) return this.finishToken(tt.eof)
2722
+
2723
+ if (curContext.override) return curContext.override(this)
2724
+ else this.readToken(this.fullCharCodeAtPos())
2725
+ }
2726
+
2727
+ pp$7.readToken = function(code) {
2728
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
2729
+ // identifiers, so '\' also dispatches to that.
2730
+ if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
2731
+ return this.readWord()
2732
+
2733
+ return this.getTokenFromCode(code)
2734
+ }
2735
+
2736
+ pp$7.fullCharCodeAtPos = function() {
2737
+ var code = this.input.charCodeAt(this.pos)
2738
+ if (code <= 0xd7ff || code >= 0xe000) return code
2739
+ var next = this.input.charCodeAt(this.pos + 1)
2740
+ return (code << 10) + next - 0x35fdc00
2741
+ }
2742
+
2743
+ pp$7.skipBlockComment = function() {
2744
+ var this$1 = this;
2745
+
2746
+ var startLoc = this.options.onComment && this.curPosition()
2747
+ var start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
2748
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
2749
+ this.pos = end + 2
2750
+ if (this.options.locations) {
2751
+ lineBreakG.lastIndex = start
2752
+ var match
2753
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
2754
+ ++this$1.curLine
2755
+ this$1.lineStart = match.index + match[0].length
2756
+ }
2757
+ }
2758
+ if (this.options.onComment)
2759
+ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
2760
+ startLoc, this.curPosition())
2761
+ }
2762
+
2763
+ pp$7.skipLineComment = function(startSkip) {
2764
+ var this$1 = this;
2765
+
2766
+ var start = this.pos
2767
+ var startLoc = this.options.onComment && this.curPosition()
2768
+ var ch = this.input.charCodeAt(this.pos+=startSkip)
2769
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
2770
+ ++this$1.pos
2771
+ ch = this$1.input.charCodeAt(this$1.pos)
2772
+ }
2773
+ if (this.options.onComment)
2774
+ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
2775
+ startLoc, this.curPosition())
2776
+ }
2777
+
2778
+ // Called at the start of the parse and after every token. Skips
2779
+ // whitespace and comments, and.
2780
+
2781
+ pp$7.skipSpace = function() {
2782
+ var this$1 = this;
2783
+
2784
+ loop: while (this.pos < this.input.length) {
2785
+ var ch = this$1.input.charCodeAt(this$1.pos)
2786
+ switch (ch) {
2787
+ case 32: case 160: // ' '
2788
+ ++this$1.pos
2789
+ break
2790
+ case 13:
2791
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
2792
+ ++this$1.pos
2793
+ }
2794
+ case 10: case 8232: case 8233:
2795
+ ++this$1.pos
2796
+ if (this$1.options.locations) {
2797
+ ++this$1.curLine
2798
+ this$1.lineStart = this$1.pos
2799
+ }
2800
+ break
2801
+ case 47: // '/'
2802
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
2803
+ case 42: // '*'
2804
+ this$1.skipBlockComment()
2805
+ break
2806
+ case 47:
2807
+ this$1.skipLineComment(2)
2808
+ break
2809
+ default:
2810
+ break loop
2811
+ }
2812
+ break
2813
+ default:
2814
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
2815
+ ++this$1.pos
2816
+ } else {
2817
+ break loop
2818
+ }
2819
+ }
2820
+ }
2821
+ }
2822
+
2823
+ // Called at the end of every token. Sets `end`, `val`, and
2824
+ // maintains `context` and `exprAllowed`, and skips the space after
2825
+ // the token, so that the next one's `start` will point at the
2826
+ // right position.
2827
+
2828
+ pp$7.finishToken = function(type, val) {
2829
+ this.end = this.pos
2830
+ if (this.options.locations) this.endLoc = this.curPosition()
2831
+ var prevType = this.type
2832
+ this.type = type
2833
+ this.value = val
2834
+
2835
+ this.updateContext(prevType)
2836
+ }
2837
+
2838
+ // ### Token reading
2839
+
2840
+ // This is the function that is called to fetch the next token. It
2841
+ // is somewhat obscure, because it works in character codes rather
2842
+ // than characters, and because operator parsing has been inlined
2843
+ // into it.
2844
+ //
2845
+ // All in the name of speed.
2846
+ //
2847
+ pp$7.readToken_dot = function() {
2848
+ var next = this.input.charCodeAt(this.pos + 1)
2849
+ if (next >= 48 && next <= 57) return this.readNumber(true)
2850
+ var next2 = this.input.charCodeAt(this.pos + 2)
2851
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
2852
+ this.pos += 3
2853
+ return this.finishToken(tt.ellipsis)
2854
+ } else {
2855
+ ++this.pos
2856
+ return this.finishToken(tt.dot)
2857
+ }
2858
+ }
2859
+
2860
+ pp$7.readToken_slash = function() { // '/'
2861
+ var next = this.input.charCodeAt(this.pos + 1)
2862
+ if (this.exprAllowed) {++this.pos; return this.readRegexp()}
2863
+ if (next === 61) return this.finishOp(tt.assign, 2)
2864
+ return this.finishOp(tt.slash, 1)
2865
+ }
2866
+
2867
+ pp$7.readToken_mult_modulo_exp = function(code) { // '%*'
2868
+ var next = this.input.charCodeAt(this.pos + 1)
2869
+ var size = 1
2870
+ var tokentype = code === 42 ? tt.star : tt.modulo
2871
+
2872
+ // exponentiation operator ** and **=
2873
+ if (this.options.ecmaVersion >= 7 && next === 42) {
2874
+ ++size
2875
+ tokentype = tt.starstar
2876
+ next = this.input.charCodeAt(this.pos + 2)
2877
+ }
2878
+
2879
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
2880
+ return this.finishOp(tokentype, size)
2881
+ }
2882
+
2883
+ pp$7.readToken_pipe_amp = function(code) { // '|&'
2884
+ var next = this.input.charCodeAt(this.pos + 1)
2885
+ if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
2886
+ if (next === 61) return this.finishOp(tt.assign, 2)
2887
+ return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
2888
+ }
2889
+
2890
+ pp$7.readToken_caret = function() { // '^'
2891
+ var next = this.input.charCodeAt(this.pos + 1)
2892
+ if (next === 61) return this.finishOp(tt.assign, 2)
2893
+ return this.finishOp(tt.bitwiseXOR, 1)
2894
+ }
2895
+
2896
+ pp$7.readToken_plus_min = function(code) { // '+-'
2897
+ var next = this.input.charCodeAt(this.pos + 1)
2898
+ if (next === code) {
2899
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
2900
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
2901
+ // A `-->` line comment
2902
+ this.skipLineComment(3)
2903
+ this.skipSpace()
2904
+ return this.nextToken()
2905
+ }
2906
+ return this.finishOp(tt.incDec, 2)
2907
+ }
2908
+ if (next === 61) return this.finishOp(tt.assign, 2)
2909
+ return this.finishOp(tt.plusMin, 1)
2910
+ }
2911
+
2912
+ pp$7.readToken_lt_gt = function(code) { // '<>'
2913
+ var next = this.input.charCodeAt(this.pos + 1)
2914
+ var size = 1
2915
+ if (next === code) {
2916
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
2917
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
2918
+ return this.finishOp(tt.bitShift, size)
2919
+ }
2920
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
2921
+ this.input.charCodeAt(this.pos + 3) == 45) {
2922
+ if (this.inModule) this.unexpected()
2923
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
2924
+ this.skipLineComment(4)
2925
+ this.skipSpace()
2926
+ return this.nextToken()
2927
+ }
2928
+ if (next === 61) size = 2
2929
+ return this.finishOp(tt.relational, size)
2930
+ }
2931
+
2932
+ pp$7.readToken_eq_excl = function(code) { // '=!'
2933
+ var next = this.input.charCodeAt(this.pos + 1)
2934
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
2935
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
2936
+ this.pos += 2
2937
+ return this.finishToken(tt.arrow)
2938
+ }
2939
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
2940
+ }
2941
+
2942
+ pp$7.getTokenFromCode = function(code) {
2943
+ switch (code) {
2944
+ // The interpretation of a dot depends on whether it is followed
2945
+ // by a digit or another two dots.
2946
+ case 46: // '.'
2947
+ return this.readToken_dot()
2948
+
2949
+ // Punctuation tokens.
2950
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
2951
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
2952
+ case 59: ++this.pos; return this.finishToken(tt.semi)
2953
+ case 44: ++this.pos; return this.finishToken(tt.comma)
2954
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
2955
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
2956
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
2957
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
2958
+ case 58: ++this.pos; return this.finishToken(tt.colon)
2959
+ case 63: ++this.pos; return this.finishToken(tt.question)
2960
+
2961
+ case 96: // '`'
2962
+ if (this.options.ecmaVersion < 6) break
2963
+ ++this.pos
2964
+ return this.finishToken(tt.backQuote)
2965
+
2966
+ case 48: // '0'
2967
+ var next = this.input.charCodeAt(this.pos + 1)
2968
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
2969
+ if (this.options.ecmaVersion >= 6) {
2970
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
2971
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
2972
+ }
2973
+ // Anything else beginning with a digit is an integer, octal
2974
+ // number, or float.
2975
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
2976
+ return this.readNumber(false)
2977
+
2978
+ // Quotes produce strings.
2979
+ case 34: case 39: // '"', "'"
2980
+ return this.readString(code)
2981
+
2982
+ // Operators are parsed inline in tiny state machines. '=' (61) is
2983
+ // often referred to. `finishOp` simply skips the amount of
2984
+ // characters it is given as second argument, and returns a token
2985
+ // of the type given by its first argument.
2986
+
2987
+ case 47: // '/'
2988
+ return this.readToken_slash()
2989
+
2990
+ case 37: case 42: // '%*'
2991
+ return this.readToken_mult_modulo_exp(code)
2992
+
2993
+ case 124: case 38: // '|&'
2994
+ return this.readToken_pipe_amp(code)
2995
+
2996
+ case 94: // '^'
2997
+ return this.readToken_caret()
2998
+
2999
+ case 43: case 45: // '+-'
3000
+ return this.readToken_plus_min(code)
3001
+
3002
+ case 60: case 62: // '<>'
3003
+ return this.readToken_lt_gt(code)
3004
+
3005
+ case 61: case 33: // '=!'
3006
+ return this.readToken_eq_excl(code)
3007
+
3008
+ case 126: // '~'
3009
+ return this.finishOp(tt.prefix, 1)
3010
+ }
3011
+
3012
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
3013
+ }
3014
+
3015
+ pp$7.finishOp = function(type, size) {
3016
+ var str = this.input.slice(this.pos, this.pos + size)
3017
+ this.pos += size
3018
+ return this.finishToken(type, str)
3019
+ }
3020
+
3021
+ // Parse a regular expression. Some context-awareness is necessary,
3022
+ // since a '/' inside a '[]' set does not end the expression.
3023
+
3024
+ function tryCreateRegexp(src, flags, throwErrorAt, parser) {
3025
+ try {
3026
+ return new RegExp(src, flags)
3027
+ } catch (e) {
3028
+ if (throwErrorAt !== undefined) {
3029
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
3030
+ throw e
3031
+ }
3032
+ }
3033
+ }
3034
+
3035
+ var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
3036
+
3037
+ pp$7.readRegexp = function() {
3038
+ var this$1 = this;
3039
+
3040
+ var escaped, inClass, start = this.pos
3041
+ for (;;) {
3042
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
3043
+ var ch = this$1.input.charAt(this$1.pos)
3044
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
3045
+ if (!escaped) {
3046
+ if (ch === "[") inClass = true
3047
+ else if (ch === "]" && inClass) inClass = false
3048
+ else if (ch === "/" && !inClass) break
3049
+ escaped = ch === "\\"
3050
+ } else escaped = false
3051
+ ++this$1.pos
3052
+ }
3053
+ var content = this.input.slice(start, this.pos)
3054
+ ++this.pos
3055
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
3056
+ // here (don't ask).
3057
+ var mods = this.readWord1()
3058
+ var tmp = content, tmpFlags = ""
3059
+ if (mods) {
3060
+ var validFlags = /^[gim]*$/
3061
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
3062
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
3063
+ if (mods.indexOf("u") >= 0) {
3064
+ if (regexpUnicodeSupport) {
3065
+ tmpFlags = "u"
3066
+ } else {
3067
+ // Replace each astral symbol and every Unicode escape sequence that
3068
+ // possibly represents an astral symbol or a paired surrogate with a
3069
+ // single ASCII symbol to avoid throwing on regular expressions that
3070
+ // are only valid in combination with the `/u` flag.
3071
+ // Note: replacing with the ASCII symbol `x` might cause false
3072
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
3073
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
3074
+ // be replaced by `[x-b]` which throws an error.
3075
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
3076
+ code = Number("0x" + code)
3077
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
3078
+ return "x"
3079
+ })
3080
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
3081
+ tmpFlags = tmpFlags.replace("u", "")
3082
+ }
3083
+ }
3084
+ }
3085
+ // Detect invalid regular expressions.
3086
+ var value = null
3087
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
3088
+ // so don't do detection if we are running under Rhino
3089
+ if (!isRhino) {
3090
+ tryCreateRegexp(tmp, tmpFlags, start, this)
3091
+ // Get a regular expression object for this pattern-flag pair, or `null` in
3092
+ // case the current environment doesn't support the flags it uses.
3093
+ value = tryCreateRegexp(content, mods)
3094
+ }
3095
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
3096
+ }
3097
+
3098
+ // Read an integer in the given radix. Return null if zero digits
3099
+ // were read, the integer value otherwise. When `len` is given, this
3100
+ // will return `null` unless the integer has exactly `len` digits.
3101
+
3102
+ pp$7.readInt = function(radix, len) {
3103
+ var this$1 = this;
3104
+
3105
+ var start = this.pos, total = 0
3106
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
3107
+ var code = this$1.input.charCodeAt(this$1.pos), val
3108
+ if (code >= 97) val = code - 97 + 10 // a
3109
+ else if (code >= 65) val = code - 65 + 10 // A
3110
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
3111
+ else val = Infinity
3112
+ if (val >= radix) break
3113
+ ++this$1.pos
3114
+ total = total * radix + val
3115
+ }
3116
+ if (this.pos === start || len != null && this.pos - start !== len) return null
3117
+
3118
+ return total
3119
+ }
3120
+
3121
+ pp$7.readRadixNumber = function(radix) {
3122
+ this.pos += 2 // 0x
3123
+ var val = this.readInt(radix)
3124
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
3125
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
3126
+ return this.finishToken(tt.num, val)
3127
+ }
3128
+
3129
+ // Read an integer, octal integer, or floating-point number.
3130
+
3131
+ pp$7.readNumber = function(startsWithDot) {
3132
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
3133
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
3134
+ if (octal && this.pos == start + 1) octal = false
3135
+ var next = this.input.charCodeAt(this.pos)
3136
+ if (next === 46 && !octal) { // '.'
3137
+ ++this.pos
3138
+ this.readInt(10)
3139
+ isFloat = true
3140
+ next = this.input.charCodeAt(this.pos)
3141
+ }
3142
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
3143
+ next = this.input.charCodeAt(++this.pos)
3144
+ if (next === 43 || next === 45) ++this.pos // '+-'
3145
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
3146
+ isFloat = true
3147
+ }
3148
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
3149
+
3150
+ var str = this.input.slice(start, this.pos), val
3151
+ if (isFloat) val = parseFloat(str)
3152
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
3153
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
3154
+ else val = parseInt(str, 8)
3155
+ return this.finishToken(tt.num, val)
3156
+ }
3157
+
3158
+ // Read a string value, interpreting backslash-escapes.
3159
+
3160
+ pp$7.readCodePoint = function() {
3161
+ var ch = this.input.charCodeAt(this.pos), code
3162
+
3163
+ if (ch === 123) {
3164
+ if (this.options.ecmaVersion < 6) this.unexpected()
3165
+ var codePos = ++this.pos
3166
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
3167
+ ++this.pos
3168
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
3169
+ } else {
3170
+ code = this.readHexChar(4)
3171
+ }
3172
+ return code
3173
+ }
3174
+
3175
+ function codePointToString(code) {
3176
+ // UTF-16 Decoding
3177
+ if (code <= 0xFFFF) return String.fromCharCode(code)
3178
+ code -= 0x10000
3179
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
3180
+ }
3181
+
3182
+ pp$7.readString = function(quote) {
3183
+ var this$1 = this;
3184
+
3185
+ var out = "", chunkStart = ++this.pos
3186
+ for (;;) {
3187
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
3188
+ var ch = this$1.input.charCodeAt(this$1.pos)
3189
+ if (ch === quote) break
3190
+ if (ch === 92) { // '\'
3191
+ out += this$1.input.slice(chunkStart, this$1.pos)
3192
+ out += this$1.readEscapedChar(false)
3193
+ chunkStart = this$1.pos
3194
+ } else {
3195
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
3196
+ ++this$1.pos
3197
+ }
3198
+ }
3199
+ out += this.input.slice(chunkStart, this.pos++)
3200
+ return this.finishToken(tt.string, out)
3201
+ }
3202
+
3203
+ // Reads template string tokens.
3204
+
3205
+ pp$7.readTmplToken = function() {
3206
+ var this$1 = this;
3207
+
3208
+ var out = "", chunkStart = this.pos
3209
+ for (;;) {
3210
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
3211
+ var ch = this$1.input.charCodeAt(this$1.pos)
3212
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
3213
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
3214
+ if (ch === 36) {
3215
+ this$1.pos += 2
3216
+ return this$1.finishToken(tt.dollarBraceL)
3217
+ } else {
3218
+ ++this$1.pos
3219
+ return this$1.finishToken(tt.backQuote)
3220
+ }
3221
+ }
3222
+ out += this$1.input.slice(chunkStart, this$1.pos)
3223
+ return this$1.finishToken(tt.template, out)
3224
+ }
3225
+ if (ch === 92) { // '\'
3226
+ out += this$1.input.slice(chunkStart, this$1.pos)
3227
+ out += this$1.readEscapedChar(true)
3228
+ chunkStart = this$1.pos
3229
+ } else if (isNewLine(ch)) {
3230
+ out += this$1.input.slice(chunkStart, this$1.pos)
3231
+ ++this$1.pos
3232
+ switch (ch) {
3233
+ case 13:
3234
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
3235
+ case 10:
3236
+ out += "\n"
3237
+ break
3238
+ default:
3239
+ out += String.fromCharCode(ch)
3240
+ break
3241
+ }
3242
+ if (this$1.options.locations) {
3243
+ ++this$1.curLine
3244
+ this$1.lineStart = this$1.pos
3245
+ }
3246
+ chunkStart = this$1.pos
3247
+ } else {
3248
+ ++this$1.pos
3249
+ }
3250
+ }
3251
+ }
3252
+
3253
+ // Used to read escaped characters
3254
+
3255
+ pp$7.readEscapedChar = function(inTemplate) {
3256
+ var ch = this.input.charCodeAt(++this.pos)
3257
+ ++this.pos
3258
+ switch (ch) {
3259
+ case 110: return "\n" // 'n' -> '\n'
3260
+ case 114: return "\r" // 'r' -> '\r'
3261
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
3262
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
3263
+ case 116: return "\t" // 't' -> '\t'
3264
+ case 98: return "\b" // 'b' -> '\b'
3265
+ case 118: return "\u000b" // 'v' -> '\u000b'
3266
+ case 102: return "\f" // 'f' -> '\f'
3267
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
3268
+ case 10: // ' \n'
3269
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
3270
+ return ""
3271
+ default:
3272
+ if (ch >= 48 && ch <= 55) {
3273
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
3274
+ var octal = parseInt(octalStr, 8)
3275
+ if (octal > 255) {
3276
+ octalStr = octalStr.slice(0, -1)
3277
+ octal = parseInt(octalStr, 8)
3278
+ }
3279
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
3280
+ this.raise(this.pos - 2, "Octal literal in strict mode")
3281
+ }
3282
+ this.pos += octalStr.length - 1
3283
+ return String.fromCharCode(octal)
3284
+ }
3285
+ return String.fromCharCode(ch)
3286
+ }
3287
+ }
3288
+
3289
+ // Used to read character escape sequences ('\x', '\u', '\U').
3290
+
3291
+ pp$7.readHexChar = function(len) {
3292
+ var codePos = this.pos
3293
+ var n = this.readInt(16, len)
3294
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
3295
+ return n
3296
+ }
3297
+
3298
+ // Read an identifier, and return it as a string. Sets `this.containsEsc`
3299
+ // to whether the word contained a '\u' escape.
3300
+ //
3301
+ // Incrementally adds only escaped chars, adding other chunks as-is
3302
+ // as a micro-optimization.
3303
+
3304
+ pp$7.readWord1 = function() {
3305
+ var this$1 = this;
3306
+
3307
+ this.containsEsc = false
3308
+ var word = "", first = true, chunkStart = this.pos
3309
+ var astral = this.options.ecmaVersion >= 6
3310
+ while (this.pos < this.input.length) {
3311
+ var ch = this$1.fullCharCodeAtPos()
3312
+ if (isIdentifierChar(ch, astral)) {
3313
+ this$1.pos += ch <= 0xffff ? 1 : 2
3314
+ } else if (ch === 92) { // "\"
3315
+ this$1.containsEsc = true
3316
+ word += this$1.input.slice(chunkStart, this$1.pos)
3317
+ var escStart = this$1.pos
3318
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
3319
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
3320
+ ++this$1.pos
3321
+ var esc = this$1.readCodePoint()
3322
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
3323
+ this$1.raise(escStart, "Invalid Unicode escape")
3324
+ word += codePointToString(esc)
3325
+ chunkStart = this$1.pos
3326
+ } else {
3327
+ break
3328
+ }
3329
+ first = false
3330
+ }
3331
+ return word + this.input.slice(chunkStart, this.pos)
3332
+ }
3333
+
3334
+ // Read an identifier or keyword token. Will check for reserved
3335
+ // words when necessary.
3336
+
3337
+ pp$7.readWord = function() {
3338
+ var word = this.readWord1()
3339
+ var type = tt.name
3340
+ if (this.keywords.test(word)) {
3341
+ if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword " + word)
3342
+ type = keywordTypes[word]
3343
+ }
3344
+ return this.finishToken(type, word)
3345
+ }
3346
+
3347
+ // Acorn is a tiny, fast JavaScript parser written in JavaScript.
3348
+ //
3349
+ // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
3350
+ // various contributors and released under an MIT license.
3351
+ //
3352
+ // Git repositories for Acorn are available at
3353
+ //
3354
+ // http://marijnhaverbeke.nl/git/acorn
3355
+ // https://github.com/ternjs/acorn.git
3356
+ //
3357
+ // Please use the [github bug tracker][ghbt] to report issues.
3358
+ //
3359
+ // [ghbt]: https://github.com/ternjs/acorn/issues
3360
+ //
3361
+ // This file defines the main parser interface. The library also comes
3362
+ // with a [error-tolerant parser][dammit] and an
3363
+ // [abstract syntax tree walker][walk], defined in other files.
3364
+ //
3365
+ // [dammit]: acorn_loose.js
3366
+ // [walk]: util/walk.js
3367
+
3368
+ var version = "4.0.11"
3369
+
3370
+ // The main exported interface (under `self.acorn` when in the
3371
+ // browser) is a `parse` function that takes a code string and
3372
+ // returns an abstract syntax tree as specified by [Mozilla parser
3373
+ // API][api].
3374
+ //
3375
+ // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
3376
+
3377
+ function parse(input, options) {
3378
+ return new Parser(options, input).parse()
3379
+ }
3380
+
3381
+ // This function tries to parse a single expression at a given
3382
+ // offset in a string. Useful for parsing mixed-language formats
3383
+ // that embed JavaScript expressions.
3384
+
3385
+ function parseExpressionAt(input, pos, options) {
3386
+ var p = new Parser(options, input, pos)
3387
+ p.nextToken()
3388
+ return p.parseExpression()
3389
+ }
3390
+
3391
+ // Acorn is organized as a tokenizer and a recursive-descent parser.
3392
+ // The `tokenizer` export provides an interface to the tokenizer.
3393
+
3394
+ function tokenizer(input, options) {
3395
+ return new Parser(options, input)
3396
+ }
3397
+
3398
+ // This is a terrible kludge to support the existing, pre-ES6
3399
+ // interface where the loose parser module retroactively adds exports
3400
+ // to this module.
3401
+ function addLooseExports(parse, Parser, plugins) {
3402
+ exports.parse_dammit = parse
3403
+ exports.LooseParser = Parser
3404
+ exports.pluginsLoose = plugins
3405
+ }
3406
+
3407
+ exports.version = version;
3408
+ exports.parse = parse;
3409
+ exports.parseExpressionAt = parseExpressionAt;
3410
+ exports.tokenizer = tokenizer;
3411
+ exports.addLooseExports = addLooseExports;
3412
+ exports.Parser = Parser;
3413
+ exports.plugins = plugins;
3414
+ exports.defaultOptions = defaultOptions;
3415
+ exports.Position = Position;
3416
+ exports.SourceLocation = SourceLocation;
3417
+ exports.getLineInfo = getLineInfo;
3418
+ exports.Node = Node;
3419
+ exports.TokenType = TokenType;
3420
+ exports.tokTypes = tt;
3421
+ exports.keywordTypes = keywordTypes;
3422
+ exports.TokContext = TokContext;
3423
+ exports.tokContexts = types;
3424
+ exports.isIdentifierChar = isIdentifierChar;
3425
+ exports.isIdentifierStart = isIdentifierStart;
3426
+ exports.Token = Token;
3427
+ exports.isNewLine = isNewLine;
3428
+ exports.lineBreak = lineBreak;
3429
+ exports.lineBreakG = lineBreakG;
3430
+
3431
+ Object.defineProperty(exports, '__esModule', { value: true });
3432
+
3433
+ })));